An intelligent software compatibility problem detection method based on a pre-trained language model

By processing traceback data using a pre-trained language model and a multi-head attention mechanism, an intelligent software compatibility problem detection model is constructed, which solves the system crash problem caused by component incompatibility in intelligent software and improves the accuracy and reliability of detection.

CN119473879BActive Publication Date: 2025-11-11NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411490502.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-11-11
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively and automatically detect compatibility issues caused by incompatible components during the operation of intelligent software, which can lead to system crashes or functional failures, increasing the complexity and cost of development and maintenance.

Method used

By employing a pre-trained language model and fine-tuning paradigm, and collecting and processing traceback data, an intelligent software compatibility problem classification model is constructed. Multi-head attention mechanism is used to enhance the model's understanding of the dependencies between stack frames and exception information, thereby achieving automatic detection.

Benefits of technology

It improves the accuracy of intelligent software compatibility problem detection, effectively captures the dependencies between stack frames and exception information, and reduces the risk of system crashes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473879B_ABST
    Figure CN119473879B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent software compatibility problem detection method based on a pre-trained language model. It collects unlabeled and labeled Python stack trace data to construct a pre-training dataset and a fine-tuning dataset; parses the traceback data and standardizes its format; processes traceback data exceeding the model's maximum length limit; uses the unlabeled traceback data to perform unsupervised retraining on the BERT model to learn traceback semantic features; constructs an intelligent software compatibility problem detection model; divides the fine-tuning dataset, selects positive examples from the training set to construct a class-balanced fine-tuning training set, and uses a small amount of labeled data to fine-tune the classification model. This invention solves the problem that existing methods cannot automatically detect compatibility problems occurring during the operation of intelligent software, overcomes the limitations of existing models in understanding the semantic features of Python traceback context, and can fully capture the dependencies between stack frames and exception information, effectively improving the accuracy of intelligent software compatibility problem detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent software compatibility problem detection in software engineering, and specifically relates to an intelligent software compatibility problem detection method based on a pre-trained language model. Background Technology

[0002] With the rapid development of deep learning technology, intelligent software is playing an increasingly important role in human society. Intelligent software consists of multiple complex and interactive components, including the core program (CORE), the Python language and its interpreter, third-party libraries (TPL), low-level libraries (LLL), development tools (DEV), operating system (OS), and hardware environment. Due to the asynchronous evolution of these components, problems such as version mismatches between components or inconsistencies between the API versions of third-party libraries called and those actually used frequently occur. These incompatible interaction problems between components are referred to as intelligent software compatibility issues. Due to the diversity and complexity of intelligent software components, various compatibility problems arise, such as CORE-TPL, TPL-TPL, and TPL-LLL.

[0003] As the complexity and scale of intelligent software increase, compatibility issues between internal components become increasingly serious, posing a significant threat to software development and maintenance. Intelligent software compatibility problems occur frequently during system runtime, potentially leading to system crashes or functional failures, thereby increasing the complexity and cost for development and maintenance teams. When a program crashes, the resulting stack trace data records abnormal stack information during program execution, providing crucial evidence for analyzing and detecting compatibility issues in intelligent software. However, because traceback data is semi-structured, traditional tools struggle to effectively analyze and understand it.

[0004] With the development of pre-trained language models, they have shown great potential in natural language understanding. Many studies have improved model performance on specific task data through retraining on specific datasets. Currently, collecting and labeling data on open-source platforms such as GitHub and Stack Overflow is time-consuming and costly. Therefore, only a small amount of labeled data is available. Against this backdrop, the pre-training and fine-tuning paradigm has been widely adopted. This approach can fully utilize the large amount of unlabeled data and the limited amount of labeled data, enabling the model to better capture the features of the data.

[0005] Therefore, this invention proposes an intelligent software compatibility problem detection method based on a pre-trained language model. This method adopts a pre-training and fine-tuning paradigm to fully understand the dependencies between contexts in the traceback data, and achieves better automatic detection performance of intelligent software compatibility problems with less labeled data. Summary of the Invention

