Test case generation method and system for security and futures software

By using the collaborative work of multiple intelligent agents and constructing a business rule graph using the CLIP model and GraphSAGE model, the problems of manual dependency and insufficient coverage in the generation of test cases for securities and futures software are solved, and efficient and accurate test case generation is achieved, reducing redundancy and improving test efficiency.

CN120631753APending Publication Date: 2025-09-12SHANGHAI FUTURES INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510691817.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing technologies for generating test cases for securities and futures software have problems such as reliance on manual experience, incomplete coverage, and difficulty in maintaining rule sets. This makes it difficult to apply to complex fields, and the generation accuracy and coverage of large language models in securities and futures software are insufficient.

Method used

By building a multi-agent collaborative working mode, including information analysis agent, use case generation agent and use case evaluation agent, using CLIP model and LangChain framework for document analysis, combining with GraphSAGE model to build business rule graph, and conducting semantic consistency and logical completeness testing, high-quality test cases are generated.

Benefits of technology

It reduces the workload of testers, improves test efficiency, reduces redundant test cases, and improves the quality and coverage of test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631753A_ABST
    Figure CN120631753A_ABST
Patent Text Reader

Abstract

The invention discloses a test case generation method and system for security and futures software. The method comprises the following steps: converting data in an original file into an embedded vector through an information analysis agent, and storing the embedded vector in a vector database; generating an initial test case set by using the plurality of test points and the data fragments corresponding to each test point through a case generation agent; constructing a business rule atlas to perform rule similarity scoring on each test case, deleting the test cases with low scores, and forming a high-score test case set by the test cases with high scores; semantic similarity scoring is carried out according to the historical test cases, sorting is carried out according to scores from high to low to form an optimal test case set, and the test case with the highest score is marked as the historical test case to be stored in the vector database. According to the method, the test cases of the security futures software can be automatically generated, redundant cases are reduced by evaluating the test cases, the case quality is improved, the workload of testers is greatly reduced, and the test efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a test case generation method, system and medium for securities and futures software. Background Art

[0002] In the securities and futures software development lifecycle, software testing is a critical step in ensuring software quality. The generation and verification of test cases is crucial for maintaining software quality. Traditional test case generation methods primarily include manual writing and rule-based generation. Manual writing can generate relatively accurate test cases, but it relies heavily on the experience, knowledge, and skills of the test engineer, requiring significant human resources and, with the increasing complexity of software functionality, prone to incomplete coverage. Rule-based generation relies on predefined rule sets, which not only places high demands on the rule set but also requires rewriting rules for software changes or new features, requiring constant updating and maintenance. Given that requirements documents and test cases primarily consist of text, large language models demonstrate significant potential and application prospects for automated test case generation. Test case generation using large language models primarily involves parsing the document, identifying and extracting test points, and then generating test cases based on these points.

[0003] For example, patent document CN117806980A discloses a test case automatic generation device based on a large language model, which includes a data source module, a test requirement module, a generation algorithm module, a test arrangement module, a test execution module, and a feedback optimization module. Among them, the data source module is used to provide test data for generating test cases, the test requirement module is used to extract the test requirements input by the user, the generation algorithm module is used to generate test cases that meet the specifications, the test arrangement module is used to form test cases to be executed and a test execution plan, the test execution module is used to call test data from the data source module according to the test execution plan to automatically execute the test cases to be executed and collect test results, and the feedback optimization module is used to optimize according to the test results. Although this test case generation method can effectively improve test efficiency, its applicable scenarios are relatively limited and it is difficult to apply to scenarios with more complex domain knowledge and professional terms.

[0004] Based on the above technical problems, the applicant proposed the technical solution of this application. Summary of the Invention

[0005] In view of the above-mentioned defects of the prior art, the present invention provides a test case generation method and system for securities and futures software, aiming to automatically generate test cases for securities and futures software, reduce the workload of testers, and significantly improve testing efficiency.

[0006] To achieve the above object, the present invention discloses a test case generation method for securities and futures software, comprising the following steps:

[0007] Obtaining original files in various document formats related to securities and futures software, converting data in the original files into embedded vectors using an information analysis agent, and storing the embedded vectors in a vector database, wherein the vector database also includes at least one historical test case that meets the securities and futures software testing requirements;

[0008] Generate an initial test case set by using a use case generation agent to generate a number of test points in the vector database and the data segments corresponding to each test point, wherein the initial test case set covers all test points;

[0009] Constructing a business rule graph based on the trading rules and compliance regulatory requirements in the securities and futures field, scoring the rule similarity of each test case in the initial test case set based on the business rule graph, and filtering out redundant test cases based on the scoring results and deleting them to form a high-scoring test case set;

[0010] A semantic similarity score is performed on each test case in the high-scoring test case set based on the historical test cases, all test cases in the high-scoring test case set are sorted according to the scores, an optimal test case set is formed according to the sorting results, and the test case with the highest score is marked as a historical test case and stored in the vector database.

[0011] Preferably, the converting the data in the original file into an embedding vector by an information analysis agent comprises:

[0012] An information analysis agent is constructed based on a multimodal large model as a basic framework. The information analysis agent extracts key information from the title data, text data, and table data in the original file, and identifies and deletes non-key information. The key information includes data segments related to the test background and test key points, and the non-key information includes blank characters, URL links, and description information without test points.

[0013] The text segmenter under the LangChain framework is used to divide the key information into fixed-length text blocks, and overlapping areas are set between adjacent text blocks;

[0014] The key information after text block processing and the image data in the original file are converted into embedded vectors to achieve embedded vectorization of text and images.

[0015] Preferably, the multimodal large model is a CLIP model.

[0016] Preferably, the initial test case set covers all test points and passes the semantic consistency test and the logical completeness test:

[0017] The semantic consistency test is to analyze the coverage of test cases and test points in the initial test case set based on a deep semantic matching algorithm, and the logical completeness test is to perform rule coverage integrity testing using a logical reasoning engine;

[0018] When the test finds that the test case does not cover all test points, the case generation agent generates a supplementary test case and merges the supplementary test case into the initial test case set.

[0019] Preferably, the business rule map is constructed according to the trading rules and compliance supervision requirements in the securities and futures fields, including:

[0020] Structurally decomposing the transaction rules and compliance regulatory requirements to form a number of atomic rule nodes, each of which has a unique identifier and context constraint attributes;

[0021] According to the unique identifier and the context constraint attribute, a logical dependency relationship between each atomic rule node is constructed through a directed hypergraph to obtain a business rule graph.

[0022] Preferably, the rule similarity score adopts cosine similarity, and the subgraph covered by each test case is extracted from the business rule graph using the GraphSAGE model and converted into a vector representation, and the rule coverage similarity between different test cases is quantified by cosine similarity:

[0023]

[0024] Among them, l1 and l2 represent the vector representations converted from the subgraphs covered by different test cases. If the rule coverage similarity of l1 and l2 is high, and l1 covers more rules in the business rule graph, then l1 will be included in the high-scoring test case set and l2 will be used as a redundant case.

[0025] The present invention also discloses a test case generation system for securities and futures software, comprising the following modules:

[0026] a data conversion module for acquiring original files in various document formats related to securities and futures software, converting the data in the original files into embedded vectors through an information analysis agent, and storing the embedded vectors in a vector database, wherein the vector database also includes at least one historical test case that meets the securities and futures software testing requirements;

[0027] A use case generation module is used to generate an initial test case set from a number of test points in the vector database and a data segment corresponding to each test point through a use case generation agent, wherein the initial test case set covers all test points;

[0028] A use case optimization module is used to construct a business rule map based on the trading rules and compliance supervision requirements in the securities and futures field, perform rule similarity scoring on each test case in the initial test case set based on the business rule map, delete low-scoring test cases as redundant cases, and form a high-scoring test case set with the obtained high-scoring test cases;

