Server-based data processing method and device, equipment and storage medium
By generating test rules and using large models for data reasoning, the problem of test case mismatch in server testing was solved, achieving more accurate test case generation and automated processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- EVEX TECHNOLOGY CO LTD
- Filing Date
- 2026-03-26
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies fail to effectively differentiate between different test types and operating systems in server testing, resulting in generated test cases that do not match actual requirements and affect test effectiveness.
Based on the test type and server operating system type, first and second rules are generated. Data reasoning is performed through a large model to generate test content and test cases, reducing manual intervention and improving accuracy.
It enables the generation of test cases for specific test types and operating systems, improving the accuracy and compatibility of test cases and reducing false positives and false negatives.
Smart Images

Figure CN122064544A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a server-based data processing method, apparatus, device, and storage medium. Background Technology
[0002] In the process of server research and development, deployment, and operation and maintenance, server testing is a crucial step in ensuring the reliable operation of the server.
[0003] In related technologies, large models are used to perform data reasoning on server configuration data to generate test cases. During the testing process, multiple servers with different operating systems need to be tested simultaneously using various test types.
[0004] However, when the test type or the server operating system differs, the focus of the test generally differs. Related technologies do not differentiate between these, leading to a mismatch between generated test cases and actual test requirements, thus affecting test effectiveness. Therefore, improving the accuracy of test cases has become an urgent technical problem to be solved. Summary of the Invention
[0005] This application provides server-based data processing methods, apparatus, devices, and storage media to improve the accuracy of test cases.
[0006] In a first aspect, embodiments of this application provide a server-based data processing method, including:
[0007] Based on the test type and the server's operating system type, a first rule and a second rule are generated; the first rule represents the rule for parsing the server's configuration information into test content; the test content represents the feature to be tested and the test method corresponding to the feature to be tested; the second rule represents the rule for parsing the test content into test cases.
[0008] Based on the configuration information and the first rule, a first prompt word is generated; the first prompt word is used to guide the generation of test content from a preset large model.
[0009] The first prompt word is input into a preset large model to obtain the output test content; the preset large model is used to perform data reasoning on the configuration information based on the first prompt word to obtain the test content;
[0010] Based on the test content and the second rule, test cases are generated; the test cases are used to test the server.
[0011] In one possible implementation, test cases are generated based on the test content and the second rule, including:
[0012] Based on the test content and the second rule, a second prompt word is generated; the second prompt word is used to guide the generation of test cases from a preset large model.
[0013] Input the second prompt word into the preset large model to obtain the output test cases;
[0014] The preset large model is used to perform data reasoning on the test content based on the second prompt word and generate test cases.
[0015] In one possible implementation, the test content includes feature information, dimension information, and tool information. The feature information characterizes the performance characteristics of the server's hardware and software, the dimension information characterizes the dimensions used to test the server, and the tool information characterizes the tools used for testing. Based on the test content and the second rule, test cases are generated, including:
[0016] Based on the dimensional information, a target template is determined from a preset template library; the target template represents the template of the test case.
[0017] Based on the feature information, the dimension information, and the tool information, a second prompt word is generated according to the second rule; the second prompt word is used to guide the generation of test cases from a preset large model.
[0018] Input the second prompt word and the target template into the preset large model to obtain the output test cases;
[0019] The preset large model is used to perform data reasoning on feature information, dimension information, and tool information based on the second prompt word, and to generate test cases based on the target template.
[0020] In one possible implementation, it also includes:
[0021] Establish a network connection with the server based on the preset login information;
[0022] If a network connection is established with the server, the server's preset interface is invoked to obtain the returned configuration information; the preset interface is used to invoke a preset data collection tool to collect the server's configuration information.
[0023] In one possible implementation, it also includes:
[0024] If a network connection is not established with the server, a new network connection will be established with the server based on the preset login information.
[0025] In one possible implementation, establishing a network connection with the server based on preset login information includes:
[0026] Based on the operating system type of the server, a target protocol is determined from multiple preset connection protocols; the target protocol represents the network protocol used to establish a network connection with the server.
[0027] Based on the target protocol, a network connection is established with the server according to the preset login information.
[0028] In one possible implementation, it also includes:
[0029] A third rule is generated based on the test type and the server's operating system type; the third rule represents the rule for parsing the test results into a test report.
[0030] The server is tested according to the test cases, and the test results are obtained.
[0031] Based on the test results, a third prompt word is generated according to the third rule; the third prompt word is used to guide the generation of a test report by a pre-set large model;
[0032] Input the third prompt word into the preset large model to obtain the output test report;
[0033] The preset large model is used to perform data reasoning on the test results based on the third prompt word and generate a test report.
[0034] Secondly, embodiments of this application provide a server-based data processing apparatus, comprising:
[0035] The first generation module is used to generate a first rule and a second rule based on the test type and the operating system type of the server; the first rule represents the rule for parsing the server's configuration information into test content; the test content represents the feature to be tested and the test method corresponding to the feature to be tested; the second rule represents the rule for parsing the test content into test cases.
[0036] The second generation module is used to generate a first prompt word based on the configuration information and the first rule; the first prompt word is used to guide the generation of test content from a preset large model.
[0037] The reasoning module is used to input the first prompt word into a preset large model to obtain the output test content; the preset large model is used to perform data reasoning on the configuration information based on the first prompt word to obtain the test content.
[0038] The third generation module is used to generate test cases based on the test content and the second rule; the test cases are used to test the server.
[0039] Thirdly, embodiments of this application provide a server-based data processing device, including: a memory and a processor;
[0040] The memory stores computer-executed instructions;
[0041] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0042] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0043] The server-based data processing method, apparatus, device, and storage medium provided in this application generate a first rule and a second rule from a rule base based on the test type and the server's operating system type. The first rule represents a rule for parsing server configuration information into test content, and the second rule represents a rule for parsing test content into test cases. This enables matching specific first and second rules to specific test types and servers with specific operating systems, resulting in rules for parsing server configuration information into test content and further into test cases. The first and second rules provide the rule foundation for subsequent data parsing of configuration information. Subsequently, based on the configuration information and the first rule, a first prompt word is generated. Using a preset large model, data reasoning is performed on the configuration information under the guidance of the first prompt word to obtain the test content. This achieves automated generation of test content, reduces manual intervention, and prevents misjudgments and omissions due to subjective human factors. After generating the test content, further, based on the second rule, the test content is parsed into test cases. Compared to existing technologies that do not consider the test type and the server's operating system type, this application can perform targeted rule transformation for specific test types and servers with specific operating system types. Configuration information is first converted into test content, achieving the initial extraction of the features to be tested from the configuration information and generating corresponding test methods for those features. Then, based on the test content, test cases are further parsed to obtain test cases. The resulting test cases have a high degree of matching with the test content, thus providing better compatibility with test types and operating system types, resulting in more accurate test cases. Attached Figure Description
[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0045] Figure 1 Flowchart of the server-based data processing method provided in this application Figure 1 ;
[0046] Figure 2 Flowchart of the server-based data processing method provided in this application Figure 2 ;
[0047] Figure 3 The server-based data processing method provided in this application Figure 3 ;
[0048] Figure 4 Flowchart of the server-based data processing method provided in this application Figure 4 ;
[0049] Figure 5 Flowchart of the server-based data processing method provided in this application Figure 5 ;
[0050] Figure 6 This is a schematic diagram of the structure of the server-based data processing device provided in this application;
[0051] Figure 7 This is a schematic diagram of the structure of the server-based data processing device provided in this application.
[0052] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0053] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0054] In the process of server research and development, deployment and operation and maintenance, functional verification, compatibility testing and stability testing are important links to ensure server performance and reliability.
[0055] With the diversification of server hardware configurations (such as CPU model, memory capacity, storage type, etc.) and the increasing complexity of software systems (such as operating system version, driver compatibility, etc.), traditional testing methods are facing severe challenges.
[0056] For example, when testing multiple servers with significantly different configurations in batches, testers need to log in to each server one by one to manually query the hardware and software configuration information, which is time-consuming and prone to missing key information, making it particularly inefficient during batch testing.
[0057] Meanwhile, the design of test cases relies on human experience and lacks systematic planning, resulting in incomplete test case coverage or mismatch with actual configurations. Furthermore, frequent manual intervention is required during test execution for scheduling and data recording, and test results need to be manually compiled into reports, which is prone to formatting errors or missing content.
[0058] Traditional testing solutions involve a lot of human intervention and fail to connect the entire process. The large amount of manual intervention in scheduling, recording, and verification can easily lead to misjudgments and omissions, resulting in long testing cycles and high testing costs.
[0059] In addition, some current solutions attempt to introduce large models to generate test cases or reports. In the actual testing process, it is necessary to conduct various types of tests on servers with different operating systems at the same time.
[0060] When the test type is different or the server operating system is different, the focus of the test is generally different. The relevant technologies do not distinguish between these differences, which leads to the generated test cases not matching the actual test requirements and making it difficult to adapt to the actual test needs, thus affecting the test results.
[0061] The server-based data processing method, apparatus, device, and storage medium provided in this application are intended to solve the aforementioned technical problems.
[0062] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0063] Figure 1 Flowchart of the server-based data processing method provided in this application Figure 1 ,like Figure 1 As shown, the method includes:
[0064] S101. Generate a first rule and a second rule based on the test type and the server's operating system type; the first rule represents the rule for parsing the server's configuration information into test content; the test content represents the feature to be tested and the test method corresponding to the feature to be tested; the second rule represents the rule for parsing the test content into test cases.
[0065] It should be noted that this application can be applied to test terminals, as well as other electronic devices or electronic devices, and this application does not limit it in this regard.
[0066] In actual testing, multiple servers need to be tested, including various types of tests such as functional verification, compatibility testing, and stability testing, in order to comprehensively verify the server's functionality and performance.
[0067] To make the generated test cases more targeted, this application generates different rules for different test types and different operating systems, which are used to generate test cases for specific test types and specific operating systems.
[0068] For example, a rule base can be built, which contains multiple rule subsets, each rule subset corresponding to a specific test type and a specific operating system, and each rule subset contains a first rule and a second rule.
[0069] For example, test types include, but are not limited to, at least one of the following: functional testing, compatibility testing, stability testing, etc. Operating system types include, but are not limited to, at least one of the following: Linux operating system, Windows operating system, etc. For each test type and each operating system type, there is a corresponding subset of rules, which includes the first rule and the second rule.
[0070] The first rule represents the rule for parsing the server's configuration information into test content. The test content represents the feature to be tested and the test method corresponding to the feature to be tested. That is, based on the first rule, the configuration information can be parsed into the feature to be tested (such as hardware features or software features) and the test method corresponding to the feature to be tested (such as which dimension to use and which tool to call for testing), providing data basis for the subsequent generation of test cases.
[0071] For example, the first rule specifies the input format of the configuration information, the first instruction template, and the output constraints. The input format of the configuration information can be a standardized data format, such as JSON (JavaScript Object Notation, a lightweight data interchange format). The first instruction template is a template for generating the first prompt word, used to subsequently generate the first prompt word to call a preset large model to generate test content. The output constraints can constrain which data the preset large model outputs and in what data format.
[0072] The second rule represents the rules for parsing test content into test cases. For example, the second rule specifies the second instruction template, coverage requirements, and test case format specifications. The second instruction template is a template for generating second prompt words, used to subsequently generate second prompt words to call a pre-defined large model to generate test cases. Coverage requirements constrain which test dimensions and features need to be covered, and how many test cases need to be generated for each test dimension. The test case format specifications define the data format of the test cases, including the test case number, name, test purpose, test tools, test steps, and expected results.
[0073] For each server to be tested, the rule base can be matched according to the current test type and the type of the server's operating system to obtain the rule subset corresponding to the server, thereby obtaining the first rule and the second rule corresponding to the server, providing rule guidance for the subsequent generation of test cases for the server.
[0074] S102. Generate the first prompt word based on the configuration information and the first rule; the first prompt word is used to guide the generation of test content from the preset large model.
[0075] For example, for each server to be tested, after obtaining the first rule and the second rule corresponding to that server, a first prompt message is first generated based on the first rule and the server's corresponding configuration information. The configuration information refers to the server's hardware and / or software configuration information, which can be obtained manually or via network calls for the test terminal. The first prompt message guides the generation of test content from a pre-defined large model.
[0076] As an example, suppose we need to perform functional testing on a server running Linux. The server's configuration information obtained over the network includes hardware configuration information such as CPU model, number of cores, and clock speed; memory capacity, type, model, speed, bit width, and available capacity; storage type, capacity, speed, bandwidth, and drive letter; network card type, PCIe (PCI-Express) interface speed and bandwidth, network port speed, and EEPROM (Electrically Erasable Programmable Read-Only Memory) information. It also includes software configuration information such as operating system version, firmware version, and driver version.
[0077] Write the configuration information into the first instruction template of the first rule according to the input format of the configuration information specified in the first rule (such as JSON format), and concatenate the output constraints in the first rule (such as the constraint that the output must be in a structured format, and each analysis point shall not exceed 100 words, etc.) to generate the first prompt word. The final generated first prompt word is as follows: "(1) System instruction: You are a professional server test architect. Please conduct test requirement analysis based on the following server configuration information. (2) Configuration information. (3) Analysis requirements: Please strictly follow the following format to output the analysis results: identification of core features of software and hardware, including CPU architecture and performance level, memory configuration and characteristics, storage type and performance level, network characteristics and performance level, operating system type and version characteristics; select test dimensions from the following dimensions: hardware basic function test, hardware advanced function test, software compatibility test, system stability test, abnormal scenario test, performance test. (4) Output constraints include that the output must be in a structured format, and each analysis point shall not exceed 100 words."
[0078] The generated first prompt can be used to guide the generation of test content from a pre-set large model.
[0079] S103. Input the first prompt word into the preset large model to obtain the output test content; the preset large model is used to perform data reasoning on the configuration information based on the first prompt word to obtain the test content.
[0080] After generating the first prompt word, input the first prompt word into the preset large model. The preset large model will then perform data reasoning on the configuration information based on the guidance of the first prompt word and output the test content.
[0081] The pre-trained large model is a fully trained model that can be built into the test terminal or deployed in the cloud. The pre-trained large model is based on a large amount of historical server configuration documents and historical test content, and has the ability to semantically understand server configuration information, reason about test logic, and generate structured text.
[0082] The pre-set large model receives the first prompt word generated by the test terminal, uses a pre-trained knowledge base to perform logical reasoning on the configuration information, and generates standardized test content according to the output requirements in the first prompt word.
[0083] S104. Generate test cases based on the test content and the second rule; the test cases are used to test the server.
[0084] For example, since the second rule represents the rule for parsing test content into test cases, test content can be parsed into test cases based on the second rule. One piece of test content can be parsed into one or more test cases.
[0085] For example, based on the second instruction template in the second rule, and according to the coverage requirements and test case format specifications in the second rule, one or more test cases can be generated. The generated test cases can use the testing methods specified in the test content to perform the required testing on the features to be tested within the test content.
[0086] The server-based data processing method provided in this application generates a first rule and a second rule from a rule base based on the test type and the server's operating system type. The first rule represents a rule for parsing server configuration information into test content, and the second rule represents a rule for parsing test content into test cases. This enables matching specific first and second rules to specific test types and operating system servers to obtain rules for parsing server configuration information into test content, and further parsing the test content into test cases. The first and second rules provide the rule foundation for subsequent data parsing of configuration information. Subsequently, based on the configuration information and the first rule, a first prompt word is generated. Using a preset large model, data reasoning is performed on the configuration information under the guidance of the first prompt word to obtain the test content. This achieves automated generation of test content, reduces manual intervention, and prevents misjudgments and omissions due to subjective human factors. After generating the test content, further, based on the second rule, the test content is parsed into test cases. Compared to existing technologies that do not consider the test type and the server's operating system type, this application can perform targeted rule transformation for specific test types and servers with specific operating system types. Configuration information is first converted into test content, achieving the initial extraction of the features to be tested from the configuration information and generating corresponding test methods for those features. Then, based on the test content, test cases are further parsed to obtain test cases. The resulting test cases have a high degree of matching with the test content, thus providing better compatibility with test types and operating system types, resulting in more accurate test cases.
[0087] Figure 2 Flowchart of the server-based data processing method provided in this application Figure 2 ,like Figure 2 As shown, S104 above includes generating a second prompt word based on the test content and a second rule; the second prompt word is used to guide a preset large model to generate test cases; the second prompt word is input into the preset large model to obtain the output test cases; wherein, the preset large model is used to perform data reasoning on the test content based on the second prompt word to generate test cases. The method includes:
[0088] S201. Generate the first rule and the second rule based on the test type and the server's operating system type.
[0089] S202. Generate the first prompt word based on the configuration information and the first rule.
[0090] S203. Input the first prompt word into the preset large model to obtain the output test content.
[0091] S204. Based on the test content and the second rule, generate a second prompt word; the second prompt word is used to guide the generation of test cases from the preset large model.
[0092] For example, after parsing the test content, it can be divided into one or more test cases based on the second rule. To automate the test case generation process, a pre-defined large model can be used to further analyze the test content, thereby automatically outputting test cases.
[0093] Specifically, based on the test content and the second rule, a second prompt word can be generated. This second prompt word guides the generation of test cases from a pre-defined large model. For example, the test content can be filled into the second instruction template in the second rule. If the second instruction template includes the parsing result item of configuration information, the parsing result item of configuration information can be replaced with the test content. Combining the coverage requirements in the second rule and the format specifications of the test cases, the second prompt word can be obtained.
[0094] S205. Input the second prompt word into the preset large model to obtain the output test cases; wherein, the preset large model is used to perform data reasoning on the test content based on the second prompt word to generate test cases.
[0095] Among them, the pre-set large model is Figure 1 Based on the implementation examples, the pre-trained large model also has a massive amount of historical test content and historical test cases, enabling the pre-trained large model to have the ability to understand the semantics of the test content, reason about the test logic, and generate structured text.
[0096] The pre-set large model receives the second prompt word generated by the test terminal, uses a pre-trained knowledge base to perform logical reasoning on the test content, and generates one or more test cases that can be directly used for testing according to the output requirements in the second prompt word.
[0097] The server-based data processing method provided in this application embodiment, in Figure 1 Based on the previous implementation, a second prompt word is generated according to the test content and the second rule. This second prompt word guides the generation of test cases from a pre-set large model, providing a data foundation for subsequent test case generation. By inputting the second prompt word into the pre-set large model and leveraging its data reasoning capabilities regarding the test content, the automated conversion of test content into test cases is further achieved.
[0098] Figure 3 The server-based data processing method provided in this application Figure 3 ,like Figure 3 As shown, the test content includes feature information, dimension information, and tool information. Feature information characterizes the performance characteristics of the server's hardware and software, dimension information characterizes the dimensions used to test the server, and tool information characterizes the tools used for testing. S104 includes: determining a target template from a preset template library based on the dimension information; the target template characterizes the template for test cases; generating a second prompt word based on the feature information, dimension information, and tool information, according to a second rule; the second prompt word guides the generation of test cases from a preset large model; inputting the second prompt word and the target template into the preset large model to obtain the output test cases; wherein, the preset large model is used to perform data reasoning on the feature information, dimension information, and tool information based on the second prompt word, and to generate test cases based on the target template. The above method includes:
[0099] S301. Generate the first rule and the second rule based on the test type and the server's operating system type.
[0100] S302. Generate the first prompt word based on the configuration information and the first rule.
[0101] S303. Input the first prompt word into the preset large model to obtain the output test content.
[0102] The test content includes feature information, dimensional information, and tool information. Feature information characterizes the performance characteristics of the server's hardware and software; for example, hardware features include CPU characteristics, memory characteristics, storage characteristics, and network characteristics. Software features include operating system characteristics.
[0103] Regarding hardware characteristics, as an example, for CPU characteristics, based on the CPU model, the number of CPU cores (28 cores), and the number of threads (56 threads) in the configuration information, it can be inferred that the CPU is a high-performance computing CPU, thus identifying the CPU characteristics as a high-performance multi-core architecture that supports virtualization.
[0104] As another example, regarding memory characteristics, based on memory capacity and operating frequency, it can be inferred that the memory is large-capacity, high-frequency memory, thus identifying memory characteristics suitable for memory-intensive testing.
[0105] As an example of software characteristics, based on the operating system version, firmware version, driver version, etc., it can be inferred that the operating system is an enterprise-level stable version, thus identifying the operating system characteristics as requiring testing for compatibility with mainstream software.
[0106] Dimensional information represents the dimensions used to test the server. For example, based on the analysis of configuration information, the generated dimensional information includes the following dimensions for testing the server: basic hardware function testing, advanced hardware function testing, software compatibility testing, system stability testing, abnormal scenario testing, performance testing, etc.
[0107] For each testing dimension, the tool information also specifies the testing tools that can be used for that dimension. For example, for software compatibility testing, compatibility test scripts, driver verification tools, etc., can be used.
[0108] S304. Based on the dimension information, determine the target template from the preset template library; the target template represents the template of the test case.
[0109] For example, the preset template library includes multiple predefined, reusable test case templates that cover common dimensions of server testing, but do not contain specific test data.
[0110] Each dimension corresponds to one or more test case templates. For example, the hardware functional testing dimension corresponds to memory basic function test templates, memory stress test templates, etc. For each dimension, one or more target templates corresponding to that dimension can be selected from a preset template library based on the dimension information. The selected target templates are used to generate test cases.
[0111] S305. Based on the feature information, dimension information, and tool information, generate a second prompt word according to the second rule; the second prompt word is used to guide the generation of test cases from the preset large model.
[0112] After obtaining the target template, it is necessary to determine the specific test data to be filled in the target template in order to generate the final test cases. Based on feature information, dimension information, and tool information, a second prompt word can be generated according to the second rule, so that test cases can be generated using the preset large model in subsequent processing.
[0113] For example, feature information, dimension information, and tool information can be filled into the second instruction template in the second rule. For instance, the second instruction template includes the parsing result item of configuration information. The parsing result item of configuration information is replaced with feature information, dimension information, and tool information to instruct the preset large model to determine which features need to be tested based on the feature information, to determine from which dimensions the features should be tested based on the dimension information, and to determine which tools can be used for testing based on the tool information. The coverage requirements in the second rule and the format specifications of the test cases are combined to obtain the second prompt word.
[0114] As an example, the generated second prompt word is: "(1) System instruction: You are a professional server test case designer. Please generate directly executable automated test cases based on the following server configuration analysis results. (2) Parsing results of configuration information, including feature information, dimension information, and tool information. (3) Coverage requirements: All test dimensions must be covered, and at least 5 test cases must be generated for each dimension. The test cases must be strongly related to the features. (4) Test case format specifications: Each test case includes test case number, test case name, test purpose, test steps, expected results, test tools, and execution instructions. (5) Output constraints, such as outputting a JSON array."
[0115] S306. Input the second prompt word and the target template into the preset large model to obtain the output test cases; wherein, the preset large model is used to perform data reasoning on feature information, dimension information and tool information based on the second prompt word, and generate test cases based on the target template.
[0116] The pre-defined large model receives the second prompt word. Based on the requirements in the second prompt word, it performs data reasoning on feature information, dimension information, and tool information to generate specific test data that needs to be filled into the target template. The generated test data is then filled into the corresponding target template to obtain test cases.
[0117] The server-based data processing method provided in this embodiment determines a target template from a preset template library based on the dimensional information in the test content. The target template represents the template of the test case. Figure 2 Based on the implementation examples, template guidance is provided for generating test cases for pre-defined large models. Furthermore, the test content clearly defines feature information, dimension information, and tool information, further specifying which features need to be tested, from which dimensions to be tested, and what tools to use. This provides more refined inference data for test case generation, resulting in more accurate test data. Combined with the target template, test cases that meet the testing requirements are generated.
[0118] Figure 4 Flowchart of the server-based data processing method provided in this application Figure 4 ,like Figure 4 As shown, before generating the first and second rules based on the test type and the server's operating system type, the above method also includes:
[0119] S401. Establish a network connection with the server based on the preset login information.
[0120] For example, in order to obtain configuration information from the server, a network connection needs to be established between the test terminal and the server. After logging in, the server's configuration information is automatically obtained. Login information for the server, such as login identity information and login credentials (which can be stored encrypted), can be pre-configured in the test terminal. When testing the server is required, the pre-configured login information is used to automatically establish a network connection with the server.
[0121] Since different servers may have different operating systems installed, and different operating systems have different requirements for network connection protocols, multiple connection protocols can be pre-configured, allowing the test terminal to establish a network connection with the server through various preset connection protocols.
[0122] During the process of establishing a network connection through login, the target protocol can be determined from multiple preset connection protocols based on the server's operating system type; the target protocol represents the network protocol used to establish a network connection with the server; based on the target protocol and the preset login information, a network connection is established with the server.
[0123] For example, the preset connection protocols include, but are not limited to, one or more of the following: SSH (Secure Shell) protocol, RDP (Remote Desktop Protocol) protocol, Telnet protocol, etc.
[0124] Based on the server's operating system type, it can automatically adapt to a target protocol that can be used for network connection from multiple preset connection protocols, and establish a network connection with the server based on the target protocol and preset login information.
[0125] By pre-setting multiple connection protocols in the test terminal, different operating systems can be adapted during the test, thereby ensuring that the test terminal and the server can successfully establish a network connection, providing a network foundation for obtaining configuration information later.
[0126] S402. If a network connection is established with the server, the server's preset interface is called to obtain the returned configuration information. The preset interface is used to call the preset acquisition tool to collect the server's configuration information.
[0127] When the test terminal calls the server's preset interface, it can execute built-in commands in the operating system to invoke preset data collection tools and collect all of the server's configuration information. After collection, it can automatically verify the integrity of the information, supplement missing data, and generate standardized structured text of the configuration information. The collected information can be encrypted and stored, and can be compared with historical configuration information to mark configuration changes, so that only the changed items can be tested according to testing requirements.
[0128] S403. If a network connection has not been established with the server, a new network connection will be established with the server based on the preset login information.
[0129] For example, if a network connection to the server is lost due to network anomalies or other reasons, the automatic reconnection function is triggered, and a new network connection is established with the server based on the preset login information. The number of allowed retries can be set, for example, a preset 3 retries with a 30-second interval between each attempt. Upon successful retry, the server login is completed, and a login log is generated, recording details such as login time and connection method. If a network connection to the server is lost after all 3 attempts, an error message is automatically generated, the abnormal login information is stored locally, and the connection process is terminated.
[0130] The retry mechanism can accommodate situations where network instability leads to network connection failures, ensuring that when a network connection is available, the test terminal can establish a network connection with the server to the greatest extent possible, thereby guaranteeing that it can successfully obtain configuration information from the server subsequently.
[0131] In this embodiment, by pre-setting login information, the test terminal can automatically establish a network connection with the server, automatically obtain the server's configuration information, and perform automated processing of the configuration information for standardization and formatting, replacing manual querying, further reducing human intervention, and ensuring the comprehensiveness and accuracy of configuration information collection.
[0132] Figure 5 Flowchart of the server-based data processing method provided in this application Figure 5 ,like Figure 5 As shown, after generating test cases based on the test content and the second rule, the above method also includes:
[0133] S501. Generate a third rule based on the test type and the server's operating system type; the third rule represents the rule that parses the test results into a test report.
[0134] For example, the rule subset in the rule base includes not only the first and second rules, but also a third rule. That is, for each test type and each server's operating system type, there is at least one corresponding third rule. The third rule represents the rule that parses the test results into a test report.
[0135] In some specific implementations of this embodiment, the latest industry testing standards can also be monitored via network connection. When changes in industry testing standards are detected, an update to the rule base is triggered. The rules in the rule base are updated in real time according to the latest testing standards to ensure that the preset large model can always output test cases that conform to the latest testing specifications.
[0136] For example, the third rule specifies the third instruction template, language specifications, and anomaly analysis requirements for generating test reports, and constrains the completeness, logical clarity, and data accuracy of the test reports. Specifically, the third instruction template serves as a template for generating third prompts, which are then used to call a pre-defined large model to generate the test report. The language specifications define the descriptive standards for the test report content. The anomaly analysis requirements outline the analytical requirements for test case failures.
[0137] Based on the test type and the server's operating system type, a subset of rules can be matched from the rule base to obtain a third rule, which is then used to generate a third prompt word.
[0138] S502. Based on the test cases, test the server and obtain the test results.
[0139] Meanwhile, for each generated test case, each test case is executed sequentially according to its number to test the server. The default is full testing, meaning all test cases generated according to the preset large model are executed completely.
[0140] It can also quickly switch to a fast testing mode based on testing needs. That is, only core or high-priority test cases are executed, skipping time-consuming and non-critical test items to quickly obtain test results.
[0141] During test case execution, the system can monitor test progress, system resource usage, and abnormal execution information in real time, automatically collecting and encrypting log information during execution. When an abnormality is detected, the system automatically pauses the currently executing test case, fully records the abnormal information, skips the abnormally executed test case, and continues executing subsequent test cases. For abnormally executed test cases, if the abnormality is recoverable (i.e., the environment causing the abnormal execution is recoverable), the abnormally executed test case is re-executed when the environment for the abnormal execution is detected to be recovered, ensuring that all test cases are executed.
[0142] After executing all test cases, a summary test result is obtained. The test result should include at least the input data, execution process data, and execution output data for each test case.
[0143] S503. Based on the test results and the third rule, generate a third prompt word; the third prompt word is used to guide the generation of a test report from the preset large model.
[0144] After obtaining the test results, the test results are filled into the third instruction template in the third rule. The language specifications, anomaly analysis requirements, constraints, etc. in the third rule are combined to obtain the third prompt words, which are used to guide the generation of test reports from the preset large model.
[0145] S504. Input the third prompt word into the preset large model to obtain the output test report; wherein, the preset large model is used to perform data reasoning on the test results based on the third prompt word and generate the test report.
[0146] The pre-trained large model consists of a massive amount of historical test results and reports, which enables it to understand the semantics and make logical inferences about the test results and generate structured test reports.
[0147] The pre-set large model receives third-party prompts generated by the test terminal, uses a pre-trained knowledge base to perform logical reasoning on the test results, and generates standardized test reports according to the output requirements in the third-party prompts. For example, it can generate test reports adapted to various formats such as PDF, Word, and Excel.
[0148] The generated test report will be automatically stored in a preset path and automatically pushed to a preset recipient via email.
[0149] In this embodiment, for the test results obtained from executing test cases, a third prompt word is generated based on a third rule. The third rule represents the rule for parsing the test results into a test report. Then, the third prompt word is input into a preset large model to obtain the output test report, thus realizing the automation of test report generation. This achieves a closed-loop process from configuration information collection, test case generation, test case execution, and test report generation, improving the overall efficiency of testing.
[0150] The following is an example of a fully automated process, from obtaining configuration information, generating test cases, executing test cases, to generating test reports, to further illustrate this application. This example is applied to a general-purpose server running Linux. The specific execution process is as follows:
[0151] First, log in to the test terminal and configuration server using your login credentials, enter the test type and the server's operating system type. The test terminal will automatically match the first rule, second rule, third rule, and target template. The default test report storage path is the "Server Test Report" folder on the D drive of the server. The default email address for the test manager is also specified. Ensure the server is running normally and that the network connection between the test terminal and the server is stable. Start the full-process test.
[0152] The test terminal automatically detects the server's operating system type as Linux, prioritizes SSH connection, automatically inputs preset login credentials, and sends a network connection request. If the initial login fails due to network fluctuations, a retry mechanism is automatically triggered. Upon successful retry, a network connection is established with the server, and a login log is generated, recording information such as login time and connection method. If the retry fails, an exception log is automatically generated, stored locally, and the connection process is terminated.
[0153] After logging into the server, the test terminal automatically invokes a built-in command in the operating system to call the preset configuration data collection tool, collecting all the server's configuration information. The collected configuration information is then structured to generate structured configuration data.
[0154] After obtaining the configuration information, a first prompt word is generated based on the configuration information and the first rule. This prompt word is then input into a pre-defined large model to guide the model in performing data reasoning and analysis on the configuration information, extracting test content such as hardware and software characteristics, test dimensions, test tools, and test priorities. For example, the first rule includes converting configuration information such as server CPU, memory, storage, network card, OS version, and driver version into structured text of a unified format as input to the large model; the prompt word contains no manual input or vague descriptions, ensuring reproducible input and predictable output.
[0155] Next, based on the test content and the second rule, a second prompt word is generated. For example, the second rule includes: generating adapted automated test cases based on the current server configuration; test cases covering hardware functions (basic / advanced functions), software compatibility, system stability, abnormal scenarios, interaction scenarios, fault tolerance, and other dimensions; each test case includes: test case number, test case name, test steps, expected results, test tools, and execution instructions; the output is a structured list that can be directly parsed and executed by the automated testing framework, without redundant descriptions or manual operation steps; the output content must be structured and machine-parseable; test cases and test results must be strongly matched and strongly correlated with the server configuration; output fields are fixed and formatted uniformly to facilitate subsequent automatic archiving and report generation.
[0156] The second prompt word is input into a pre-defined large model. Based on the target template, 140 test cases are generated, including: 50 hardware function test cases (such as CPU performance testing, memory read / write testing, storage I / O testing, network card connectivity testing, PCIe compatibility testing, etc.), 40 software compatibility test cases (such as driver adaptation testing), 30 system stability test cases (such as 72-hour long-term stability testing, high-load testing, etc.), and 20 abnormal scenario test cases (such as power failure restart testing, network interruption testing, CPU overload testing, etc.). This step requires no manual design or adjustment; the test cases and configurations are precisely matched, covering all dimensions of testing needs, significantly reducing the professional threshold for testing, and improving the efficiency of test case planning.
[0157] The test terminal defaults to full test mode, sequentially calling each test case in the order they were generated. It automatically invokes the corresponding testing tools, collecting and storing data such as test time, execution results, and resource usage in real time. During testing, a simulated network outage occurs. The test terminal immediately pauses the network card bandwidth test case, records the occurrence point, description, and test logs, and automatically jumps to the PCIe interface compatibility test. After the network is restored, the network card test case is automatically restarted and completed.
[0158] After executing all test cases, the test results are obtained (including 139 test cases passed, 1 case passed after restarting due to network interruption, resulting in a 100% pass rate, 1 case with a network interruption error which has been resolved, and configuration information). Based on the test results and the third rule, a third prompt word is generated. This third prompt word is input into a preset large model, which drives the model to perform reasoning and analysis on the test results and output a standardized test report.
[0159] For example, the third rule includes: automatically determining the execution result (pass / fail / abnormal) of each test case; locating and briefly analyzing failures and abnormal items; outputting structured test results, including test case number, execution result, time consumption, exception information, and test conclusion; and ensuring that the output content is objective, based on actual test data, and does not include irrelevant content.
[0160] The report contains the following core contents: (1) Basic server information (configuration information list); (2) Test environment information (test terminal configuration, server operating system version, network connection method); (3) Test case execution statistics (pass rate, failure rate, unexecuted items); (4) Test data details (test results, time consumption, resource usage of each test case); (5) Anomaly information analysis (anomaly description, occurrence node, troubleshooting process, solution); (6) Test conclusion (the server runs stably, the software and hardware are properly adapted, and it meets the test specifications).
[0161] The report is automatically saved to a preset path and automatically pushed to the preset test manager's email address, eliminating the need for manual editing, backup, and push.
[0162] Figure 6 This is a schematic diagram of the structure of the server-based data processing device provided in this application, as shown below. Figure 6 As shown, the server-based data processing device 60 provided in this embodiment includes:
[0163] The first generation module 601 is used to generate a first rule and a second rule based on the test type and the operating system type of the server; the first rule represents the rule for parsing the server's configuration information into test content; the test content represents the feature to be tested and the test method corresponding to the feature to be tested; the second rule represents the rule for parsing the test content into test cases.
[0164] The second generation module 602 is used to generate a first prompt word based on the configuration information and the first rule; the first prompt word is used to guide the generation of test content from the preset large model;
[0165] The reasoning module 603 is used to input the first prompt word into the preset large model to obtain the output test content; the preset large model is used to perform data reasoning on the configuration information based on the first prompt word to obtain the test content.
[0166] The third generation module 604 is used to generate test cases based on the test content and the second rule; the test cases are used to test the server.
[0167] In one possible implementation, the third generation module 604 is further used for:
[0168] Based on the test content and the second rule, a second prompt word is generated; the second prompt word is used to guide the generation of test cases from the preset large model.
[0169] Input the second prompt word into the preset large model to obtain the output test cases;
[0170] The pre-set large model is used to perform data reasoning on the test content based on the second prompt word and generate test cases.
[0171] In one possible implementation, the test content includes feature information, dimension information, and tool information. Feature information characterizes the performance characteristics of the server's hardware and software, dimension information characterizes the dimensions used to test the server, and tool information characterizes the tools used for testing. The third generation module 604 is also used for:
[0172] Based on the dimension information, the target template is determined from the preset template library; the target template represents the template of the test case.
[0173] Based on feature information, dimension information, and tool information, a second prompt word is generated according to the second rule; the second prompt word is used to guide the generation of test cases from the preset large model.
[0174] Input the second prompt word and the target template into the preset large model to obtain the output test cases;
[0175] The pre-set large model is used to perform data reasoning on feature information, dimension information, and tool information based on the second prompt word, and to generate test cases based on the target template.
[0176] In one possible implementation, the server-based data processing device 60 further includes a connection module for:
[0177] Establish a network connection with the server based on the preset login information;
[0178] If a network connection is established with the server, the server's preset interface is called to obtain the returned configuration information; the preset interface is used to call preset data collection tools to collect the server's configuration information.
[0179] In one possible implementation, the connection module is also used for:
[0180] If a network connection is not established with the server, a new network connection will be established with the server based on the preset login information.
[0181] In one possible implementation, the connection module is also used for:
[0182] Based on the server's operating system type, the target protocol is determined from multiple preset connection protocols; the target protocol represents the network protocol used to establish a network connection with the server.
[0183] Based on the target protocol and the preset login information, a network connection is established with the server.
[0184] In one possible implementation, the server-based data processing device 60 further includes a fourth generation module, used for:
[0185] A third rule is generated based on the test type and the server's operating system type; the third rule represents the rule for parsing the test results into a test report.
[0186] Based on the test cases, the server is tested and the test results are obtained;
[0187] Based on the test results and the third rule, a third prompt word is generated; the third prompt word is used to guide the generation of test reports from the pre-set large model.
[0188] Input the third prompt word into the preset large model to obtain the output test report;
[0189] The pre-set large model is used to perform data reasoning on the test results based on the third prompt word and generate a test report.
[0190] The server-based data processing device provided in this embodiment can execute the methods provided in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0191] Figure 7 This is a schematic diagram of the server-based data processing device provided in this application. Figure 7 As shown, the server-based data processing device 70 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the device 70 further includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus.
[0192] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.
[0193] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0194] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0195] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0196] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0197] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0198] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0199] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0200] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0201] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0202] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0203] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0204] If a function is implemented as a software functional unit 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 this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0205] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0206] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A server-based data processing method, characterized in that, include: Generate a first rule and a second rule based on the test type and the server's operating system type; The first rule represents the rule for parsing the server's configuration information into test content; the test content represents the feature to be tested and the test method corresponding to the feature to be tested. The second rule represents the rule for parsing test content into test cases; Based on the configuration information and the first rule, a first prompt word is generated; The first prompt word is used to guide the generation of test content from the preset large model; Input the first prompt word into the preset large model to obtain the output test content; The preset large model is used to perform data reasoning on the configuration information based on the first prompt word to obtain the test content; Based on the test content and the second rule, test cases are generated; The test cases are used to test the server.
2. The method according to claim 1, characterized in that, Based on the test content and the second rule, test cases are generated, including: Based on the test content and the second rule, a second prompt word is generated; the second prompt word is used to guide the generation of test cases from a preset large model. Input the second prompt word into the preset large model to obtain the output test cases; The preset large model is used to perform data reasoning on the test content based on the second prompt word and generate test cases.
3. The method according to claim 1, characterized in that, The test content includes feature information, dimension information, and tool information. The feature information represents the performance characteristics of the server's hardware and software, the dimension information represents the dimensions used to test the server, and the tool information represents the tools used for testing. Based on the test content and the second rule, test cases are generated, including: Based on the dimensional information, a target template is determined from a preset template library; the target template represents the template of the test case. Based on the feature information, the dimension information, and the tool information, a second prompt word is generated according to the second rule; the second prompt word is used to guide the generation of test cases from a preset large model. Input the second prompt word and the target template into the preset large model to obtain the output test cases; The preset large model is used to perform data reasoning on feature information, dimension information, and tool information based on the second prompt word, and to generate test cases based on the target template.
4. The method according to any one of claims 1-3, characterized in that, Also includes: Establish a network connection with the server based on the preset login information; If a network connection is established with the server, the server's preset interface is called to obtain the returned configuration information; The preset interface is used to call a preset data collection tool to collect the configuration information of the server.
5. The method according to claim 4, characterized in that, Also includes: If a network connection is not established with the server, a new network connection will be established with the server based on the preset login information.
6. The method according to claim 4, characterized in that, Establishing a network connection with the server based on preset login information includes: Based on the operating system type of the server, a target protocol is determined from multiple preset connection protocols; the target protocol represents the network protocol used to establish a network connection with the server. Based on the target protocol, a network connection is established with the server according to the preset login information.
7. The method according to any one of claims 1-3, characterized in that, Also includes: Generate a third rule based on the test type and the server's operating system type; The third rule represents the rule for parsing test results into a test report; The server is tested according to the test cases, and the test results are obtained. Based on the test results, and using the third rule, a third prompt word is generated; The third prompt word is used to guide the generation of test reports from the preset large model; Input the third prompt word into the preset large model to obtain the output test report; The preset large model is used to perform data reasoning on the test results based on the third prompt word and generate a test report.
8. A server-based data processing device, characterized in that, include: The first generation module is used to generate a first rule and a second rule based on the test type and the operating system type of the server; the first rule represents the rule for parsing the server's configuration information into test content; the test content represents the feature to be tested and the test method corresponding to the feature to be tested. The second rule represents the rule for parsing test content into test cases; The second generation module is used to generate a first prompt word based on the configuration information and the first rule; The first prompt word is used to guide the generation of test content from the preset large model; The reasoning module is used to input the first prompt word into a preset large model and obtain the output test content; The preset large model is used to perform data reasoning on the configuration information based on the first prompt word to obtain the test content; The third generation module is used to generate test cases based on the test content and the second rule; the test cases are used to test the server.
9. A server-based data processing device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.