Basic software test threshold real-time prediction method and device

By constructing the data set and using the weighted moving average algorithm for model training and testing, the subjectivity problem of testing threshold judgment in basic software testing is solved, real-time prediction of test thresholds and the stability and reliability improvement of on-board operating system testing is achieved.

CN119415424APending Publication Date: 2025-02-11CHINA FAW CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411386404.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the current basic software testing, the determination of the test threshold depends on the subjective judgment of the test engineer, resulting in unstable and unreliable test results, especially in large amounts of data and in-vehicle operating system testing.

Method used

By building and dividing the data set into training and testing sets, model training and testing is performed using a weighted moving average algorithm, predicted test thresholds are output, and the model is continuously optimized through the evaluation and adjustment process.

Benefits of technology

Real-time prediction of test thresholds is realized, reducing the dependence on the subjective experience of test engineers, and improving the stability and reliability of on-board operating system testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415424A_ABST
    Figure CN119415424A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a real-time prediction method and device for a basic software test threshold, and relates to the technical field of automobile software testing, and the method comprises the steps: constructing a data set, and dividing the data set into a training set and a test set; setting algorithm parameters, inputting the training set to the algorithm model for model training, inputting the test set to the trained model for testing, and outputting a predicted test threshold; evaluating and adjusting a test result; predicting the next test threshold value to generate a prediction result; the problem that the threshold value cannot be adjusted in real time in the current basic software test is solved, the dependence of threshold value determination on the subjective experience of a test engineer is weakened, high adaptability is achieved, and the stability and reliability of the vehicle-mounted operating system test are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of automotive software testing, and in particular to a method and device for real-time prediction of basic software testing thresholds. Background Art

[0002] In the rapidly developing automotive industry, the testing of basic software has become a key link to ensure driving safety and user experience. However, there is currently no unified industry testing specification in this field. During the testing process, the test threshold is a key parameter for determining the test results. However, the current setting of the test threshold in the industry only relies on the subjective experience and personal judgment of the test engineer. In the case of a large amount of data, it is very easy to cause instability or even errors in the test results. For mass-produced models, such uncertainty is dangerous. In addition, in the testing of some in-vehicle operating systems, the test threshold is usually floating, which is one of the reasons why this work is highly dependent on human judgment. This fluctuation is usually time-series, so the judgment of the test threshold needs to have a certain degree of real-time performance. However, the current judgment of the test threshold still relies on the subjective judgment of the test engineer, which in turn affects the stability and reliability of the in-vehicle operating system test. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a real-time prediction method and device for basic software test thresholds, so as to solve the problem that the determination of existing test thresholds still relies on the subjective judgment of test engineers, thereby affecting the stability and reliability of vehicle-mounted operating system testing.

[0004] In a first aspect, an embodiment of the present application provides a method for real-time prediction of a basic software test threshold, comprising:

[0005] Build a data set and divide it into a training set and a test set;

[0006] Set algorithm parameters, input the training set to the algorithm model for model training, input the test set to the trained model for testing, and output the predicted test threshold;

[0007] Evaluate and adjust test results;

[0008] Make a prediction for the next test threshold and generate a prediction result.

[0009] In the above implementation process, a data set is constructed and divided into a training set and a test set; algorithm parameters are set, the training set is input into the algorithm model for model training, the test set is input into the trained model for testing, and the predicted test threshold is output; the test results are evaluated and adjusted; the next test threshold is predicted and the prediction result is generated; the problem that the threshold cannot be adjusted in real time in the current basic software testing is solved, the dependence of the threshold determination on the subjective experience of the test engineer is reduced, and it has strong adaptability, which ensures the stability and reliability of the vehicle operating system testing.

[0010] Furthermore, the step of constructing a data set and dividing the data set into a training set and a test set includes:

[0011] Periodically acquire historical test data based on a weighted moving average algorithm to build a data set based on timestamps and test results;

[0012] Perform preliminary cleaning of the data set to identify and remove outliers;

[0013] The cleaned data set is divided into training set and test set according to the set ratio.

[0014] In the above implementation process, a data set is constructed so that the model can be trained and tested based on a training set and a test set. The training set is used to train the algorithm model, and the test set is used to evaluate the model performance.

[0015] Furthermore, the setting of algorithm parameters includes:

[0016] Set key parameters for the weighted moving average algorithm, including moving window value, difference threshold and prediction key value;

