S-parameter channel defect diagnosis method and system based on multi-dimensional attribute attention fusion

By using a deep learning model that integrates multi-dimensional attribute attention, and leveraging a dual-stream encoder and cross-attention mechanism with frequency and time domain features, we have achieved automated and accurate diagnosis of defects in high-speed signal links, solving the problems of low efficiency and high misjudgment rate in existing S-parameter analysis methods.

CN122633480APending Publication Date: 2026-08-25NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610611705.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-06
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing S-parameter analysis methods rely on engineers' expertise and experience, resulting in low analysis efficiency and a high error rate, making it difficult to accurately identify minute defects in high-speed signal links.

Method used

A deep learning model with multi-dimensional attribute attention fusion is adopted. Frequency domain and time domain feature information are extracted through a dual-stream encoder, and feature fusion is performed using a cross-attention mechanism to generate a defect probability vector, thereby realizing automated defect diagnosis.

Benefits of technology

It improves the accuracy of S-parameter analysis, reduces the false positive and false negative rates, and can more comprehensively identify and classify various single and mixed defects, reducing reliance on the experience of signal integrity experts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122633480A_ABST
    Figure CN122633480A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of multi-dimensional attribute attention fusion S parameter channel defect diagnosis method and system, it is related to server technical field.The method can extract feature information from S parameter data after obtaining S parameter data.Then the feature information is encoded as a feature vector, and bidirectional cross-attribute attention fusion is performed on the feature vector to obtain a fused feature vector, and then a classification decision is made based on the fused feature vector to generate a defect probability vector.The method can deeply integrate the frequency domain and time domain multi-dimensional attribute information of S parameters, and use the attention mechanism to adaptively focus on key features, which can more comprehensively and accurately identify and classify various single and mixed defects, improve the accuracy of diagnostic analysis results.And it can realize end-to-end automatic analysis from data preprocessing to defect classification, reduce the dependence on signal integrity expert experience, shorten the analysis cycle and improve the diagnosis efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of server technology, and in particular to a method and system for diagnosing S-parameter channel defects using multi-dimensional attribute attention fusion. Background Technology

[0002] In server system link design, signal integrity (SI) analysis is a critical step in ensuring system reliability. S-parameters (Scattering parameters) describe the characteristics of high-frequency networks, evaluate the performance of transmission channels, and serve as a means of black-box testing for transmission lines, microwave components, and other devices. As system link data transmission rates increase, even minor defects in the channel, such as impedance discontinuities and crosstalk, can significantly impact signal quality. Therefore, S-parameter analysis is necessary for design optimization and fault location.

[0003] S-parameter analysis can be directly applied to frequency domain analysis and can also be transformed into time domain analysis for in-depth analysis. By combining the frequency domain responses of S-parameters, such as insertion loss, echo, and crosstalk, with time domain characteristics such as time domain reflectometry (TDR) and time domain transmission (TDT), potential problems in high-speed signal links can be identified. Examples include via or connector impedance discontinuities, printed circuit board (PCB) trace crosstalk, and signal attenuation.

[0004] Since S-parameter analysis requires identifying defect patterns from frequency and time domain characteristics, relying on engineers' expertise and experience for signal integrity analysis, this method is not only inefficient but also prone to misjudgment due to subjective factors, thus reducing the accuracy of the analysis results. Summary of the Invention

[0005] In view of this, embodiments of this application provide a method and system for diagnosing S-parameter channel defects using multi-dimensional attribute attention fusion, in order to solve the problem of low accuracy of S-parameter analysis results.

[0006] According to a first aspect of this application, a method for diagnosing S-parameter channel defects through multi-dimensional attribute attention fusion is provided, the method comprising: Obtain S-parameter data, which includes the real part and the imaginary part of the parameter; Feature information is extracted from the S-parameter data, including frequency domain information and time domain information; the frequency domain information includes the amplitude extracted based on the real part of the parameters and the phase extracted based on the imaginary part of the parameters. The feature information is encoded into a feature vector using a two-stream encoder in the deep learning model. The two-stream encoder includes a frequency domain feature encoder and a time domain feature encoder. The feature vector includes a frequency domain feature vector and a time domain feature vector. The frequency domain feature vector is a vector obtained by the frequency domain feature encoder performing feature encoding on the frequency domain information. The time domain feature vector is a vector obtained by the time domain feature encoder performing feature encoding on the time domain information. A cross-attention mechanism is used to fuse the feature vectors into a fused feature vector; A classification decision is performed based on the fused feature vector to generate a defect probability vector, which is used to characterize the diagnostic probability of the fused feature vector relative to multiple defect types.

[0007] As can be seen, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion can automatically diagnose physical defects in high-speed server link channels based on a deep learning model of S-parameters. During the diagnosis process, a multi-port S-parameter file is used as input. By treating the S-parameters as multi-channel image or sequence data containing frequency and time domain physical meanings, a deep learning model is used to extract and fuse features to achieve defect classification. The final output is a defect probability vector with a classification label relative to the defect type. This method can more comprehensively and accurately identify and classify various single and mixed defects by deeply fusing the frequency and time domain multi-dimensional attribute information of the S-parameters and using an attention mechanism to adaptively focus on key features, thereby improving the accuracy of S-parameter analysis results and reducing false positives and false negatives.

[0008] In some embodiments, obtaining S-parameter data includes: Send a data acquisition request to the vector network analyzer so that the vector network analyzer performs S-parameter detection in response to the data acquisition request; Obtain the raw S-parameter file, which is the raw data obtained from the vector network analyzer; If the original S-parameter file does not contain test fixture parasitic effects, the original S-parameter file is determined as the S-parameter data; If the original S-parameter file contains test fixture parasitic effects, the parasitic effect information in the original S-parameter file is removed by an automatic fixture removal algorithm to obtain clean S-parameter data, which is used to reflect the device characteristics of the device under test.

[0009] As can be seen, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion described in the above embodiments can use an automatic fixture removal algorithm to process the original S-parameter file obtained by the vector network analyzer, accurately remove the parasitic effects of test fixtures and cables, and extract pure S-parameter data that only reflects the characteristics of the device under test, thereby ensuring that the subsequent model can learn the real device characteristics.

[0010] In some embodiments, extracting feature information from the S-parameter data includes: The S-parameter data is read using a scientific computing library to generate a parameter matrix at multiple frequency points; The input path is divided according to the parameter matrix, and the input path includes a frequency domain path and a time domain path; On the frequency domain path, the real part of the S-parameter data is extracted to obtain the amplitude of the S-parameter, and the imaginary part of the S-parameter data is extracted to obtain the phase of the S-parameter. The frequency domain information is generated based on the amplitude and the phase, and the frequency domain information includes a frequency domain feature tensor formed by organizing the amplitude and the phase. In the time domain path, the frequency domain information is converted into a time domain response value by applying an inverse Fourier transform to the S-parameter data, and the time domain information is generated based on the time domain response value. The time domain response value includes at least one of a time domain impulse response value, a time domain step response value, and a time domain pulse response value. The time domain information includes a time domain feature tensor formed by extrapolating the time domain response value into a frequency band and windowing it.

[0011] As can be seen, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion described in the above embodiments can divide the data processing path into frequency domain path and time domain path by formatting and transforming the S-parameter data. These paths are used to extract frequency domain information and time domain information respectively, forming multi-dimensional attribute information in the frequency domain and time domain. This facilitates more comprehensive and accurate identification and classification of defects, thereby improving the accuracy of S-parameter analysis results.

[0012] In some embodiments, after extracting feature information from the S-parameter data, the method further includes: Obtain the port parameters of the system being diagnosed corresponding to the S-parameter data, wherein the port parameters include the number of ports contained in the system being diagnosed; According to the port parameters, the amplitude is normalized to a preset standard parameter range, and the time domain response value is normalized to the preset standard parameter range; A classification label is added to the normalized feature information to generate a sample dataset. The classification label is a binary vector using a one-hot encoding format. Each dimension of the classification label is used to represent a defect type. The sample dataset is randomly divided into a training set and a validation set.

