Test method and system based on multi-modal generation and dynamic verification of large model

Through the testing method of large-model multimodal generation and dynamic verification, the problems of low test data generation efficiency and poor compliance in existing technologies are solved, and efficient and compliant test data generation and anomaly detection are achieved, adapting to the multimodal data requirements of modern business scenarios.

CN120653566APending Publication Date: 2025-09-16ZHEJIANG SHUXIN NETWORK CO LTD

Patent Information

Application Number
CN202510818359.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing test data generation methods are inefficient and difficult to adapt to data distribution drift and new abnormal patterns in modern business scenarios. In addition, the generated test data is prone to incomplete coverage and is difficult to meet industry compliance requirements.

Method used

A testing method based on large-scale model multimodal generation and dynamic verification is adopted. Test data is generated through a pre-trained large model, and dynamic detection and causal reasoning are performed in combination with an abnormal pattern knowledge base. An iterative mechanism is established, and low-rank adaptation technology and a multi-channel hybrid architecture are used for data generation and verification. An industry parameter library is configured for automatic mapping, and the DQN algorithm is used for resource allocation optimization.

Benefits of technology

It improves the efficiency and compliance of test data generation, reduces computing resource usage, enhances adaptability to new fields, reduces manual configuration workload, ensures the compliance and verification accuracy of generated data, and quickly identifies and corrects anomalies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653566A_ABST
    Figure CN120653566A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data testing, in particular to a testing method and system based on large model multi-modal generation and dynamic verification, and the testing method based on large model multi-modal generation and dynamic verification comprises the following steps: initializing a testing system, deploying a pre-trained large model, and generating testing data through the large model; dynamically detecting the generated test data through a preset abnormal mode knowledge base, and feeding back an abnormal result; and according to an abnormal result, reasoning and positioning an abnormal root cause through a preset causal reasoning model, and carrying out interpretable causal analysis output. According to the method, an iteration mechanism of test data generation, detection and feedback can be established, the generation work of the test data is reversely optimized through the abnormal result, all the generated test data can be ensured to pass basic verification, the compliance of the test data is ensured, dynamic detection is performed through the preset abnormal mode knowledge base, and the test efficiency is improved. Compared with a traditional static model, the method is higher in detection accuracy and processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data testing technology, and in particular to a testing method and system based on large-scale model multimodal generation and dynamic verification. Background Art

[0002] With the development of the Internet industry, more and more fields need to rely on automation and information systems as work support. In the initial construction process, such systems need to be tested, and large amounts of test data are required for testing. Existing generation methods generally rely on manual rule design or statistical sampling, such as SQL-based rule engines, Monte Carlo simulations, etc. In complex work scenarios, the test data generated by such generation methods have problems such as a single pattern and semantic deviation from the actual business scenario. Especially in highly compliant fields such as finance, schema constraints cannot be met. For example, the big data test case generation method and device disclosed in the Chinese patent (Announcement No.: CN112988603B) uses decision tree data structure. The tool performs data analysis and case execution based on the structure. For high-concurrency case execution, the tool makes decisions through the attributes of the decision tree nodes to control the case execution order, interface concurrency, interface serialization, and aggregate execution of a certain interface involved in multiple concurrent cases. It has high generation efficiency and can be dynamically adjusted according to the dynamically changing case business processes. However, it still requires a long time of debugging before it works. When it is directly used for test data generation, there are still problems such as uncontrollable output and business logic deviation. At the same time, its generation efficiency still has certain performance bottlenecks when processing large amounts of data, such as TB-level data in real time. Therefore, further technical improvements are needed to improve its adaptability to data distribution drift and new abnormal patterns in today's business scenarios. Summary of the Invention

[0003] The technical problem to be solved by the present invention is: the existing test data generation method is relatively backward. Not only is the generation efficiency low, but it is also no longer suitable for data distribution drift and new abnormal patterns in today's business scenarios. The test data it outputs is prone to incomplete coverage and is difficult to meet industry compliance requirements.

[0004] To solve the above technical problems, the first aspect of the present invention adopts the following technical solution: a testing method based on large-scale multimodal generation and dynamic verification, comprising the following steps:

[0005] Initialize the test system, deploy the pre-trained large model, and generate test data using the large model;

[0006] The generated test data is dynamically tested using the preset abnormal pattern knowledge base, and abnormal results are fed back;

[0007] Based on the abnormal results, the root cause of the abnormality is located through the preset causal reasoning model, and an explainable causal analysis output is performed.

