A solid state disk test script generation method, device, equipment and storage medium
Patent Information
- Application Number
- CN202311695056.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-12-08
AI Technical Summary
在工作生产中SSD的测试量非常大,因此需要大量的测试任务,全靠人工部署测试JOB费时费力
[0013]可见,本发明提供了一种固态硬盘测试脚本生成方法,包括:获取项目数据库中的若干预设类型的开发脚本以得到预设数据样本;所述预设数据样本为用于进行测试的脚本;对所述预设数据样本进行分类以得到若干分类后脚本集合,并确定各所述分类后脚本集合各自对应的训练标签信息;基于所述分类后脚本集合、所述分类后脚本集合对应的训练标签信息以及预设深度学习算法对原始模型进行训练,以基于所述分类后脚本集合和所述训练标签信息调整所述原始模型中的权值,得到训练后模型;当在固态硬盘的生产过程中获取到服务器发送的固态硬盘测试脚本生成请求,则将所述固态硬盘测试脚本生成请求输入至所述训练后模型,以通过所述训练后模型生成与所述固态硬盘测试脚本生成请求对应的目标固态硬盘测试脚本,并基于存储系统中盘片的容量点将所述目标固态硬盘测试脚本返回至与所述盘片对应的所述服务器。由此可见,本发明通过获取多个数据样本,并确定每个数据样本对应的标签信息,利用标签信息训练原始模型,使得模型学习数据样本中不同标签信息对应的特征,并根据学习到的特征调整原始模型中的参数,得到训练后模型,当需要生成固态硬盘测试脚本时,将接收到的固态硬盘测试脚本生成请求进行特征分析,根据得到的标签信息自动生成对应的固态硬盘测试脚本并返回给对应的服务器,能够快速生成固态硬盘测试脚本,节约测试部署时间,提高了测试效率。
Smart Images