[0017] Among them, the moving window value refers to the moving average calculation of the set data each time; the difference threshold refers to the range of deviation between the true value and the predicted value; the prediction key value refers to the test threshold for predicting future time points.

[0018] In the above implementation process, the moving window value is used to smooth the window size of the data; the difference threshold is used to subsequently determine whether the deviation between the predicted result and the actual value is within an acceptable range; the prediction key value is the future time point that the model needs to predict.

[0019] Furthermore, the inputting of the training set into the algorithm model for model training, the inputting of the test set into the trained model for testing, and the outputting of the predicted test threshold value include:

[0020] Input the data of the training set into the weighted moving average algorithm to start the training process;

[0021] Build a prediction model by learning the training set based on the moving average algorithm or other built-in logic;

[0022] Input the data of the test set to test the trained model;

[0023] Each sample in the test set is predicted based on the weighted moving average algorithm to generate a predicted value, which includes the predicted test threshold.

[0024] In the above implementation process, based on the weighted moving average algorithm, the test threshold is calculated and predicted through the model, which can effectively get rid of the uncertainty caused by the subjective judgment of the tester in the test threshold determination work.

[0025] Furthermore, the evaluation and adjustment of the test results include:

[0026] Calculate the difference between the predicted value and the true value of each test sample, and take the absolute value of the difference;

[0027] Determine whether the absolute value is within a preset threshold range;

[0028] If all or a set number of differences meet the requirements, the model is considered to have passed the test;

[0029] If there are many differences that exceed the range, record the abnormal values ​​and return to the step of setting the algorithm parameters. Adjust the algorithm parameters according to the test results and re-train and test until the difference meets the requirements;

[0030] Set a timeout to monitor the training process. If the training time exceeds the requirement, the prediction process will be terminated and an error will be reported.

[0031] In the above implementation process, it is ensured that the test results meet the requirements and there is a problem in obtaining the test threshold.

[0032] Furthermore, the prediction of the next test threshold and generating a prediction result includes:

[0033] Use the trained and validated weighted moving average algorithm to predict the test threshold for the next period;

[0034] Generate prediction results and return them to the tool chain to assist the tool chain in determining the actual test results.

[0035] In the above implementation process, the next test threshold is predicted and a prediction result is generated, thereby improving the test efficiency and test accuracy.

[0036] In a second aspect, an embodiment of the present application provides a basic software test threshold real-time prediction device, comprising:

[0037] A data construction module is used to construct a data set and divide the data set into a training set and a test set;

[0038] The model training module is used to set algorithm parameters, input the training set to the algorithm model for model training, input the test set to the trained model for testing, and output the predicted test threshold;

[0039] Result evaluation module, used to evaluate and adjust the test results;

[0040] The result prediction module is used to predict the next test threshold and generate the prediction result.

[0041] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0042] A processor, a memory and a bus, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the basic software test threshold real-time prediction method as described above.

[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a server, implements the basic software test threshold real-time prediction method as described above.

[0044] In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes instructions, and when the instructions are executed by a computer, the computer implements the basic software test threshold real-time prediction method as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 A flowchart of a method for real-time prediction of a basic software test threshold provided in an embodiment of the present application;

[0047] Figure 2 A schematic diagram of a specific embodiment of a method for real-time prediction of a basic software test threshold provided in an embodiment of the present application;

[0048] Figure 3 It is a structural schematic diagram of a basic software test threshold real-time prediction device provided in an embodiment of the present application;

[0049] Figure 4It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0051] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0052] Please see Figure 1 , Figure 1 A flowchart of a method for real-time prediction of a basic software test threshold provided in an embodiment of the present application. Figure 1 , the basic software test threshold real-time prediction method, including:

[0053] 100. Build a dataset and divide it into a training set and a test set.

[0054] Specifically, historical test data is periodically acquired based on the weighted moving average algorithm to establish a data set based on timestamps and test results; the data set is preliminarily cleaned to identify and remove outliers; the cleaned data set is divided into a training set and a test set according to a set ratio; thereby, a data set is constructed so that the model can be trained and tested based on the training set and the test set, the training set is used to train the algorithm model, and the test set is used to evaluate the model performance.