[0008] When the present invention is working, it can establish an iterative mechanism for test data generation, detection and feedback, reversely optimize the test data generation work through abnormal results, ensure that all generated test data pass basic verification, ensure the compliance of the test data, and perform dynamic detection through a preset abnormal pattern knowledge base. Compared with traditional static model detection, the accuracy and processing efficiency are higher, and it can cooperate with explainable causal analysis to further improve the quality of test data generation, and timely suppress and correct the generation of erroneous data.

[0009] Preferably, the following steps are also included: presetting an industry parameter configuration library, structured storage of general rules for generating and detecting several types of test data for automatic mapping when generating or detecting different types of test data, and realizing semantic retrieval through knowledge graph embedding.

[0010] When the present invention is working, it can greatly reduce the migration cycle when generating test data across industries by configuring an industry parameter configuration library that structuredly stores general rules for generating and detecting several types of test data for automatic mapping when generating or detecting different types of test data. The general rules of automatic mapping enable large models to quickly adapt to new fields through parameter transfer learning without additional training, which can reduce the investment in training resources and the workload of manually configuring general rules, thereby improving the compliance rate of test data generation.

[0011] Preferably, when the test system is initialized, the following steps are also included: obtaining the selected general large model, performing LoRA-based domain fine-tuning, and injecting general rules that match the current industry.

[0012] When the present invention works, it adopts low-rank adaptation technology to fine-tune only the specific weight matrix of the large model, reducing the amount of parameter adjustment. It can not only save a lot of computing resources, but also facilitate the injection or updating of industry knowledge, while reducing the domain adaptation time and ensuring the compliance rate of the generated data.

[0013] Preferably, when generating test data through a large model, the following steps are adopted to generate multimodal data based on the large model, perform multi-dimensional verification on the multimodal data through a preset multi-channel hybrid architecture, and verify whether the multimodal data meets the business distribution requirements.

[0014] When the present invention works, it uses a large model to generate data that can adapt to the dynamic generation needs of multimodal data, with high generation efficiency and compliance, and performs multi-dimensional verification of multimodal data through a multi-channel hybrid architecture, which can solve the modal splitting problem of traditional methods and has high verification accuracy and efficiency.

[0015] Preferably, when dynamically detecting the generated test data through a preset abnormal pattern knowledge base, the following steps are adopted to perform multimodal comparative feature extraction on the generated test data, and dynamically detect the generated test data through a preset dynamic abnormality detection engine combined with a preset abnormal pattern knowledge base. The construction of the dynamic abnormality detection engine adopts the following steps:

[0016] A1: Construct positive and negative sample pairs, which include positive samples obtained by enhancing normal data and negative samples obtained by synthesizing abnormalities;

[0017] A2: It compares and learns feature identifiers through a preset learning framework and applies causal dilated convolution to time series data. By stacking dilated convolutions, it captures long-term dependencies, enhances feature extraction efficiency, and improves anomaly detection accuracy.

[0018] A3: When a new anomaly is detected, the knowledge graph update is triggered and the preset anomaly pattern knowledge graph is updated online.

[0019] When the present invention works, it can effectively reduce the false alarm rate by constructing a lightweight dynamic anomaly detection and verification module based on contrastive learning and TCN time series modeling, and updating the anomaly pattern knowledge base in real time. Compared with traditional static anomaly detection methods, it can greatly reduce the occupation of computing resources. At the same time, it can also avoid problems such as the inability to identify data distribution drift or new anomalies in real time due to reliance on fixed rules or historical data training. It has good versatility and strong adaptability.

[0020] As an advantage, the method further includes the following steps: optimizing computing resource allocation and dynamically adjusting computing resources allocated for test data generation and detection, specifically using the following steps:

[0021] B1: Collect historical test data, build a multi-objective optimization model based on risk priority, historical defect rate, and execution cost, solve the optimal set, perform dynamic weight configuration, and perform meta-heuristic use case sorting;

[0022] B2: Using the DQN algorithm, reinforcement learning resource allocation is performed based on reference parameters of the working state during work, where the reference parameters include at least one of the state, action, and reward.

[0023] When the present invention is working, the DQN algorithm is adopted to perform reinforcement learning resource allocation based on the reference parameters of the working state during operation, which can realize the automatic allocation and dynamic adjustment of computing resources for test data generation and verification work, reduce the proportion of manual participation in customizing resource allocation plans, and have strong adaptability.

