A large model driving-based software function depth analysis method
By employing a large-model-driven method for in-depth software function analysis, we have addressed the limitations of multimodal data fusion and test case generation. This approach enables semantic association of multidimensional information and intelligent generation of test cases, improving the accuracy and efficiency of software function analysis and adapting to rapid software iteration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU GONGDIANBAO IND TECH CO LTD
- Filing Date
- 2025-12-29
- Publication Date
- 2026-05-19
AI Technical Summary
Existing software function analysis methods have limitations in multimodal data fusion, deep semantic understanding, and automated quality assurance. They lack cross-modal information alignment and joint reasoning mechanisms, resulting in one-sided analysis results, a lack of overall insight at the system level, difficulty in fully identifying the complete features and hidden defects of software functions, and low efficiency due to reliance on manual intervention in test case generation and verification.
A large model-driven approach is adopted. By collecting multimodal data (code repository, requirement documents, user interaction logs and test cases), performing cross-modal alignment processing, a hybrid analysis large model is constructed. This model combines rule-based models and deep learning models for collaborative analysis, automatically generates boundary test cases, and executes tests in a virtualized environment to achieve continuous iterative optimization.
It achieves structured integration and semantic association of multi-dimensional information, improves the accuracy and coverage depth of software function identification and defect detection, and enhances the intelligence and systematization of test case generation, thereby improving the effectiveness and efficiency of software testing, adapting to rapid software iteration and changes in requirements, and forming a closed-loop optimization capability.
Smart Images