[0029] A use case scoring module is used to perform semantic similarity scoring on each test case in the high-scoring test case set based on the historical test cases, sort all test cases in the high-scoring test case set according to the scores, form an optimal test case set according to the sorting results, and mark the test case with the highest score as a historical test case and store it in the vector database.

[0030] Preferably, the data conversion module is further used for:

[0031] An information analysis agent is constructed based on a multimodal large model as a basic framework. The information analysis agent extracts key information from the title data, text data, and table data in the original file, and identifies and deletes non-key information. The key information includes data segments related to the test background and test key points, and the non-key information includes blank characters, URL links, and description information without test points.

[0032] The text segmenter under the LangChain framework is used to divide the key information into fixed-length text blocks, and overlapping areas are set between adjacent text blocks;

[0033] The key information after text block processing and the image data in the original file are converted into embedded vectors to achieve embedded vectorization of text and images.

[0034] The present invention also discloses a test case generation device for securities and futures software, the generation device including a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the above-mentioned test case generation method for securities and futures software are implemented.

[0035] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned test case generation method for securities and futures software are implemented.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] The test case generation method for securities and futures software provided by the present invention automatically generates test cases for securities and futures software by constructing three intelligent agents, namely, an information analysis agent, a use case generation agent, and a use case evaluation agent, to achieve collaborative work. It also establishes an evaluation mechanism for test cases to achieve the purpose of reducing redundant use cases and improving the quality of use cases. This not only greatly reduces the workload of testers, but also significantly improves test efficiency.

[0038] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 The present invention is a flowchart of a method for generating test cases for securities and futures software.

[0040] Figure 2 It is a processing diagram of the information analysis agent in the test case generation method for securities and futures software of the present invention.

[0041] Figure 3 It is a processing diagram of the test case generation intelligent agent in the test case generation method for securities and futures software of the present invention.

[0042] Figure 4 It is a schematic diagram of the collaborative work of multiple agents in the test case generation method for securities and futures software of the present invention. DETAILED DESCRIPTION

[0043] In order to make the technical means, creative features, objectives and effects of the invention easier to understand, the invention is further described below with reference to specific diagrams. However, the invention is not limited to the following implementation cases.

[0044] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings in this specification are only used to match the contents disclosed in the specification so that people familiar with this technology can understand and read them. They are not used to limit the conditions under which the present invention can be implemented. Therefore, they have no substantive technical significance. Any modification of the structure, change in the proportion relationship or adjustment of the size should still fall within the scope of the technical content disclosed in the present invention without affecting the efficacy and purpose that can be achieved by the present invention.

[0045] Due to the complex and esoteric domain knowledge and specialized terminology in the securities and futures industry, the accuracy and coverage of test cases generated by large language models in this field are significantly insufficient. Existing solutions include building data warehouses to improve the large language model's understanding of domain knowledge. However, this requires the establishment and maintenance of data warehouses, and excessive amounts of data can hinder the large language model's ability to identify intent. Other solutions attempt to improve test case quality through manual intervention, but this undoubtedly increases the manual burden. Some solutions combine fuzz testing techniques with genetic algorithms to achieve high test case coverage, but this results in the generation of redundant test cases. These existing solutions primarily focus on optimizing the test case generation algorithm itself, but fail to fully consider the importance of leveraging historical information for test case generation.

[0046] The present invention provides a method for securities and futures document analysis and test case generation by multiple agents in a collaborative manner. It aims to reduce redundant cases and improve the quality of test cases by establishing a test case evaluation mechanism, provide continuous feedback and assistance using the results of test case generation, and establish a multi-agent collaborative method to reduce the workload of testers and improve test efficiency.

[0047] like Figure 1 As shown, the first embodiment of the present invention provides a test case generation method for securities and futures software, comprising the following steps:

[0048] Step S1, obtain original files in various document formats related to securities and futures software, convert the data in the original files into embedded vectors through an information analysis agent, and store them in a vector database. The vector database also includes at least one historical test case that meets the securities and futures software testing requirements.