[0024] Preferably, when locating the root cause of the anomaly based on the abnormal result through reasoning with a preset causal reasoning model and performing interpretable causal analysis output, the establishment of the causal reasoning model adopts the following steps: performing causal modeling, defining variable relationships, using a preset framework, constructing a causal graph for testing anomalies, and identifying and outputting the root cause by verifying the causal graph through causal effect identification.

[0025] When the present invention is working, it can locate the root cause of the anomaly based on the abnormal result through the preset causal reasoning model, avoiding the black box results of the traditional generation method, and can quickly locate the root cause. By establishing a causal reasoning model combined with a causal graph, the abnormal propagation path can be quickly identified, and by analyzing the abnormal causal chain, the positioning efficiency is greatly improved.

[0026] To solve the above technical problems, the second aspect of the present invention adopts the following technical solution: a test system based on large model multimodal generation and dynamic verification, applying the test method based on large model multimodal generation and dynamic verification as described in any of the above aspects, including:

[0027] Large model multimodal generation module, which generates test data based on the large model;

[0028] The dynamic anomaly detection and verification module is used to dynamically detect the test data generated by the large model multimodal generation module and return the anomaly results for reverse optimization of the large model multimodal generation module;

[0029] The explainable analysis module is used to locate the root cause of the anomaly based on the abnormal results through a preset causal reasoning model and perform explainable causal analysis output.

[0030] Preferably, it also includes a resource optimization module for reinforcement learning resource allocation based on reference parameters, and the resource optimization module dynamically allocates computing resources through reinforcement learning according to the working status of the large model multimodal generation module and the dynamic anomaly detection and verification module.

[0031] Preferably, it also includes an industry parameter configuration library for structured storage of general rules for generating and detecting several types of test data, and the large model multimodal generation module and the dynamic anomaly detection and verification module automatically map and match the general rules when working.

[0032] The beneficial technical effects of the present invention include:

[0033] 1. The present invention can establish an iterative mechanism for test data generation, detection and feedback, reversely optimize the test data generation work through abnormal results, ensure that all generated test data pass basic verification, guarantee the compliance of the test data, and perform dynamic detection through a preset abnormal pattern knowledge base. Compared with traditional static models, the detection accuracy and processing efficiency are higher, and it can cooperate with explainable causal analysis to further improve the quality of test data generation, and timely suppress the generation of erroneous data and correct it.

[0034] 2. The present invention configures an industry parameter configuration library that structuredly stores general rules for generating and detecting several types of test data for automatic mapping when generating or detecting different types of test data, which can significantly reduce the migration cycle when generating test data across industries. The general rules of automatic mapping enable large models to quickly adapt to new fields through parameter transfer learning without additional training, which can reduce the investment in training resources and the workload of manually configuring general rules, thereby improving the compliance rate of test data generation.

[0035] 3. The present invention adopts low-rank adaptation technology and only fine-tunes the specific weight matrix of the large model, reducing the amount of parameter adjustment. It not only saves a lot of computing resources, but also facilitates the injection or updating of industry knowledge, reducing the domain adaptation time while ensuring the compliance rate of the generated data.

[0036] 4. The present invention adopts a large model generation method that can adapt to the dynamic generation requirements of multimodal data, with high generation efficiency and compliance, and performs multi-dimensional verification of multimodal data through a multi-channel hybrid architecture, which can solve the modal splitting problem of traditional methods and has high verification accuracy and efficiency.

[0037] 5. The present invention can effectively reduce the false alarm rate by constructing a lightweight dynamic anomaly detection and verification module based on contrastive learning and TCN time series modeling, and updating the anomaly pattern knowledge base in real time. Compared with traditional static anomaly detection methods, it can greatly reduce the occupation of computing resources. At the same time, it can also avoid problems such as the inability to identify data distribution drift or new anomalies in real time due to reliance on fixed rules or historical data training. It has good versatility and strong adaptability.

[0038] 6. The present invention adopts the DQN algorithm to perform reinforcement learning resource allocation based on the reference parameters of the working status during operation. It can realize the automatic allocation and dynamic adjustment of computing resources for test data generation and verification work, reduce the proportion of manual participation in customizing resource allocation plans, and has strong adaptive capabilities.

[0039] 7. The present invention can locate the root cause of the anomaly based on the abnormal result through a preset causal reasoning model, avoiding the black box results of traditional generation methods, and can quickly locate the root cause. By establishing a causal reasoning model combined with a causal graph, the abnormal propagation path can be quickly identified, and by analyzing the abnormal causal chain, the positioning efficiency is greatly improved.