[0055] Exemplarily, to establish a database, you first need to establish a "timestamp-test result" database. The data comes from historical test data. Since the weighted moving average algorithm is a machine learning algorithm based on time series, it only obtains the correspondence between "time" and "test result"; in this database, a one-to-one correspondence between timestamps and test results is recommended, and when establishing the database, it is necessary to set the interval between two adjacent timestamps, such as setting it to obtain data every five minutes, or every ten minutes, and the time interval must be kept consistent when making predictions later.

[0056] After creating the database, Figure 2As shown in the figure, the machine learning algorithm used in the real-time threshold determination method is weighted moving average, which is a time series-based prediction algorithm used to measure the direction of the trend, which is consistent with the requirements determined in the basic software stability test; the weighted moving average algorithm can filter high-frequency noise and reflect the medium- and long-term low-frequency trend to predict the test threshold for a period of time in the future. In the calculation of the test threshold, each prediction uses the latest set of values ​​(that is, a moving window). For each moving window, the moving average algorithm deletes the oldest value from the set and then puts in the latest calculated average value to keep the calculation result updated.

[0057] 200. Set algorithm parameters, input the training set to the algorithm model for model training, input the test set to the trained model for testing, and output the predicted test threshold.

[0058] On the basis of the above embodiment, the real-time prediction method of the basic software test threshold of the embodiment of the present application can also be embodied as follows: the setting of algorithm parameters includes:

[0059] Set key parameters for the weighted moving average algorithm, which include moving window value, difference threshold and prediction key value; among them, moving window value refers to the moving average calculation processing of the set data each time; difference threshold refers to the range of deviation between the true value and the predicted value; prediction key value refers to the test threshold for predicting future time points.

[0060] It can be understood that the moving window value is used to smooth the window size of the data; the difference threshold is used to subsequently determine whether the deviation between the predicted result and the actual value is within an acceptable range; the prediction key value is the future time point that the model needs to predict.

[0061] For example, after the database is established, it is cleaned to remove the obviously unreasonable occasional outliers, and then the data set is divided into a training set and a test set, with a ratio of approximately 2:1. Then the moving window value, difference, difference threshold and prediction key value are set. Among them, the moving window value refers to how many data are processed by moving average calculation each time; the difference refers to the deviation between the true value and the predicted value; the difference threshold refers to the range of the deviation between the true value and the predicted value; the prediction key value refers to the test threshold value of how long it needs to predict the subsequent time for the final prediction stage.

[0062] On the basis of the above embodiment, the real-time prediction method of the basic software test threshold in the embodiment of the present application can also be concretized as follows: the input training set is input to the algorithm model for model training, the test set is input to the trained model for testing, and the predicted test threshold is output, including:

[0063] 210. Input the data of the training set into the weighted moving average algorithm to start the training process.

[0064] 220. Build a prediction model by learning the training set based on the moving average algorithm or other built-in logic.

[0065] 230. Input the test set data to test the trained model.

[0066] 240. Predict each sample in the test set based on the weighted moving average algorithm to generate a predicted value, which includes a predicted test threshold.

[0067] Based on the weighted moving average algorithm, the model is used to calculate and predict the test threshold, which can effectively get rid of the uncertainty caused by the tester's subjective judgment in the test threshold determination work.

[0068] The purpose of setting the test set is to test whether the trained model can make a relatively accurate prediction of the test threshold. After inputting the test set into the model, set the root mean square error to view the prediction effect:

[0069] rms=np.sqrt(np.mean(np.power((np.array(valid['Close'])-preds),2)))

[0070] print('RMSE value on validation set:')

[0071] print(rms)

[0072] Among them, the RMSE value and are the differences mentioned above.

[0073] 300. Evaluate and adjust test results.

[0074] Specifically, calculate the difference between the predicted value and the true value of each test sample, and take the absolute value of the difference; determine whether the absolute value is within the preset threshold range; if all or a set number of differences meet the requirements, the model is considered to have passed the test; if there are many differences outside the range, record the abnormal values, and return to the step of setting the algorithm parameters, adjust the algorithm parameters according to the test results, and re-train and test until the difference meets the requirements; set a timeout to monitor the training process. If the training time expires and the requirements are still not met, terminate the prediction process and report an error.

[0075] It can be understood that if all or a set number of differences meet the requirements, the model is considered to have passed the test, and the set number can be set according to specific needs.

[0076] Thus, it is ensured that the test results meet the requirements and there is no problem in obtaining the test threshold.