[0013] As can be seen, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion described in the above embodiments can normalize the amplitude data of the frequency domain path to the standard parameter range by port pair through data standardization, and normalize the time domain response value to the preset standard parameter range. Then, by adding classification labels and dividing the dataset, a sample dataset is formed for training the deep learning model, thereby ensuring the randomness of the division and the independence of the data, providing a reliable foundation for subsequent model training.

[0014] In some embodiments, the feature information is encoded into a feature vector using a two-stream encoder in the deep learning model, including: Obtain the frequency domain feature tensor corresponding to the frequency domain information; The frequency domain feature encoder is used to reshape the frequency domain feature tensor into a first sequence tensor; the first sequence tensor includes multiple frequency domain parameter pairs, which are used to characterize the frequency domain response sequence. By sliding the convolution kernel of the convolutional neural network layer along the frequency axis, the local frequency domain features of the first sequence tensor are captured. The Transformer encoder is used to model the dependencies between global frequency points through a self-attention mechanism; Global average pooling is used to compress the frequency domain response sequence of the frequency domain parameter pair into a fixed-length frequency domain vector, and the fixed-length frequency domain vector is concatenated into a first long vector. The port relationships corresponding to the first long vector are learned through a fully connected layer to output the frequency domain feature vector.

[0015] As can be seen, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion described in the above embodiments can utilize a frequency domain feature encoder in a dual-stream encoder to efficiently extract the frequency domain features of the device under test from the frequency domain dimension, thereby achieving accurate signal integrity classification. When extracting frequency domain feature vectors, the input tensor can be reshaped into a first sequence tensor, and the port matrix can be flattened into multiple frequency domain parameter pairs, representing the amplitude and phase variation curves across the frequency band. Feature extraction employs a hybrid architecture of 1D-CNN and Transformer, which can capture local frequency domain features and model the dependencies between global frequency points, further enhancing the frequency domain feature representation.

[0016] In some embodiments, the feature information is encoded into a feature vector using a two-stream encoder in the deep learning model, including: Obtain the temporal feature tensor corresponding to the temporal information; The temporal feature encoder is used to reshape the temporal feature tensor into a second sequence tensor; the second sequence tensor includes multiple temporal parameter pairs, which are used to characterize the temporal response sequence. Local temporal features of the second sequence tensor are extracted by sliding the convolution kernel of the convolutional neural network layer along the time axis. The Transformer encoder is used to model global dependencies between temporal events through a self-attention mechanism; Global average pooling is used to compress the time-domain response sequence of the time-domain parameter pair into a fixed-length time-domain vector, and the fixed-length time-domain vector is concatenated into a second long vector. The port relationships corresponding to the second long vector are learned through a fully connected layer to output the temporal feature vector.

[0017] As can be seen, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion described in the above embodiments can employ a temporal feature encoder in a dual-stream encoder to efficiently extract temporal features from both temporal dimensions, thereby achieving accurate signal integrity classification. During temporal feature extraction, a 1D-CNN and Transformer architecture symmetrical to the frequency domain feature extraction process can be used to extract local temporal features and model the global dependencies between temporal events, further representing temporal and frequency domain features.

[0018] In some embodiments, a cross-attention mechanism is employed to fuse the feature vectors into a fused feature vector, including: A bidirectional cross-attention path is constructed, comprising a first path and a second path. The first path is an attention path from the frequency domain path to the time domain path; the second path is an attention path from the time domain path to the frequency domain path. Calculate the first output vector of the first path, wherein the first output vector is a cross vector obtained by using the frequency domain feature vector as the query and the time domain feature vector as the key and value; Calculate the second output vector of the second path, which is a cross vector obtained by using the time-domain feature vector as the query and the frequency-domain feature vector as the key and value; The fused feature vector is obtained by concatenating the first output vector and the second output vector and performing linear projection.

[0019] As can be seen, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion described in the above embodiments can efficiently extract and fuse features of the device under test from both the frequency and time domains by combining a bidirectional cross-attribute attention fusion architecture with the feature extraction using a dual-stream encoder, thereby achieving accurate signal integrity classification. By using two parallel feature extraction paths in the frequency and time domains, the frequency and time domain information of the S-parameters are processed respectively, and a cross-attention mechanism is used to achieve deep fusion of the frequency and time domain feature vectors, forming a fused feature vector for classification. Therefore, the method can achieve adaptive, nonlinear deep fusion between frequency and time domain features by constructing cross-attention paths in two directions, fully exploring the complementary information between attributes.

[0020] In some embodiments, a classification decision is performed based on the fused feature vector to generate a defect probability vector, including: The fused feature vector is input into the fully connected layer of the deep learning model; The fully connected layer maps the fused feature vector to a label space, which includes classification labels corresponding to various defect types. In the label space, an activation function is used to output the diagnostic probability of the fused feature vector for multiple defect type classification labels, so as to generate the defect probability vector; Obtain a preset probability threshold for each of the aforementioned defect types; Based on the diagnostic probability and the preset probability threshold, a diagnostic result vector is generated, wherein the result value of each dimension in the diagnostic result vector is a first value or a second value; the first value is the result value set when the diagnostic probability is greater than or equal to the preset probability threshold; and the second value is the result value set when the diagnostic probability is less than the preset probability threshold.

[0021] As can be seen, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion described in the above embodiments can perform label space mapping through the fully connected layer of the deep learning model, and use the activation function to output the diagnostic probability of the fused feature vector for multiple defect type classification labels, so that the deep learning model can have multi-label diagnosis capability, support accurate diagnosis of mixed defects, and output multiple defect types present in the sample at the same time, which is more in line with the complex scenarios in engineering practice.

[0022] In some embodiments, the method further includes: Obtain a sample dataset, which includes a training set and a validation set; The S parameters of the samples used as the training set in the sample dataset are input into the deep learning model to obtain the predicted probability output by the deep learning model. The binary cross-entropy loss function is used to calculate the error between the predicted probability and the true binary label at each classification label position. The training loss is calculated based on the error value, and the training loss is the average of the error value at all positions. The model parameters of the deep learning model are iteratively optimized based on the training loss.

[0023] As can be seen, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion described in the above embodiments can be used to train the deep learning model using the Sigmoid activation function and binary cross-entropy loss, enabling the deep learning model to diagnose multiple defects simultaneously.

[0024] According to a second aspect of this application, a multi-dimensional attribute attention fusion S-parameter channel defect diagnosis system is provided, the system comprising: The data acquisition module is used to acquire S-parameter data, which includes the real part and the imaginary part of the parameter; An information extraction module is used to extract feature information from the S-parameter data, the feature information including frequency domain information and time domain information; the frequency domain information includes the amplitude extracted based on the real part of the parameters and the phase extracted based on the imaginary part of the parameters; The feature encoding module is used to encode the feature information into feature vectors using a two-stream encoder in a deep learning model. The two-stream encoder includes a frequency domain feature encoder and a time domain feature encoder. The feature vector includes a frequency domain feature vector and a time domain feature vector. The frequency domain feature vector is a vector obtained by the frequency domain feature encoder performing feature encoding on the frequency domain information. The time domain feature vector is a vector obtained by the time domain feature encoder performing feature encoding on the time domain information. The feature fusion module is used to fuse the feature vectors into a fused feature vector using a cross-attention mechanism; A classification decision module is used to perform classification decisions based on the fused feature vector to generate a defect probability vector, which is used to characterize the diagnostic probability of the fused feature vector relative to multiple defect types.

[0025] As can be seen, the S-parameter channel defect diagnosis system based on the multi-dimensional attribute attention fusion described above can acquire S-parameter data through a data acquisition module and extract feature information from the S-parameter data through an information extraction module. Then, the feature information is encoded into feature vectors through a feature encoding module, and the feature fusion module uses a cross-attention mechanism to fuse these feature vectors into a fused feature vector, achieving bidirectional cross-attribute attention fusion. This allows the classification decision module to perform classification decisions based on the fused feature vector to generate a defect probability vector. The system can deeply fuse the frequency and time domain multi-dimensional attribute information of the S-parameters and adaptively focus on key features using an attention mechanism, enabling more comprehensive and accurate identification and classification of various single and mixed defects, thus improving diagnostic accuracy. Furthermore, it can achieve end-to-end automated analysis from data preprocessing to defect classification, reducing reliance on signal integrity expert experience, shortening the analysis cycle, and improving automation and testing efficiency.