[0006] Purpose of the invention: This invention proposes an intelligent software compatibility problem detection method based on a pre-trained language model, which can effectively improve the accuracy of intelligent software compatibility problem detection.

[0007] Technical Solution: The intelligent software compatibility problem detection method based on a pre-trained language model described in this invention specifically includes the following steps:

[0008] (1) Collect unlabeled and labeled Python stack traceback data from GitHub and Stack Overflow, remove non-standard data, and use them to build pre-trained datasets and fine-tuning datasets;

[0009] (2) The obtained raw Traceback data is parsed, the Traceback format is unified, and the file path, line number, function name, error code and exception information in each stack frame are extracted to reduce irrelevant data noise;

[0010] (3) Count the lengths of stack frames and exception information respectively, and design a custom algorithm to truncate data that exceeds the maximum length of the model in order to retain the core features in stack frames and exception information.

[0011] (4) Based on the BERT pre-trained model, the Traceback data processed in step (3) is used to perform masked language model MLM pre-training to obtain the Traceback context semantic representation pre-trained model.

[0012] (5) Combine the pre-trained model obtained from step (4) with the multi-head attention mechanism layer, the Dropout layer and the fully connected layer to construct an intelligent software compatibility problem classification model;

[0013] (6) Select positively labeled samples from the labeled Traceback training set, construct a class-balanced dataset through data augmentation, and then train the intelligent software compatibility problem classification model constructed in step (5) until the preset number of training cycles is reached.

[0014] Furthermore, the implementation process of step (1) is as follows:

[0015] By using custom rules, traceback data is collected from GitHub and Stack Overflow. Regular expressions are used to clean up redundant symbols in the data and remove incomplete or non-standard traceback records.

[0016] By analyzing the dataset, two mainstream traceback formats were identified. Traceback data of these two mainstream formats were manually extracted from labeled StackOverflow category posts to construct a fine-tuning dataset.

[0017] Furthermore, the implementation process of step (2) is as follows:

[0018] Based on the main features in the Traceback data, the file path, line number, method name and code in the stack frame are preserved, and the two mainstream Traceback data formats are processed into a unified mode accordingly.

[0019] File paths are treated as variable information. Even in the same execution environment, due to different paths on different machines, the special symbol "<*>" is used to represent the variable parts of the file path, and only the file name is retained. For paths involving third-party libraries, the keyword and the part following it are retained. The separator "\" or "\\" in the file path is replaced with " / " to prevent the tokenizer from interpreting it as an escape character. When file paths, line numbers, function names, or code are missing in the stack frame, placeholders [FILE], [NUM], [FUNC], and [CODE] are used to replace the missing information to maintain context consistency.

[0020] Furthermore, the implementation process of step (3) is as follows:

[0021] Use [SEP] to separate different stack frames and exception information, add the special symbol "<*>" added in step (2) and placeholders [FILE], [NUM], [FUNC] and [CODE] to the vocabulary, and perform word segmentation on the input sequence;

[0022] For tracebacks exceeding the model's maximum length limit, a custom truncation algorithm is used to preserve important features: First, the lengths of stack frames and exception messages for all tracebacks are counted. Based on the number of tracebacks covered by these lengths and the overall maximum length, the maximum lengths of stack frames and exception messages are determined, with a maximum exception message length of 50 and a maximum stack frame length of 460. The specific method is as follows:

[0023] If the total length of the traceback exceeds the maximum length limit of BERT, the abnormal information in the traceback is truncated first. If the length of the traceback still exceeds the model's limit after truncating the abnormal information, the stack frames are truncated one by one from the beginning until the entire sequence meets the allowed length.

[0024] Furthermore, the implementation process of step (4) is as follows:

[0025] After processing in step (3), the input sequence X = {x1, x2, ..., x} is obtained. t ,…,x T}, where x t Represents a token; based on the pre-trained model, a masked language task is pre-trained, and tokens in the input sequence X are randomly replaced using preset probabilities, with X representing a token. mask This represents the tokens that were replaced; the corrupted version is denoted as [insert version here]. The training objective is to reconstruct the mask sequence. The statement is as follows:

[0026]

[0027] Where θ represents the learnable parameters of the model, including all weights and biases; H θ This represents a Transformer-based encoder that maps a sequence X to a series of hidden vectors; e(x) is the word embedding of the token x from the Transformer embedding layer, T is the transpose operation, and ∑ x ′ is the sum of all tokens in the vocabulary; the preset probability is 0.15.

[0028] Furthermore, the implementation process of step (5) is as follows:

[0029] Using the pre-trained model obtained in step (4) as the encoder for the Traceback data, we embed it to obtain... Next, a multi-head attention mechanism layer is used to further capture the dependencies between words; the multi-head attention mechanism consists of multiple self-attention layers, each of which extracts features by calculating a weight matrix of query, key, and value, denoted as: Then, a residual connection is used to add the output of the attention mechanism to the original encoder output, and the representation H after the residual connection is obtained. attention (X) is input into a linear classification layer, and the predicted probability of each class is output through the softmax function.

[0030] Furthermore, the implementation process of step (6) is as follows:

[0031] The fine-tuning dataset is divided into a training set, a validation set, and a test set. Data with positive labels are selected from the training set, and the row numbers of this part of the data are randomly replaced to generate a class-balanced training dataset with the same number of positive and negative examples. The ratio of positive to negative examples in the test set and the validation set remains unchanged.

[0032] Input the class-balanced training, validation, and test sets into the intelligent software compatibility problem classification model constructed in step (5); adjust the model parameters and training cycles by adjusting the value of the loss function until the training loss and validation loss tend to stabilize; in each training cycle, iteratively train the weight matrix w and bias term b using the adjusted parameter settings; and convert the vector H(x) output by the fully connected layer into a single vector using the softmax function. i Mapping to each category yields the tensor z. j The corresponding probability score; specifically stated as follows:

[0033] y j =softmax(z j ) = softmax(w j ·x+b j )

[0034] The loss function for training the classification model is expressed as:

[0035]

[0036] Where N represents the number of training samples in each batch, y j This represents the true label value of the j-th sample, with 0 for samples without compatibility issues and 1 for samples with compatibility issues. j This represents the predicted probability of the j-th class.

[0037] Beneficial Effects: Compared with existing technologies, the beneficial effects of this invention are as follows: This invention combines pre-training and fine-tuning paradigms to achieve intelligent software compatibility problem detection; it utilizes Traceback data as a source of compatibility problem information and pre-trains the model through unsupervised learning methods to fully learn the connections between different stack frames and exception information in the Traceback data; in the fine-tuning stage, the pre-trained model is used as an encoder, and a multi-head attention mechanism is used to further strengthen the connections between Traceback context features, thereby enhancing the training set to train the classification model; this invention solves the problem that existing methods cannot automatically detect compatibility problems that occur during the operation of intelligent software. The proposed Traceback pre-training model overcomes the limitations of existing models in understanding the semantic features of Traceback context, and can fully capture the dependencies between stack frames and exception information, effectively improving the accuracy of intelligent software compatibility problem detection. Attached Figure Description

[0038] Figure 1 This is a flowchart of the present invention;

[0039] Figure 2 An overall framework diagram of the compatibility problem classification model constructed for this invention;

[0040] Figure 3 This is the Traceback parsing diagram proposed in this invention;

[0041] Figure 4 These are two mainstream traceback formats. Detailed Implementation

[0042] The present invention will now be described in further detail with reference to the accompanying drawings.