Figure CN117648259B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning, and in particular to a method, apparatus, device, and storage medium for generating solid-state drive test scripts. Background Technology
[0002] SSD (Solid State Drive) testing is performed using the Jenkins platform (an open-source software project). SSD testing requires the use of Jenkins jobs, which can be created by different staff members to perform SSD testing. In production environments, the volume of SSD testing is very high, requiring numerous test tasks. Manually deploying test jobs is time-consuming and labor-intensive. Automated testing also requires manually selecting SSD test scripts to prepare for generating test jobs. As the volume of SSD testing increases, and the number of scripts connecting Jenkins to the Gerrit (a web code review tool) repository also increases, running all test jobs on a single machine can lead to waiting times if too many test jobs are running. Manually selecting scripts to assemble jobs is inefficient. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for generating solid-state drive (SSD) test scripts, which can quickly generate SSD test scripts, save test deployment time, and improve test efficiency. The specific solution is as follows: In a first aspect, the present invention discloses a method for generating a solid-state drive test script, comprising: Several preset types of development scripts are obtained from the project database to obtain preset data samples; the preset data samples are scripts used for testing. The preset data samples are classified to obtain several sets of classified scripts, and the training label information corresponding to each set of classified scripts is determined. The original model is trained based on the set of classified scripts, the training label information corresponding to the set of classified scripts, and a preset deep learning algorithm. The weights in the original model are then adjusted based on the set of classified scripts and the training label information to obtain the trained model. When a solid-state drive (SSD) test script generation request is received from the server during the SSD production process, the SSD test script generation request is input into the trained model to generate a target SSD test script corresponding to the SSD test script generation request. The target SSD test script is then returned to the server corresponding to the disk based on the capacity of the disk in the storage system.
[0004] Optionally, obtaining several preset types of development scripts from the project database to obtain preset data samples includes: Several preset types of development scripts are integrated from the databases of all projects to obtain the preset data sample; the preset data sample includes solid-state drive performance test scripts, solid-state drive feature test scripts, solid-state drive basic function test scripts, and solid-state drive modular test scripts.
[0005] Optionally, the step of training the original model based on the classified script set, the training label information corresponding to the classified script set, and a preset deep learning algorithm, to adjust the weights in the original model based on the classified script set and the training label information, to obtain a trained model, includes: The initial layer of the multilayer autoencoder neural network is determined as the current layer; The set of classified scripts carrying the training label information is input into the current layer of the multilayer autoencoder neural network in the original model; The pre-training operation is performed on the current layer using the set of classified scripts, so as to adjust the weights in the original model based on the training label information, and obtain the neural network weights output by the current layer; Determine whether the current layer is the last layer of the multilayer autoencoder neural network; If the current layer is the last layer of the multilayer autoencoder neural network, then the neural network weights are determined as the final weights, and the trained model is generated based on the final weights; If the current layer is not the last layer of the multilayer autoencoder neural network, then the weights of the next layer of the current layer are set to the weights of the neural network output by the current layer, the next layer is determined as the new current layer, and the process of inputting the set of classified scripts carrying the training label information into the current layer of the multilayer autoencoder neural network in the original model is repeated.
[0006] Optionally, the step of performing a pre-training operation on the current layer using the set of classified scripts to adjust the weights in the original model based on the training label information, thereby obtaining the neural network weights output by the current layer, includes: The classified script set is input into the current layer in order to extract the feature information of the training label information; Based on the feature information and the preset loss function of the current layer, the weights in the original model are adjusted to obtain the neural network weights output by the current layer.
[0007] Optionally, after adjusting the weights in the original model based on the classified script set and the training label information to obtain the trained model, the method further includes: Obtain all the disks installed in the storage system, and set the corresponding capacity point for each disk; Disks with the same capacity point are identified as the target disk set.
[0008] Optionally, the step of inputting the solid-state drive test script generation request into the trained model to generate a target solid-state drive test script corresponding to the solid-state drive test script generation request through the trained model includes: Determine the target disk set in the server, and determine the test tag information corresponding to the target disk set; Based on the test tag information, a request is generated to generate the solid-state drive test script. All the SSD test script generation requests are sent to the central server, so that the central server can input all the SSD test script generation requests into the trained model. Based on the test label information, the type of script to be generated is determined, and the target SSD test script corresponding to the SSD test script generation request is generated based on the type of script to be generated.
[0009] Optionally, after returning the target solid-state drive test script to the server corresponding to the disk based on the capacity point of the disk in the storage system, the method further includes: The target solid-state drive test script is stored in the target directory of the server, and the disk to be tested is determined from all the disks of the server based on the capacity point of the disk in the storage system; Obtain the drive letter of the disk to be tested, and execute the corresponding preset test operations based on the drive letter and the target solid-state drive test script to obtain the corresponding test results.
[0010] Secondly, the present invention discloses a solid-state drive test script generation device, comprising: The data sample acquisition module is used to acquire several preset types of development scripts from the project database to obtain preset data samples; the preset data samples are scripts used for testing. The training label information determination module is used to classify the preset data samples to obtain several sets of classified scripts, and to determine the training label information corresponding to each set of classified scripts. The model training module is used to train the original model based on the set of classified scripts, the training label information corresponding to the set of classified scripts, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the set of classified scripts and the training label information to obtain the trained model. The target solid-state drive test script generation module is used to input the solid-state drive test script generation request into the trained model when a solid-state drive test script generation request is received from the server during the solid-state drive production process, so as to generate a target solid-state drive test script corresponding to the solid-state drive test script generation request through the trained model. The target solid-state drive test script return module is used to return the target solid-state drive test script to the server corresponding to the disk based on the capacity point of the disk in the storage system.
[0011] Thirdly, the present invention discloses an electronic device, comprising: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the solid-state drive test script generation method disclosed above.
[0012] Fourthly, the present invention discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the solid-state drive test script generation method disclosed above.
[0013] As can be seen, the present invention provides a method for generating solid-state drive (SSD) test scripts, comprising: obtaining several preset types of development scripts from a project database to obtain preset data samples; the preset data samples are scripts used for testing; classifying the preset data samples to obtain several sets of classified scripts, and determining the training label information corresponding to each set of classified scripts; training an original model based on the sets of classified scripts, the training label information corresponding to the sets of classified scripts, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the sets of classified scripts and the training label information to obtain a trained model; when a SSD test script generation request is obtained from a server during the SSD production process, the SSD test script generation request is input into the trained model to generate a target SSD test script corresponding to the SSD test script generation request through the trained model, and the target SSD test script is returned to the server corresponding to the disk based on the capacity of the disk in the storage system. Therefore, this invention acquires multiple data samples and determines the label information corresponding to each data sample. It then uses the label information to train the original model, enabling the model to learn the features corresponding to different label information in the data samples. Based on the learned features, the parameters in the original model are adjusted to obtain the trained model. When it is necessary to generate a solid-state drive test script, the received solid-state drive test script generation request is subjected to feature analysis. Based on the obtained label information, the corresponding solid-state drive test script is automatically generated and returned to the corresponding server. This enables the rapid generation of solid-state drive test scripts, saves test deployment time, and improves test efficiency. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0015] Figure 1 This is a flowchart of a solid-state drive test script generation method disclosed in this invention; Figure 2 This is a flowchart of a specific solid-state drive test script generation method disclosed in this invention; Figure 3 A schematic diagram of the solid-state drive test script generation device provided by the present invention; Figure 4 This invention provides a structural diagram of an electronic device. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Currently, SSD testing volume in production is very high, requiring numerous testing tasks. Manually deploying test jobs is time-consuming and labor-intensive. Automated testing also requires manual selection of SSD test scripts to prepare for test job generation. When the SSD testing volume increases and the number of scripts connecting Jenkins to the Gerrit repository grows, all test jobs run on a single machine. Too many running test jobs can lead to waiting times, making manual script selection for job composition inefficient. The current testing method involves testers modifying or adding scripts based on development tasks. When the number of scripts added in a short period is significant, script additions are performed, involving many functional modules, including scripts added for tasks or scripts added due to sudden project needs. After receiving the script task, testers begin script development, upload the scripts to the Gerrit repository, and after verification, assemble the jobs and perform batch testing of the hard drives. This process requires a large number of personnel, especially for automated batch testing of hard drives. Therefore, this invention provides a method for generating SSD test scripts, which can quickly generate SSD test scripts, saving test deployment time and improving testing efficiency.
[0018] This invention discloses a method for generating solid-state drive test scripts, see [link to relevant documentation]. Figure 1 As shown, the method includes: Step S11: Obtain several preset types of development scripts from the project database to obtain preset data samples; the preset data samples are scripts used for testing.
[0019] In this embodiment, several preset types of development scripts are obtained from the project database to obtain preset data samples; the preset data samples are scripts used for testing. Specifically, several preset types of development scripts from the databases of all projects are integrated to obtain the preset data samples; the preset data samples include SSD performance test scripts, SSD feature test scripts, SSD basic function test scripts, and SSD modular test scripts. There are many methods for SSD testing, including manual testing and automated testing. Automated testing often uses the Jenkins platform. SSD testing focuses on various aspects, including performance testing, long-term stability testing, trim, trim_format, file system testing, normal and abnormal power-on / off testing, data verification testing, admin command testing, various IO (Input / Output) tests, module function testing, and cross-functional testing. Different tests have corresponding SSD test scripts, and the preset data samples are obtained by statistically analyzing the SSD test scripts from historical tests.
[0020] Understandably, in the production process, SSDs undergo numerous tests to verify their functionality, including read / write tests, bad block tests, and stress tests on sample disks. Furthermore, large-scale automated testing of hard drives is required, often executed through the Jenkins platform. Jenkins is an open-source software project, a continuous integration tool developed in Java, used to monitor repetitive tasks and providing an open and easy-to-use software platform that enables continuous integration. Jenkins is fundamental to modern software development, reducing integration problems. It is easy to install and configure, features email publishing and test report generation, and its distributed build system supports testing across multiple Jenkins computers.
[0021] Step S12: Classify the preset data samples to obtain several sets of classified scripts, and determine the training label information corresponding to each set of classified scripts.
[0022] In this embodiment, after obtaining several preset types of development scripts from the project database to obtain preset data samples, the preset data samples are classified to obtain several sets of classified scripts, and the training label information corresponding to each set of classified scripts is determined. It is understood that solid-state drive test scripts differ for different testing directions; therefore, it is necessary to classify all preset data samples according to the test direction of the scripts to obtain several sets of classified scripts. Since different sets of classified scripts target different testing directions, the training label information for each set of classified scripts is determined according to the different testing directions. The training label information is the information that directly determines the corresponding test type, so that the corresponding solid-state drive test script can be determined based on the test type.
[0023] Step S13: Train the original model based on the set of classified scripts, the training label information corresponding to the set of classified scripts, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the set of classified scripts and the training label information to obtain the trained model.
[0024] In this embodiment, after determining the training label information corresponding to each of the classified script sets, the original model is trained based on the classified script sets, the training label information corresponding to the classified script sets, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the classified script sets and the training label information to obtain the trained model. Specifically, the initial layer of the multilayer autoencoder neural network is determined as the current layer; the set of classification scripts carrying the training label information is input into the current layer of the multilayer autoencoder neural network in the original model; the set of classification scripts is used to perform a pre-training operation on the current layer to adjust the weights in the original model based on the training label information, thereby obtaining the neural network weights output by the current layer; it is determined whether the current layer is the last layer of the multilayer autoencoder neural network; if the current layer is the last layer of the multilayer autoencoder neural network, the neural network weights are determined as the final weights, and the trained model is generated based on the final weights; if the current layer is not the last layer of the multilayer autoencoder neural network, the weights of the next layer of the current layer are set as the neural network weights output by the current layer, the next layer is determined as the new current layer, and the process re-enters the step of inputting the set of classification scripts carrying the training label information into the current layer of the multilayer autoencoder neural network in the original model. The step of performing a pre-training operation on the current layer using the set of classified scripts to adjust the weights in the original model based on the training label information and obtain the neural network weights output by the current layer includes: inputting the set of classified scripts into the current layer to extract feature information from the training label information; and adjusting the weights in the original model based on the feature information and a preset loss function of the current layer to obtain the neural network weights output by the current layer.
[0025] Understandably, when using a multilayer autoencoder neural network for learning, the number of scripts in the post-classification script set of each layer in the multilayer autoencoder neural network decreases layer by layer. That is, the initial post-classification script set is input into the initial layer of the multilayer autoencoder neural network, the pre-training operation is performed in the initial layer and the updated post-classification script set is output. At this time, the number of scripts in the updated post-classification script set is less than the number of scripts in the initial post-classification script set. The scripts are filtered through each layer in the multilayer autoencoder neural network, and the later the layer, the fewer scripts are used. Since the scripts left after filtering are the better scripts, the training effect of the model is improved.
[0026] Furthermore, deep learning-based algorithms are used for pre-training via multi-layer autoencoder neural networks, followed by optimization of neural network weights based on label information to obtain a deep belief network (i.e., the trained model). Deep learning discovers distributed feature representations of data by combining low-level features to form more abstract high-level representations of attribute categories or features. In essence, through layer-by-layer feature transformation, the feature representation of samples in the original space is transformed to a new feature space, making classification or prediction easier. Compared to methods that construct features using manual rules, learning features from big data is better able to characterize the rich intrinsic information of the data. Script features can be extracted and summarized during the deep learning process, and the learned results can guide testers to quickly deploy jobs in situations requiring batch hard drive testing and extensive script support.
[0027] Deep learning learns the inherent patterns and representational layers of sample data. The information gained during the learning process greatly helps in interpreting data such as text, images, and sound. The ultimate goal is to enable machines to have analytical and learning capabilities like humans, and to recognize data such as text, images, and sound.
[0028] Step S14: When a solid-state drive test script generation request is received from the server during the solid-state drive production process, the solid-state drive test script generation request is input into the trained model to generate a target solid-state drive test script corresponding to the solid-state drive test script generation request through the trained model, and the target solid-state drive test script is returned to the server corresponding to the disk based on the capacity of the disk in the storage system.
[0029] In this embodiment, after adjusting the weights in the original model based on the classified script set and the training label information to obtain the trained model, when a solid-state drive (SSD) test script generation request is received from the server during the SSD production process, the SSD test script generation request is input into the trained model to generate a target SSD test script corresponding to the SSD test script generation request. The target SSD test script is then returned to the server corresponding to the disk based on the capacity of the disk in the storage system. Specifically, the target SSD test script is stored in a target directory on the server, and the disk to be tested located in the target disk set is determined from all the disks on the server based on the capacity of the disk in the storage system. The drive letter of the disk to be tested is obtained, and corresponding preset test operations are performed based on the drive letter and the target SSD test script to obtain the corresponding test results.
[0030] This invention employs deep learning to modularly train a categorized script set, obtaining a trained model. Deep learning is used to acquire JOB features (i.e., feature information) from the categorized script set, and the relationship between these features and the scripts within the set is learned. The trained model, derived from deep learning, extracts keywords (i.e., feature information) from SSD test script generation requests, automatically assembling and returning the corresponding SSD test scripts. This meets the testing needs of large-scale, integrated SSD testing.
[0031] As can be seen, the present invention provides a method for generating solid-state drive (SSD) test scripts, comprising: obtaining several preset types of development scripts from a project database to obtain preset data samples; the preset data samples are scripts used for testing; classifying the preset data samples to obtain several sets of classified scripts, and determining the training label information corresponding to each set of classified scripts; training an original model based on the sets of classified scripts, the training label information corresponding to the sets of classified scripts, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the sets of classified scripts and the training label information to obtain a trained model; when a SSD test script generation request is obtained from a server during the SSD production process, the SSD test script generation request is input into the trained model to generate a target SSD test script corresponding to the SSD test script generation request through the trained model, and the target SSD test script is returned to the server corresponding to the disk based on the capacity of the disk in the storage system. Therefore, this invention acquires multiple data samples and determines the label information corresponding to each data sample. It then uses the label information to train the original model, enabling the model to learn the features corresponding to different label information in the data samples. Based on the learned features, the parameters in the original model are adjusted to obtain the trained model. When it is necessary to generate a solid-state drive test script, the received solid-state drive test script generation request is subjected to feature analysis. Based on the obtained label information, the corresponding solid-state drive test script is automatically generated and returned to the corresponding server. This enables the rapid generation of solid-state drive test scripts, saves test deployment time, and improves test efficiency.
[0032] See Figure 2 As shown, this embodiment of the invention discloses a method for generating solid-state drive test scripts. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.
[0033] Step S21: Obtain several preset types of development scripts from the project database to obtain preset data samples.
[0034] Step S22: Classify the preset data samples to obtain several sets of classified scripts, and determine the training label information corresponding to each set of classified scripts.
[0035] Step S23: Train the original model based on the set of classified scripts, the training label information corresponding to the set of classified scripts, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the set of classified scripts and the training label information to obtain the trained model.
[0036] Step S24: Obtain all the disks installed in the storage system and set the corresponding capacity point for each disk.
[0037] In this embodiment, after adjusting the weights in the original model based on the classified script set and the training label information to obtain the trained model, all the disks installed in the storage system are obtained, and a corresponding capacity point is set for each disk. The storage system has multiple disks, and the capacity points of the disks can be the same or different. For example, the storage system may have 25 disks installed at full capacity, with the 25 disks distributed at different capacity points. The server obtains SSDs with different capacity points and installs the corresponding firmware on the disks.
[0038] Step S25: Determine the disks with the same capacity point as the target disk set.
[0039] In this embodiment, after acquiring all the disks installed in the storage system and setting a corresponding capacity point for each disk, the disks with the same capacity point are determined as the target disk set. It is understood that a controlled variable method is used during model testing; therefore, disks with the same capacity point are placed in the same set to obtain target disk sets with different capacity points. Deployment scripts are then used to test all disks in the storage system based on the principle of the same capacity point, thereby operating the corresponding disks on the server.
[0040] Step S26: When a solid-state drive test script generation request is received from the server during the solid-state drive production process, the solid-state drive test script generation request is input into the trained model to generate a target solid-state drive test script corresponding to the solid-state drive test script generation request through the trained model, and the target solid-state drive test script is returned to the server corresponding to the disk based on the capacity of the disk in the storage system.
[0041] In this embodiment, when a solid-state drive (SSD) test script generation request is received from a server during the SSD production process, the SSD test script generation request is input into the trained model. The trained model then generates a target SSD test script corresponding to the SSD test script generation request. Based on the capacity of the disk platter in the storage system, the target SSD test script is returned to the server corresponding to the disk platter. Specifically, the target disk platter set in the server is determined, and the test tag information corresponding to the target disk platter set is determined. The SSD test script generation request is generated based on the test tag information. All SSD test script generation requests are sent to a central server, which then inputs all SSD test script generation requests into the trained model. Based on the test tag information, the script type to be generated is determined, and based on the script type to be generated, the target SSD test script corresponding to the SSD test script generation request is generated.
[0042] Understandably, when testing multiple storage devices, the number of disks increases. For example, testing 5 servers might require 100 disks. Even testing disks of the same capacity, there would still be around 80 disks with the same capacity on each server. Manual testing with such a large number of disks is time-consuming. This invention places the test script for the target SSD under ` / root / server / power` on the Jenkins server. Then, it retrieves the drive letters of the disks in the target disk set with different capacities. Based on these drive letters and the target SSD test script, it executes corresponding preset test operations to obtain the test results. This achieves unified deployment and categorized testing, saving deployment time. The script storage path is standardized across all servers because multiple servers need to be managed, for example, five servers. The target SSD test scripts on each server are placed in a unified directory / root / server / power. If the number of test servers increases, a master job is needed for unified management. That is, a master server is set up among all servers to manage the generation of SSD test scripts on other servers. The master job can start tests on multiple servers at once, achieving the goal of one-to-many control.
[0043] This invention trains a script model using deep learning, extracts keyword tag information for training, and obtains a trained model. When a job needs to be built again, simply input the type of keyword to be tested into the trained model, and the model automatically builds the script and sends it to the corresponding server for testing. This meets the needs of large-scale testing with integrated SSDs and improves testing efficiency.
[0044] For details regarding steps S21 to S23, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0045] As can be seen, this application embodiment obtains several preset types of development scripts from the project database to obtain preset data samples; the preset data samples are scripts used for testing; the preset data samples are classified to obtain several sets of classified scripts, and the training label information corresponding to each set of classified scripts is determined; the original model is trained based on the sets of classified scripts, the training label information corresponding to the sets of classified scripts, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the sets of classified scripts and the training label information to obtain a trained model; all the disks installed in the storage system are obtained, and each disk is set with... The system sets the corresponding capacity point; identifies platters with the same capacity point as the target platter set; when a solid-state drive (SSD) test script generation request is received from the server during SSD production, the SSD test script generation request is input into the trained model to generate a target SSD test script corresponding to the SSD test script generation request. Based on the capacity point of the platter in the storage system, the target SSD test script is returned to the server corresponding to the platter. This method can quickly generate SSD test scripts, save test deployment time, improve test efficiency, and guide testers to quickly deploy JOBs.
[0046] See Figure 3 As shown, this embodiment of the invention also discloses a solid-state drive test script generation device, comprising: The data sample acquisition module 11 is used to acquire several preset types of development scripts from the project database to obtain preset data samples; the preset data samples are scripts used for testing. The training label information determination module 12 is used to classify the preset data samples to obtain several sets of classified scripts, and to determine the training label information corresponding to each set of classified scripts. Model training module 13 is used to train the original model based on the set of classified scripts, the training label information corresponding to the set of classified scripts, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the set of classified scripts and the training label information to obtain the trained model. The target solid-state drive test script generation module 14 is used to input the solid-state drive test script generation request into the trained model when a solid-state drive test script generation request is received from the server during the solid-state drive production process, so as to generate a target solid-state drive test script corresponding to the solid-state drive test script generation request through the trained model. The target solid-state drive test script return module 15 is used to return the target solid-state drive test script to the server corresponding to the disk based on the capacity point of the disk in the storage system.
[0047] As can be seen, the present invention includes: obtaining several preset types of development scripts from a project database to obtain preset data samples; the preset data samples are scripts used for testing; classifying the preset data samples to obtain several sets of classified scripts, and determining the training label information corresponding to each set of classified scripts; training an original model based on the sets of classified scripts, the training label information corresponding to the sets of classified scripts, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the sets of classified scripts and the training label information to obtain a trained model; when a solid-state drive test script generation request is obtained from a server during the solid-state drive production process, the solid-state drive test script generation request is input into the trained model to generate a target solid-state drive test script corresponding to the solid-state drive test script generation request through the trained model, and the target solid-state drive test script is returned to the server corresponding to the disk based on the capacity of the disk in the storage system. Therefore, this invention acquires multiple data samples and determines the label information corresponding to each data sample. It then uses the label information to train the original model, enabling the model to learn the features corresponding to different label information in the data samples. Based on the learned features, the parameters in the original model are adjusted to obtain the trained model. When it is necessary to generate a solid-state drive test script, the received solid-state drive test script generation request is subjected to feature analysis. Based on the obtained label information, the corresponding solid-state drive test script is automatically generated and returned to the corresponding server. This enables the rapid generation of solid-state drive test scripts, saves test deployment time, and improves test efficiency.
[0048] In some specific embodiments, the data sample acquisition module 11 specifically includes: A preset data sample acquisition unit is used to integrate several preset types of development scripts from the database of all projects to obtain the preset data sample; the preset data sample includes solid-state drive performance test scripts, solid-state drive characteristic test scripts, solid-state drive basic function test scripts, and solid-state drive modular test scripts.
[0049] In some specific embodiments, the training label information determination module 12 specifically includes: A preset data sample classification unit is used to classify the preset data samples to obtain a set of classified scripts; The training label information determination unit is used to determine the training label information corresponding to each of the classified script sets.
[0050] In some specific embodiments, the model training module 13 specifically includes: The first current layer determination unit is used to determine the initial layer of the multilayer autoencoder neural network as the current layer; The post-classification script set input unit is used to input the post-classification script set carrying the training label information into the current layer of the multi-layer autoencoder neural network in the original model; The feature information extraction unit is used to input the classified script set into the current layer in order to extract the feature information of the training label information; The weight adjustment unit is used to adjust the weights in the original model based on the feature information and the preset loss function of the current layer, so as to obtain the neural network weights output by the current layer. The current layer determination unit is used to determine whether the current layer is the last layer of the multi-layer autoencoder neural network; A neural network weight setting unit is used to set the weight of the next layer of the current layer to the neural network weight output by the current layer if the current layer is not the last layer of the multilayer autoencoder neural network. The second current layer determination unit is used to determine the next layer as the new current layer and re-enter the step of inputting the set of classified scripts carrying the training label information into the current layer of the multilayer autoencoder neural network in the original model; The final weight determination unit is used to determine the neural network weights as final weights if the current layer is the last layer of the multilayer autoencoder neural network. The post-training model acquisition unit is used to generate the post-training model based on the final weights. A disk acquisition unit is used to acquire all the disks installed in the storage system; A capacity point setting unit is used to set a corresponding capacity point for each of the disks; The target platter set determination unit is used to determine the platters with the same capacity point as the target platter set.
[0051] In some specific embodiments, the target solid-state drive test script generation module 14 specifically includes: A test tag information determination unit is used to determine the target disk set in the server and determine the test tag information corresponding to the target disk set; Solid State Drive Test Script Generation Request Generation Unit, used to generate the Solid State Drive Test Script Generation Request based on the test tag information; Solid State Drive Test Script Generation Request Sending Unit, used to send all the solid state drive test script generation requests to the main server; The solid-state drive test script generation request input unit is used to input all solid-state drive test script generation requests into the trained model through the main server when a solid-state drive test script generation request is received from the server during the solid-state drive production process. The script type determination unit is used to determine the script type to be generated based on the test tag information; The target solid-state drive test script generation unit is used to generate the target solid-state drive test script corresponding to the solid-state drive test script generation request based on the script type to be generated.
[0052] In some specific embodiments, the target solid-state drive test script return module 15 specifically includes: The target solid-state drive test script storage unit is used to store the target solid-state drive test script in the target directory of the server; The disk platter determination unit is used to determine the disk platter to be tested located in the target disk platter set from all the disk platters of the server based on the capacity point of the disk platter in the storage system. The drive letter acquisition unit is used to acquire the drive letter of the disk to be tested; The test execution unit is used to execute corresponding preset test operations based on the drive letter and the target solid-state drive test script to obtain the corresponding test results.
[0053] Furthermore, embodiments of the present invention also provide an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of the invention.
[0054] Figure 4This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present invention. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the solid-state drive test script generation method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0055] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this invention, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0056] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0057] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the solid-state drive test script generation method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0058] Furthermore, this embodiment of the invention also discloses a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the solid-state drive test script generation method steps disclosed in any of the foregoing embodiments.
[0059] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0060] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0061] The present invention provides a detailed description of a solid-state drive test script generation method, apparatus, device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for generating a solid-state drive test script, characterized in that, include: Obtain several pre-defined types of development scripts from the project database to obtain pre-defined data samples; The preset data sample is a script used for testing; The preset data samples are classified to obtain several sets of classified scripts, and the training label information corresponding to each set of classified scripts is determined. The original model is trained based on the set of classified scripts, the training label information corresponding to the set of classified scripts, and a preset deep learning algorithm. The weights in the original model are then adjusted based on the set of classified scripts and the training label information to obtain the trained model. When a solid-state drive (SSD) test script generation request is received from the server during the SSD production process, the SSD test script generation request is input into the trained model to generate a target SSD test script corresponding to the SSD test script generation request. The target SSD test script is then returned to the server corresponding to the disk based on the capacity of the disk in the storage system. After adjusting the weights in the original model based on the classified script set and the training label information to obtain the trained model, the process further includes: Obtain all the disks installed in the storage system, and set the corresponding capacity point for each disk; The disks with the same capacity point are identified as the target disk set; The step of inputting the solid-state drive test script generation request into the trained model, so as to generate a target solid-state drive test script corresponding to the solid-state drive test script generation request through the trained model, includes: Determine the target disk set in the server, and determine the test tag information corresponding to the target disk set; Based on the test tag information, a request is generated to generate the solid-state drive test script. All the SSD test script generation requests are sent to the central server, so that the central server can input all the SSD test script generation requests into the trained model. Based on the test label information, the type of script to be generated is determined, and the target SSD test script corresponding to the SSD test script generation request is generated based on the type of script to be generated.
2. The solid-state drive test script generation method according to claim 1, characterized in that, The step of obtaining several preset types of development scripts from the project database to obtain preset data samples includes: Several preset types of development scripts are integrated from the databases of all projects to obtain the preset data sample; the preset data sample includes solid-state drive performance test scripts, solid-state drive feature test scripts, solid-state drive basic function test scripts, and solid-state drive modular test scripts.
3. The solid-state drive test script generation method according to claim 1, characterized in that, The step of training the original model based on the classified script set, the training label information corresponding to the classified script set, and a preset deep learning algorithm, and adjusting the weights in the original model based on the classified script set and the training label information to obtain the trained model, includes: The initial layer of the multilayer autoencoder neural network is determined as the current layer; The set of classified scripts carrying the training label information is input into the current layer of the multilayer autoencoder neural network in the original model; The pre-training operation is performed on the current layer using the set of classified scripts, so as to adjust the weights in the original model based on the training label information, and obtain the neural network weights output by the current layer; Determine whether the current layer is the last layer of the multilayer autoencoder neural network; If the current layer is the last layer of the multilayer autoencoder neural network, then the neural network weights are determined as the final weights, and the trained model is generated based on the final weights; If the current layer is not the last layer of the multilayer autoencoder neural network, then the weights of the next layer of the current layer are set to the weights of the neural network output by the current layer, the next layer is determined as the new current layer, and the process of inputting the set of classified scripts carrying the training label information into the current layer of the multilayer autoencoder neural network in the original model is repeated.
4. The solid-state drive test script generation method according to claim 3, characterized in that, The step of performing a pre-training operation on the current layer using the classified script set to adjust the weights in the original model based on the training label information, and obtaining the neural network weights output by the current layer, includes: The classified script set is input into the current layer in order to extract the feature information of the training label information; Based on the feature information and the preset loss function of the current layer, the weights in the original model are adjusted to obtain the neural network weights output by the current layer.
5. The solid-state drive test script generation method according to claim 1, characterized in that, After returning the target solid-state drive test script to the server corresponding to the disk based on the capacity point of the disk in the storage system, the process further includes: The target solid-state drive test script is stored in the target directory of the server, and the disk to be tested is determined from all the disks of the server based on the capacity point of the disk in the storage system; Obtain the drive letter of the disk to be tested, and execute the corresponding preset test operations based on the drive letter and the target solid-state drive test script to obtain the corresponding test results.
6. A solid-state drive test script generation device, characterized in that, include: The data sample acquisition module is used to acquire several preset types of development scripts from the project database to obtain preset data samples; The preset data sample is a script used for testing; The training label information determination module is used to classify the preset data samples to obtain several sets of classified scripts, and to determine the training label information corresponding to each set of classified scripts. The model training module is used to train the original model based on the set of classified scripts, the training label information corresponding to the set of classified scripts, and a preset deep learning algorithm, so as to adjust the weights in the original model based on the set of classified scripts and the training label information to obtain the trained model. The target solid-state drive test script generation module is used to input the solid-state drive test script generation request into the trained model when a solid-state drive test script generation request is received from the server during the solid-state drive production process, so as to generate a target solid-state drive test script corresponding to the solid-state drive test script generation request through the trained model. The target solid-state drive test script return module is used to return the target solid-state drive test script to the server corresponding to the disk based on the capacity point of the disk in the storage system. The device is also used to acquire all the disks installed in the storage system and set a corresponding capacity point for each disk. The disks with the same capacity point are identified as the target disk set; The target solid-state drive (SSD) test script generation module is used to determine the target disk set in the server and determine the test tag information corresponding to the target disk set; generate the SSD test script generation request based on the test tag information; send all the SSD test script generation requests to the main server, so that the main server can input all the SSD test script generation requests into the trained model, determine the script type to be generated based on the test tag information, and generate the target SSD test script corresponding to the SSD test script generation request based on the script type to be generated.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the solid-state drive test script generation method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Used for storing computer programs; wherein, when the computer program is executed by a processor, it implements the solid-state drive test script generation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
UI testing method and system, computer equipment and storage medium
CN110309059A
SSD hard disk automatic test method, device and equipment and readable storage medium
CN111104274A