[0026] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0027] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A schematic flowchart of the S-parameter channel defect diagnosis method based on multidimensional attribute attention fusion provided in an embodiment of this application; Figure 2 This is a schematic diagram of the entire defect diagnosis process provided in the embodiments of this application; Figure 3 This is a schematic diagram of the data preprocessing process provided in the embodiments of this application; Figure 4 This is a schematic diagram of the dual-stream encoding process provided in an embodiment of this application; Figure 5 This is a schematic diagram of the iterative optimization deep learning model process provided in the embodiments of this application; Figure 6 A schematic diagram of the structure of the S-parameter channel defect diagnosis system with multi-dimensional attribute attention fusion provided in the embodiments of this application. Detailed Implementation

[0028] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0029] In the embodiments of this application, the S-parameter channel defect diagnosis method and system based on multi-dimensional attribute attention fusion can be used to diagnose physical defects in the high-speed signal link of a server, thereby enabling server system link design.

[0030] Signal integrity (SI) analysis of server system link design is a crucial step in ensuring system reliability. S-parameters are used in signal integrity analysis. S-parameters are complex matrices describing the energy scattering relationship between ports in a high-frequency network. They are indicators used to analyze transmission characteristics such as insertion loss, reflection characteristics such as return loss, and crosstalk. For example, S-parameters can be the original input data source. Therefore, S-parameters can be used to describe high-frequency network characteristics, evaluate transmission channel performance, and serve as a method for black-box testing of transmission lines, microwave components, and other devices.

[0031] As system link data transmission rates increase, even minor defects in the channel, such as impedance discontinuities and crosstalk, can significantly impact signal quality. S-parameter analysis is necessary for design optimization and fault location. S-parameter analysis can be directly applied to frequency domain analysis or transferred to the time domain for in-depth analysis. By combining the frequency domain responses of S-parameters (insertion loss, echo, crosstalk, etc.) with time domain characteristics such as time-domain reflectometry (TDR) and time-domain transmission (TDT), potential problems in high-speed signal links can be identified. Examples include impedance discontinuities in vias or connectors, crosstalk in printed circuit board (PCB) traces, and signal attenuation.

[0032] S-parameter analysis can extract frequency and time domain features from S-parameter data and combine this with the expertise and experience of signal integrity analysis engineers to identify defect patterns. However, because identifying defect patterns in the frequency and time domains relies on the expertise and experience of engineers for signal integrity analysis, this S-parameter analysis method is not only inefficient but also prone to misjudgments due to subjective factors, thus reducing the accuracy of the analysis results.

[0033] To improve the efficiency and accuracy of S-parameter analysis, some embodiments can also utilize machine learning and deep learning for automated defect diagnosis. Machine learning models can learn feature patterns from complex S-parameter data, enabling automatic defect classification and diagnosis.

[0034] For example, a through-silicon via (TSV) defect model can be constructed using electromagnetic simulation, and a multi-level neural network (HMC-LDNN) can be used for hierarchical defect classification and localization. Specifically, a 3D IC electromagnetic simulation model is established based on the geometric and material parameters of the actual structure under test. The model's accuracy is verified and adjusted using measured S-parameters to obtain a full-wave simulation model of the TSV. Using the verified model, full-wave simulation models of various TSV defects such as voids and cracks are constructed, and the corresponding S-parameter features are extracted to form a defect dataset. Then, an HMC-LDNN network containing a multi-level local neural network is trained using this defect dataset. Finally, the measured S-parameters of the actual TSV structure are input into the trained network, and the hierarchical defect classification and localization results are output.

[0035] However, when performing multidimensional attribute feature fusion and attention mechanism optimization, the aforementioned machine learning models cannot fully utilize the complete information contained in the real and imaginary parts of the S-parameters, and lack in-depth fusion of frequency domain and time domain features, resulting in reduced accuracy of the analysis results.

[0036] To address the low accuracy of S-parameter analysis results, this application provides a multi-dimensional attribute attention fusion-based S-parameter channel defect diagnosis method in some embodiments. This method can automatically classify physical defects in high-speed server link channels based on a deep learning model of S-parameters. Using multi-port S-parameter data containing both real and imaginary parts as input, the method treats the S-parameter data as multi-channel image or sequence data containing frequency and time domain physical meanings. It then uses a deep learning model to extract and fuse features to achieve defect classification, ultimately outputting a defect probability vector. This approach can accurately identify and classify defect types, improving the accuracy of diagnostic results.

[0037] The method can be applied to diagnostic systems or electronic devices that establish a communication connection with diagnostic systems and have data processing capabilities. These electronic devices include, but are not limited to, computers, servers, mobile terminals, smart wearable devices, and industrial control computers. For ease of description, this application embodiment uses a diagnostic system as the executing entity of the method. It should be understood that the method can also be applied to other types of executing entities, which are not illustrated in this application embodiment. Figure 1 As shown, the method includes: S101, Obtain S-parameter data.

[0038] When diagnosing channel defects, S-parameter data can be acquired first. This S-parameter data includes real and imaginary parts. The real part characterizes the amplitude of the S-parameter; the imaginary part characterizes its phase.

[0039] To acquire S-parameter data, the diagnostic system can send a data acquisition request to a Vector Network Analyzer (VNA). The VNA then responds to the request by performing S-parameter detection and returning the S-parameter data to the diagnostic system. The VNA is the core device for measuring the S-parameters of high-frequency devices and can be used to extract parameters from high-frequency equivalent circuit models.

[0040] For example, such as Figure 2 As shown, after connecting the test port of the vector network analyzer to the port of the device under test (DUT) of the system being diagnosed, the vector network analyzer can respond to the data acquisition request sent by the diagnostic system, perform S-parameter detection on the DUT according to the set frequency range and resolution, obtain the detection data, and then form an S-parameter file according to standard formats such as ".s2p" and ".s4p", and then feed it back to the diagnostic system.

[0041] After acquiring the S-parameter data, it can be preprocessed. In some embodiments, when acquiring S-parameter data, a raw S-parameter file can be obtained first, which is the raw data acquired from the vector network analyzer. The raw S-parameter file is then checked for fixture parasitic effects. If the raw S-parameter file does not contain test fixture parasitic effects, it can be identified as S-parameter data. If the raw S-parameter file contains test fixture parasitic effects, an automatic fixture removal algorithm is used to remove the parasitic effect information from the raw S-parameter file, resulting in clean S-parameter data. This S-parameter data reflects the device characteristics of the device under test.

[0042] For example, a data preprocessing module can be configured in the diagnostic system. This module aims to convert the raw measurement data into a standardized format suitable for model training, improving the data quality of the S-parameter data and laying the foundation for subsequent deep learning tasks. After obtaining the raw S-parameter file in .s4p format from the vector network analyzer, since the S-parameter data in the raw S-parameter file contains test fixture parasitic effects, the data preprocessing module can call the data processing program corresponding to the Automatic Fixture Removal (AFR) algorithm and apply the AFR algorithm to accurately remove the parasitic effects of test fixtures and cables, extracting pure S-parameter data that only reflects the characteristics of the device under test (DUT), ensuring that the model can learn the true device characteristics.

[0043] S102. Extract feature information from S-parameter data.

[0044] After acquiring the S-parameter data, feature information can be extracted from it. This feature information includes frequency domain information and time domain information; the frequency domain information includes the amplitude extracted from the real part of the parameters and the phase extracted from the imaginary part of the parameters; the time domain information includes the time-domain impulse response value.

[0045] Frequency domain and time domain information can each contain different defect-related features. Using data from both the frequency and time domains enhances the accuracy of model defect prediction. The parallel feature extraction paths in the frequency and time domains can form a progressive relationship with the final defect diagnosis result: "complementary information - deep collaboration - accurate diagnosis." That is, they are physically complementary. Frequency domain features (S-parameters) can characterize the transmission characteristics of a signal in the frequency dimension, such as insertion loss, return loss, and crosstalk. They can be used to determine the type of defect; for example, an abnormally steep drop in insertion loss at high frequencies suggests a "high insertion loss" defect; a resonant peak in return loss at a specific frequency suggests an "impedance discontinuity" defect.