[0043] like Figure 1 , Figure 2 As shown, this invention proposes an intelligent software compatibility problem detection method based on a pre-trained language model. It pre-trains on a large amount of Python stack trace (Traceback) data using unsupervised learning to learn the dependency information between contexts in the Traceback data. The pre-trained model is used as an encoder for the Traceback data to construct an intelligent software compatibility problem classification model, and a multi-head self-attention mechanism is used to strengthen the dependency relationship between words at different distances. The enhanced labeled data is then used to train the classification model to achieve intelligent software compatibility problem detection. Specifically, the method includes the following steps:

[0044] Step 1: Collect unlabeled and labeled traceback data to build a pre-trained dataset and a fine-tuning dataset.

[0045] Filtering rules were defined to select only data related to the Python language and containing the keyword "Traceback". To collect unlabeled data, the GitHub REST API was first used to filter relevant traceback data from the GitHub platform according to these rules. Since GitHub issues typically include a title, body, and user comments, the GitHub API searches for keywords in these three parts by default. To initially ensure data integrity, records containing keywords only in the issue title were excluded. Regular expressions were then used to extract traceback data from the body and comments. Finally, special characters, blank lines, redundant information, and incomplete data were removed.

[0046] Similarly, posts tagged with Python were filtered from Stack Overflow dump data, and then posts containing the keyword "Traceback" were further filtered out. Untagged Traceback data was extracted in the same way as the GitHub data.

[0047] Analysis of the collected unlabeled data samples revealed that two traceback formats accounted for over 85% of the data, such as... Figure 4 As shown. These two traceback formats originate from different IDEs. Figure 4 Format 1 shows the most common traceback format generated in most Python environments, while another format typically appears in interactive runtime environments (such as Jupyter Notebook), such as... Figure 4 As shown in Format 2. Other traceback formats occur relatively infrequently, so they are excluded. To ensure the quality and consistency of the dataset, only traceback data in these two formats are retained.

[0048] To obtain labeled data, existing labeled Stack Overflow posts were used. Due to the limited number of labeled datasets, manual extraction was employed, using the same rules to accurately extract the required traceback data in the two main formats from these posts, ensuring the effectiveness and accuracy of the fine-tuned dataset.

[0049] Step 2: Parse the Traceback data and process it into a uniform format.

[0050] To analyze and process the common characteristics of traceback data, the two formats of traceback obtained in step 1 are processed into a unified form. For example... Figure 3 As shown, given a traceback dataset, denoted as ST = {f1, f2, ..., f...} n-1 ,f n}, where f i (i∈1,...,n-1) represents a stack frame, f n This represents exception information. Each traceback dataset consists of one or more stack frames and one exception message. The main features of the stack frames include file path, line number, function name, and code. To extract these core features, regular expressions are used to remove irrelevant information, generating traceback data in a uniform format.

[0051] File paths are treated as variable information. Even within the same execution environment, paths differ across machines; therefore, "<*>" is used to represent the variable parts of file paths, retaining only the filename. For paths involving third-party libraries, which typically contain the keywords "site-packages" or "dist-packages," these keywords and their following parts are retained, as they are crucial for detecting compatibility issues. Furthermore, backslashes "\" and "\\" in file paths may be interpreted as special characters like "\t" or "\n," so they are uniformly replaced with " / ". When file paths, line numbers, function names, or code are missing from the stack frame, placeholders [FILE], [NUM], [FUNC], and [CODE] are used to replace these missing pieces of information to maintain context consistency. This not only preserves key features but also avoids irrelevant fields interfering with model training, reducing the risk of overfitting.

[0052] Step 3: Use large-scale unlabeled traceback data to perform unsupervised retraining on the BERT model to learn traceback semantic features and obtain the traceback encoder, i.e., the pre-trained model.

[0053] First, the Traceback data needs to be preprocessed. The preprocessed text is then input into the BERT model for pre-training. This mainly includes the following steps:

[0054] Considering that the BERT model uses [SEP] to distinguish different sentences, [SEP] is used to separate different stack frames and exception information to ensure intra-sentence and cross-sentence features. Then, the special symbols and placeholders used in step 2 are added to the vocabulary, and the input sequence is segmented.