[0040] Other features and advantages of the present invention will be disclosed in detail in the following specific embodiments and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The present invention will be further described below with reference to the accompanying drawings:

[0042] Figure 1 This is a schematic diagram of the structure of the test system based on large-scale model multi-modal generation and dynamic verification;

[0043] Figure 2 A workflow diagram for building a dynamic anomaly detection engine in testing based on large model multimodal generation and dynamic verification;

[0044] Figure 3 Workflow diagram for dynamically allocating computing resources in tests based on large model multimodal generation and dynamic verification. DETAILED DESCRIPTION

[0045] The following is an explanation and description of the technical solutions of the embodiments of the present invention in conjunction with the drawings of the embodiments of the present invention. However, the following embodiments are only preferred embodiments of the present invention and are not exhaustive. Based on the embodiments in the implementation manner, other embodiments obtained by those skilled in the art without creative work are all within the scope of protection of the present invention.

[0046] In the following description, terms such as "inside", "outside", "up", "down", "left", "right", etc. that indicate directions or positional relationships are only used to facilitate the description of the embodiments and simplify the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, they should not be understood as limiting the present invention.

[0047] Example 1:

[0048] See also Figure 1 This embodiment discloses a test method based on large model multimodal generation and dynamic verification, including the following steps:

[0049] Initialize the test system, deploy the pre-trained large model, and generate test data using the large model;

[0050] The generated test data is dynamically tested using the preset abnormal pattern knowledge base, and abnormal results are fed back;

[0051] Based on the abnormal results, the root cause of the abnormality is located through the preset causal reasoning model, and an explainable causal analysis output is performed.

[0052] When this embodiment is working, it is possible to establish an iterative mechanism for test data generation, detection and feedback, reversely optimize the test data generation work through abnormal results, ensure that all generated test data pass basic verification, ensure the compliance of the test data, and perform dynamic detection through a preset abnormal pattern knowledge base. Compared with traditional static model detection, the accuracy and processing efficiency are higher, and it can cooperate with explainable causal analysis to further improve the quality of test data generation, and timely suppress and correct the generation of erroneous data.

[0053] Preferably, the following steps are also included: presetting an industry parameter configuration library 5, structured storage of general rules for generating and detecting several types of test data for automatic mapping when generating or detecting different types of test data, and realizing semantic retrieval through knowledge graph embedding. For example, in the financial field, the financial PCI-DSS standard can be stored in the industry parameter configuration library 5, and field constraints such as "transaction amount→decimal(18,2)" can be automatically mapped during work. When switching business scenarios, it can be "migrated to the new field with one click" based on the industry parameter configuration library 5.

[0054] When this embodiment is working, by configuring the industry parameter configuration library 5 that structuredly stores general rules for generating and detecting several types of test data for automatic mapping when generating or detecting different types of test data, the migration cycle when generating test data across industries can be greatly reduced. The general rules of automatic mapping enable large models to quickly adapt to new fields through parameter transfer learning without additional training, which can reduce the investment in training resources and the workload of manually configuring general rules, thereby improving the compliance rate of test data generation.

[0055] In specific implementation, when the test system is initialized, the following steps are also included: obtaining the selected general large model, performing LoRA-based field fine-tuning, and injecting general rules that match the current industry. The sample code for the LoRA fine-tuning parameters is as follows, based on the LLaMA-3 model, rank \(r=8\), number of adaptation layers = 4, and injecting field constraints:

[0056] ```json

[0057] {

[0058] "field":"amount",

[0059] "type":"decimal(18,2)",

[0060] "constraint":"value>=0"

[0061] }

[0062] ```;

[0063] The current generation efficiency can reach 100,000 pieces per minute, which is a great technological improvement compared to the traditional method of 100 pieces per minute.

[0064] For example, when performing lightweight fine-tuning for domain adaptation, low-rank adaptation technology is used to fine-tune only specific weight matrices of the large model, such as (\(W\in\mathbb{R}^{d\times sk}\)). Industry knowledge, such as financial trading rules, is injected, reducing the number of fine-tuned parameters to less than 5%. Compared with full parameter fine-tuning, this can save 90% of computing resources. Some formula reference codes can use the following formulas:

[0065] \[

[0066] h=W_0x+\Delta W x=W_0x+BAx\quad(B\in\mathbb{R}^{d\timesr},

[0067] A\in\mathbb{R}^{r\timesk},r\ll d)

[0068] \];