[0049] Specifically, raw files related to securities and futures software are the original documentation for the software. These files come in a variety of formats, such as Word, Markdown, PDF, and LaTeX, and often contain information that is less relevant to the test objectives. After obtaining these raw files, they need to be formatted and filtered. This involves performing a series of format conversions to unify the data, followed by information extraction to remove irrelevant information.

[0050] The information analysis agent is based on a multimodal large model. In this embodiment, the multimodal large model uses the CLIP model. CLIP stands for Contrastive Language-Image Pre-Training. It achieves cross-modal alignment of images and text through contrastive learning, mapping them into a shared semantic space to measure similarity. In this embodiment, the CLIP model is used to extract key information from the acquired raw file data and exclude irrelevant information.

[0051] The information analysis agent converts the data in the original file into an embedding vector through the following sub-steps:

[0052] Step S11, constructing an information analysis agent based on a multimodal large model, wherein the information analysis agent extracts key information from the title data, text data and table data in the original file, and deletes non-key information after identifying it.

[0053] In step S12, a text segmenter under the LangChain framework is used to divide the key information into text blocks of fixed length, and overlapping areas are set between adjacent text blocks.

[0054] Step S13: convert the key information after the text block processing and the image data in the original file into embedded vectors to achieve embedded vectorization of text and image.