[0055] Next, it's necessary to determine whether the segmented Traceback sequence exceeds the maximum length limit of the BERT model. Directly truncating portions exceeding the maximum length may result in the loss of anomalous information or incomplete stack frames. Therefore, to preserve the complete backtracking information to the greatest extent possible, the length distribution of anomalous information and stack frames in both the unlabeled and labeled datasets was first evaluated. Based on statistics of the cumulative length of the Traceback data, the maximum length limits for anomalous information and stack frames were set to 50 and 460, respectively. This configuration covers approximately 86% of the Traceback data, ensuring the integrity of most of the data. Subsequently, the Traceback data exceeding the maximum length limit was truncated using the following two steps to preserve as much critical information as possible.

[0056] Step 1: If the total length of the traceback exceeds the maximum length limit of BERT, prioritize truncating the abnormal information in the traceback. This information may contain noise that has not been completely removed, and truncating this information helps the model focus more on understanding the direct factors that caused the error.

[0057] Step 2: If the Traceback length still exceeds the model's limit after truncating the exception information, truncate the stack frames one by one until the entire sequence meets the allowed length. Choose to truncate from the beginning, prioritizing the most recent stack frames, as they are more likely to be directly related to the error.

[0058] By performing the above truncation steps, we ensure that the retained content reflects the original error scenario as completely as possible, thereby helping the model to more accurately understand and analyze the cause of the error.

[0059] Step 4: After completing the processing in Step 3, the input sequence is obtained, X = {x1, x2, ..., x...} t ,…,x T}, where x t This represents a token. The input sequence is fed into the model, and the language model is trained using a self-supervised learning method.

[0060] Following BERT's pre-training strategy, this study employs Masked Language Management (MLM) as its training objective. By predicting randomly masked tokens within a sentence, it learns intra-frame and contextual relationships between stack frames, enabling the model to fully capture rich linguistic features and complex contextual relationships in the backtracking sequence, thereby improving its generalization ability. Specifically, tokens in the input sequence X are randomly replaced with a set probability (p = 0.15), and X is used as the basis for the training. mask This represents the tokens that were replaced; the corrupted version is denoted as [insert version here]. The training objective is to reconstruct the mask sequence. This can be expressed as follows:

[0061]

[0062] Where θ represents the learnable parameters of the model, typically including all weights and biases; H θ This represents a Transformer-based encoder that maps a sequence X to a series of hidden vectors; e(x) is the word embedding of the token x from the Transformer embedding layer, T is the transpose operation, and ∑ x′ It is the sum of all tokens in the vocabulary.

[0063] Step 5: Use the pre-trained model obtained in Step 4 to build a compatibility problem classification model, including a Traceback encoder, a multi-head attention mechanism layer, a Dropout layer, and a fully connected layer.

[0064] Using the pre-trained model obtained in step 4 as the encoder for the Traceback data, we embed it to obtain... Next, a multi-head attention mechanism is used to further capture the dependencies between words. This mechanism consists of multiple self-attention layers, each extracting features by calculating a weight matrix of the query, key, and value.

[0065] In this step, residual connections are used to add the output of the attention mechanism to the original encoder output, preserving gradient propagation and enhancing the richness of the feature representation. The residual-connected representation H... attention (X) is input into a linear classification layer, and the softmax function is used to classify each Traceback data, outputting the predicted probability of different categories.

[0066] Step 6: Divide the fine-tuning dataset, select positive examples from the training set to construct a class-balanced fine-tuning training set, and use a small amount of labeled data to fine-tune the classification model.

[0067] First, the fine-tuning dataset is divided into training, validation, and test sets. Data labeled as positive examples (i.e., Traceback data with compatibility issues) is selected from the training set, and the row numbers of this part of the data are randomly replaced to generate a class-balanced training dataset with the same number of positive and negative examples. The ratio of positive to negative examples in the test and validation sets remains unchanged.