[0069] Where: \(r\) is the rank, which controls the complexity of the adaptation layer.

[0070] Among them, when fine-tuning the objective function, some reference codes are as follows:

[0071] \[

[0072] \mathcal{L}_{\text{total}}=\mathcal{L}_{\text{LM}}+\lambda\cdot\mathcal{L}_{\text{schema}}

[0073] \];

[0074] Where: (\(\mathcal{L}_{\text{LM}}\) is the language model loss;

[0075] \(\mathcal{L}_{\text{schema}}\) is the Schema compliance loss, such as field non-empty verification. By introducing Schema constraint adversarial training, we ensure that the generated data complies with business rules.

[0076] When this embodiment is working, low-rank adaptation technology is used to fine-tune only the specific weight matrix of the large model, reducing the amount of parameter adjustment. In specific implementation, lightweight fine-tuning is achieved through LoRA, and only <5% of parameters need to be adjusted to adapt to different industries. This not only saves a lot of computing resources, but also facilitates the injection or updating of industry knowledge, reducing the field adaptation time while ensuring the compliance rate of generated data.

[0077] Preferably, when generating test data through a large model, the following steps are adopted to generate multimodal data based on the large model, and perform multi-dimensional verification of the multimodal data through a preset multi-channel hybrid architecture to verify whether the multimodal data meets the business distribution requirements. During operation, it is also possible to set a discriminator that generates text, time series, and image data based on the large model and uses a CNN+Transformer hybrid architecture to determine whether the data meets the business distribution requirements, and perform multimodal adversarial training. In the generative adversarial network framework, the discriminator additionally verifies whether the data meets the industry Schema. Among them, some reference codes for adversarial loss are as follows:

[0078] \[

[0079] \min_G\max_D\mathbb{E}[\logD(x_{\text{real}})]+\mathbb{E}[\log(1-D(G(z)))]

[0080] \];

[0081] Of course, you can also use the following reference code:

[0082] \[

[0083] \mathcal{L}_{\text{adv}}=\mathcal{L}_{\text{GAN}}}+\lambda\cdot\mathbb{E}[\text{Violation}(G(z))]

[0084] \];

[0085] Among them, \(\text{Violation}\) is the penalty item for violating the Schema rules.

[0086] When this embodiment is working, a large model is used to generate data that can adapt to the dynamic generation needs of multimodal data, with high generation efficiency and compliance, and multi-dimensional verification of multimodal data is performed through a multi-channel hybrid architecture, which can solve the modal splitting problem of traditional methods and has high verification accuracy and efficiency.

[0087] See also Figure 3As a further improvement of this embodiment, the following steps are further included to optimize the allocation of computing resources and dynamically adjust the computing resources allocated for test data generation and detection. Specifically, the following steps are adopted:

[0088] B1: Collect historical test data, build a multi-objective optimization model based on risk priority, historical defect rate, and execution cost, and solve the optimal set. During operation, the NSGA-II algorithm can be used to solve the Pareto optimal solution set, perform dynamic weight configuration, and perform meta-heuristic use case sorting.

[0089] B2: Using the DQN algorithm, reinforcement learning resource allocation is performed based on reference parameters of the working state during work, where the reference parameters include at least one of the state, action, and reward.

[0090] When this embodiment is working, the DQN algorithm is used to perform reinforcement learning resource allocation based on the reference parameters of the working status during operation. It can realize the automatic allocation and dynamic adjustment of computing resources for test data generation and verification work, reduce the proportion of manual participation in customizing resource allocation plans, and has strong adaptive capabilities.

[0091] In specific implementation, a scoring model can be constructed based on Risk (risk priority), Defect (historical defect rate), and Cost (execution cost). Some reference codes are as follows:

[0092] \[

[0093] \text{Priority}=\alpha\cdot\text{Risk}+\beta\cdot\text{Defect}-\gamma\cdot\text{Cost}

[0094] \];

[0095] The DQN algorithm is used during operation. Based on the State (including current resource utilization and the length of the queue to be tested), the Action (including the CPU and memory allocation ratios), and the Reward (including the weighted sum of the improvement in defect detection rate and the reduction in resource consumption), the system can achieve a 40% increase in test throughput through real-time adjustment of resource allocation strategies.

[0096] Example 2:

[0097] See also Figure 2 This embodiment provides a testing method based on large model multimodal generation and dynamic verification. The similarities with other embodiments are not repeated here, and the differences are described in detail below.