[0055] like Figure 2 As shown, during the document content extraction process, the document content is divided into titles, texts, tables, and pictures. Key information is extracted from the titles, texts, and tables through the constructed information analysis agent. The key information includes data fragments related to the test background and test key points, and the non-key information includes blank characters, URL links, and descriptive information without test points. The information analysis agent can ensure the efficiency of the extraction process and the relevance of the information, and provide high-quality input data for the generation of test cases. After the information analysis agent filters the data content of the titles, texts, and tables, the text is segmented using the text segmenter under the LangChain framework. The LangChain framework has multiple text segmenters. The text segmenter used in this embodiment is the recursive character segmenter RecursiveCharacterTextSplitter. Among the general parameters of the text segmenter, the maximum length of a single segment is set to 1500, the overlap length between segments is 150, and the segmentation character list is ["\n\n","\n",".","?"","!","。","?","!"]. This text segmentation method makes the computation efficient and can effectively ensure the continuity of the semantic context and avoid information loss.

[0056] After text segmentation, the CLIP model's text encoder and image encoder, respectively, embed and vectorize the processed text and image data, mapping them into the same vector space. The image encoder converts the image into a vector through linear projection, while the text encoder generates a feature vector after processing the text through word segmentation and positional encoding. The feature vectors output by both are linearly projected to the same dimension, forming a shared semantic space that facilitates the recognition and understanding of the inherent connections between text and images.

[0057] After the text and image are embedded and vectorized, they are stored in a vector database. This vector database is a local vector library that includes several historical test cases that meet the requirements of securities and futures software testing. The historical test cases can be manually input in advance or automatically generated using the method of this embodiment.

[0058] Step S2: Generate an initial test case set using a use case generation agent for several test points in the vector database and the data segments corresponding to each test point. The initial test case set covers all test points.

[0059] Specifically, the use case generation agent is built based on GPT-4 and is used to automatically generate test cases based on the important input information. Figure 3 As shown in the figure, the decision logic of the use case generation agent is as follows: the test points in the vector database and the data fragments corresponding to the test points are first input into the use case generation agent as important information. The use case generation agent generates an initial test case set based on the contextual semantics of the test points and the corresponding target data fragments, and checks one by one whether each test point is completely covered.

[0060] The initial test case set covers all test points through semantic consistency testing and logical completeness testing. This dual-modal dual-channel collaborative verification mechanism can ensure the comprehensiveness and integrity of the test case set finally output. The semantic consistency test is based on a deep semantic matching algorithm to analyze the coverage of test cases and test points in the initial test case set. The logical completeness test is to use a logical reasoning engine to perform a rule coverage integrity test. The coverage integrity verification rule is to verify the comprehensive coverage relationship of the test case set to the target test point. When it is detected that the semantic consistency test or the logical completeness test fails, a coverage alarm message will be issued. When the test finds that the test case does not cover all test points, the case generation agent generates a supplementary test case, and merges the supplementary test case into the initial test case set. The above-mentioned coverage check will be performed again, and the process will be executed in a loop until all test points are covered.

[0061] Step S3: construct a business rule map based on the trading rules and compliance supervision requirements in the securities and futures field, perform rule similarity scoring on each test case in the initial test case set based on the business rule map, and screen out redundant cases based on the scoring results and delete them to form a high-scoring test case set.

[0062] Specifically, an evaluation method based on rule dependency graph is adopted to model the complex trading rules and compliance supervision requirements in the securities and futures field as a graph structure. By analyzing the coverage of rule nodes by test cases and quantifying their similarities, an accurate evaluation of the quality of test cases can be achieved.

[0063] In this embodiment, the business rule graph is constructed through the following steps:

[0064] Step S31 : structurally decompose the transaction rules and compliance supervision requirements to form a number of atomic rule nodes, each of which has a unique identifier and context constraint attributes.

[0065] Step S32: construct the logical dependency relationship between the atomic rule nodes through a directed hypergraph according to the unique identifier and the context constraint attribute to obtain a business rule graph.

[0066] Specifically, the business rules of securities and futures contracts are first structurally decomposed. Independently executable and indivisible logical units are extracted and defined as atomic rule nodes. Each node contains a unique identifier and contextual constraint attributes. A directed hypergraph is then used to construct a logical dependency network between nodes, forming a business rule graph.

[0067] Entities and relationships in the business rule graph are embedded in vector space. In this embodiment, the GraphSAGE model with multi-hop neighborhood aggregation is used to achieve representation learning. GraphSAGE, short for Graph SAmple and aggreGatE, is an inductive learning framework based on graph neural networks (GNNs). Its advantages lie in its inductive learning capabilities and multi-hop neighborhood feature fusion, enabling efficient and flexible graph representation learning through sampling and aggregation mechanisms.

[0068] By matching semantic features to detect rule entities in test cases and mapping them to corresponding nodes in the rule graph, a verifiable association is established between the test operation steps and the target rule nodes. This allows the number of rules in the rule graph contained in each test case to be detected. The more rules a test case contains, the more rules it corresponds to in the rule graph. The rule similarity score uses cosine similarity. The GraphSAGE model is used to extract the subgraph covered by each test case from the business rule graph and convert it into a vector representation. The cosine similarity is used to quantify the rule coverage similarity between different test cases, as shown in the following formula:

[0069]

[0070] Among them, l1 and l2 represent the vector representations converted from the subgraphs covered by different test cases. If the rule coverage similarity of l1 and l2 is high, and l1 covers more rules in the business rule graph, then l1 will be included in the high-scoring test case set, and l2 will be deleted as a redundant case. It should be noted that a high rule coverage similarity indicates that the two test cases basically overlap in the covered business rules. The test case that covers more rules in the business rule graph can be retained, and the other test case that covers fewer rules can be regarded as a redundant case. If the number of rules covered by the two test cases is the same, it means that the two test cases cover the same number of rules. One of the test cases can be included in the high-scoring test case set, and the other test case can be regarded as a redundant case.

[0071] Step S4: perform semantic similarity scoring on each test case in the high-scoring test case set based on the historical test cases, sort all test cases in the high-scoring test case set according to the scores, form an optimal test case set according to the sorting results, and mark the test case with the highest score as a historical test case and store it in the vector database.

[0072] Specifically, the semantic similarity of test cases is scored using historical test cases in the vector database. These historical test cases can be pre-stored high-quality test cases or selected high-scoring test cases whose language descriptions better meet the requirements. The test cases are re-scored using historical test cases to identify those with more semantic similarity to the historical test cases, thereby selecting high-quality test cases. Semantic similarity is scored using cosine similarity, and the test cases are sorted by score. The top m test cases are included in the optimal test case set, and the top n highest-scoring test cases are stored in the vector database as historical test cases.

[0073] like Figure 4As shown, the original document undergoes data processing and enters the information analysis agent for embedding vector processing, with the processing results stored in the local vector library. The use case generation agent reads text and image information from the local vector library to generate test cases. The use case evaluation agent then scores the generated test cases to form a test case set, and highly rated test cases are stored back in the local vector library. This embodiment automatically generates test cases by constructing three agents: an information analysis agent, a use case generation agent, and a use case evaluation agent, to work together. It also establishes a test case evaluation mechanism to reduce redundant test cases and improve their quality. This not only greatly reduces the workload of testers but also significantly improves testing efficiency.

[0074] A second embodiment of the present invention discloses a test case generation system for securities and futures software, including a data conversion module, a test case generation module, a test case optimization module, and a test case scoring module.

[0075] The data conversion module is used to obtain original files in various document formats related to securities and futures software, convert the data in the original files into embedded vectors through an information analysis agent, and store them in a vector database. The vector database also includes at least one historical test case that meets the securities and futures software testing requirements.

[0076] The use case generation module is used to generate an initial test case set from a number of test points in the vector database and the data segments corresponding to each test point through a use case generation agent, wherein the initial test case set covers all test points.

[0077] The use case optimization module is used to construct a business rule map based on the trading rules and compliance supervision requirements in the securities and futures field, and to score the rule similarity of each test case in the initial test case set based on the business rule map, delete the low-scoring test cases as redundant cases, and form the high-scoring test cases into a high-scoring test case set.

[0078] A use case scoring module is used to perform semantic similarity scoring on each test case in the high-scoring test case set based on the historical test cases, sort all test cases in the high-scoring test case set according to the scores, form an optimal test case set according to the sorting results, and mark the test case with the highest score as a historical test case and store it in the vector database.

[0079] Since the first embodiment and this embodiment correspond to each other, this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and the technical effects achieved in the first embodiment can also be achieved in this embodiment. To reduce repetition, they will not be repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the first embodiment.

[0080] The third embodiment of the present invention relates to a Helicobacter pylori question-and-answer device based on retrieval enhancement, which includes a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the method in embodiment one are implemented.

[0081] A fourth embodiment of the present invention relates to a computer-readable storage medium having a computer program / instruction stored thereon, wherein the computer program / instruction implements the steps of the method in the first embodiment when executed by a processor.

[0082] The preferred embodiments of the present invention have been described in detail above. It should be understood that numerous modifications and variations based on the concepts of the present invention are possible without inventive effort by those skilled in the art. Therefore, any technical solution that can be derived by one skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.

Claims

1. A test case generation method for securities and futures software, characterized in that: The following steps are involved: Obtaining original files in various document formats related to securities and futures software, converting data in the original files into embedded vectors using an information analysis agent, and storing the embedded vectors in a vector database, wherein the vector database also includes at least one historical test case that meets the securities and futures software testing requirements; Generate an initial test case set by using a use case generation agent to generate a number of test points in the vector database and the data segments corresponding to each test point, wherein the initial test case set covers all test points; Constructing a business rule graph based on the trading rules and compliance regulatory requirements in the securities and futures field, scoring the rule similarity of each test case in the initial test case set based on the business rule graph, and filtering out redundant test cases based on the scoring results and deleting them to form a high-scoring test case set; A semantic similarity score is performed on each test case in the high-scoring test case set based on the historical test cases, all test cases in the high-scoring test case set are sorted according to the scores, an optimal test case set is formed according to the sorting results, and the test case with the highest score is marked as a historical test case and stored in the vector database.

2. The test case generation method for securities and futures software according to claim 1, characterized in that: The converting the data in the original file into an embedding vector by an information analysis agent includes: An information analysis agent is constructed based on a multimodal large model as a basic framework. The information analysis agent extracts key information from the title data, text data, and table data in the original file, and identifies and deletes non-key information. The key information includes data segments related to the test background and test key points, and the non-key information includes blank characters, URL links, and description information without test points. The text segmenter under the LangChain framework is used to divide the key information into fixed-length text blocks, and overlapping areas are set between adjacent text blocks; The key information after text block processing and the image data in the original file are converted into embedded vectors to achieve embedded vectorization of text and images.

3. The test case generation method for securities and futures software according to claim 2, characterized in that: The multimodal large model is specifically a CLIP model.

4. The test case generation method for securities and futures software according to claim 1, characterized in that: The initial test case set covers all test points and passes the semantic consistency test and logical completeness test: The semantic consistency test is to analyze the coverage of test cases and test points in the initial test case set based on a deep semantic matching algorithm, and the logical completeness test is to perform rule coverage integrity testing using a logical reasoning engine; When the test finds that the test case does not cover all test points, the case generation agent generates a supplementary test case and merges the supplementary test case into the initial test case set.

5. The test case generation method for securities and futures software according to claim 1, characterized in that: The business rule map constructed based on the trading rules and compliance supervision requirements in the securities and futures fields includes: Structurally decomposing the transaction rules and compliance regulatory requirements to form a number of atomic rule nodes, each of which has a unique identifier and context constraint attributes; According to the unique identifier and the context constraint attribute, a logical dependency relationship between each atomic rule node is constructed through a directed hypergraph to obtain a business rule graph.

6. The test case generation method for securities and futures software according to claim 1, characterized in that: The rule similarity score adopts cosine similarity. The GraphSAGE model is used to extract the subgraph covered by each test case from the business rule graph and convert it into a vector representation. The cosine similarity is used to quantify the rule coverage similarity between different test cases: Among them, l1 and l2 represent the vector representations converted from the subgraphs covered by different test cases. If the rule coverage similarity of l1 and l2 is high, and l1 covers more rules in the business rule graph, then l1 will be included in the high-scoring test case set and l2 will be used as a redundant case.

7. A test case generation system for securities and futures software, characterized in that: Includes the following modules: a data conversion module for acquiring original files in various document formats related to securities and futures software, converting the data in the original files into embedded vectors through an information analysis agent, and storing the embedded vectors in a vector database, wherein the vector database also includes at least one historical test case that meets the securities and futures software testing requirements; A use case generation module is used to generate an initial test case set from a number of test points in the vector database and a data segment corresponding to each test point through a use case generation agent, wherein the initial test case set covers all test points; A use case optimization module is used to construct a business rule map based on the trading rules and compliance supervision requirements in the securities and futures field, perform rule similarity scoring on each test case in the initial test case set based on the business rule map, delete low-scoring test cases as redundant cases, and form a high-scoring test case set with the obtained high-scoring test cases; A use case scoring module is used to perform semantic similarity scoring on each test case in the high-scoring test case set based on the historical test cases, sort all test cases in the high-scoring test case set according to the scores, form an optimal test case set according to the sorting results, and mark the test case with the highest score as a historical test case and store it in the vector database.

8. The test case generation system for securities and futures software according to claim 7, characterized in that: The data conversion module is further used for: An information analysis agent is constructed based on a multimodal large model as a basic framework. The information analysis agent extracts key information from the title data, text data, and table data in the original file, and identifies and deletes non-key information. The key information includes data segments related to the test background and test key points, and the non-key information includes blank characters, URL links, and description information without test points. The text segmenter under the LangChain framework is used to divide the key information into fixed-length text blocks, and overlapping areas are set between adjacent text blocks; The key information after text block processing and the image data in the original file are converted into embedded vectors to achieve embedded vectorization of text and images.

9. A test case generation device for securities and futures software, characterized in that: The generating device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the test case generating method for securities and futures software as described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the test case generation method for securities and futures software as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Automatic test case generation device based on large language model

    CN117806980A

Cited By

  • Graphical user interface test case generation method based on multi-agent framework

    CN121187955A

  • Intelligent test case mining system and method based on knowledge graph

    CN121326753A

  • Test set construction method of large model system and electronic equipment

    CN121901113A