[0068] Next, the class-balanced training, validation, and test sets are input into the classification model constructed in step 5. The model parameters and training epochs are adjusted using the loss function value until the training and validation losses plateau. In each training epoch, the weight matrix w and bias term b are iteratively trained using the adjusted parameter settings. The vector H(x) output from the fully connected layer is then processed using the softmax function. i Mapping to each category yields the tensor z. j The corresponding probability score. The specific description is as follows:

[0069] y j =softmax(z j ) = softmax(w j ·x+b j )

[0070] The loss function for training the classification model is expressed as:

[0071]

[0072] Where N represents the number of training samples in each batch, y j This represents the true label value of the j-th sample; 0 for samples with non-incompatibility issues and 1 for samples with compatibility issues; q j This represents the predicted probability of the j-th class.

[0073] The above description provides a detailed explanation of the intelligent software compatibility problem detection method based on a pre-trained language model according to the present invention. However, it is obvious that the specific implementation of the present invention is not limited thereto. For those skilled in the art, various obvious modifications made to this invention without departing from the spirit and scope of the claims are within the protection scope of the present invention.

Claims

1. A method for detecting intelligent software compatibility issues based on a pre-trained language model, characterized in that, Includes the following steps: (1) Collect unlabeled and labeled Python stack traceback data from GitHub and Stack Overflow, remove non-standard data, and use them to build pre-trained datasets and fine-tuning datasets; (2) The obtained raw Traceback data is parsed, the Traceback format is unified, and the file path, line number, function name, error code and exception information in each stack frame are extracted to reduce irrelevant data noise; (3) Count the lengths of stack frames and exception information respectively, and design a custom algorithm to truncate data that exceeds the maximum length of the model in order to retain the core features in stack frames and exception information. (4) Based on the BERT pre-trained model, the Traceback data processed in step (3) is used to perform masked language model MLM pre-training to obtain the Traceback context semantic representation pre-trained model. (5) Combine the pre-trained model obtained from step (4) with the multi-head attention mechanism layer, the Dropout layer and the fully connected layer to construct an intelligent software compatibility problem classification model; (6) Select positive samples from the labeled Traceback training set, construct a class-balanced dataset through data augmentation, and then train the intelligent software compatibility problem classification model constructed in step (5) until the preset number of training cycles is reached. The implementation process of step (4) is as follows: After processing in step (3), the input sequence X = {x1, x2, ..., x} is obtained. t ,…,x T }, where x t Represents a token; based on the pre-trained model, a masked language task is pre-trained, and tokens in the input sequence X are randomly replaced using preset probabilities, with X representing a token. mask This represents the tokens that were replaced; the corrupted version is denoted as [insert version here]. The training objective is to reconstruct the mask sequence. The statement is as follows: Where θ represents the learnable parameters of the model, including all weights and biases; H θ Let represent a Transformer-based encoder that maps sequence X to a series of hidden vectors; e(x) is the word embedding of token x from the Transformer embedding layer. It is a transpose operation, ∑ x′ It is the sum of all tokens in the vocabulary.

2. The intelligent software compatibility problem detection method based on a pre-trained language model according to claim 1, characterized in that, The implementation process of step (1) is as follows: By using custom rules, traceback data is collected from GitHub and Stack Overflow. Regular expressions are used to clean up redundant symbols in the data and remove incomplete or non-standard traceback records. By analyzing the dataset, two mainstream traceback formats were identified. Traceback data of these two mainstream formats were manually extracted from labeled Stack Overflow category posts to construct a fine-tuning dataset.