[0046] Time-domain features characterize the propagation properties of a signal over time, such as the location, amplitude, and delay of reflected pulses. They can be used to determine where defects occur or how they affect the signal, such as the location of additional reflection peaks in the impulse response, corresponding to the precise location of impedance discontinuities on the physical link. Through parallel dual-stream extraction, frequency-domain and time-domain information are encoded into their respective optimal feature representations, providing high-quality input for subsequent fusion.

[0047] After obtaining clean S-parameter data through data preprocessing, the S-parameter data can be further formatted and transformed to extract feature information. Therefore, in some embodiments, when extracting feature information from S-parameter data, a scientific computing library can be used to read the S-parameter data to generate a parameter matrix at multiple frequency points. Then, the input path is divided according to the parameter matrix, where the input path includes a frequency domain path and a time domain path.

[0048] For example, such as Figure 3 As shown, the Touchstone file corresponding to the S-parameter data can be read using scientific computing libraries such as NumPy, generating an M×M parameter matrix across N frequency points. Here, M represents the number of ports; for example, when the system being diagnosed contains 4-port devices, M=4 can be set, resulting in a 4×4×N matrix. The input path is then divided based on the parameter matrix, resulting in two input paths for processing the S-parameter data: a frequency domain path and a time domain path.

[0049] In the frequency domain path, the real part of the S-parameter data can be extracted first to obtain the amplitude of the S-parameters, and the imaginary part of the S-parameter data can be extracted to obtain the phase of the S-parameters. Then, frequency domain information is generated based on the amplitude and phase, wherein the frequency domain information includes a frequency domain feature tensor formed by organizing the amplitude and phase.

[0050] For example, in the frequency domain path, the real part of the S-parameters can be read from the complex S-parameters to extract the amplitude of the S-parameters, which is expressed in dB. Similarly, the phase of the S-parameters can be extracted by reading the imaginary part of the parameters, which is expressed in degrees. After extracting the amplitude and phase, they are then organized into a frequency domain feature tensor of shape (M, M, N, 2), where the last dimension contains both amplitude and phase channels.

[0051] In the time domain, by applying an inverse Fourier transform to the S-parameter data, the frequency domain information is converted into time domain response values. These time domain response values ​​include at least one of time domain impulse response values, time domain step response values, and time domain pulse response values. Then, time domain information is generated based on these time domain response values. This time domain information includes a time domain feature tensor formed by frequency band extrapolation and windowing of the time domain response values.

[0052] For example, for a time-domain path, T-parameters can be obtained by applying the Inverse Fast Fourier Transform (IFFT) to the frequency-domain S-parameters. T-parameters refer to the time-domain impulse response obtained after transforming the frequency-domain S-parameters using the IFFT. T-parameters are the direct input to the time-domain feature encoder, providing a complete characterization of the signal in the time dimension, and are used to analyze phenomena such as the location of impedance discontinuities, reflection amplitude, signal delay, and crosstalk location. Furthermore, to ensure the causality of the time-domain signal and avoid aliasing, the time-domain features need to be extrapolated and windowed, ultimately forming a time-domain feature tensor of shape (M, M, T, 1), where T represents the number of time-domain points.

[0053] By formatting and transforming the S-parameter data, the data processing path can be divided into a frequency domain path and a time domain path, which are used to extract frequency domain information and time domain information respectively, forming multi-dimensional attribute information in the frequency and time domains. This facilitates more comprehensive and accurate identification and classification of defects, thereby improving the accuracy of S-parameter analysis results.

[0054] During data preprocessing, S-parameter data can be standardized to ensure it meets the input requirements of downstream tasks and facilitates the construction of sample datasets. In some embodiments, after extracting feature information from the S-parameter data, the port parameters of the diagnosed system corresponding to the S-parameter data can also be obtained, including the number of ports in the diagnosed system. Then, based on the port parameters, the amplitude and time-domain response values ​​are normalized to a preset standard parameter range.

[0055] For example, during the data standardization phase, amplitude data in the frequency domain path can be normalized. That is, after obtaining the port parameters of the system being diagnosed corresponding to the S-parameter data, the amplitude data can be normalized according to the port to normalize it to the [-1, 1] interval. Since the phase data is already within the [-π, π] interval, no additional processing is needed. Similarly, the impulse response values ​​in the time domain path can also be normalized to normalize them to the [-1, 1] interval, thus unifying the data scale.

[0056] After data normalization, classification labels can be added to the normalized feature information to generate a sample dataset. Based on model training needs, the sample dataset is randomly divided into a training set and a validation set. The classification labels are binary vectors using one-hot encoding; each dimension of the classification label represents a defect type.

[0057] For example, classification labels can represent multiple defect types. The corresponding tags can be generated by a signal integrity (SI) expert system based on comprehensive analysis and use a one-hot encoding format to characterize the defect type corresponding to the S-parameter data. For example, [1, 0, 0, 0] represents normal; [0, 1, 0, 0] represents impedance discontinuity; [0, 0, 1, 0] represents high insertion loss; [0, 0, 0, 1] represents severe near-end crosstalk; and [0, 1, 1, 0] represents a mixed defect, such as the simultaneous presence of impedance discontinuity and high insertion loss.

[0058] After adding classification labels, a sample dataset can be formed. This dataset is then randomly divided into an 80% training set and a 20% validation set. Furthermore, to prevent data leakage, it is necessary to ensure that the same batch of measurement data does not appear in both the training and validation sets simultaneously, improving the randomness of the partitioning and the independence of the data, thus providing a reliable foundation for subsequent model training.

[0059] S103. Use a two-stream encoder in a deep learning model to encode the feature information into a feature vector.

[0060] After extracting feature information from the S-parameter data, this extracted feature information can be input into a deep learning model. The model then uses a two-stream encoder to encode the feature information into feature vectors. The deep learning model is a neural network model trained using the S-parameter sample dataset. This model includes a two-stream encoder, comprising a frequency-domain feature encoder and a time-domain feature encoder. Correspondingly, the feature vectors obtained through feature encoding include frequency-domain feature vectors and time-domain feature vectors.

[0061] A frequency domain feature vector is a vector obtained by a frequency domain feature encoder performing feature encoding on frequency domain information. To obtain a frequency domain feature vector, in some embodiments, a two-stream encoder in a deep learning model is used. When encoding feature information into a feature vector, the frequency domain feature tensor corresponding to the frequency domain information can be obtained first, and then the frequency domain feature encoder can be used to reshape the frequency domain feature tensor into a first sequence tensor. This first sequence tensor includes multiple frequency domain parameter pairs, which are used to characterize the frequency domain response sequence.

[0062] The convolutional kernels of the convolutional neural network layer slide along the frequency axis to capture the local frequency domain features of the first sequence tensor. Then, a Transformer encoder is used to model the dependencies between global frequency points through a self-attention mechanism. Next, global average pooling is used to compress the frequency domain response sequence of the frequency domain parameter pairs into a fixed-length frequency domain vector, and the fixed-length frequency domain vector is concatenated into a first long vector. Finally, a fully connected layer learns the port relationships corresponding to the first long vector to output a frequency domain feature vector.

[0063] For the original S-parameters with M ports, N frequency points, and 2 channels (amplitude and phase channels), the original input frequency domain feature tensor is a four-dimensional tensor of (M, M, N, 2), which contains the topological relationships between ports, such as S11 representing reflection and S21 representing transmission. Since 1D-CNN and Transformer architectures are used to process sequential data such as time series and frequency domain sequences, tensor reshaping can transform multi-port S-parameter data into a unified representation that can be processed by sequence models, thereby achieving efficient extraction of frequency domain features. Specifically, to transform multi-port S-parameters into sequential data suitable for 1D-CNN and Transformer processing, the frequency domain feature tensor can be flattened into a first sequence tensor (M×M, N, 2). Each S-parameter pair (such as S11, S12) is considered an independent frequency domain sequence, and its dimension (N, 2) is the optimal input format for 1D-CNN sliding along the frequency axis.