[0077] 400. Predict the next test threshold and generate a prediction result.

[0078] On the basis of the above-mentioned embodiment, the real-time prediction method of the basic software test threshold of the embodiment of the present application can also be embodied as follows: the prediction of the next test threshold and the generation of the prediction result include:

[0079] 410. Use the trained and validated weighted moving average algorithm to predict the test threshold value for the next period.

[0080] 420. Generate prediction results and return these results to the tool chain to assist the tool chain in determining the actual test results.

[0081] Exemplarily, the solution of the embodiment of the present application can be embedded in the tool chain of basic software testing in the form of a component. The embedding method is: the tool chain obtains historical test data, the component processes the historical data and builds a temporary database; the predicted test threshold will be returned to the tool chain, and the tool chain will be assisted in making judgments on the test results. At the same time, the component and the test work can be completed in parallel, that is, the prediction of the test threshold and the basic software test are carried out at the same time, thereby improving the test efficiency and test accuracy.

[0082] For example, please refer to Figure 2 , taking the determination of the test threshold of CPU usage in a vehicle operating system basic software stability test as an example:

[0083] Extract historical data related to CPU usage alarm values ​​from the existing tool chain. Organize the data according to time interval x to ensure that the data is presented in the form of time series, such as<tn,rn> ,<tn+x,rn+x> ..., where tn represents the timestamp and rn represents the observation value or result at the corresponding time point. The data set is preliminarily cleaned to identify and remove outliers to ensure data quality.

[0084] The cleaned data set is divided into a training set and a test set in a ratio of 2:1. The training set is used to train the algorithm model, and the test set is used to evaluate the model performance.

[0085] Set key parameters for the moving average algorithm, including the moving window length MAa, which is used to smooth the window size of the data. Set the difference threshold MAb, which is used to determine whether the deviation between the predicted result and the actual value is within an acceptable range. Determine the prediction key x+n, which is the future time point that the model needs to predict.

[0086] The training set data is input into the weighted moving average algorithm to start the training process. The weighted moving average algorithm learns the training set based on the moving average algorithm or other built-in logic to build a prediction model.

[0087] The trained model is tested using the test set data, and the weighted moving average algorithm is used to predict each sample in the test set to generate a predicted value.

[0088] Calculate the difference between the predicted value and the true value of each test sample, take its absolute value, and determine whether the absolute value is within the preset threshold range [0, MAb]. If all or most of the differences meet the requirements, the model is considered to have passed the test; if there are many differences that exceed the range, record the abnormal values, and return to the step of setting the algorithm parameters. Adjust the algorithm parameters (such as MAa, MAb) according to the test results and retrain and test until the difference meets the requirements. Set a timeout to monitor the training process. If the training time is too long and still does not meet the requirements, terminate the prediction process and report an error.

[0089] Use the trained and verified weighted moving average algorithm to predict the CPU alarm threshold for the next period; generate prediction results and return them to the tool chain to assist the tool chain in determining the actual test results.

[0090] Through the above process, the weighted moving average algorithm can be effectively used to predict the CPU usage alarm value, and through continuous optimization and adjustment, the accuracy and reliability of the prediction results can be ensured.

[0091] As mentioned above, the embodiment of the present application is based on the weighted moving average algorithm, which is a kind of time series prediction model in machine learning. By calculating and predicting the test threshold through this model, the uncertainty caused by the subjective judgment of the tester in the determination of the test threshold can be effectively eliminated. Secondly, the method is real-time, and the weighted moving average algorithm has a moving window, which can determine the test threshold of the next time period in real time, thereby improving the flexibility of the test. At the same time, the method is adaptable. At present, automobile companies usually have a set of mature tool chains for basic software testing. The test mode is stable and not easy to disassemble, but the method has a small amount of code, occupies little memory space and load, so that it can be embedded in the form of a component into an integrated test platform, and has strong adaptability.

[0092] In summary, the embodiments of the present application specifically solve the problem that the threshold cannot be adjusted in real time in the current basic software testing, reduce the dependence of threshold determination on the subjective experience of test engineers, and have strong adaptability, and can be well embedded in the current testing tool chain in this field.

[0093] The embodiments of the present application can achieve:

[0094] First, improve the real-time and efficiency of task processing. By adopting the weighted moving average algorithm, the real-time determination of the test threshold in the basic software test is achieved, which means that the determination of the test threshold is no longer limited by the processing speed of the traditional method, and can respond and process data quickly, significantly improving the overall efficiency of the test process.

