A big data-based large model test case intelligent generation system
The intelligent test case generation system based on big data and large models solves the problem that traditional test case generation systems cannot deeply explore system design details, and realizes the generation of efficient, comprehensive and reliable test cases in the entire software development process, thereby improving test coverage and efficiency.
Patent Information
- Application Number
- CN202510948805.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-10
AI Technical Summary
Traditional test case generation systems find it difficult to deeply explore the complex interaction logic and business rules between system modules, and are unable to effectively intervene in the early stages of software development, resulting in insufficient test coverage and increased subsequent repair costs.
A large-model test case intelligent generation system based on big data is adopted to generate high-quality test cases through units such as multi-source heterogeneous data perception and structured analysis, hypergraph topological relationship construction and semantic enhancement, cross-modal feature joint extraction and deep fusion, test case framework generation and parameter association, hypergraph neural network optimization iteration and use case clustering.
It achieves in-depth coverage of system design details throughout the entire software development process, generates efficient, comprehensive, and reliable test cases, improves the depth, breadth, and efficiency of test case generation, and ensures software quality and reliability.
Smart Images

Figure CN120448285B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and software testing, and in particular to a large-scale model test case intelligent generation system based on big data. Background Art
[0002] Driven by the wave of digital transformation, large language model (LLM) technologies such as GPT and BERT have achieved breakthroughs. Their superior natural language understanding and generation capabilities have brought new development opportunities to the field of software testing. Generating basic test scenarios based on text descriptions has become an important exploration direction for software test automation. However, with the increasing complexity of software systems, traditional test case generation methods are no longer able to meet the requirements of efficient and accurate testing. More intelligent and advanced solutions are urgently needed to ensure the quality and reliability of software products.
[0003] Current traditional test case generation has obvious limitations. On the one hand, when dealing with the relationship between requirement documents and system designs, existing methods are unable to deeply explore the complex interaction logic and business rules between the various modules of the system, and only stay at the surface of information processing. As a result, the generated test cases are difficult to fully cover the software functions and cannot effectively identify potential design defects and logical loopholes. On the other hand, when responding to the testing needs of the entire software development process, some test case generation systems are highly dependent on the system code that has been developed. In the early stages of software development, when the code is not yet formed, it cannot play a role, making it difficult for testing work to intervene in the early stages of the development process, unable to discover problems in time, increasing the cost of later repairs, and seriously affecting the overall efficiency and quality control of software development. Summary of the Invention
[0004] In order to overcome the shortcomings and deficiencies of the existing technology, the present invention provides a large model test case intelligent generation system based on big data.
[0005] The technical solution adopted by the present invention is a system for intelligently generating large-model test cases based on big data, comprising:
[0006] The multi-source heterogeneous data perception and structured parsing unit is used to collect multi-source data such as requirement documents and system codes and parse them into structured data. The hypergraph topology relationship construction and semantic enhancement unit constructs structured data into a hypergraph structure, connects different data nodes through hyperedges and enhances semantic expression. The cross-modal feature joint extraction and deep fusion unit extracts text and code cross-modal features from the hypergraph structure and performs deep fusion. The test case framework generation and parameter association unit generates a basic test case framework based on the fused features and associates software test parameters. The hypergraph neural network optimization iteration and use case clustering unit iteratively optimizes the basic framework through the optimized hypergraph neural network and clusters test cases. The test case verification and output unit verifies the clustered test cases and outputs the final results.
[0007] The output end of the multi-source heterogeneous data perception and structured parsing unit is connected to the input end of the hypergraph topology relationship construction and semantic enhancement unit, the output end of the hypergraph topology relationship construction and semantic enhancement unit is connected to the input end of the cross-modal feature joint extraction and deep fusion unit, the output end of the cross-modal feature joint extraction and deep fusion unit is connected to the input end of the test case framework generation and parameter association unit, the output end of the test case framework generation and parameter association unit is connected to the input end of the hypergraph neural network optimization iteration and use case clustering unit, and the output end of the hypergraph neural network optimization iteration and use case clustering unit is connected to the input end of the test case verification and output unit.
[0008] Furthermore, when the hypergraph topology relationship is constructed and the semantic enhancement unit constructs the hypergraph structure, the formula ,in, Represents a node set consisting of requirement document keyword nodes and code function nodes. Represents a set of hyperedges connecting different types of nodes. Hyperedges connect multiple nodes to represent complex relationships between data. represents the hyperedge weight matrix, whose elements For quantization nodes With node The semantic association strength when connected by hyperedges; when the cross-modal feature joint extraction and the deep fusion unit perform feature fusion, the formula is used ,in, is the fused cross-modal feature vector, is the text feature vector extracted from the text node in the hypergraph, is the code feature vector extracted from the code node in the hypergraph, and The fusion coefficient is dynamically adjusted according to the feature importance in the software test parameters. The test coverage type and test priority in the software test parameters affect and The value of .
[0009] Furthermore, the cross-modal feature joint extraction and deep fusion unit uses the optimized hypergraph neural network to extract cross-modal features through the formula Update node features, where For nodes In the Feature vectors in layer hypergraph neural networks, is the activation function, For the node The set of connected hyperedges, is the number of hyperedges in the set, For nodes With node Hyperedge weights, For nodes In the The feature vector of the layer, For the Layer Hyperedge The test case framework generates a feature transformation matrix associated with the parameter association unit when the software test parameters are associated with the parameter association unit, using the formula ,in, is the associated test case parameter set, is the parameter adjustment coefficient, Based on hypergraph structure and fusion features Generated basic parameter set, test data type in software test parameters, test environment configuration impact and Calculation.
[0010] Furthermore, when the hypergraph neural network optimization iteration and the use case clustering unit optimize the hypergraph neural network, the formula is used ,in, are the optimized hypergraph neural network parameters, is the parameter to be optimized, is the number of training samples, For the The loss function of each sample is used to build the loss calculation rules based on the test case completeness and test step accuracy in the software test parameters; when clustering test cases, the formula is used. ,in, is the clustered test case, As the basic test case framework, The use case adjustment amount calculated by the optimized hypergraph neural network, the test depth requirement and test complexity index in the software test parameters Calculation.
[0011] Furthermore, when the cross-modal feature joint extraction and the deep fusion unit perform cross-modal feature extraction, the formula is also used. ,in, is the code modal eigenvector, is the number of code feature dimensions, is the weight of the k-th dimension code feature, is the code feature value of the kth dimension, the code coverage and code logic complexity in the software test parameters The value of the test case framework generation and parameter association unit generates the test case framework using the formula ,in, For the generated test case framework, is the framework generation function, H is the hypergraph structure, is the code modal eigenvector, is the text modal feature vector, the test type and test target influence in the software test parameters The operation process.
[0012] Furthermore, when the hypergraph topology relationship is constructed and the semantic enhancement unit enhances the semantic expression, the formula is used. , where S is the overall semantic enhancement vector of the hypergraph, For nodes The semantic contribution weight of For nodes Initial semantic vector, node importance and node correlation in software testing parameters Calculation; When the cross-modal feature joint extraction and deep fusion unit perform feature fusion, the formula is also used ,in, is the final fusion feature vector, F is the preliminary fusion feature vector, is the feature correction vector adjusted according to the hypergraph structure and software test parameters, is the correction coefficient, the feature fusion accuracy requirements in the software test parameters, and the impact of the test case quality standards and of confirmation.
[0013] Furthermore, the cross-modal feature joint extraction and deep fusion unit includes: a text feature extraction sub-unit, which is used to extract word vectors and semantic dependency text features from text nodes in the hypergraph; a code feature extraction sub-unit, which is used to extract function call relationships and code structure code features from code nodes in the hypergraph; a cross-modal feature alignment sub-unit, which aligns the extracted text features with the code features in terms of dimension and semantics based on the hypergraph structure; and a feature fusion optimization sub-unit, which optimizes and adjusts the initially fused cross-modal features according to software testing parameters.
[0014] Furthermore, the test case framework generation and parameter association unit includes: a basic framework generation sub-unit, which generates a basic test case framework including test steps and test objects based on the fused cross-modal features; a parameter mapping sub-unit, which maps the test data and test environment in the software test parameters to the corresponding parts of the basic framework; a framework verification sub-unit, which checks whether the generated test case framework complies with the software testing specifications; and a parameter association optimization sub-unit, which optimizes the associated test case parameters according to the association relationship between the software test parameters.
[0015] Furthermore, the hypergraph neural network optimization iteration and use case clustering unit includes: a network parameter initialization subunit, which assigns initial parameters to the hypergraph neural network; a training sample construction subunit, which constructs a sample set for training based on the hypergraph structure and fusion features; a network training optimization subunit, which uses an optimization algorithm to train the hypergraph neural network and update the network parameters; and a use case clustering execution subunit, which performs clustering operations on the basic test case framework based on the trained hypergraph neural network.
[0016] Beneficial effects: The present invention proposes a large-model test case intelligent generation system based on big data. The system collects and structures multi-source data such as requirement documents and system codes through a multi-source heterogeneous data perception and structured parsing unit, providing a comprehensive data foundation for subsequent processing; the hypergraph topology relationship construction and semantic enhancement unit constructs the data into a hypergraph structure, uses hyperedges to connect different nodes, and deeply mines the complex relationships between data, making up for the deficiency of traditional methods that cannot associate system design details, ensuring that the generated test cases can cover the interaction logic and business rules of each module of the system. The cross-modal feature joint extraction and deep fusion unit extracts multimodal features such as text and code from the hypergraph and fuses them. Combined with the test case framework generation and parameter association unit, it generates a basic framework based on the fused features and associates test parameters, so that the generated test cases no longer just stay on the surface information. The hypergraph neural network optimization iteration and use case refinement unit iteratively optimizes the basic framework through the optimized hypergraph neural network, refines the test cases, and improves the quality of the test cases. The test case verification and output unit verifies and outputs the final test cases to ensure accuracy. The entire system does not rely on completed system code and can intervene in the entire software development process. Starting from multi-source data and through the collaborative operation of various units, it comprehensively improves the depth, breadth and efficiency of test case generation, providing an efficient and reliable solution for large-model software testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a diagram of the system unit composition of the present invention;
[0018] Figure 2 This is a flow chart of the system operation of the present invention. DETAILED DESCRIPTION
[0019] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict, and the present application will be further described in detail in combination with the drawings and specific embodiments.
[0020] As shown in the drawings, Figure 1 A big data-based large model test case intelligent generation system includes:
[0021] A multi-source heterogeneous data perception and structured analysis unit is configured to collect multi-source data such as requirement documents and system codes, and analyze the data into structured data.
[0022] Specifically, the multi-source heterogeneous data perception and structured analysis unit is the first step of system operation, and its core function is to collect various types of data such as requirement documents and system codes, and convert these data into structured form. In terms of technical parameters, this unit needs to have strong compatibility to support the collection of requirement documents in.docx,.pdf formats and system codes written in different programming languages such as Java, Python and C++. At the same time, it also needs to meet the timeliness requirement of data collection, and can realize real-time or timed data collection to ensure that the obtained data can timely reflect the latest state of the software system. The significance of this unit is to break down the data barriers, integrate the data stored in different formats and different locations in the software development process, provide a unified and standardized data basis for subsequent processing, and avoid deviations in test case generation caused by data format confusion or information loss.
[0023] In the specific implementation process, the multi-source heterogeneous data perception and structured analysis unit is connected with the version control system and document management system of the software development project by deploying specific data collection interfaces. For requirement documents, the unit will identify the structure information such as title, paragraph and list in the documents and extract the key requirement description; for system codes, the unit will parse the syntax units such as function definition, class structure and variable declaration in the codes. Then, the data structure technology is used to convert the collected data into a format convenient for computer processing, such as XML, JSON or specific data table structure. In the conversion process, the key information in the data is marked and classified to provide standardized input data for the subsequent hypergraph topology relationship construction and semantic enhancement unit, so that the system can deeply mine the internal relationship between the data based on these structured data.
[0024] The hypergraph topology relationship construction and semantic enhancement unit constructs the structured data into a hypergraph structure, connects different data nodes through hyperedges and enhances the semantic expression;
[0025] Specifically, the main function of the hypergraph topology relationship construction and semantic enhancement unit is to construct structured data into a hypergraph structure, connecting different data nodes through hyperedges to represent the complex many-to-many relationships between data and enhance the semantic expression of data. In terms of technical parameters, this unit needs to accurately control the generation rules of hypergraph nodes and hyperedges to ensure that the hypergraph structure accurately reflects the logical relationships of the data. For example, for the generation of nodes, reasonable abstraction should be made according to the data type and importance; for the construction of hyperedges, the association strength and semantic association between data nodes need to be accurately judged. The significance of this unit lies in transforming the originally planar and isolated structured data into a hypergraph with a three-dimensional topological structure, making the complex semantic relationships between data explicit, providing a more rich and deep information basis for subsequent cross-modal feature extraction and fusion, and thus improving the comprehensiveness and accuracy of test case generation.
[0026] In specific implementation, the hypergraph topology relationship construction and semantic enhancement unit first abstracts the functional requirements in the requirement document, the business process description, and the functions, classes, etc. in the system code into nodes of the hypergraph according to the type and source of the data. Then, by analyzing the context and logical association of the data, it connects multiple related nodes using hyperedges. For example, when a functional requirement in the requirement document corresponds to multiple function implementations in the system code, the node representing the functional requirement is connected to these function nodes through hyperedges. After constructing the hypergraph structure, the unit further performs semantic enhancement processing on the nodes and hyperedges, assigning different weights and semantic labels to the nodes and hyperedges according to factors such as the importance and frequency of data, so that the hypergraph structure can more accurately express the semantic information of the data, laying a foundation for subsequent units to deeply understand and process the data.
[0027] The cross-modal feature joint extraction and deep fusion unit extracts text and code cross-modal features from the hypergraph structure and performs deep fusion;
[0028] Specifically, the cross-modal feature joint extraction and deep fusion unit is responsible for extracting text, code, and other different modal features from the hypergraph structure and deeply fusing these features. In terms of technical parameters, it requires efficient feature extraction algorithms that can extract text features such as word vectors and semantic dependency relationships from text nodes in the hypergraph, and code features such as function call relationships and code structure from code nodes. At the same time, for the feature fusion process, the fusion method and degree need to be accurately controlled to ensure that the fused features can completely retain the key information of each modality and have good distinguishability. The significance of this unit lies in integrating the feature information of different modal data in the software system, breaking down the barriers between modalities, forming a more comprehensive and representative integrated feature, and providing a more rich and valuable basis for the generation of test case frameworks, thereby generating test cases that better meet the actual needs of the system.
[0029] During the specific implementation process, the cross-modal feature joint extraction and deep fusion unit first uses natural language processing technology to perform word segmentation, part-of-speech tagging, syntactic analysis and other operations on the text content for the text nodes in the hypergraph, and extracts text features such as word vectors and semantic roles. For code nodes, static code analysis technology is used to parse the syntax tree of the code and extract code features such as function call hierarchy, variable scope, and code logical structure. After extracting features of different modalities, the unit adopts a specific fusion strategy to integrate text features and code features. For example, through weighted summation, feature splicing, etc., the features of the two modalities are combined into a new cross-modal feature vector. During the fusion process, the fusion weights will be dynamically adjusted according to the importance of different features in the software test parameters, so that the fused features can better meet the needs of test case generation and provide high-quality feature input for the construction of the subsequent test case framework.
[0030] The test case framework generation and parameter association unit generates a basic test case framework based on the fused features and associates software test parameters;
[0031] Specifically, the function of the test case framework generation and parameter association unit is to generate a basic test case framework based on the fused cross-modal features and associate the software test parameters with the framework. In terms of technical parameters, it needs to have a flexible framework generation algorithm that can generate a variety of test case frameworks containing elements such as test steps, test objects, and expected results according to different system types and test requirements. At the same time, for the association of software test parameters, it is necessary to accurately identify the correspondence between the parameters and the various elements of the framework to ensure that the parameters can be reasonably integrated into the test case framework. The significance of this unit is to transform abstract cross-modal features into specific test case frameworks, and combine them with software test parameters to make test cases more targeted and executable, providing basic framework support for the subsequent refinement of test cases and actual test execution.
[0032] During specific implementation, the test case framework generation and parameter association unit first analyzes the system's functional modules and business processes based on the fused cross-modal features to determine the basic framework structure of the test case. For example, based on the system functional points reflected in the features, a framework containing multiple test steps is generated, and each step corresponds to a specific test operation. Then, for software test parameters, such as test data type, test environment configuration, test priority, etc., they are mapped one by one to the corresponding positions in the test case framework. For example, the test data type is associated with the input data part in the test step, and the execution conditions of the test case are determined according to different test environment configurations. During the association process, the unit will also check and adjust the parameters for rationality to ensure that the test case framework has practical operability while meeting the test requirements, providing a complete basic test case framework for subsequent hypergraph neural network optimization iteration and use case refinement units.
[0033] Hypergraph neural network optimization iteration and use case clustering unit, which iteratively optimizes the basic framework through the optimized hypergraph neural network and clusters test cases;
[0034] Specifically, the hypergraph neural network optimization iteration and use case refinement unit iteratively optimizes the basic test case framework through the optimized hypergraph neural network to achieve test case refinement. In terms of technical parameters, this unit requires the hypergraph neural network to have good learning and generalization capabilities, and to be able to adjust network parameters to optimize the test case framework according to the actual needs of software testing. At the same time, reasonable iteration termination conditions need to be set, such as reaching a certain number of iterations or the optimization degree of the test case meeting a specific threshold. The significance of this unit is to use the powerful data analysis and processing capabilities of the hypergraph neural network to conduct in-depth analysis and optimization of the basic test case framework, to make up for possible deficiencies in the framework, to make the test cases more comprehensive and detailed, to improve the test coverage and effectiveness of the test cases for the software system, and to ensure that potential defects and problems in the software system can be detected.
[0035] In a specific implementation, the hypergraph neural network optimization iteration and use case refinement unit first assigns initial parameters to the hypergraph neural network and inputs the basic test case framework and related hypergraph structure and cross-modal features as input data. Then, the hypergraph neural network is trained through training samples. During the training process, a corresponding loss function is constructed according to the requirements of the software test parameters regarding test case integrity, test step accuracy, etc., to evaluate the gap between the network output test case and the ideal test case. The network adjusts its parameters using optimization algorithms based on the feedback of the loss function, continuously improving the optimization effect on the test case framework. After multiple iterations of training, when the set termination condition is reached, the hypergraph neural network outputs the optimized test case framework, and the unit refines the test case based on this, supplements the detailed description of the test steps, and specifies the specific value range of the test data, etc., so that the test case is more specific and executable, providing high-quality test cases for the actual execution of software testing.
[0036] The test case verification and output unit verifies the clustered test cases and outputs the final results.
[0037] Specifically, the test case verification and output unit is the last link of the system, and its main responsibility is to verify the refined test cases and output the final test case results. Technically, this unit needs to have comprehensive verification rules and methods, and can verify from multiple dimensions such as the completeness, accuracy, and executability of the test cases. For example, it checks whether the test cases cover all key test points, whether the description of the test steps is clear and accurate, and whether the test data is reasonable and has accessibility, etc. The significance of this unit lies in ensuring the quality and reliability of the output test cases, which can effectively detect the functions and performance of the software system in actual software testing, avoid inaccurate or unexecutable test results due to problems in the test cases, and provide the last line of defense for software quality assurance.
[0038] During the specific implementation process, the test case verification and output unit will first check the refined test cases one by one according to the pre-set verification rules. For the completeness of the test cases, the functional requirements and design documents of the system will be compared to confirm that all important functions and business processes are covered by corresponding test cases; for accuracy, it will check whether the logic of the test steps is correct and whether the expected results are reasonable; for executableness, it will verify whether the test data can be obtained and whether the test environment is easy to set up. If a problem is found in the test case during the verification process, the unit will feedback the problem to the Hypergraph Neural Network Optimization Iteration and Use Case Refinement Unit for correction. When the test case passes all verifications, the test case verification and output unit will output the final test case results in the specified format and requirements. These results can be directly used in the software test execution process to provide software testers with detailed and reliable testing guidance, helping to ensure the quality and stability of the software system.
[0039] The output end of the multi-source heterogeneous data perception and structured parsing unit is connected to the input end of the hypergraph topology relationship construction and semantic enhancement unit, the output end of the hypergraph topology relationship construction and semantic enhancement unit is connected to the input end of the cross-modal feature joint extraction and deep fusion unit, the output end of the cross-modal feature joint extraction and deep fusion unit is connected to the input end of the test case framework generation and parameter association unit, the output end of the test case framework generation and parameter association unit is connected to the input end of the hypergraph neural network optimization iteration and use case clustering unit, and the output end of the hypergraph neural network optimization iteration and use case clustering unit is connected to the input end of the test case verification and output unit.
[0040] Preferably, when constructing the hypergraph topology relationship and the semantic enhancement unit constructing the hypergraph structure, the formula ,in, Represents a node set consisting of requirement document keyword nodes and code function nodes. Represents a set of hyperedges connecting different types of nodes. Hyperedges connect multiple nodes to represent complex relationships between data. represents the hyperedge weight matrix, whose elements For quantization nodes With node The semantic association strength when connected by hyperedges; when the cross-modal feature joint extraction and the deep fusion unit perform feature fusion, the formula is used ,in, is the fused cross-modal feature vector, is the text feature vector extracted from the text node in the hypergraph, is the code feature vector extracted from the code node in the hypergraph, and The fusion coefficient is dynamically adjusted according to the feature importance in the software test parameters. The test coverage type and test priority in the software test parameters affect and The value of .
[0041] Specifically, when the hypergraph topology relationship construction and semantic enhancement unit constructs the hypergraph structure, it accurately depicts the complex relationships between data such as requirement document keywords and code function nodes by defining a node set, a hyperedge set, and a hyperedge weight matrix. The weight matrix quantifies the strength of the semantic association of the nodes, providing a structured semantic basis for subsequent processing. When the cross-modal feature joint extraction and deep fusion unit performs feature fusion, it dynamically adjusts the fusion coefficient of the text feature vector and the code feature vector based on the test coverage type and priority in the software test parameters, so that the fused cross-modal feature vector retains the key information of each modality and meets the focus of the test requirements. During implementation, the former abstracts data into nodes and constructs hyperedges according to the rules, while the latter first extracts text and code feature vectors separately, and then dynamically weights and fuses them according to the test parameters, ensuring that the system fits the software testing scenario from data structure construction to feature fusion, thereby improving the accuracy and pertinence of test case generation.
[0042] Preferably, the cross-modal feature joint extraction and deep fusion unit uses an optimized hypergraph neural network to extract cross-modal features through the formula Update node features, where For nodes In the Feature vectors in layer hypergraph neural networks, is the activation function, For the node The set of connected hyperedges, is the number of hyperedges in the set, For nodes With node Hyperedge weights, For nodes In the The feature vector of the layer, For the Layer Hyperedge The test case framework generates a feature transformation matrix associated with the parameter association unit when the software test parameters are associated with the parameter association unit, using the formula ,in, is the associated test case parameter set, is the parameter adjustment coefficient, Based on hypergraph structure and fusion features Generated basic parameter set, test data type in software test parameters, test environment configuration impact and Calculation.
[0043] Specifically, the cross-modal feature joint extraction and deep fusion unit uses an optimized hypergraph neural network to update node features, comprehensively capturing data features in the hypergraph structure by integrating factors such as hyperedge connection relationships, node weights, and feature transformation matrices. The test case framework generation and parameter association unit adjusts the generated basic parameter set through parameter adjustment coefficients based on the hypergraph structure and fusion features, combined with the data type and environment configuration in the software test parameters, to form an associated test case parameter set. During implementation, the former continuously optimizes node feature extraction during hypergraph neural network training, while the latter repeatedly adjusts the parameter set based on the extracted features and test parameters, so that the generated test case framework is closely associated with the actual test requirements, ensuring that the test case can effectively detect the software system functions in subsequent execution.
[0044] Preferably, when the hypergraph neural network optimization iteration and the use case clustering unit optimize the hypergraph neural network, the formula is used ,in, are the optimized hypergraph neural network parameters, is the parameter to be optimized, is the number of training samples, For the The loss function of each sample is used to build the loss calculation rules based on the test case completeness and test step accuracy in the software test parameters; when clustering test cases, the formula is used. ,in, is the clustered test case, As the basic test case framework, The use case adjustment amount calculated by the optimized hypergraph neural network, the test depth requirement and test complexity index in the software test parameters Calculation.
[0045] Specifically, when optimizing the hypergraph neural network, this unit constructs a loss function based on the test case completeness, step accuracy, and other factors in the software test parameters. By minimizing the loss function, the network parameters are optimized so that the network can better adapt to the test case generation requirements. In the test case refinement stage, the adjustment amount of the basic test case framework is calculated based on test parameters such as test depth requirements and complexity indicators, and the refined test cases are obtained. During implementation, the initial parameters of the hypergraph neural network are first set and relevant data is input, and the network is continuously optimized through training samples; then the adjustment amount is calculated based on the test parameters, the basic framework is refined, and the test cases are gradually improved so that they can cover the test points of the software system more comprehensively and meticulously, thereby improving the quality of the test cases.
[0046] Preferably, when the cross-modal feature joint extraction and the deep fusion unit perform cross-modal feature extraction, the formula is also used. ,in, is the code modal eigenvector, is the number of code feature dimensions, is the weight of the k-th dimension code feature, is the code feature value of the kth dimension, the code coverage and code logic complexity in the software test parameters The value of the test case framework generation and parameter association unit generates the test case framework using the formula ,in, For the generated test case framework, is the framework generation function, H is the hypergraph structure, is the code modal eigenvector, is the text modal feature vector, the test type and test target influence in the software test parameters The operation process.
[0047] Specifically, when the cross-modal feature joint extraction and deep fusion unit extracts the code modal feature vector, it determines the weight of each code feature dimension based on the code coverage, logic complexity, etc. in the software test parameters, and comprehensively extracts the code features. When the test case framework generation and parameter association unit generates the framework, it integrates the hypergraph structure, code modal feature vector, text modal feature vector, and test parameters such as test type and target, and generates function operations through a specific framework to obtain the test case framework. During the implementation process, the former accurately analyzes the code features and extracts feature vectors based on the weights determined by the parameters, while the latter integrates various information and parameters, and generates a framework through function operations to ensure that the generated test case framework starts from the multimodal perspective of code and text, closely revolves around the test requirements, and provides an effective framework support for subsequent testing work.
[0048] Preferably, when the hypergraph topology relationship is constructed and the semantic enhancement unit enhances the semantic expression, the formula is used. , where S is the overall semantic enhancement vector of the hypergraph, For nodes The semantic contribution weight of For nodes Initial semantic vector, node importance and node correlation in software testing parameters Calculation; When the cross-modal feature joint extraction and deep fusion unit perform feature fusion, the formula is also used ,in, is the final fusion feature vector, F is the preliminary fusion feature vector, is the feature correction vector adjusted according to the hypergraph structure and software test parameters, is the correction coefficient, the feature fusion accuracy requirements in the software test parameters, and the impact of the test case quality standards and of confirmation.
[0049] Specifically, when the hypergraph topology relationship construction and semantic enhancement unit enhances the semantic expression, the node semantic contribution weight is determined according to the node importance and correlation in the software test parameters, and the overall semantics of the hypergraph is enhanced to make the hypergraph more accurately reflect the data semantic information. When the cross-modal feature joint extraction and deep fusion unit performs feature fusion, the feature correction vector and correction coefficient are determined according to the feature fusion accuracy requirements and test case quality standards in the hypergraph structure and software test parameters, and the preliminary fused feature vector is optimized to obtain the final fused feature vector. During implementation, the former first analyzes the node characteristics and determines the weight enhancement semantics according to the parameters, and the latter combines the hypergraph and test parameters to optimize the fusion features, ensuring that the system is more in line with the high standards of software testing in terms of data semantic expression and feature fusion, and laying a solid data foundation for test case generation.
[0050] Preferably, the cross-modal feature joint extraction and deep fusion unit includes: a text feature extraction subunit, which is used to extract word vectors and semantic dependency text features from text nodes in the hypergraph; a code feature extraction subunit, which is used to extract function call relationships and code structure code features from code nodes in the hypergraph; a cross-modal feature alignment subunit, which aligns the extracted text features with the code features in terms of dimension and semantics based on the hypergraph structure; and a feature fusion optimization subunit, which optimizes and adjusts the initially fused cross-modal features according to software testing parameters.
[0051] Specifically, the text feature extraction subunit extracts text features such as word vectors and semantic dependencies from text nodes in the hypergraph, providing text modal information for subsequent fusion; the code feature extraction subunit extracts code features such as function call relationships and code structure from code nodes to improve code modal features; the cross-modal feature alignment subunit aligns text and code features in terms of dimension and semantics based on the hypergraph structure to eliminate modal differences; the feature fusion optimization subunit optimizes and adjusts the initially fused cross-modal features based on software test parameters. During implementation, each subunit performs tasks in sequence: the text and code feature extraction subunits collect features separately, the alignment subunit processes differences, and the optimization subunit improves the fused features based on test parameters, enabling the unit to efficiently and accurately extract and fuse cross-modal features, providing high-quality feature input for test case generation.
[0052] Preferably, the test case framework generation and parameter association unit includes: a basic framework generation sub-unit, which generates a basic test case framework including test steps and test objects based on the fused cross-modal features; a parameter mapping sub-unit, which maps the test data and test environment in the software test parameters to the corresponding parts of the basic framework; a framework verification sub-unit, which checks whether the generated test case framework complies with the software testing specifications; and a parameter association optimization sub-unit, which optimizes the associated test case parameters according to the association relationship between the software test parameters.
[0053] Specifically, the basic framework generation subunit generates a basic test case framework containing test steps and objects based on the fused cross-modal features, and builds a prototype of the test case; the parameter mapping subunit maps software test parameters such as test data and environment to the corresponding parts of the framework, giving the framework actual test parameters; the framework verification subunit checks whether the framework complies with the software testing specifications to ensure the validity of the framework; the parameter association optimization subunit optimizes the associated test case parameters based on the association relationship between parameters. During the implementation process, the subunits work together. The basic framework generation subunit first builds the framework, the parameter mapping subunit fills in the parameters, the verification subunit reviews the framework, and finally the optimization subunit improves the parameter association, so that the generated test case framework not only complies with the test specifications, but also closely associates with the actual test parameters and has good executable performance.
[0054] Preferably, the hypergraph neural network optimization iteration and use case clustering unit includes: a network parameter initialization subunit, which assigns initial parameters to the hypergraph neural network; a training sample construction subunit, which constructs a sample set for training based on the hypergraph structure and fusion features; a network training optimization subunit, which uses an optimization algorithm to train the hypergraph neural network and update the network parameters; and a use case clustering execution subunit, which performs clustering operations on the basic test case framework based on the trained hypergraph neural network.
[0055] Specifically, the network parameter initialization subunit assigns initial parameters to the hypergraph neural network and determines the network's initial state. The training sample construction subunit constructs a training sample set based on the hypergraph structure and fusion features, providing data for network training. The network training optimization subunit uses an optimization algorithm to train the network and updates parameters to meet testing requirements. The use case refinement and execution subunit refines the basic test case framework based on the trained network. During implementation, each subunit performs its work in sequence. After the initialization subunit sets parameters, the construction subunit prepares samples. The training optimization subunit trains the network using samples. Finally, the execution subunit refines the framework based on the training results, gradually optimizing the hypergraph neural network and improving the test cases, so that the test cases can better meet the comprehensiveness and accuracy requirements of software testing.
[0056] like Figure 2As shown, a large model test case intelligent generation system based on big data, the operation of the system includes the following steps:
[0057] Step S1: Collect multi-source data such as requirement documents and system codes through a multi-source heterogeneous data perception and structured parsing unit, and parse them into structured data;
[0058] Step S2: Using the hypergraph topology relationship construction and semantic enhancement unit to construct the structured data into a hypergraph structure, connecting different data nodes through hyperedges and enhancing semantic expression;
[0059] Step S3: The cross-modal feature joint extraction and deep fusion unit extracts text and code cross-modal features from the hypergraph structure and performs deep fusion;
[0060] Step S4: The test case framework generation and parameter association unit generates a basic test case framework based on the fused features and associates the software test parameters;
[0061] Step S5: Optimize the iteration and use case clustering unit through the hypergraph neural network, iteratively optimize the basic framework using the optimized hypergraph neural network, and cluster the test cases;
[0062] Step S6: The test case verification and output unit verifies the clustered test cases and outputs the final results.
[0063] A large-model test case intelligent generation system based on big data. To address the problem that traditional systems cannot deeply associate system design details, this system uses a multi-source heterogeneous data perception and structured parsing unit to comprehensively collect multi-source data such as requirement documents and system code, and converts it into a structured form. The hypergraph topology relationship construction and semantic enhancement unit further constructs this data into a hypergraph structure, uses hyperedges to connect different types of data nodes, and deeply mines the complex relationships between data. For example, the system can accurately capture the potential connection between the business logic in the requirement document and the module interaction in the code structure, and visualize the system design details in the form of a hypergraph, avoiding the drawbacks of traditional methods that only stay at the surface of information processing. The cross-modal feature joint extraction and deep fusion unit extracts multimodal features such as text and code from the hypergraph and deeply fuses them, so that the generated test cases can fully cover the interaction logic and business rules of each module of the system, ensuring that the test cases are closely related to the system design.
[0064] To address the traditional system's reliance on completed code, this system can intervene without waiting for the system code to be fully developed. In the early stages of software development, the multi-source heterogeneous data perception and structured parsing unit can acquire data such as requirements documents. The hypergraph topology relationship construction and semantic enhancement unit constructs a hypergraph based on this data. Subsequent units then generate a basic test case framework based on this data and associate software test parameters. As development progresses, the hypergraph neural network optimization iteration and use case refinement unit iteratively optimizes the basic framework using an optimized hypergraph neural network, continuously refining test cases. This entire process runs through the entire software development process. Whether in the requirements analysis and design phases or the coding implementation phase, the system can continuously generate and optimize test cases, overcoming the limitations of traditional systems that are ineffective in the early stages of development. In addition, the test case verification and output unit rigorously verifies the final test cases to ensure the high quality and reliability of the output test cases, providing an efficient, comprehensive, and reliable solution for large-model software testing.
[0065] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0066] While embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various equivalent changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A large-model test case intelligent generation system based on big data, characterized by: include: Multi-source heterogeneous data perception and structured parsing unit, used to collect multi-source data such as requirement documents and system code, and parse it into structured data; The hypergraph topology relationship construction and semantic enhancement unit constructs structured data into a hypergraph structure, connects different data nodes through hyperedges, and enhances semantic expression; the cross-modal feature joint extraction and deep fusion unit extracts text and code cross-modal features from the hypergraph structure and deeply fuses them; the test case framework generation and parameter association unit generates a basic test case framework based on the fused features and associates software test parameters; the hypergraph neural network optimization iteration and use case clustering unit iteratively optimizes the basic framework through the optimized hypergraph neural network and clusters test cases; Test case verification and output unit verifies the clustered test cases and outputs the final results; The output end of the multi-source heterogeneous data perception and structured parsing unit is connected to the input end of the hypergraph topology relationship construction and semantic enhancement unit, the output end of the hypergraph topology relationship construction and semantic enhancement unit is connected to the input end of the cross-modal feature joint extraction and deep fusion unit, the output end of the cross-modal feature joint extraction and deep fusion unit is connected to the input end of the test case framework generation and parameter association unit, the output end of the test case framework generation and parameter association unit is connected to the input end of the hypergraph neural network optimization iteration and use case clustering unit, and the output end of the hypergraph neural network optimization iteration and use case clustering unit is connected to the input end of the test case verification and output unit; When the hypergraph neural network optimization iteration and the use case clustering unit optimize the hypergraph neural network, the formula is used ,in, are the optimized hypergraph neural network parameters, is the parameter to be optimized, is the number of training samples, For the The loss function of each sample is used to build the loss calculation rules based on the test case completeness and test step accuracy in the software test parameters; when clustering test cases, the formula is used. ,in, is the clustered test case, As the basic test case framework, The use case adjustment amount calculated by the optimized hypergraph neural network, the test depth requirement and test complexity index in the software test parameters Calculation of When the cross-modal feature joint extraction and the deep fusion unit perform cross-modal feature extraction, the formula is also used. ,in, is the code modal eigenvector, is the number of code feature dimensions, For the The weight of the dimension code feature, For the The code feature value of the dimension, the code coverage and code logic complexity in the software testing parameters The value of the test case framework generation and parameter association unit generates the test case framework using the formula ,in, For the generated test case framework, Generate functions for the framework, is a hypergraph structure, is the code modal eigenvector, is the text modal feature vector, the test type and test target influence in the software test parameters The operation process.
2. The system for intelligently generating large-scale model test cases based on big data according to claim 1, characterized in that: When the hypergraph topology relationship is constructed and the semantic enhancement unit constructs the hypergraph structure, the formula ,in, Represents a node set consisting of requirement document keyword nodes and code function nodes. Represents a set of hyperedges connecting different types of nodes. Hyperedges connect multiple nodes to represent complex relationships between data. represents the hyperedge weight matrix, whose elements For quantization nodes With node The semantic association strength when connected by hyperedges; when the cross-modal feature joint extraction and the deep fusion unit perform feature fusion, the formula is used ,in, is the fused cross-modal feature vector, is the text feature vector extracted from the text node in the hypergraph, is the code feature vector extracted from the code node in the hypergraph, and The fusion coefficient is dynamically adjusted according to the feature importance in the software test parameters. The test coverage type and test priority in the software test parameters affect and The value of .
3. The system for intelligently generating large-scale model test cases based on big data according to claim 1, characterized in that: The cross-modal feature joint extraction and deep fusion unit uses the optimized hypergraph neural network to extract cross-modal features through the formula Update node features, where For nodes In the Feature vectors in layer hypergraph neural networks, is the activation function, For the node The set of connected hyperedges, is the number of hyperedges in the set, For nodes With node Hyperedge weights, For nodes In the The feature vector of the layer, For the Layer Hyperedge The test case framework generates a feature transformation matrix associated with the parameter association unit when the software test parameters are associated with the parameter association unit, using the formula ,in, is the associated test case parameter set, is the parameter adjustment coefficient, Based on hypergraph structure and fusion features Generated basic parameter set, test data type in software test parameters, test environment configuration impact and Calculation.
4. The system for intelligently generating large-scale model test cases based on big data according to claim 1, characterized in that: When the hypergraph topology relationship is constructed and the semantic enhancement unit enhances the semantic expression, the formula is used. ,in, is the overall semantic enhancement vector of the hypergraph, For nodes The semantic contribution weight of For nodes Initial semantic vector, node importance and node correlation in software testing parameters Calculation; When the cross-modal feature joint extraction and deep fusion unit perform feature fusion, the formula is also used ,in, is the final fusion feature vector, is the initial fusion feature vector, is the feature correction vector adjusted according to the hypergraph structure and software test parameters, is the correction coefficient, the feature fusion accuracy requirements in the software test parameters, and the impact of the test case quality standards and of confirmation.
5. The system for intelligently generating large-scale model test cases based on big data according to claim 1, characterized in that: The cross-modal feature joint extraction and deep fusion unit includes: a text feature extraction subunit, which is used to extract word vectors and semantic dependency text features from text nodes in the hypergraph; a code feature extraction subunit, which is used to extract function call relationships and code structure code features from code nodes in the hypergraph; a cross-modal feature alignment subunit, which aligns the extracted text features with the code features in terms of dimension and semantics based on the hypergraph structure; and a feature fusion optimization subunit, which optimizes and adjusts the initially fused cross-modal features according to software testing parameters.
6. The system for intelligently generating large-scale model test cases based on big data according to claim 1, characterized in that: The test case framework generation and parameter association unit includes: a basic framework generation subunit, which generates a basic test case framework including test steps and test objects based on the fused cross-modal features; a parameter mapping subunit, which maps the test data and test environment in the software test parameters to the corresponding parts of the basic framework; a framework verification subunit, which checks whether the generated test case framework complies with the software testing specifications; and a parameter association optimization subunit, which optimizes the associated test case parameters according to the association relationship between the software test parameters.
7. The system for intelligently generating large-scale model test cases based on big data according to claim 1, characterized in that: The hypergraph neural network optimization iteration and use case clustering unit includes: a network parameter initialization subunit, which assigns initial parameters to the hypergraph neural network; a training sample construction subunit, which constructs a sample set for training based on the hypergraph structure and fusion features; a network training optimization subunit, which uses an optimization algorithm to train the hypergraph neural network and update the network parameters; and a use case clustering execution subunit, which performs clustering operations on the basic test case framework based on the trained hypergraph neural network.
Citation Information
Patent Citations
Method and system for quickly constructing and multiplexing application framework
CN119576290A
Code automatic generation and optimization system based on multiple modes
CN120276718A