[0064] Since the flattened sequences are not processed independently, but are compressed into a feature vector (C) after feature extraction, and then concatenated into a long vector of (M×M×C) by Concat, and finally the relationship between ports is learned through a fully connected layer, the interaction between ports can be preserved and learned through tensor reshaping. This allows the fully connected layer to learn whether there is a correlation between the anomaly of S21 (transmission) and the anomaly of S11 (reflection), thereby determining whether crosstalk defects affect multiple ports simultaneously.

[0065] For example, such as Figure 4 As shown, the frequency domain feature encoder in the deep learning model starts with a frequency domain feature tensor (M, M, N, 2), where M is the number of ports (e.g., M=4), N is the number of frequency points, and the two channels represent amplitude (dB) and phase (angle), respectively. The frequency domain feature encoder can reshape the input frequency domain feature tensor into a first sequence tensor (M×M, N, 2), that is, flatten the 4×4 port matrix into 16 S-parameter frequency domain parameter pairs, namely (S11, S12, ..., S44). Each frequency domain parameter pair corresponds to a frequency domain response sequence of shape (N, 2), representing the variation curves of the amplitude and phase of the S-parameters in the frequency band.

[0066] The feature extraction process employs a hybrid architecture of a one-dimensional convolutional neural network (1D-CNN) and a transformer. The 1D-CNN layer captures local frequency domain features, such as resonances or steep attenuations within narrow bands, by sliding the convolutional kernel along the frequency axis, outputting a local frequency domain feature vector of shape (M×M, N', C). Here, N' is the length of the pooled sequence, and C is the number of feature channels, representing the mapping to a higher-dimensional abstract feature space.

[0067] The Transformer encoder models global frequency dependencies, such as the correlation between high-frequency attenuation and mid-frequency peaks, through a self-attention mechanism, further enhancing feature representation. The Transformer encoder maintains an output shape of (M×M, N', C). Then, through global average pooling, the feature response sequence of each S-parameter frequency domain parameter pair is compressed into a fixed-length frequency domain vector with shape (M×M, C), which is then concatenated into a long vector of length M×M×C, referred to as the first long vector. Finally, a fully connected layer learns the relationships between ports, such as the interaction between S11 and S21, outputting the final frequency domain feature vector F. freq .

[0068] The temporal feature vector is a vector obtained by a temporal feature encoder performing feature encoding on temporal information. To obtain the temporal feature vector, in some embodiments, a two-stream encoder in a deep learning model is used. When encoding feature information into a feature vector, the temporal feature tensor corresponding to the temporal information can be obtained first, and then the temporal feature encoder can be used to reshape the temporal feature tensor into a second sequence tensor. The second sequence tensor includes multiple pairs of temporal parameters, and these pairs of parameters are used to represent the temporal response sequence.

[0069] The convolutional kernels of the convolutional neural network layer slide along the time axis to extract local temporal features of the second sequence tensor, and a Transformer encoder is used to model the global dependencies between temporal events through a self-attention mechanism. Then, global average pooling is used to compress the temporal response sequence of the temporal parameter pairs into a fixed-length temporal vector, and the fixed-length temporal vector is concatenated into a second long vector. Finally, a fully connected layer is used to learn the port relationships corresponding to the second long vector to output a temporal feature vector.

[0070] For example, after obtaining the time-domain feature tensor, it can be input into the time-domain feature encoder in a deep learning model. The time-domain feature encoder can process the time-domain feature tensor (M, M, T, 1), where M represents the number of ports (e.g., M=4), T represents the number of time-domain points, and one channel represents the amplitude of the impulse response. Similar to the frequency domain processing, the time-domain feature encoder can reshape the input time-domain feature tensor into a second sequence tensor (M×M, T, 1), corresponding to 16 pairs of time-domain parameters. Each pair of time-domain parameters corresponds to a time-domain response sequence, resulting in 16 time-domain response sequences, namely (T11, T21, ..., T44).

[0071] In temporal feature extraction, the temporal feature encoder can employ a 1D-CNN and Transformer architecture, which is symmetrical to the 1D-CNN and Transformer architectures used in temporal feature encoders. The 1D-CNN layer slides along the time axis to extract local temporal features, such as the rising and falling edges of pulses, ringing periods, or the starting position of reflected pulses. The Transformer encoder can model global dependencies between temporal events, such as the correlation between early reflections and subsequent ringing. The feature aggregation process is consistent with the frequency domain, generating a fixed-length temporal vector of shape (M×M, C) through global average pooling. This fixed-length temporal vector is then concatenated to form a second longer vector, which is then used by fully connected layers to learn the relationships between ports, outputting the temporal feature vector F. time .

[0072] As can be seen, the deep learning model employs a dual-stream encoder architecture, which can efficiently extract features of the device under test (DUT) in both the frequency and time domains to achieve accurate signal integrity classification. The deep learning model processes the frequency and time domain information of the S-parameters through two parallel feature extraction paths in the frequency and time domains, respectively, and encodes them into frequency domain feature vectors and time domain feature vectors.

[0073] S104. Employ a cross-attention mechanism to fuse feature vectors into a fused feature vector.

[0074] After generating frequency domain feature vectors and time domain feature vectors through feature encoding, the feature vectors can be fused. That is, according to the cross-attention mechanism, bidirectional cross-attribute attention fusion is achieved, and the frequency domain feature vectors and time domain feature vectors are deeply fused into a fused feature vector for classification.

[0075] After the feature vectors extracted by the two streams are input into the bidirectional cross-attribute attention fusion module, the module allows the two types of features to mutually query and focus on each other's key information. The fused feature vector contains complete information on both the defect type and the defect location or characteristics, enabling the final multi-label classifier to output independent probabilities of multiple defects simultaneously. Therefore, bidirectional cross-attribute attention can achieve comprehensive and symmetrical information interaction between the two attributes through two parallel, opposite-direction cross-attention paths, ensuring that complementary information between attributes is fully explored from both directions, avoiding information omissions that may occur due to single-direction queries, thereby achieving deeper and more robust feature fusion.

[0076] To achieve feature fusion, in some embodiments, bidirectional cross-attribute attention fusion is performed on the feature vectors to obtain the fused feature vectors. This can be achieved by first constructing a bidirectional cross-attention path, which includes a first path and a second path. The first path is an attention path from the frequency domain to the time domain; the second path is an attention path from the time domain to the frequency domain.

[0077] Next, the first output vector of the first path is calculated. This first output vector is a cross vector obtained by using the frequency domain feature vector as the query and the time domain feature vector as the key and value. The first output vector is then used to represent the portion of the time domain feature vector that is related to the frequency domain feature vector.

[0078] For example, in feature fusion, a cross-attention mechanism can be used to allow frequency domain feature vectors and time domain feature vectors to mutually query and pay attention to each other's important information, achieving adaptive, non-linear feature fusion rather than simple concatenation or addition. Therefore, for the first path from the frequency domain to the time domain (Freq-Time), the source of query Q1 can be set to the frequency domain feature vector F. freq The source of the key K1 is the time-domain feature vector F. time And the source of the set value (Value) V1 is the time-domain feature vector F. time Then calculate the first output vector according to the following formula:

[0079] in, O 1 indicates the first output vector; Attention (·) denotes the attention function; Q 1 represents the query vector for the first path; K 1 represents the key vector of the first path; V 1 represents the value vector of the first path; softmax (·)express softmax function; T Indicates the transpose symbol; d k This represents the dimensions of the key and query vectors in the attention mechanism.

[0080] Then through the first output vector O 1. It can select the most relevant part of the frequency domain information (frequency domain feature vector) from the time domain information (time domain feature vector) so that the frequency domain path can query and focus on important information of the time domain path.

[0081] Similarly, while calculating the first output vector, the second output vector of the second path can also be calculated. The second output vector is a cross vector obtained by using the time-domain feature vector as the query and the frequency-domain feature vector as the key and value; the second output vector is used to represent the part of the frequency-domain feature vector that is related to the time-domain feature vector.

[0082] For example, for the second path from the time domain path to the frequency domain path (Time-Freq), the source of the query vector Q2 can be set to the time domain feature vector F. time The source of the key vector K2 is set to the frequency domain feature vector F. freq And the source of the value vector V2 is the frequency domain feature vector F. freq Then calculate the second output vector according to the following formula:

[0083] in, O 2 represents the second output vector; Attention (·) denotes the attention function; Q 2 represents the query vector for the second path; K 2 represents the key vector of the second pathway; V 2 represents the value vector of the second path; softmax (·)express softmax function; T Indicates the transpose symbol; d k This represents the dimensions of the key and query vectors in the attention mechanism.

[0084] Then through the second output vector O 2. It can select the most relevant parts of the time domain information (time domain feature vector) from the frequency domain information (frequency domain feature vector) so that the time domain path can query and focus on important information of the frequency domain path.

[0085] After calculating the first and second output vectors, the fused feature vector is obtained by concatenating them and performing a linear projection on the concatenated result. For example, by concatenating two first output vectors O1 and O2, which are rich in cross-information, a concatenated vector can be formed, i.e.: F Concat = Concat ( O 1, O 2); in, F Concat Indicates concatenated vectors; Concat (·) denotes a concatenation function; O 1 indicates the first output vector; O 2 represents the second output vector.

[0086] To further perform feature fusion and dimensionality reduction, the concatenated vector can be passed through a linear projection layer to obtain the fused feature vector, i.e.: F fused = Linear ( Concat ( O 1, O 2)); in, F fused Represents the fused feature vector; Linear (·) denotes a linear projection function; Concat(·) denotes a concatenation function; O 1 indicates the first output vector; O 2 represents the second output vector.

[0087] As can be seen, the feature fusion process, based on feature extraction using a dual-stream encoder, combines a bidirectional cross-attribute attention fusion architecture to efficiently extract and fuse features of the device under test from both the frequency and time domains, achieving accurate signal integrity classification. Through two parallel feature extraction paths in the frequency and time domains, the frequency and time domain information of the S-parameters are processed separately, and a cross-attention mechanism is used to achieve deep fusion of the frequency and time domain feature vectors, forming a fused feature vector for classification. By generating the fused feature vector, the deep learning model can learn how to most effectively combine information from the frequency and time domains, outputting a unified and compact fused feature vector. F fused This is used by the final classifier to achieve adaptive, nonlinear deep fusion between frequency domain and time domain features, and to fully explore the complementary information between attributes.

[0088] S105. Perform classification decisions based on the fused feature vectors to generate a defect probability vector.

[0089] After obtaining the fused feature vector through feature fusion, classification decisions can be performed based on the fused feature vector to generate a defect probability vector, which is used to characterize the diagnostic probability of the fused feature vector relative to multiple defect types.

[0090] The classification decision process uses a classifier in a deep learning model to calculate the diagnostic probability of the fused feature vector relative to the defect type label. In a deep learning model, the classifier is a processing module located at the end of the neural network, used to map the extracted features to specific category labels. The classifier can map the high-dimensional feature vector output by the feature encoding and fusion module to the label space of the sample through feature mapping, outputting a probability vector. Each dimension of the probability vector represents the probability of belonging to a certain category; in the defect diagnosis domain, this probability is called the diagnostic probability.

[0091] For example, a classifier can employ a very simple single-layer linear mapping structure to achieve multi-label classification. The input to the classifier is then the fused feature vector. F fused By performing feature mapping, the fused feature vectors are mapped to the output layer, i.e., "F". fused →Output Layer.

[0092] The output layer can then be used to perform linear transformations, specifically, a linear transformation module consisting of a fully connected layer, which fuses the feature vectors. F fusedDirectly mapped to the label space. The number of neurons in the output layer needs to be strictly equal to the label dimension. For example, the number of classification labels is 4, representing classification results such as normal, impedance discontinuity, high insertion loss, and severe near-end crosstalk.

[0093] The output layer can also have an activation function to calculate the diagnostic probability, such as using the sigmoid function as the activation function of the output layer. The sigmoid function works independently for each neuron, and the output value is between 0 and 1, representing the independent probability that the sample has a defect of the corresponding category. For example, an output vector [0.01, 0.92, 0.15, 0.03] means that the model predicts that the sample is very likely to have an "impedance discontinuity" defect, while there are basically no other defects.

[0094] In some embodiments, to obtain diagnostic results, when performing classification decisions based on the fused feature vector, the fused feature vector can be input into a fully connected layer of a deep learning model, and the fully connected layer can map the fused feature vector to a label space, wherein the label space includes classification labels corresponding to multiple defect types. In the label space, an activation function can be used to output the diagnostic probabilities of the fused feature vector for the classification labels of multiple defect types, thereby generating a defect probability vector.

[0095] To determine the final defect diagnosis result, a preset probability threshold for each defect type can be obtained, and a diagnosis result vector can be generated based on the diagnosis probability and the preset probability threshold. In this vector, the result value for each dimension is either a first value or a second value. The first value is the result value set when the diagnosis probability is greater than or equal to the preset probability threshold; the second value is the result value set when the diagnosis probability is less than the preset probability threshold.

[0096] For example, a pre-trained deep learning model can be used to perform defect diagnosis prediction and decision-making. The deep learning model can predict unknown samples and output corresponding probability vectors. For example, for real-time acquired S-parameter data, the final output probability vector is [0.02, 0.87, 0.95, 0.01]. Then, a final classification decision is made based on the probability vectors. This involves setting a threshold for each label, such as 0.5 by default, and making independent judgments. If the diagnostic probability of a label is greater than or equal to 0.5, the result value of that label in the diagnosis result vector is set to 1, indicating the existence of a defect corresponding to that label. Similarly, if the diagnostic probability of a label is less than 0.5, the result value of that label in the diagnosis result vector is set to 0, indicating the absence of a defect corresponding to that label. Therefore, for the probability vector in the example above, the sample can be determined to be a mixed defect, i.e., the diagnosis result vector is [0, 1, 1, 0], indicating that the device under test corresponding to the currently acquired S-parameter data has a defect of impedance discontinuity and high insertion loss.

[0097] By applying the technical solutions of the above embodiments, the S-parameter channel defect diagnosis method based on multi-dimensional attribute attention fusion described in the above embodiments can improve the accuracy of defect diagnosis. Specifically, by deeply fusing the frequency and time domain multi-dimensional attribute information of S-parameters and utilizing an attention mechanism to adaptively focus on key features, it can more comprehensively and accurately identify and classify various single and mixed defects, significantly reducing the false positive and false negative rates. The method can also improve the automation level of defect diagnosis and enhance diagnostic efficiency. Specifically, the method can achieve end-to-end automated analysis from data preprocessing to defect classification, reducing reliance on signal integrity (SI) expert experience, shortening the analysis cycle, and improving testing efficiency. Furthermore, the method can also possess multi-label diagnostic capabilities, supporting accurate diagnosis of mixed defects and simultaneously outputting multiple defect types present in the sample, better aligning with complex scenarios in actual engineering practice.

[0098] In some embodiments, as a refinement and extension of the specific implementation of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, some embodiments of this application also provide a method for diagnosing S-parameter channel defects through multi-dimensional attribute attention fusion. The difference between this method and the above embodiments is that it allows for continuous iterative optimization of the deep learning model, such as... Figure 5 As shown, the method includes: S201. Obtain the sample dataset; S202. Input the S-parameters of the samples used as the training set in the sample dataset into the deep learning model to obtain the predicted probability output by the deep learning model. S203. Using the binary cross-entropy loss function, calculate the error value between the predicted probability and the true binary label at each classification label position. S204. Calculate the training loss based on the error value; S205. Iteratively optimize the model parameters of the deep learning model based on training loss.

[0099] When iteratively optimizing a deep learning model, we can first obtain a sample dataset including a training set and a validation set. Then, we input the S-parameters of the samples used as the training set into the deep learning model to obtain the predicted probabilities output by the model. Next, we use the binary cross-entropy loss function to calculate the error between the predicted probability and the true binary label at each classification label position. Then, we calculate the training loss based on the error values, and iteratively optimize the model parameters based on the training loss. Here, the training loss is the average of the error values ​​across all positions.

[0100] For example, training strategies can be set for deep learning modules. These strategies include parameters such as loss functions, optimizers, and learning rates. For instance, a binary cross-entropy loss (BCE Loss) function can be used. The BCE Loss function independently calculates the error between the predicted probability and the true binary label (0 or 1) at each label position and averages the loss over all positions, thus adapting to multi-label classification tasks.

[0101] The optimizer can use the AdamW optimizer, which decouples weight decay from Adam and achieves better generalization performance. The learning rate scheduling strategy can employ a cosine annealing decay strategy, causing the learning rate to gradually decrease from its initial value to 0 according to a cosine function during training, which helps the model converge to a better solution.

[0102] When continuously iterating and optimizing a deep learning model, you can first obtain a sample dataset and input the training set from the sample dataset into the deep learning model to obtain the training diagnostic results output by the deep learning model. Then, compare the training diagnostic results with the classification labels labeled in the sample dataset, and calculate the training loss L using binary cross-entropy loss. BCE Next, obtain the training loss threshold L0, and compare the training loss with the training loss threshold. When the training loss L0... BCE When the output accuracy exceeds the training loss threshold L0, it indicates that the deep learning model's output accuracy has not met the required standards. In this case, the output accuracy can be determined based on the training loss L0. BCE Perform backpropagation and optimize the model parameters of the deep learning model using the AdamW optimizer. Then, based on the optimized model parameters, repeat the above training process until the training loss L... BCE If the training loss threshold L0 is less than or equal to the training loss threshold, the model parameters of the deep learning model are output to obtain the trained deep learning model, which is then used to perform classification decisions.

[0103] By applying the technical solutions of the above embodiments, the S-parameter channel defect diagnosis method of multi-dimensional attribute attention fusion described in the above embodiments can train the deep learning model using the Sigmoid activation function and binary cross-entropy loss model training method, so that the deep learning model can have the ability to diagnose multiple defects at the same time.

[0104] In some embodiments, as a specific implementation of the S-parameter channel defect diagnosis method based on multidimensional attribute attention fusion described in the above embodiments, some embodiments of this application also provide a multidimensional attribute attention fusion-based S-parameter channel defect diagnosis system, such as... Figure 6 As shown, the system includes: The data acquisition module is used to acquire S-parameter data, which includes the real part and the imaginary part of the parameter; An information extraction module is used to extract feature information from the S-parameter data, the feature information including frequency domain information and time domain information; the frequency domain information includes the amplitude extracted based on the real part of the parameters and the phase extracted based on the imaginary part of the parameters; The feature encoding module is used to encode the feature information into feature vectors using a two-stream encoder in a deep learning model. The two-stream encoder includes a frequency domain feature encoder and a time domain feature encoder. The feature vector includes a frequency domain feature vector and a time domain feature vector. The frequency domain feature vector is a vector obtained by the frequency domain feature encoder performing feature encoding on the frequency domain information. The time domain feature vector is a vector obtained by the time domain feature encoder performing feature encoding on the time domain information. The feature fusion module is used to fuse the feature vectors into a fused feature vector using a cross-attention mechanism; A classification decision module is used to perform classification decisions based on the fused feature vector to generate a defect probability vector, which is used to characterize the diagnostic probability of the fused feature vector relative to multiple defect types.

[0105] For example, the S-parameter channel defect diagnosis system based on the multi-dimensional attribute attention fusion described in the above embodiments can first acquire raw S-parameter data containing test fixture parasitic effects from a vector network analyzer through a data acquisition module during defect diagnosis. Then, an automatic fixture removal algorithm is applied to accurately eliminate the parasitic effects of the test fixture and cable, extracting pure S-parameter data that only reflects the characteristics of the device under test, ensuring that the model can learn the true device features.

[0106] The information extraction module then formats and transforms the S-parameter data. Specifically, it uses NumPy to read the Touchstone file, generating an M×M matrix across N frequency points. The data processing path is divided into a frequency domain path and a time domain path. The frequency domain path extracts amplitude and phase from the complex S-parameters and organizes them into a tensor of shape (M, M, N, 2). The time domain path applies an inverse Fourier transform to the frequency domain S-parameters, converting them into a time-domain impulse response to visually reveal characteristics such as impedance discontinuities, delays, attenuation, and crosstalk. To ensure causality and avoid aliasing in the time domain signal, bandwidth extrapolation and windowing are performed, ultimately forming a tensor of shape (M, M, T, 1).

[0107] The information extraction module can also perform data standardization, that is, normalizing the amplitude data of the frequency domain path to the [-1, 1] interval by port pair. The impulse response values ​​of the time domain path are also normalized to the [-1, 1] interval to unify the data scale. Then, by adding classification labels using one-hot encoding, a sample dataset is formed. The dataset is then randomly divided into an 80% training set and a 20% validation set, providing a reliable foundation for subsequent model training.

[0108] The feature encoding module can perform feature encoding using a deep learning model, encoding frequency domain information and time domain information into frequency domain feature vectors and time domain feature vectors, respectively. During encoding, the feature encoding module first reshapes the input tensor into a sequence tensor and uses a hybrid architecture of 1D-CNN and Transformer for feature extraction. Specifically, it captures local features through 1D-CNN layers, models the global frequency dependencies through the Transformer encoder's self-attention mechanism, then compresses the feature sequence of each S-parameter pair into a fixed-length vector using global average pooling, concatenates them into a long vector, and finally learns the relationships between ports through fully connected layers to output the final feature vector.

[0109] The feature fusion module then performs bidirectional cross-attribute attention fusion on the frequency domain feature vector and the time domain feature vector. Employing a cross-attention mechanism, the frequency and time domain features mutually query and focus on each other's important information, achieving adaptive, non-linear feature fusion and outputting a unified, compact fused feature vector. F fused This is used by the classifier when making classification decisions.

[0110] Before performing classification decisions, the deep learning model needs to be trained. This involves using binary cross-entropy loss as the loss function, the AdamW optimizer as the optimizer during training, and a cosine annealing decay strategy as the learning rate scheduling strategy. The deep learning model is iteratively trained using the training set from the sample dataset. After training, the model's output accuracy is verified using the validation set from the sample dataset. Only when the output accuracy meets the design requirements is the classification decision executed.

[0111] During classification decisions, a trained deep learning model can be used to predict the output of unknown samples, yielding a probability vector. The final classification decision requires setting a threshold for each label for independent judgment. When the judgment probability is greater than or equal to the threshold, the presence of that type of defect is confirmed; when the judgment probability is less than the threshold, the absence of that type of defect is confirmed. Then, by fusing the diagnostic results corresponding to the classification probabilities of multiple types, accurate diagnostic results supporting mixed defects can be obtained, simultaneously outputting multiple defect types present in the sample.

[0112] By applying the technical solutions of the above embodiments, the S-parameter channel defect diagnosis system with multi-dimensional attribute attention fusion described in the above embodiments can acquire S-parameter data through a data acquisition module and extract feature information from the S-parameter data through an information extraction module. Then, the feature information is encoded into feature vectors through a feature encoding module, and bidirectional cross-attribute attention fusion is performed on the feature vectors through a feature fusion module to obtain a fused feature vector. This allows the classification decision module to perform classification decisions based on the fused feature vector to generate a defect probability vector. The system can more comprehensively and accurately identify and classify various single and mixed defects by deeply fusing the frequency and time domain multi-dimensional attribute information of S-parameters and adaptively focusing on key features using an attention mechanism, thereby improving diagnostic accuracy. Furthermore, it can achieve end-to-end automated analysis from data preprocessing to defect classification, reducing reliance on signal integrity expert experience, shortening the analysis cycle, and improving automation and testing efficiency.

[0113] It should be noted that other corresponding descriptions of the functional units involved in the multi-dimensional attribute attention fusion S-parameter channel defect diagnosis system provided in the embodiments of this application can be referred to the corresponding descriptions in the multi-dimensional attribute attention fusion S-parameter channel defect diagnosis method provided in the above embodiments, and will not be repeated here.

[0114] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0115] The embodiments described above are merely examples of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the protection scope of this application.

Claims

1. A multi-dimensional attribute attention fusion-based S-parameter channel defect diagnosis method, characterized in that, The method includes: Obtain S-parameter data, which includes the real part and the imaginary part of the parameter; Feature information is extracted from the S-parameter data, including frequency domain information and time domain information; the frequency domain information includes the amplitude extracted based on the real part of the parameters and the phase extracted based on the imaginary part of the parameters. The feature information is encoded into feature vectors using a two-stream encoder in a deep learning model. The two-stream encoder includes a frequency domain feature encoder and a time domain feature encoder. The feature vectors include frequency domain feature vectors and time domain feature vectors. The frequency domain feature vector is a vector obtained by the frequency domain feature encoder performing feature encoding on the frequency domain information. The time domain feature vector is a vector obtained by the time domain feature encoder performing feature encoding on the time domain information. A cross-attention mechanism is used to fuse the feature vectors into a fused feature vector; A classification decision is performed based on the fused feature vector to generate a defect probability vector, which is used to characterize the diagnostic probability of the fused feature vector relative to multiple defect types.

2. The method according to claim 1, characterized in that, Obtain S-parameter data, including: Send a data acquisition request to the vector network analyzer so that the vector network analyzer performs S-parameter detection in response to the data acquisition request; Obtain the raw S-parameter file, which is the raw data obtained from the vector network analyzer; If the original S-parameter file does not contain test fixture parasitic effects, the original S-parameter file is determined as the S-parameter data; If the original S-parameter file contains test fixture parasitic effects, the parasitic effect information in the original S-parameter file is removed by an automatic fixture removal algorithm to obtain clean S-parameter data, which is used to reflect the device characteristics of the device under test.

3. The method according to claim 1, characterized in that, Extracting feature information from the S-parameter data includes: The S-parameter data is read using a scientific computing library to generate a parameter matrix at multiple frequency points; The input path is divided according to the parameter matrix, and the input path includes a frequency domain path and a time domain path; On the frequency domain path, the real part of the S-parameter data is extracted to obtain the amplitude of the S-parameter, and the imaginary part of the S-parameter data is extracted to obtain the phase of the S-parameter. The frequency domain information is generated based on the amplitude and the phase, and the frequency domain information includes a frequency domain feature tensor formed by organizing the amplitude and the phase. In the time domain path, the frequency domain information is converted into a time domain response value by applying an inverse Fourier transform to the S-parameter data, and the time domain information is generated based on the time domain response value. The time domain response value includes at least one of a time domain impulse response value, a time domain step response value, and a time domain pulse response value. The time domain information includes a time domain feature tensor formed by extrapolating the time domain response value into a frequency band and windowing it.

4. The method according to claim 3, characterized in that, After extracting feature information from the S-parameter data, the method further includes: Obtain the port parameters of the system being diagnosed corresponding to the S-parameter data, wherein the port parameters include the number of ports contained in the system being diagnosed; According to the port parameters, the amplitude is normalized to a preset standard parameter range, and the time domain response value is normalized to the preset standard parameter range; A classification label is added to the normalized feature information to generate a sample dataset. The classification label is a binary vector using a one-hot encoding format. Each dimension of the classification label is used to represent a defect type. The sample dataset is randomly divided into a training set and a validation set.

5. The method according to claim 1, characterized in that, The feature information is encoded into a feature vector using the two-stream encoder in the deep learning model, including: Obtain the frequency domain feature tensor corresponding to the frequency domain information; The frequency domain feature encoder is used to reshape the frequency domain feature tensor into a first sequence tensor; the first sequence tensor includes multiple frequency domain parameter pairs, which are used to characterize the frequency domain response sequence. By sliding the convolution kernel of the convolutional neural network layer along the frequency axis, the local frequency domain features of the first sequence tensor are captured. The Transformer encoder is used to model the dependencies between global frequency points through a self-attention mechanism; Global average pooling is used to compress the frequency domain response sequence of the frequency domain parameter pair into a fixed-length frequency domain vector, and the fixed-length frequency domain vector is concatenated into a first long vector. The port relationships corresponding to the first long vector are learned through a fully connected layer to output the frequency domain feature vector.

6. The method according to claim 1, characterized in that, The feature information is encoded into a feature vector using the two-stream encoder in the deep learning model, including: Obtain the temporal feature tensor corresponding to the temporal information; The temporal feature encoder is used to reshape the temporal feature tensor into a second sequence tensor; the second sequence tensor includes multiple temporal parameter pairs, which are used to characterize the temporal response sequence. Local temporal features of the second sequence tensor are extracted by sliding the convolution kernel of the convolutional neural network layer along the time axis. The Transformer encoder is used to model global dependencies between temporal events through a self-attention mechanism; Global average pooling is used to compress the time-domain response sequence of the time-domain parameter pair into a fixed-length time-domain vector, and the fixed-length time-domain vector is concatenated into a second long vector. The port relationships corresponding to the second long vector are learned through a fully connected layer to output the temporal feature vector.

7. The method according to claim 1, characterized in that, A cross-attention mechanism is used to fuse the feature vectors into a fused feature vector, including: A bidirectional cross-attention path is constructed, comprising a first path and a second path. The first path is an attention path from the frequency domain path to the time domain path; the second path is an attention path from the time domain path to the frequency domain path. Calculate the first output vector of the first path, wherein the first output vector is a cross vector obtained by using the frequency domain feature vector as the query and the time domain feature vector as the key and value; Calculate the second output vector of the second path, which is a cross vector obtained by using the time-domain feature vector as the query and the frequency-domain feature vector as the key and value; The fused feature vector is obtained by concatenating the first output vector and the second output vector and performing linear projection.

8. The method according to claim 1, characterized in that, Based on the fused feature vector, a classification decision is performed to generate a defect probability vector, including: The fused feature vector is input into the fully connected layer of the deep learning model; The fully connected layer maps the fused feature vector to a label space, which includes classification labels corresponding to various defect types. In the label space, an activation function is used to output the diagnostic probability of the fused feature vector for multiple defect type classification labels, so as to generate the defect probability vector; Obtain a preset probability threshold for each of the aforementioned defect types; Based on the diagnostic probability and the preset probability threshold, a diagnostic result vector is generated, wherein the result value of each dimension in the diagnostic result vector is a first value or a second value; the first value is the result value set when the diagnostic probability is greater than or equal to the preset probability threshold; and the second value is the result value set when the diagnostic probability is less than the preset probability threshold.

9. The method according to claim 1, characterized in that, The method further includes: Obtain a sample dataset, which includes a training set and a validation set; The S parameters of the samples used as the training set in the sample dataset are input into the deep learning model to obtain the predicted probability output by the deep learning model. The binary cross-entropy loss function is used to calculate the error between the predicted probability and the true binary label at each classification label position. The training loss is calculated based on the error value, and the training loss is the average of the error value at all positions. The model parameters of the deep learning model are iteratively optimized based on the training loss.

10. A multi-dimensional attribute attention fusion S-parameter channel defect diagnosis system, characterized in that, The system includes: The data acquisition module is used to acquire S-parameter data, which includes the real part and the imaginary part of the parameter; An information extraction module is used to extract feature information from the S-parameter data, the feature information including frequency domain information and time domain information; the frequency domain information includes the amplitude extracted based on the real part of the parameters and the phase extracted based on the imaginary part of the parameters; The feature encoding module is used to encode the feature information into feature vectors using a two-stream encoder in a deep learning model. The two-stream encoder includes a frequency domain feature encoder and a time domain feature encoder. The feature vector includes a frequency domain feature vector and a time domain feature vector. The frequency domain feature vector is a vector obtained by the frequency domain feature encoder performing feature encoding on the frequency domain information. The time domain feature vector is a vector obtained by the time domain feature encoder performing feature encoding on the time domain information. The feature fusion module is used to fuse the feature vectors into a fused feature vector using a cross-attention mechanism; A classification decision module is used to perform classification decisions based on the fused feature vector to generate a defect probability vector, which is used to characterize the diagnostic probability of the fused feature vector relative to multiple defect types.