[0095] Second, reduce human error and subjectivity. The method of the embodiment of the present application effectively eliminates the influence of human intervention on the threshold determination execution process, greatly reduces the reliance of the test threshold determination on the subjective experience and judgment of the test engineer, not only reduces the error rate caused by human factors, but also ensures the objectivity and consistency of the test results, and improves the test quality and reliability.

[0096] Third, enhance system adaptability and flexibility. The method of the embodiment of the present application also shows good adaptability. It can be seamlessly embedded in the existing test tool chain in the form of components without large-scale transformation or reconstruction of the existing system. This flexible integration method simplifies the deployment process and enables the method to quickly adapt to different test scenarios and requirements, improving the overall flexibility and scalability of the test system.

[0097] For example, please refer to Figure 2 , a real-time prediction method for basic software test threshold based on weighted moving average is shown: configure the test case script, add the Teardown keyword at the end of each test case; run the test case to check whether an error is reported, if so, obtain the S{MES5AGE) variable, read the error information in the command line, and convert the command line error information into natural language according to the anchor error information library.

[0098] Error tracing: Through the keywords carried in S{MESSAGE}, trace back to the location where the keyword is called in the test script; Error tracing: Through the script keyword position, trace back to the console output line that generates the error in the unux command line.

[0099] Obtain the execution directory of the error reporting command line; determine the vehicle operating system module that reports the error through the directory; search for the "Error Reporting-Regression Suggestion Database" based on the error reporting module and the S{MES5AGE) variable.

[0100] If a match cannot be found in the "Error Report - Regression Suggestion Database", a regression test suggestion with the most calls to the same module will be given, the current error type will be added to the "Error Report - Regression Test Suggestion" database, and a pop-up window will appear.

[0101] If it can be matched in the "Error Report-Regression Suggestion Database", a pop-up window will be displayed directly.

[0102] The pop-up window provides the following information: natural language error message, error location source, and regression test suggestion. Generate an HTML-formatted test report appendix to record the above three information. Record the tester's regression test steps and add them to the "Error Report-Regression Test Suggestion" database to complete the test process.

[0103] The above steps are not to be performed in a strict order as described in the numbers, but should be understood as an overall solution.

[0104] In the second aspect, based on the above embodiments, Figure 3 This is a schematic diagram of the structure of a basic software test threshold real-time prediction device provided in an embodiment of the present application. Figure 3 The basic software test threshold real-time prediction device provided in this embodiment specifically includes: a data construction module 301, a model training module 302, a result evaluation module 303 and a result prediction module 304.

[0105] Among them, the data construction module 301 is used to construct a data set and divide the data set into a training set and a test set; the model training module 302 is used to set algorithm parameters, input the training set to the algorithm model for model training, input the test set to the trained model for testing, and output the predicted test threshold; the result evaluation module 303 is used to evaluate and adjust the test results; the result prediction module 304 is used to predict the next test threshold and generate a prediction result.

[0106] As described above, the embodiment of the present application constructs a data set and divides the data set into a training set and a test set; sets algorithm parameters, inputs the training set to the algorithm model for model training, inputs the test set to the trained model for testing, and outputs a predicted test threshold; evaluates and adjusts the test results; predicts the next test threshold and generates a prediction result; solves the problem that the threshold cannot be adjusted in real time in the current basic software testing, reduces the dependence of the threshold determination on the subjective experience of the test engineer, and has strong adaptability, thereby ensuring the stability and reliability of the vehicle operating system test.

[0107] The basic software test threshold real-time prediction device provided in the embodiment of the present application can be used to execute the basic software test threshold real-time prediction method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0108] In a third aspect, an embodiment of the present application further provides an electronic device that can integrate the basic software test threshold real-time prediction device provided in an embodiment of the present application. Figure 4 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 4The electronic device includes: an input device 43, an output device 44, a memory 42 and one or more processors 41; the memory 42 is used to store one or more programs; when the one or more programs are executed by the one or more processors 41, the one or more processors 41 implement the basic software test threshold real-time prediction method provided by the above embodiment. The input device 43, the output device 44, the memory 42 and the processor 41 can be connected by a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0109] The processor 41 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 42, that is, realizes the above-mentioned basic software test threshold real-time prediction method.