Figure CN121412096B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software engineering technology, and in particular to a method for in-depth analysis of software functions based on a large model. Background Technology
[0002] As software systems continue to expand in scale and application scenarios become increasingly complex, traditional software functional analysis methods are gradually showing limitations in handling the fusion of multi-source heterogeneous data, deep semantic understanding, and automated quality assurance. The data generated in the modern software lifecycle takes many forms, including source code, requirements documents, user interaction logs, and test cases. This data contains multi-dimensional information such as software function implementation, user behavioral intent, and system operating status. However, existing analysis methods often only focus on a single type of data, lacking effective alignment and joint reasoning mechanisms for cross-modal information. This results in one-sided analysis results, a lack of holistic system-level insight, and difficulty in comprehensively identifying the complete characteristics and hidden defects of software functions.
[0003] Currently, mainstream technologies in the field of software functional analysis mainly include defect detection based on static code analysis, test coverage assessment based on dynamic execution, and requirement tracing based on natural language processing. Static analysis techniques rely on predefined rules or pattern matching, which can efficiently discover grammatical or simple logical errors, but have limited ability to understand business semantics, runtime behavior, and functional descriptions in unstructured text. Dynamic testing methods verify functional correctness by executing test cases, but their test case generation often relies on human experience or simple random strategies, making it difficult to systematically cover boundary scenarios and deep logical combinations. Meanwhile, although some research has attempted to introduce machine learning for automated analysis, most methods are still limited to a single model structure, failing to effectively combine the determinism of rule engines with the generalization ability of data-driven models, and have not yet achieved a good balance between interpretability, adaptability, and analytical depth.
[0004] The main problems faced by existing technologies include: First, the lack of a unified semantic representation and alignment mechanism among multimodal software data creates "data silos," limiting comprehensive modeling of software states. Second, analysis methods often operate in isolation, with rule-based and learning methods failing to achieve deep synergy, resulting in the analysis process failing to fully utilize the complementary advantages of domain prior knowledge and implicit data patterns. Third, the automation level of test case generation and verification is insufficient, especially in the identification and coverage of boundary conditions, abnormal processes, and implicit functional rules, which relies on manual intervention, leading to low efficiency and the potential for overlooking critical scenarios. Finally, existing analysis systems generally lack continuous learning and self-evolution capabilities, making it difficult to adapt to rapid software iteration and dynamic changes in requirements, causing analysis models to gradually become ineffective over time. Therefore, there is an urgent need for a deep software functional analysis method that can integrate multi-source data, achieve rule-based and learning synergy, and support automated test generation and closed-loop optimization to improve the intelligence and systematization level of software quality assurance.
[0005] Therefore, it is essential to invent a software function depth analysis method based on a large model to solve the above problems. Summary of the Invention
[0006] The purpose of this invention is to provide a software function depth analysis method based on a large model to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for in-depth analysis of software functions based on a large model, specifically including the following steps:
[0008] S1. Collect multimodal data of the target software, wherein the multimodal data includes at least code library data, requirement document data, user interaction logs, and test case data;
[0009] S2. Perform cross-modal alignment processing on the collected multimodal data to map data from different modalities to a unified vector space and construct a multidimensional tensor sequence for characterizing the software state.
[0010] S3. Construct a hybrid analysis model, which includes a rule-based analysis model and a deep learning-based analysis model;
[0011] S4. The multidimensional tensor sequence is analyzed collaboratively using the hybrid analysis model to identify software functional features and potential defects, wherein the rule model and the deep learning model are cross-validated and jointly inferred.
[0012] S5. Based on the results of the collaborative analysis, automatically generate a set of boundary test cases for the target software, and execute the tests in a virtualized verification environment to monitor the functional implementation in real time.
[0013] S6. Based on the test execution results and logs, perform feedback optimization and iterative training on the hybrid analysis model.
[0014] Preferably, in step S1:
[0015] The code repository data includes structured code metadata and runtime characteristic data. The structured code metadata is obtained through version control tool interfaces and static code analysis tools, and the runtime characteristic data is obtained by inserting probes into the code or using dynamic tracing tools.
[0016] The requirement document data is parsed using natural language processing technology to extract user roles, behaviors, value points, and version evolution information;
[0017] The user interaction logs include clickstream data, abnormal events, API call chains, and database query logs captured through tracking technology.
[0018] The test case data includes structured test cases obtained from test management tools, as well as test cases extracted from non-standardized documents through text parsing or large model understanding.
[0019] Preferably, the cross-modal alignment process includes:
[0020] The original data for each modality is encoded using a modality-specific encoder; specifically, an encoder based on abstract syntax trees and graph neural networks is used for code data; a pre-trained language model encoder is used for text data; and a time-series model encoder is used for log data.
[0021] A cross-modal embedding layer maps the vectors output by each modal encoder to the same semantic space.
[0022] The vectors of each modality in a unified semantic space are combined according to the time dimension to form a three-dimensional tensor sequence. The three dimensions of the three-dimensional tensor represent the data source type, time window, and feature dimension, respectively.
[0023] Preferably, in step S3:
[0024] The rule-based analysis model has a rule base that includes programming language syntax specifications, industry standards, business logic, and a business process state machine derived from user interaction logs. It uses a declarative rule language or a domain-specific language to define and match execution rules.
[0025] The deep learning-based analysis model employs a pre-trained large code model, Transformer architecture, or graph neural network to extract deep semantic features of code and requirements, and to perform functional classification and vulnerability detection tasks.
[0026] Preferably, the collaborative analysis includes at least one of the following mechanisms:
[0027] The rule model preprocesses the input data, filters out noisy data, and provides weak supervision signals for the deep learning model.
[0028] The deep learning model performs semantic understanding of natural language requirements that are difficult to formalize into rules, and transforms them into structured inputs that the rule model can process.
[0029] The rule model and the deep learning model analyze the same input independently and verify the consistency of the analysis results. If the results conflict, a review process is triggered.
[0030] The abstract analysis results output by the deep learning model are mapped to specific compliance clauses or business rule descriptions through the rule model.
[0031] Preferably, in step S5:
[0032] The virtualization verification environment adopts layered modeling, including system-level virtualization based on container orchestration technology, business logic-level virtualization based on microservices and service mesh, and data-level virtualization based on database proxy and data masking technology.
[0033] The generation of boundary test case set includes: extracting boundary constraints and implicit boundary rules from the collaborative analysis results, constructing a boundary condition knowledge base, and generating test cases using the hybrid analysis large model or a dedicated large model.
[0034] Preferably, the feedback optimization and iterative training include:
[0035] The test execution results and logs are used as feedback signals, and after filtering and cleaning, they are converted into training samples.
[0036] The deep learning-based analysis model is incrementally trained using a parameter-efficient fine-tuning technique.
[0037] Based on reinforcement learning strategies, the model generation strategy is optimized according to the value of defects discovered by test cases;
[0038] The implicit patterns learned by the deep learning model are extracted into new candidate rules, and the rule base of the rule-based analysis model is automatically updated.
[0039] The technical effects and advantages of this invention are as follows:
[0040] 1. This invention collects and integrates multimodal data such as code repositories, requirement documents, user interaction logs, and test cases, and uses cross-modal alignment technology to map them to a unified semantic space to construct a multidimensional tensor sequence that can represent the software state. This achieves the structured integration and semantic association of multidimensional information of the software, thereby effectively overcoming the problem of data silos in traditional analysis methods and laying a solid data foundation for in-depth and panoramic software function analysis.
[0041] 2. This invention constructs a hybrid analysis model that integrates rule-based models and deep learning models, and designs multiple collaborative analysis mechanisms including cross-validation, joint reasoning, and semantic transformation. It fully leverages the deterministic and interpretability advantages of rule engines and the powerful generalization and semantic understanding capabilities of deep learning models, achieving organic complementarity between logical rules and data-driven methods in the analysis process. This significantly improves the accuracy, interpretability, and coverage depth of software function identification and defect detection.
[0042] 3. Based on the results output by collaborative analysis, this invention automatically extracts boundary constraints and implicit rules, constructs a queryable and reasonable boundary condition knowledge base, and then drives the hybrid large model or dedicated large model to automatically generate highly targeted boundary test case sets, realizing the intelligent and systematic generation of test cases. In particular, it enhances the coverage of boundary scenarios, abnormal paths and implicit functional rules, thereby significantly improving the effectiveness and execution efficiency of software testing.
[0043] 4. This invention provides a secure, isolated, and near-realistic execution platform for automatically generated test cases by adopting a layered virtualization verification environment that includes a system layer, a business logic layer, and a data layer. It supports real-time monitoring and verification of software functionality, which not only reduces the impact of testing on the production environment but also accelerates the test feedback loop, comprehensively improving the flexibility and reliability of the software quality verification process.
[0044] 5. This invention uses test execution results and related logs as feedback signals, and comprehensively applies techniques such as efficient parameter fine-tuning, reinforcement learning strategy optimization, and automated rule extraction and updating to achieve continuous iteration and self-evolution of the hybrid analysis model. This enables the entire system to adapt to continuous software iteration and dynamic changes in requirements, continuously optimizing analysis accuracy, test generation quality, and rule base completeness. Ultimately, it forms a complete methodology system from deep analysis and intelligent testing to closed-loop optimization, greatly enhancing the long-term adaptability and vitality of this invention. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the method steps of the present invention.
[0046] Figure 2This is a flowchart of the cross-modal alignment process of the present invention.
[0047] Figure 3 This is a virtualization verification environment and test generation execution diagram for the present invention. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] This invention provides, for example Figure 1 The method for in-depth software functional analysis based on a large model, as shown, specifically includes the following steps:
[0050] S1. Collect multimodal data of the target software, wherein the multimodal data includes at least code library data, requirement document data, user interaction logs, and test case data;
[0051] Furthermore, in the above technical solution, in step S1:
[0052] The code repository data includes structured code metadata and runtime characteristic data. The structured code metadata is obtained through version control tool interfaces and static code analysis tools, and the runtime characteristic data is obtained by inserting probes into the code or using dynamic tracing tools.
[0053] The requirement document data is parsed using natural language processing technology to extract user roles, behaviors, value points, and version evolution information;
[0054] The user interaction logs include clickstream data, abnormal events, API call chains, and database query logs captured through tracking technology.
[0055] The test case data includes structured test cases obtained from test management tools, as well as test cases extracted from non-standardized documents through text parsing or large model understanding.
[0056] It's important to understand that the version control tool interface specifically refers to the RESTful API or command-line interface of tools such as Git, SVN, or Mercurial. By calling these interfaces, one can obtain the code's commit history, branch information, and code change differences. The static code analysis tool is SonarQube, Checkstyle, or Fortify, used to extract classes, methods, variable dependencies, cyclomatic complexity, and potential defect patterns from the source code. The probe is a bytecode injection point implemented based on Java Agent, .NET Profiler, or Linux eBPF technology, used to collect function call stacks, memory allocation, and input / output parameters during software runtime. The dynamic tracing tool is DTrace, SystemTap, or APM, used to collect system call sequences, network throughput, and response latency.
[0057] The natural language processing technology specifically refers to named entity recognition and relation extraction technology based on pre-trained language models BERT, ERNIE, or GPT. The user roles, behaviors, value points, and version evolution information are stored in structured knowledge graphs or JSON format, wherein the version evolution information is obtained by comparing the semantic differences of different version requirement documents.
[0058] The event tracking technology involves embedding a JavaScript SDK into the front-end page, integrating an event tracking framework into the mobile device, or implanting AOP aspects in the back-end service. The clickstream data includes user interface element identifiers, operation types, timestamps, and session identifiers. The API call chain data is collected through distributed tracing systems such as Zipkin and SkyWalking, and includes service name, method name, call duration, and exception status code. The database query logs are captured through database audit logs or proxy middleware, recording SQL statements, execution plans, and the number of rows affected.
[0059] The test management tool is Jira, TestRail, or Zephyr, which obtains the test case name, execution steps, expected results, and associated requirement numbers through their open data interfaces. The text parsing involves extracting the title, steps, and expected result fields from Word and PDF documents based on regular expressions or template matching. The large model understanding specifically refers to inputting non-standardized document fragments into a finely tuned large language model, which automatically identifies and structures the test preconditions, input data, and validation assertions.
[0060] S2. Perform cross-modal alignment processing on the collected multimodal data to map data from different modalities to a unified vector space and construct a multidimensional tensor sequence for characterizing the software state.
[0061] Furthermore, in the above technical solutions, such as Figure 2 As shown, the cross-modal alignment process includes:
[0062] The original data for each modality is encoded using a modality-specific encoder; specifically, an encoder based on abstract syntax trees and graph neural networks is used for code data; a pre-trained language model encoder is used for text data; and a time-series model encoder is used for log data.
[0063] A cross-modal embedding layer maps the vectors output by each modal encoder to the same semantic space.
[0064] The vectors of each modality in a unified semantic space are combined according to the time dimension to form a three-dimensional tensor sequence. The three dimensions of the three-dimensional tensor represent the data source type, time window, and feature dimension, respectively.
[0065] It is important to know that the encoder based on abstract syntax trees and graph neural networks has the following specific workflow: First, the source code is converted into an abstract syntax tree (AST) using a language-specific parser (such as ANTLR or Tree-sitter); then, the AST is transformed into an attribute graph structure, where nodes represent grammatical elements (such as functions, variables, and operators), and edges represent grammatical relationships (such as parent-child relationships, data flow, and control flow); finally, a graph neural network model (such as GCN, GAT, or GGNN) is used to perform embedding learning on the attribute graph, outputting a fixed-dimensional vector representing the code structure and semantics.
[0066] The pre-trained language model encoder is specifically a Transformer-based model, such as BERT, RoBERTa, or CodeBERT, used to convert natural language text such as requirement documents and annotations into context-aware vector representations. Before alignment, the text needs to be segmented, stop words removed, and the sequence truncated or padded to the maximum length specified by the model.
[0067] The temporal model encoder is specifically a recurrent neural network (such as LSTM or GRU) or a temporal Transformer model, used to process user interaction logs and runtime feature data with a chronological order. This encoder takes a sequence of log events sorted by timestamps as input, captures their dynamic patterns and dependencies, and outputs a temporal feature vector representing the system's runtime behavior.
[0068] The cross-modal embedding layer is a shared linear transform layer or multilayer perceptron, whose input dimension matches the sum of the output dimensions of each dedicated encoder, and whose output dimension is a unified semantic space dimension. The weight matrix of this layer is trained through multi-task learning or contrastive learning objectives to minimize the distance between different modal vectors from the same software entity (such as the same functional module), while maximizing the distance between unrelated entity vectors.
[0069] The specific process of combining data by the time dimension is as follows: All modal data are assigned a unified timestamp or divided into a unified time window; within each time window, the vectors of each modality in the unified semantic space are stacked according to the data source type dimension; finally, the tensors of consecutive time windows are arranged in order to form a three-dimensional tensor sequence. The time window can be a fixed duration (e.g., 1 minute) or dynamically divided according to software function lifecycle events (e.g., a user session, a test case execution cycle).
[0070] S3. Construct a hybrid analysis model, which includes a rule-based analysis model and a deep learning-based analysis model;
[0071] Furthermore, in the above technical solution, in step S3:
[0072] The rule-based analysis model has a rule base that includes programming language syntax specifications, industry standards, business logic, and a business process state machine derived from user interaction logs. It uses a declarative rule language or a domain-specific language to define and match execution rules.
[0073] The deep learning-based analysis model employs a pre-trained large code model, Transformer architecture, or graph neural network to extract deep semantic features of code and requirements, and to perform functional classification and vulnerability detection tasks.
[0074] It is important to know that the construction of the rule base specifically includes:
[0075] Programming language syntax specifications: derived from official language specifications (such as the Java Language Specification JLS) and Lint tool rule sets (such as ESLint and Pylint), and stored in the form of structured data (XML / JSON) or executable scripts.
[0076] Industry standards, including safety standards (such as OWASP TOP 10, CWE), performance standards, and compliance requirements (such as GDPR), are formalized into rule statements containing conditions (IF) and conclusions (THEN).
[0077] Business logic: Domain-specific rules extracted from product requirement documents and design documents, such as "orders with an amount greater than 1,000 yuan require an approval process", are described using a domain-specific language (DSL).
[0078] Business process state machine: By analyzing the user interaction logs, use sequence pattern mining algorithms (such as PrefixSpan) or process mining tools (such as ProM) to derive the state transition diagram of user operations and convert it into state machine rules (e.g., the "create order" state must exist before the "pay" operation).
[0079] The declarative rule language is specifically the Drools rule language, Apache Camel DSL, or SQL, while the domain-specific language is a syntax defined for software quality attributes (such as security and performance). Rule matching is performed by a rule engine (such as Jess or Drools Engine), and its workflow is as follows: the multidimensional tensor sequence or facts extracted from it are inserted into the engine's working memory; the engine performs pattern matching based on rules in the rule base, triggering the execution of rules that meet the conditions.
[0080] The specific construction and pre-training process of the deep learning-based analysis model includes:
[0081] Pre-trained large code models: Models such as CodeT5, CodeBERT, or InCoder that have been pre-trained on large code corpora are used as the encoder backbone network.
[0082] Model architecture: Based on Transformer Encoder or Graph Neural Network (GNN), a classification head or sequence labeling head may be added depending on the task. For tasks involving code structure, the model input is a token sequence or graph representation of code fragments; for tasks involving requirement text, the input is a sequence of natural language sentences.
[0083] Tasks and Fine-tuning: The functional classification task refers to classifying code or requirement fragments into predefined functional categories (such as "user authentication" and "data encryption"); the vulnerability detection task refers to identifying security weakness patterns in the code (such as buffer overflow and SQL injection). Supervised fine-tuning of the pre-trained model is performed using software data containing labeled information, with the loss function selected based on the task type: cross-entropy loss or binary cross-entropy loss.
[0084] Model collaboration: The rule-based analysis model and the deep learning-based analysis model are deployed in parallel or in series in the system architecture. Data exchange and result fusion are carried out through shared memory, message queues or API calls to jointly form the hybrid analysis big model.
[0085] S4. The multidimensional tensor sequence is analyzed collaboratively using the hybrid analysis model to identify software functional features and potential defects, wherein the rule model and the deep learning model are cross-validated and jointly inferred.
[0086] Furthermore, in the above technical solution, the collaborative analysis includes at least one of the following mechanisms:
[0087] The rule model preprocesses the input data, filters out noisy data, and provides weak supervision signals for the deep learning model.
[0088] The deep learning model performs semantic understanding of natural language requirements that are difficult to formalize into rules, and transforms them into structured inputs that the rule model can process.
[0089] The rule model and the deep learning model analyze the same input independently and verify the consistency of the analysis results. If the results conflict, a review process is triggered.
[0090] The abstract analysis results output by the deep learning model are mapped to specific compliance clauses or business rule descriptions through the rule model.
[0091] It is important to know that the specific implementation methods of each coordination mechanism are as follows:
[0092] The rule-based model preprocessing and weak supervision signal provision mechanism involves the rule-based model validating and cleaning the input raw multimodal data according to predefined data quality rules. These rules include numerical range verification, non-empty verification, and regular expression matching to filter out missing, abnormal, or malformed noise data. The cleaned data is then fed into the deep learning model. Simultaneously, the rule-based model generates judgment results on a portion of the input data based on its explicit logic. These results serve as pseudo-labels or high-confidence samples, providing weak supervision signals for the training of the deep learning model, used for model initialization or imposing constraints during training.
[0093] The semantic understanding and structured transformation mechanism for natural language requirements: The deep learning model performs semantic understanding on natural language requirement documents, specifically by performing named entity recognition, relation extraction, and intent classification tasks through its internal pre-trained language model. For example, it identifies entities such as user, password, and verification, as well as the operations and constraints between them. Subsequently, the model transforms the extracted semantic information into structured data objects according to a predetermined template, which is in JSON Schema or XML format. The structured data objects contain fields such as subject, action, object, and condition. This object can be directly inserted as facts into the working memory of the rule engine for logical matching and reasoning by the rule model.
[0094] Independent Analysis and Conflict Verification Mechanism: The rule-based model and the deep learning model receive the same preprocessed input data or key features extracted from it in parallel. The rule-based model outputs deterministic analysis results based on logical rules, such as compliance or violation of a specific clause; the deep learning model outputs predictive analysis results based on probability distributions, such as the probability of belonging to a certain vulnerability category and its classification. The system has a consistency checker that determines whether the two results conflict based on a preset confidence threshold. For example, if the rule determines compliance while the deep learning model determines it as a high-risk vulnerability and its confidence level is higher than the threshold, a conflict is identified. After a conflict is triggered, the system initiates a verification process. This process includes submitting the original data and preliminary results to a more complex integrated model or expert system for arbitration, or adding the conflict case to a queue for manual review, and feeding the final ruling back to the model as training data for subsequent optimization.
[0095] The mapping mechanism from abstract results to specific rules: Each rule in the rule base is associated with a unique rule identifier and a corresponding natural language description, which is the specific compliance clause or business rule text. When the deep learning model outputs an abstract defect type or feature pattern, the mapping module finds the one or more most relevant specific rules based on a predefined mapping table or by calculating the similarity between the abstract result and the semantic vectors of each rule description. Subsequently, the system associates and encapsulates the abstract output of the deep learning model with the matched specific rule descriptions to generate a final analysis report containing references to the specific rules.
[0096] S5. Based on the results of the collaborative analysis, automatically generate a set of boundary test cases for the target software, and execute the tests in a virtualized verification environment to monitor the functional implementation in real time.
[0097] Furthermore, in the above technical solutions, such as Figure 3 As shown, in step S5:
[0098] The virtualization verification environment adopts layered modeling, including system-level virtualization based on container orchestration technology, business logic-level virtualization based on microservices and service mesh, and data-level virtualization based on database proxy and data masking technology.
[0099] The generation of boundary test case set includes: extracting boundary constraints and implicit boundary rules from the collaborative analysis results, constructing a boundary condition knowledge base, and generating test cases using the hybrid analysis large model or a dedicated large model.
[0100] Extraction of Boundary Constraints and Implicit Boundary Rules: From the collaborative analysis results, the boundary conditions explicitly output by the rule model are parsed out, such as "the length of the input parameter must be less than or equal to 255 characters," as well as potential boundary patterns identified by the deep learning model that are not expressed in the explicit rules, such as "when the user role is 'administrator' and the operation time is during late-night hours, there is a special path in its permission verification logic." These explicit and implicit boundary information are then structurally represented.
[0101] Construction of the boundary condition knowledge base: The extracted structured boundary information is organized according to dimensions such as software functional modules, input parameters, and business status, and stored in a graph database or relational database to form a queryable and reasonable boundary condition knowledge base. Each knowledge entry includes a boundary description, the associated code location, and the source rule or model confidence level.
[0102] Test case generation: Utilizing the hybrid analysis model or a dedicated test generation model, with the boundary condition knowledge base as key input. The generation process employs at least one of the following methods:
[0103] Template-based generation: The model fills in predefined test case templates according to the boundary condition type to generate specific input values, operation steps and expected results.
[0104] Search-based generation: The model transforms boundary conditions into constraints, driving the fuzz test engine to generate random or semi-random test inputs that satisfy the boundary constraints.
[0105] Sequence prediction-based generation: The model directly outputs complete test case descriptions in natural language or code format in a serialized manner. The generated test case set will be adapted for the virtualized verification environment and injected into that environment for execution.
[0106] S6. Based on the test execution results and logs, perform feedback optimization and iterative training on the hybrid analysis model.
[0107] Furthermore, in the above technical solution, the feedback optimization and iterative training include:
[0108] The test execution results and logs are used as feedback signals, and after filtering and cleaning, they are converted into training samples.
[0109] The deep learning-based analysis model is incrementally trained using a parameter-efficient fine-tuning technique.
[0110] Based on reinforcement learning strategies, the model generation strategy is optimized according to the value of defects discovered by test cases;
[0111] The implicit patterns learned by the deep learning model are extracted into new candidate rules, and the rule base of the rule-based analysis model is automatically updated.
[0112] It is important to know that the specific implementation methods of each stage in the feedback optimization and iterative training process are as follows:
[0113] Training sample transformation: The screening and cleaning process is based on the information value of test case execution results and logs. The system first automatically scores and filters test cases based on their execution status (pass, failure, or error), combined with the completeness and information richness of associated logs, retaining feedback data with high information value. Then, the filtered result data is correlated and aligned with the corresponding original input data and the intermediate analysis results generated by the hybrid analysis model. The original input data includes code snippets or requirement items that trigger the test, and the intermediate analysis results include model attention weight distribution and feature vectors. The aligned data is collectively encapsulated into structured training samples, whose data format matches the input format required by subsequent deep learning models and reinforcement learning strategies.
[0114] Application of efficient parameter fine-tuning techniques: Specifically, efficient parameter fine-tuning employs LoRA low-rank adaptation, Adapter, or Prefix-Tuning methods to incrementally train the deep learning-based analysis model. During this process, the original backbone network parameters are frozen, and only the parameters of newly added, lightweight adapter layers are updated. The training objective is set according to the specific analysis task the model undertakes. For example, for vulnerability detection tasks, the binary classification loss function of the model is optimized using samples containing newly discovered vulnerabilities; for functional classification tasks, its multi-class cross-entropy loss function is optimized. The entire fine-tuning process is completed in an independent model experimentation and version management system to ensure the stability and controllability of the model deployed in the production environment.
[0115] The optimization mechanism of the reinforcement learning strategy: The reinforcement learning strategy models the generation and execution process of test cases as a sequence decision problem. The state space is defined as the combination of the current analysis context and the boundary condition knowledge base of the software, while the action space is defined as generating a specific test input value or a sequence of operation instructions. The reward function is dynamically calculated based on the value of the defects discovered by the test cases. The defect value is comprehensively quantified by multiple factors, including the severity level of the defect, the difficulty of reproduction, the business criticality of its impact, and whether it reveals new boundary conditions. This strategy model typically employs a deep Q-network or a policy gradient model, continuously learning from historical test feedback data to optimize its test generation strategy, thereby favoring the generation of test cases that can discover higher-value defects.
[0116] Automated rule base updates: The implicit patterns learned by the deep learning model are extracted by analyzing the model's internal representation or by performing interpretability analysis on its prediction results. Specific methods include analyzing the activation patterns of specific neurons, clustering high-dimensional features, or using interpretable AI techniques such as the LIME locally interpretable model and SHAP Shapley value to identify key feature combinations influencing the model's decisions. The extracted patterns are expressed as candidate rule statements in condition-conclusion form. The system evaluates these candidate rules through an automated rule verification process, including verifying their logical consistency on historical data and checking their effectiveness and generalization ability on independent validation sets. Verified candidate rules are automatically converted into a format defined by the declarative rule language or a domain-specific language and incrementally added to the rule base of the rule-based analysis model through versioning management, thereby achieving continuous self-evolution of the rule base.
[0117] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for in-depth software function analysis based on a large model, characterized in that, Specifically, the following steps are included: S1. Collect multimodal data of the target software, wherein the multimodal data includes at least code library data, requirement document data, user interaction logs, and test case data; S2. Perform cross-modal alignment processing on the collected multimodal data to map data from different modalities to a unified vector space and construct a multidimensional tensor sequence for characterizing the software state. S3. Construct a hybrid analysis model, which includes a rule-based analysis model and a deep learning-based analysis model; The rule-based analysis model has a rule base that includes programming language syntax specifications, industry standards, business logic, and a business process state machine derived from user interaction logs. It uses a declarative rule language or a domain-specific language to define and execute matching rules. The deep learning-based analysis model employs a pre-trained large code model, Transformer architecture, or graph neural network to extract deep semantic features of code and requirements, and to perform functional classification and vulnerability detection tasks. S4. The multidimensional tensor sequence is analyzed collaboratively using the hybrid analysis model to identify software functional features and potential defects. The rule-based analysis model and the deep learning-based analysis model are cross-validated and jointly inferred. The collaborative analysis includes at least one of the following mechanisms: The rule-based analysis model preprocesses the input data, filters out noisy data, and provides weak supervision signals for the deep learning-based analysis model. The deep learning-based analysis model performs semantic understanding on natural language requirements that are difficult to formalize according to rules, and transforms them into structured inputs that the rule-based analysis model can process. The rule-based analysis model and the deep learning-based analysis model perform independent analysis on the same input and verify the consistency of the analysis results. If the results conflict, a review process is triggered. The abstract analysis results output by the deep learning-based analysis model are mapped to specific compliance clauses or business rule descriptions through the rule-based analysis model. S5. Based on the results of the collaborative analysis, automatically generate a set of boundary test cases for the target software, and execute the tests in a virtualized verification environment to monitor the functional implementation in real time. S6. Based on the test execution results and logs, perform feedback optimization and iterative training on the hybrid analysis model; The feedback optimization and iterative training include: The test execution results and logs are used as feedback signals, and after filtering and cleaning, they are converted into training samples. The deep learning-based analysis model is incrementally trained using a parameter-efficient fine-tuning technique. Based on reinforcement learning strategies, the model generation strategy is optimized according to the value of defects discovered by test cases; The implicit patterns learned by the deep learning-based analysis model are extracted into new candidate rules, and the rule base of the rule-based analysis model is automatically updated.
2. The method for in-depth software function analysis based on a large model as described in claim 1, characterized in that, In step S1: The code repository data includes structured code metadata and runtime characteristic data. The structured code metadata is obtained through version control tool interfaces and static code analysis tools, and the runtime characteristic data is obtained by inserting probes into the code or using dynamic tracing tools. The requirement document data is parsed using natural language processing technology to extract user roles, behaviors, value points, and version evolution information; The user interaction logs include clickstream data, abnormal events, API call chains, and database query logs captured through tracking technology. The test case data includes structured test cases obtained from test management tools, as well as test cases extracted from non-standardized documents through text parsing or large model understanding.
3. The method for in-depth software function analysis based on a large model as described in claim 1, characterized in that, The cross-modal alignment process includes: The original data for each modality is encoded using a modality-specific encoder; specifically, an encoder based on abstract syntax trees and graph neural networks is used for code data; a pre-trained language model encoder is used for text data; and a time-series model encoder is used for log data. A cross-modal embedding layer maps the vectors output by each modal encoder to the same semantic space. The vectors of each modality in a unified semantic space are combined according to the time dimension to form a three-dimensional tensor sequence. The three dimensions of the three-dimensional tensor represent the data source type, time window, and feature dimension, respectively.
4. The method for in-depth software function analysis based on a large model as described in claim 1, characterized in that, In step S5: The virtualization verification environment adopts layered modeling, including system-level virtualization based on container orchestration technology, business logic-level virtualization based on microservices and service mesh, and data-level virtualization based on database proxy and data masking technology. The generation of boundary test case set includes: extracting boundary constraints and implicit boundary rules from the collaborative analysis results, constructing a boundary condition knowledge base, and generating test cases using the hybrid analysis large model or a dedicated large model.