3. The intelligent software compatibility problem detection method based on a pre-trained language model according to claim 1, characterized in that, The implementation process of step (2) is as follows: Based on the main features in the Traceback data, the file path, line number, method name and code in the stack frame are preserved, and the two mainstream Traceback data formats are processed into a unified mode accordingly. File paths are treated as variable information. Even in the same execution environment, due to different paths on different machines, the special symbol "<*>" is used to represent the variable parts of the file path, and only the file name is retained. For paths involving third-party libraries, the keyword and the part following it are retained. The separator "\" or "\\" in the file path is replaced with " / " to prevent the tokenizer from interpreting it as an escape character. When file paths, line numbers, function names, or code are missing in the stack frame, placeholders [FILE], [NUM], [FUNC], and [CODE] are used to replace the missing information to maintain context consistency.

4. The intelligent software compatibility problem detection method based on a pre-trained language model according to claim 1, characterized in that, The implementation process of step (3) is as follows: Use [SEP] to separate different stack frames and exception information, add the special symbol "<*>" added in step (2) and placeholders [FILE], [NUM], [FUNC] and [CODE] to the vocabulary, and perform word segmentation on the input sequence; For tracebacks exceeding the model's maximum length limit, a custom truncation algorithm is used to preserve important features: First, the lengths of the stack frames and exception information for all tracebacks are counted. The maximum lengths of the stack frames and exception information are then determined based on the number of tracebacks covered by each length and the overall maximum length, as follows: If the total length of the traceback exceeds the maximum length limit of BERT, the abnormal information in the traceback is truncated first. If the length of the traceback still exceeds the model's limit after truncating the abnormal information, the stack frames are truncated one by one from the beginning until the entire sequence meets the allowed length.

5. The intelligent software compatibility problem detection method based on a pre-trained language model according to claim 1, characterized in that, The implementation process of step (5) is as follows: Using the pre-trained model obtained in step (4) as the encoder for the Traceback data, we embed it to obtain... Next, a multi-head attention mechanism layer is used to further capture the dependencies between words; the multi-head attention mechanism consists of multiple self-attention layers, each of which extracts features by calculating a weight matrix of query, key, and value, denoted as: Then, a residual connection is used to add the output of the attention mechanism to the original encoder output, and the representation H after the residual connection is obtained. attention (X) is input into a linear classification layer, and the predicted probability of each class is output through the softmax function.

6. The intelligent software compatibility problem detection method based on a pre-trained language model according to claim 1, characterized in that, The implementation process of step (6) is as follows: The fine-tuning dataset is divided into a training set, a validation set, and a test set. Data with positive labels are selected from the training set, and the row numbers of this part of the data are randomly replaced to generate a class-balanced training dataset with the same number of positive and negative examples. The ratio of positive to negative examples in the test set and the validation set remains unchanged. Input the class-balanced training, validation, and test sets into the intelligent software compatibility problem classification model constructed in step (5); adjust the model parameters and training cycles by adjusting the value of the loss function until the training loss and validation loss tend to stabilize; in each training cycle, iteratively train the weight matrix w and bias term b using the adjusted parameter settings; and convert the vector H(x) output by the fully connected layer into a single vector using the softmax function. i Mapping to each category yields the tensor z. j The corresponding probability score; specifically stated as follows: y j =softmax(z j )=softmax(w j ·x+b j ) The loss function for training the classification model is expressed as: Where N represents the number of training samples in each batch, y j This represents the true label value of the j-th sample, with 0 for samples without compatibility issues and 1 for samples with compatibility issues. j This represents the predicted probability of the j-th class.

7. The intelligent software compatibility problem detection method based on a pre-trained language model according to claim 4, characterized in that, The maximum length of the abnormal information is 50.

8. The intelligent software compatibility problem detection method based on a pre-trained language model according to claim 4, characterized in that, The maximum length of the stack frame is 460.

9. The intelligent software compatibility problem detection method based on a pre-trained language model according to claim 1, characterized in that, The preset probability is 0.15.

Citation Information

Patent Citations

  • Software compatibility processing method based on artificial intelligence

    CN116361191A

  • Python program API parameter compatibility problem automatic repairing method

    CN118689764A