[0110] The electronic device provided above can be used to execute the real-time prediction method for basic software test threshold provided in the above embodiment, and has corresponding functions and beneficial effects.

[0111] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the basic software test threshold real-time prediction method as described above, and can achieve the same beneficial effects.

[0112] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present application is not limited to the basic software test threshold real-time prediction method as described above, and can also execute related operations in the basic software test threshold real-time prediction method provided in any embodiment of the present application.

[0113] In a fifth aspect, the embodiments of the present application also provide a computer program product, and the methods described in the various embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the various embodiments of the present application is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM (Open Application Model) or other programmable device.

[0114] The computer program or instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0115] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0117] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0118] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0119] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0120] It should 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 existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A real-time prediction method for basic software test threshold, characterized in that: include: Build a data set and divide it into a training set and a test set; Set algorithm parameters, input the training set to the algorithm model for model training, input the test set to the trained model for testing, and output the predicted test threshold; Evaluate and adjust test results; Make a prediction for the next test threshold and generate a prediction result.

2. The real-time prediction method for basic software test threshold according to claim 1 is characterized in that: The step of constructing a data set and dividing the data set into a training set and a test set includes: Periodically acquire historical test data based on a weighted moving average algorithm to build a data set based on timestamps and test results; Perform preliminary cleaning of the data set to identify and remove outliers; The cleaned data set is divided into training set and test set according to the set ratio.

3. The real-time prediction method for basic software test threshold according to claim 1 is characterized in that: The setting of algorithm parameters includes: Set key parameters for the weighted moving average algorithm, including moving window value, difference threshold and prediction key value; Among them, the moving window value refers to the moving average calculation of the set data each time; the difference threshold refers to the range of deviation between the true value and the predicted value; the prediction key value refers to the test threshold for predicting future time points.

4. The real-time prediction method for basic software test threshold according to claim 1 is characterized in that: The input training set is input to the algorithm model for model training, the test set is input to the trained model for testing, and the predicted test threshold is output, including: Input the data of the training set into the weighted moving average algorithm to start the training process; Build a prediction model by learning the training set based on the moving average algorithm or other built-in logic; Input the data of the test set to test the trained model; Each sample in the test set is predicted based on the weighted moving average algorithm to generate a predicted value, which includes the predicted test threshold.

5. The real-time prediction method for basic software test threshold according to claim 1 is characterized in that: The test results are evaluated and adjusted, including: Calculate the difference between the predicted value and the true value of each test sample, and take the absolute value of the difference; Determine whether the absolute value is within a preset threshold range; If all or a set number of differences meet the requirements, the model is considered to have passed the test; If there are many differences that exceed the range, record the abnormal values ​​and return to the step of setting the algorithm parameters. Adjust the algorithm parameters according to the test results and re-train and test until the difference meets the requirements; Set a timeout to monitor the training process. If the training time exceeds the requirement, the prediction process will be terminated and an error will be reported.

6. The real-time prediction method for basic software test threshold according to claim 1 is characterized in that: The step of predicting the next test threshold and generating a prediction result includes: Use the trained and validated weighted moving average algorithm to predict the test threshold for the next period; Generate prediction results and return them to the tool chain to assist the tool chain in determining the actual test results.

7. A real-time prediction device for basic software test threshold, characterized in that: include: A data construction module is used to construct a data set and divide the data set into a training set and a test set; The model training module is used to set algorithm parameters, input the training set to the algorithm model for model training, input the test set to the trained model for testing, and output the predicted test threshold; Result evaluation module, used to evaluate and adjust the test results; The result prediction module is used to predict the next test threshold and generate the prediction result.

8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the real-time prediction method for the basic software test threshold as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a server, implements the basic software test threshold real-time prediction method as described in any one of claims 1-6.

10. A computer program product, characterized in that The computer program product comprises instructions, which, when executed by a computer, enable the computer to implement the method for real-time prediction of a basic software test threshold according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Time sequence prediction method based on HH-VBF

    CN106658638A

  • Alarm threshold determination method and device, computer equipment and storage medium

    CN110489306A

  • Interface traffic control method and device, electronic equipment and storage medium

    CN114510341A

  • Test data analysis processing method and device, electronic equipment and storage medium

    CN116521568A

  • Method and system for setting threshold automatically

    JP2004259146A