[0098] In this embodiment, when the generated test data is dynamically detected through a preset abnormal pattern knowledge base, the following steps are adopted to perform multimodal comparative feature extraction on the generated test data, and dynamically detect it through a preset dynamic abnormality detection engine combined with a preset abnormal pattern knowledge base. The construction of the dynamic abnormality detection engine adopts the following steps:

[0099] A1: Construct positive and negative sample pairs, which include positive samples obtained by enhancing normal data and negative samples obtained by synthesizing abnormalities;

[0100] A2: It compares and learns feature identifiers through a preset learning framework and applies causal dilated convolution to time series data. By stacking dilated convolutions, it captures long-term dependencies, enhances feature extraction efficiency, and improves anomaly detection accuracy.

[0101] A3: When a new anomaly is detected, the knowledge graph update is triggered and the preset anomaly pattern knowledge graph is updated online.

[0102] When this embodiment is working, by constructing a lightweight dynamic anomaly detection and verification module 2 of contrastive learning and TCN time series modeling, and updating the anomaly pattern knowledge base in real time, it can effectively reduce the false alarm rate. At the same time, compared with the traditional static anomaly detection method, it can greatly reduce the occupation of computing resources. At the same time, it can also avoid the problems of being unable to identify data distribution drift or new anomalies in real time due to relying on fixed rules or historical data training. It has good versatility and strong adaptability.

[0103] During operation, normal data is enhanced as positive samples and abnormal data is synthesized as negative samples. The SimCLR framework can be used to learn feature representation. The objective function is as follows:

[0104] \[

[0105] \mathcal{L}_{\text{contrast}}=-\log\frac{\exp(\text{sim}(z_i,z_j) / \tau)}{\sum_{k=1}^{2N}\mathbb{1}_{k\neqi}\exp(\text{sim}(z_i,z_k) / \tau}

[0106] \];

[0107] At the same time, when modeling TCN, that is, temporal convolutional network, causal dilation convolution is used for time series data to capture long-term dependencies. Some reference codes are as follows:

[0108] \[

[0109] y_t=\sum_{i=0}^{k-1}w_i\cdotx_{td\cdoti}

[0110] \];

[0111] Where: \(d\) is the dilation coefficient, \(k\) is the convolution kernel size.

[0112] In step A3, when the knowledge graph update is triggered and the preset abnormal pattern knowledge graph is updated online, some reference codes are as follows:

[0113] ```Python

[0114] ifanomaly_score>threshold:

[0115] update_knowledge_graph(feature_embedding)

[0116] ```;

[0117] When working, the contrastive learning + TCN combination reduces the computational overhead by 50% compared to traditional LSTM, and supports online updates through the abnormal pattern knowledge graph, which can reduce the missed detection rate to below 5%.

[0118] As a further improvement of this embodiment, when locating the root cause of the anomaly based on the abnormal result through reasoning with a preset causal reasoning model and performing interpretable causal analysis output, the establishment of the causal reasoning model adopts the following steps: performing causal modeling, defining variable relationships, using a preset framework, constructing a causal graph for testing anomalies, and identifying and outputting the root cause through causal effect identification and verification of the causal graph.

[0119] When this embodiment is working, it can locate the root cause of the anomaly based on the abnormal result through the preset causal reasoning model, avoiding the black box results of the traditional generation method, and can quickly locate the root cause. By establishing a causal reasoning model combined with a causal graph, the abnormal propagation path can be quickly identified, and by analyzing the abnormal causal chain, the positioning efficiency is greatly improved.

[0120] When working, you can use the DoWhy library to build a causal graph, identify the anomaly propagation path, and provide an interpretable causal analysis output by providing anomaly causal chains, which can effectively improve positioning efficiency. Some reference codes are as follows:

[0121] ```Python

[0122] model=CausalModel(

[0123] data=df,

[0124] treatment='data_generation_method',

[0125] outcome='anomaly_score' )

[0127] estimate=model.estimate_effect()

[0128] ```;

[0129] Of course, you can also use the DoWhy and Pyro frameworks to build a causal graph of test anomalies and identify the root cause, such as whether it is a data generation bias or a system logic error. Some reference code is as follows:

[0130] ```Python

[0131] model=CausalModel(

[0132] data=df,

[0133] treatment="data_source",

[0134] outcome="test_failure",

[0135] graph="X->Y<-Z" )

[0137] estimate=model.estimate_effect(method="backdoor.propensity_score_weighting")

[0138] ```;

[0139] In actual work, for example, a bank needs to test the system stability of 100,000 transactions per second, requiring the test data to comply with PCI-DSS standards. The business rules include transaction amount ≥ 0 and account ID validity. The stress indicators include response time < 50ms and error rate < 0.001%. When generating data, LoRA fine-tunes parameters based on the LLaMA-3 model with rank \(r=8\), number of adaptation layers = 4, and injects field constraints. The sample code is as follows:

[0140] ```json

[0141] {

[0142] "field":"amount",

[0143] "type":"decimal(18,2)",

[0144] "constraint":"value>=0"

[0145] }

[0146] ```;

[0147] Its generation efficiency can reach 100,000 pieces per minute. It tests test data and constructs a three-dimensional feature tensor of transaction amount, timestamp, and user ID through comparative learning features. It performs TCN time series modeling, sets the expansion coefficient \(d=1,2,4\) and convolution kernel \(k=3\), and efficiently detects anomalies such as delayed payments and repeated transactions. When generating and testing test data, it allocates resources through the DQN strategy. For example, it can dynamically allocate 80% of resources to high-risk transactions, such as large transfers, which can increase throughput by 40%.

[0148] Example 3:

[0149] See also Figure 1 This embodiment provides a test system based on large model multimodal generation and dynamic verification, which applies the test method based on large model multimodal generation and dynamic verification described in the above embodiment, including:

[0150] Large model multimodal generation module 1, generates test data based on the large model;

[0151] Dynamic anomaly detection and verification module 2 is used to dynamically detect the test data generated by the large model multimodal generation module 1 and return the anomaly results for reverse optimization of the large model multimodal generation module 1;

[0152] The explainability analysis module 3 is used to locate the root cause of the anomaly based on the abnormal result through the preset causal reasoning model and perform explainable causal analysis output.

[0153] Preferably, it also includes a resource optimization module 4 for reinforcement learning resource allocation based on reference parameters, and the resource optimization module 4 dynamically allocates computing resources through reinforcement learning according to the working status of the large model multimodal generation module 1 and the dynamic anomaly detection and verification module 2, and also includes an industry parameter configuration library 5 for structured storage of general rules for generating and detecting several types of test data, and the large model multimodal generation module 1 and the dynamic anomaly detection and verification module 2 automatically map the matching general rules when working.

[0154] During operation, the industry parameter configuration library 5 automatically maps parameter configuration and general rules to the large model multimodal generation module 1, dynamic anomaly detection and verification module 2 and resource optimization module 4 according to the current business scenario. The large model multimodal generation module 1 generates big data test data according to the current business scenario and sends it to the dynamic anomaly detection and verification module 2 for detection. When an abnormal result is detected, it is transmitted back to the large model multimodal generation module 1. At the same time, the interpretable analysis module 3 locates the root cause of the abnormality based on the abnormal result through the preset causal reasoning model, and performs interpretable causal analysis output. After correcting the root cause of the abnormality, the working status is detected synchronously during test data generation and detection. The resource optimization module optimizes the allocation of computing resources, generates and executes the resource allocation strategy, and repeats in sequence to complete test data generation, detection and feedback. When switching fields, you only need to fine-tune the large model parameters and replace the parameter configuration and general rules to quickly switch scenes, with good versatility.

[0155] The beneficial technical effects of this embodiment include: the present invention can establish an iterative mechanism for test data generation, detection and feedback, reversely optimize the test data generation work through abnormal results, ensure that all generated test data pass basic verification, ensure the compliance of the test data, and perform dynamic detection through a preset abnormal pattern knowledge base. Compared with traditional static models, the detection accuracy and processing efficiency are higher, and it can cooperate with explainable causal analysis to further improve the quality of test data generation, and timely suppress and correct the generation of erroneous data.

[0156] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Those skilled in the art will understand that the present invention includes, but is not limited to, the contents described in the drawings and the above specific embodiments. Any modifications that do not deviate from the functional and structural principles of the present invention are intended to be included within the scope of the claims.

Claims

1. A testing method based on large model multimodal generation and dynamic verification, characterized by: The following steps are involved: Initialize the test system, deploy the pre-trained large model, and generate test data using the large model; The generated test data is dynamically tested using the preset abnormal pattern knowledge base, and abnormal results are fed back; Based on the abnormal results, the root cause of the abnormality is located through the preset causal reasoning model, and an explainable causal analysis output is performed.

2. The testing method based on large model multimodal generation and dynamic verification according to claim 1, characterized in that: The method also includes the following steps: presetting an industry parameter configuration library (5), structurally storing general rules for generating and detecting several types of test data for automatic mapping when generating or detecting different types of test data, and realizing semantic retrieval through knowledge graph embedding.

3. The testing method based on large model multimodal generation and dynamic verification according to claim 2, characterized in that: When the test system is initialized, the following steps are also included: obtaining the selected general large model, performing LoRA-based domain fine-tuning, and injecting general rules that match the current industry.

4. The testing method based on large model multimodal generation and dynamic verification according to claim 3 is characterized in that: When generating test data through a large model, the following steps are used to generate multimodal data based on the large model, and to perform multi-dimensional verification of the multimodal data through a preset multi-channel hybrid architecture to verify whether the multimodal data meets the business distribution requirements.

5. The testing method based on large model multimodal generation and dynamic verification according to claim 1, characterized in that: When dynamically detecting the generated test data using a preset abnormal pattern knowledge base, the following steps are used to perform multimodal comparative feature extraction on the generated test data, and dynamically detect the generated test data using a preset dynamic abnormality detection engine combined with a preset abnormal pattern knowledge base. The construction of the dynamic abnormality detection engine uses the following steps: A1: Construct positive and negative sample pairs, which include positive samples obtained by enhancing normal data and negative samples obtained by synthesizing abnormalities; A2: It compares and learns feature identifiers through a preset learning framework and applies causal dilated convolution to time series data. By stacking dilated convolutions, it captures long-term dependencies, enhances feature extraction efficiency, and improves anomaly detection accuracy. A3: When a new anomaly is detected, the knowledge graph update is triggered and the preset anomaly pattern knowledge graph is updated online.

6. The testing method based on large model multimodal generation and dynamic verification according to claim 1, characterized in that: The method further includes the following steps: optimizing computing resource allocation and dynamically adjusting computing resources allocated for test data generation and detection. Specifically, the following steps are used: B1: Collect historical test data, build a multi-objective optimization model based on risk priority, historical defect rate, and execution cost, solve the optimal set, perform dynamic weight configuration, and perform meta-heuristic use case sorting; B2: Using the DQN algorithm, reinforcement learning resource allocation is performed based on reference parameters of the working state during work, where the reference parameters include at least one of the state, action, and reward.

7. The testing method based on large model multimodal generation and dynamic verification according to claim 1, characterized in that: When locating the root cause of the anomaly based on the abnormal result through reasoning with a preset causal reasoning model and performing interpretable causal analysis output, the establishment of the causal reasoning model adopts the following steps: causal modeling, defining variable relationships, using a preset framework, constructing a causal graph for the test anomaly, and identifying and outputting the root cause through causal effect identification and verification of the causal graph.

8. A test system based on large model multimodal generation and dynamic verification, applying the test method based on large model multimodal generation and dynamic verification as described in any one of claims 1 to 7, characterized in that: include: Large model multimodal generation module (1), generates test data based on the large model; A dynamic anomaly detection and verification module (2) is used to dynamically detect the test data generated by the large model multimodal generation module (1) and return the anomaly results for reverse optimization by the large model multimodal generation module (1); The explainability analysis module (3) is used to locate the root cause of the anomaly based on the abnormal results through the preset causal reasoning model and perform explainable causal analysis output.

9. The test system based on large model multimodal generation and dynamic verification according to claim 8, characterized in that: The system further includes a resource optimization module (4) for performing reinforcement learning resource allocation based on reference parameters. The resource optimization module (4) dynamically allocates computing resources through reinforcement learning according to the working states of the large model multimodal generation module (1) and the dynamic anomaly detection and verification module (2).

10. The test system based on large model multimodal generation and dynamic verification according to claim 8, characterized in that: It also includes an industry parameter configuration library (5) for structured storage of general rules for generating and detecting several types of test data, and the general rules are automatically mapped and matched when the large model multimodal generation module (1) and the dynamic anomaly detection and verification module (2) work.

Citation Information

Patent Citations

  • Big data test case generation method and device

    CN112988603B

Cited By

  • Intelligent test data generation and security verification method and system

    CN121682851A

  • Abnormal root cause tracing method and device for multi-causal model integration and computer equipment

    CN121936608A

  • Digital intelligent farm crop monitoring system based on image processing

    CN122130627A