A needle guide quality intelligent discrimination system based on capacitance response feature learning
By using a capacitor edge response enhancement and multi-band wavelet decomposition module, combined with a capacitor feature memory library and machine learning model, the problem of insufficient signal sensitivity and anomaly detection accuracy in guide needle detection is solved, and efficient and intelligent identification of guide needle quality is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YIYANG YILIDA ELECTRONICS CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies lack effective enhancement processing of edge change information in capacitive response signals during probe detection, making it difficult to accurately capture weak structural changes, resulting in low detection sensitivity. Furthermore, the lack of effective utilization of historical data leads to insufficient accuracy and stability in anomaly detection.
Gradient enhancement processing is performed using a capacitor edge response enhancement module, multi-scale features are extracted by combining a multi-band wavelet decomposition module, and a capacitor feature memory library is constructed for similarity calculation. A stable anomaly detection reference model is established, and discrimination is performed through a machine learning model.
This improves the sensitivity of the probe detection signal, enables the full expression of multi-scale structural information of the probe capacitance response signal, and enhances the accuracy and stability of anomaly detection.
Smart Images

Figure CN122241519A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of capacitive sensing and detection, specifically to an intelligent needle quality discrimination system based on capacitive response feature learning. Background Technology
[0002] In the fields of electronic manufacturing and precision testing, guide pins are important connection and testing components. Their structural state and contact performance directly affect the reliability and stability of electronic devices. Therefore, during the production and testing of guide pins, it is necessary to accurately detect their structural state and contact quality. Existing technologies typically employ detection methods based on the principle of capacitance sensing, directly analyzing the original capacitance response signal. This lacks effective enhancement processing of signal edge change information, making it difficult to accurately capture subtle structural changes, resulting in low sensitivity for detecting abnormal states of guide pins. Existing detection methods often use single-scale feature analysis to judge the quality of capacitance response signals, making it difficult to fully mine the multi-scale structural information contained in the capacitance response signal, resulting in insufficient feature expression capabilities and affecting the stability and accuracy of the detection results. Existing anomaly detection methods usually only make judgments based on the current detection signal, lacking effective utilization of historical normal sample features. They cannot establish stable reference feature models through historical data, making them prone to misjudgment or missed judgment when facing complex operating conditions or signal fluctuations. Summary of the Invention
[0003] To address the above issues and overcome the shortcomings of existing technologies, this invention provides an intelligent guide needle quality discrimination system based on capacitance response feature learning. This invention enhances the original capacitance response signal by setting a capacitance edge response enhancement module, effectively strengthening edge change information in the capacitance signal and improving the detectability of weak structural changes, thereby increasing the sensitivity of the guide needle detection signal. Furthermore, this invention constructs a multi-band wavelet decomposition module based on Haar wavelets to perform multi-scale band decomposition of the capacitance response signal, simultaneously extracting low-frequency structural features and high-frequency detail features, thus achieving a full expression of the multi-scale structural information of the guide needle capacitance response signal and improving feature representation capabilities. Finally, this invention constructs a capacitance feature memory library and uses feature retrieval to calculate similarity in the anomaly perception response map construction module, effectively utilizing historical normal guide needle features to build a stable anomaly detection reference model, thereby improving the accuracy and stability of anomaly detection.
[0004] The technical solution adopted in this invention is as follows: This invention provides a guide needle quality intelligent discrimination system based on capacitance response feature learning, including a capacitance edge response enhancement module, a multi-band wavelet decomposition module, a response template generation module, a capacitance feature memory library construction module, an anomaly perception response map construction module, a retrieval-enhanced discrimination fusion module, and a consistency self-diagnosis module, specifically including the following: The capacitor edge response enhancement module acquires the original capacitor response signal during the guide needle detection process, and performs gradient enhancement processing on the original capacitor response signal in the scanning sequence dimension and frequency dimension by constructing a capacitor response differential operator to obtain capacitor edge response enhancement features. The capacitor edge response enhancement features are then input to the multi-band wavelet decomposition module. The multi-band wavelet decomposition module constructs a multi-scale decomposition structure based on Haar wavelets, performs multi-scale decomposition processing on the capacitor edge response enhancement features at the frequency band level, splits the original capacitor response signal into low-frequency structural features and high-frequency detail features, and fuses the features of each frequency band to construct a multi-scale capacitor response feature set. The multi-scale capacitor response features are input to the response template generation module. The response template generation module collects historical normal guide needle detection data, performs statistical modeling and similarity analysis on multi-scale capacitance response features, generates a standard capacitance response template set, and inputs the standard capacitance response templates into the capacitance feature memory library construction module. The capacitor feature memory library construction module performs feature encoding and storage on the standard capacitor response template to construct a normal guide needle capacitor feature memory library, which is then provided to the anomaly perception response map construction module. The anomaly perception response map construction module calculates the similarity between the capacitance response features of the probe to be detected and the features in the capacitance feature memory library to obtain the anomaly distribution at the detection location, and constructs a capacitance anomaly response map, which is then input into the retrieval-enhanced discrimination fusion module. The enhanced retrieval and discrimination fusion module integrates the capacitance anomaly response map and multi-scale capacitance response features to construct a comprehensive discrimination feature vector. It then uses a machine learning model to discriminate the quality status of the guide needle, obtains the guide needle quality discrimination result, and inputs the guide needle quality discrimination result into the consistency self-diagnosis module. The consistency self-diagnosis module evaluates the consistency between the guide needle quality discrimination result and the abnormal response map, and corrects the confidence of the discrimination result according to the consistency index, and outputs the final guide needle quality discrimination result.
[0005] Furthermore, the multi-band wavelet decomposition module constructs a multi-scale decomposition structure based on Haar wavelets, performs band-level multi-scale decomposition processing on the capacitor edge response enhancement features, and decomposes the original capacitor response signal into low-frequency structural features and high-frequency detail features, specifically including the following steps: Step S1: Capacitive response signal construction. The capacitor edge response enhancement feature and the original capacitor response signal are used to perform edge response enhancement fusion processing on the original capacitor response signal, constructing an enhanced capacitor response signal sequence, as shown below: ; in, This represents the original capacitance response signal. This indicates enhanced edge response characteristics of the capacitor. Indicates the edge enhancement weight coefficient. This represents the enhanced capacitor response signal sequence. Indicates the sampling time of the capacitor signal; Step S2: Construction of Haar wavelet multi-scale decomposition structure. Based on the Haar wavelet basis functions, a multi-scale decomposition structure is constructed. The enhanced capacitance response signal sequence is decomposed into a first-level scale to obtain low-frequency approximate components and high-frequency detail components, as shown below: ; ; in, This represents the low-frequency structural components of the first layer. This represents the first layer of high-frequency detail components. This represents the discrete sampling index after wavelet decomposition. and This indicates the signal value of the enhanced capacitor response signal at adjacent sampling points; Step S3: Multi-scale recursive frequency band decomposition. Using the low-frequency structural components as the input for the next level of decomposition, a multi-scale recursive decomposition process is constructed to perform multi-level frequency band splitting on the capacitance response signal, obtaining multi-scale low-frequency structural components and high-frequency detail components, as shown below: ; ; in, Indicates the wavelet decomposition level. Indicates the first Low-frequency structural components of the layer, Indicates the first High-frequency detail components of the layer, Indicates the first Low-frequency structural components of the layer, Indicates the first High-frequency detail components of the layer; Step S4: Calculate the frequency band response energy. Calculate the frequency band response energy for each scale's high-frequency detail components to characterize the intensity of changes at the capacitive touch edge. The formula used is as follows: ; in, Indicates the first The frequency band energy value of the high-frequency detail components of the layer. Indicates the first High-frequency detail components of the layer, This represents the discrete sampling index at this scale; Step S5: Construction of multi-scale capacitance response feature set. The low-frequency structural components and high-frequency detail components at each scale are combined to construct a multi-scale capacitance response feature set, as shown below: ; in, This represents a set of multi-scale capacitive response characteristics. Indicates the first Low-frequency structural components of the layer, Represents high-frequency detail components at various scales. This represents the frequency band energy value corresponding to the high-frequency detail components at each scale. This represents the maximum number of levels in wavelet decomposition.
[0006] Furthermore, the anomaly perception response graph construction module specifically includes the following steps: Step Q1: Acquisition of the capacitance response features to be detected. Obtain the multi-scale capacitance response feature set of the probe to be detected, as shown below: ; in, This represents the set of capacitive response characteristics of the probe to be tested. Indicates the first The capacitance response feature vector at each detection location This indicates the number of detection locations obtained during the guide needle scanning process; Step Q2: Capacitance feature memory database retrieval. The capacitance feature memory database is called, as shown below: ; The distance between the feature to be detected and the features in the memory database is calculated using nearest neighbor search: ; in, The first character in the capacitor feature memory library One reference feature, Represents Euclidean distance. Indicates the detection location The minimum feature distance, Indicates the number of features in the memory library; Step Q3: Anomaly calculation. The anomaly score of the detected location is calculated based on the nearest neighbor distance. The formula used is as follows: ; in, Indicates the detection location abnormality This represents the nearest neighbor distance. This represents the maximum value among all detected distances; Step Q4: Local anomaly enhancement calculation. The anomaly degree at the detection location is calculated using local neighborhood aggregation. The formula used is as follows: ; in, Indicates the enhanced anomaly degree. Indicates the detection location The neighborhood set, Indicates the detection location within the neighborhood. abnormality Indicates the number of neighboring detection points; Step Q5: Anomaly response map construction. Based on the enhanced anomaly degree distribution, a capacitance anomaly response map is constructed, as shown below: ; in, This represents a capacitor abnormal response diagram. Indicates the detection location The intensity of the abnormal response; Step Q6: Output the abnormal response map. Input the abnormal response map of the capacitor into the retrieval-enhanced discrimination fusion module.
[0007] The beneficial effects achieved by the present invention using the above solution are as follows: (1) By setting up a capacitor edge response enhancement module, the present invention performs gradient enhancement processing on the original capacitor response signal, effectively strengthening the edge change information in the capacitor signal, improving the detectability of weak structural changes, and thus enhancing the sensitivity of the guide needle detection signal; (2) This invention constructs a multi-band wavelet decomposition module based on Haar wavelets to perform multi-scale band decomposition on the capacitor response signal, and extracts low-frequency structural features and high-frequency detail features in the capacitor response signal, thereby achieving full expression of multi-scale structural information of the guide needle capacitor response signal and improving feature expression capability. (3) This invention constructs a capacitor feature memory library and uses feature retrieval to calculate similarity in the anomaly perception response map construction module, thereby realizing the effective use of historical normal guide needle features, thus constructing a stable anomaly detection reference model and improving the accuracy and stability of anomaly detection. Attached Figure Description
[0008] Figure 1 This is a schematic diagram of a guide needle quality intelligent discrimination system based on capacitance response feature learning proposed in this invention.
[0009] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation
[0010] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0011] Example 1, see Figure 1 This invention provides a smart needle quality discrimination system based on capacitance response feature learning, comprising a capacitance edge response enhancement module, a multi-band wavelet decomposition module, a response template generation module, a capacitance feature memory library construction module, an anomaly perception response map construction module, a retrieval-enhanced discrimination fusion module, and a consistency self-diagnosis module, specifically including the following: The capacitor edge response enhancement module acquires the original capacitor response signal during the guide needle detection process, and performs gradient enhancement processing on the original capacitor response signal in the scanning sequence dimension and frequency dimension by constructing a capacitor response differential operator to obtain capacitor edge response enhancement features. The capacitor edge response enhancement features are then input to the multi-band wavelet decomposition module. The multi-band wavelet decomposition module constructs a multi-scale decomposition structure based on Haar wavelets, performs multi-scale decomposition processing on the capacitor edge response enhancement features at the frequency band level, splits the original capacitor response signal into low-frequency structural features and high-frequency detail features, and fuses the features of each frequency band to construct a multi-scale capacitor response feature set. The multi-scale capacitor response features are input to the response template generation module. The response template generation module collects historical normal guide needle detection data, performs statistical modeling and similarity analysis on multi-scale capacitance response features, generates a standard capacitance response template set, and inputs the standard capacitance response templates into the capacitance feature memory library construction module. The capacitor feature memory library construction module performs feature encoding and storage on the standard capacitor response template to construct a normal guide needle capacitor feature memory library, which is then provided to the anomaly perception response map construction module. The anomaly perception response map construction module calculates the similarity between the capacitance response features of the probe to be detected and the features in the capacitance feature memory library to obtain the anomaly distribution at the detection location, and constructs a capacitance anomaly response map, which is then input into the retrieval-enhanced discrimination fusion module. The enhanced retrieval and discrimination fusion module integrates the capacitance anomaly response map and multi-scale capacitance response features to construct a comprehensive discrimination feature vector. It then uses a machine learning model to discriminate the quality status of the guide needle, obtains the guide needle quality discrimination result, and inputs the guide needle quality discrimination result into the consistency self-diagnosis module. The consistency self-diagnosis module evaluates the consistency between the guide needle quality discrimination result and the abnormal response map, and corrects the confidence of the discrimination result according to the consistency index, and outputs the final guide needle quality discrimination result.
[0012] In this embodiment, the guide needle detection device includes a set of capacitance sensing array detection platforms. The capacitance sensing array consists of 12×12 capacitance detection units, with a spacing of 0.6mm between each detection unit. The guide needle to be tested moves at a constant speed above the capacitance sensing array via a linear slide rail device. The scanning speed is set to 15mm / s. During the scanning process, the capacitance sensing array collects the capacitance change signal between the guide needle and the sensing array in real time at a sampling frequency of 1.5kHz, thereby obtaining the original capacitance response signal sequence on the guide needle scanning path. During the guide needle detection process, the system acquires an original capacitance response signal sequence of length 800. The capacitance edge response enhancement module first performs edge change enhancement processing on the signal. By constructing a capacitance response differential operator, the change gradient between adjacent sampling points is calculated, and the capacitance edge response enhancement features are obtained. Then, the signal is fused and enhanced according to the following formula to obtain the enhanced capacitance response signal sequence. After this step, the edge features of the originally relatively smooth capacitance signal are significantly enhanced, making the local structural changes of the guide needle more obvious in the signal. Subsequently, the multi-band wavelet decomposition module performs multi-scale decomposition on the enhanced capacitive response signal. In this embodiment, Haar wavelet is used for three-level decomposition. First, the signal is decomposed into low-frequency structural component A1 and high-frequency detail component D1. Then, the low-frequency component A1 is decomposed into A2 and D2. Finally, A2 is decomposed into A3 and D3. The system obtains multi-scale signal features and calculates the frequency band energy values E1, E2 and E3 of the high-frequency components at each scale, and finally constructs a multi-scale capacitive response feature set. In this embodiment, 1500 qualified guide needle samples are selected, and a multi-scale capacitance response feature set is extracted for each sample. The mean vector and feature distribution range of each feature component are calculated by statistical modeling method, thereby generating a standard capacitance response template set. Subsequently, the capacitor feature memory library construction module performs feature encoding on the generated standard template and stores it in a structured manner. In this embodiment, the capacitor feature memory library contains 1500 sets of normal guide needle feature vectors, and each set of feature vectors has a dimension of 32. In the actual detection process, the anomaly perception response map construction module obtains the feature set of the guide needle to be detected, and performs nearest neighbor search between the feature vector of each detection position and the reference feature in the capacitance feature memory library. The minimum feature distance is obtained by calculating the Euclidean distance. Then, the anomaly degree of each detection position is normalized according to the anomaly degree calculation formula to obtain the anomaly degree sequence. The enhanced anomaly degree is calculated by the neighborhood averaging method. An abnormal capacitance response map is generated based on the abnormality distribution of all detection locations. When the guide needle has a local bending defect, the abnormality of the corresponding scanning area is significantly higher than that of the normal area, which is represented as a continuous high response area in the abnormal response map. Subsequently, the enhanced discrimination fusion module fuses the abnormal response map A with the multi-scale capacitance response feature set and constructs a comprehensive discrimination feature vector, which is then input into the machine learning discrimination model for quality identification. In this embodiment, a support vector machine model is used as a classifier to classify and identify the guide needle state through training samples, thereby outputting the guide needle quality discrimination result. The consistency between the spatial distribution relationship between the guide needle quality results output by the classification model and the abnormal response map is evaluated. When the abnormal area in the abnormal response map is consistent with the abnormal location determined by the classification model, the confidence of the discrimination result is increased. When the two are inconsistent, the confidence is reduced and the result is corrected to obtain the final guide needle quality discrimination result. The system described in this embodiment was used to test a batch of guide pins. A total of 2,000 guide pin samples were tested, of which 1,700 were normal and 300 had bent or abnormal contact.
[0013] Example 2, based on the above examples, describes a multi-band wavelet decomposition module that constructs a multi-scale decomposition structure based on Haar wavelets. This module performs multi-band multi-scale decomposition processing on the capacitor edge response enhancement features, splitting the original capacitor response signal into low-frequency structural features and high-frequency detail features. Specifically, it includes the following steps: Step S1: Capacitive response signal construction. The capacitor edge response enhancement feature and the original capacitor response signal are used to perform edge response enhancement fusion processing on the original capacitor response signal, constructing an enhanced capacitor response signal sequence, as shown below: ; in, This represents the original capacitance response signal. This indicates enhanced edge response characteristics of the capacitor. Indicates the edge enhancement weight coefficient. This represents the enhanced capacitor response signal sequence. Indicates the sampling time of the capacitor signal; Step S2: Construction of Haar wavelet multi-scale decomposition structure. Based on the Haar wavelet basis functions, a multi-scale decomposition structure is constructed. The enhanced capacitance response signal sequence is decomposed into a first-level scale to obtain low-frequency approximate components and high-frequency detail components, as shown below: ; ; in, This represents the low-frequency structural components of the first layer. This represents the first layer of high-frequency detail components. This represents the discrete sampling index after wavelet decomposition. and This indicates the signal value of the enhanced capacitor response signal at adjacent sampling points; Step S3: Multi-scale recursive frequency band decomposition. Using the low-frequency structural components as the input for the next level of decomposition, a multi-scale recursive decomposition process is constructed to perform multi-level frequency band splitting on the capacitance response signal, obtaining multi-scale low-frequency structural components and high-frequency detail components, as shown below: ; ; in, Indicates the wavelet decomposition level. Indicates the first Low-frequency structural components of the layer, Indicates the first High-frequency detail components of the layer, Indicates the first Low-frequency structural components of the layer, Indicates the first High-frequency detail components of the layer; Step S4: Calculate the frequency band response energy. Calculate the frequency band response energy for each scale's high-frequency detail components to characterize the intensity of changes at the capacitive touch edge. The formula used is as follows: ; in, Indicates the first The frequency band energy value of the high-frequency detail components of the layer. Indicates the first High-frequency detail components of the layer, This represents the discrete sampling index at this scale; Step S5: Construction of multi-scale capacitance response feature set. The low-frequency structural components and high-frequency detail components at each scale are combined to construct a multi-scale capacitance response feature set, as shown below: ; in, This represents a set of multi-scale capacitive response characteristics. Indicates the first Low-frequency structural components of the layer, Represents high-frequency detail components at various scales. This represents the frequency band energy value corresponding to the high-frequency detail components at each scale. This represents the maximum number of levels in wavelet decomposition.
[0014] In this embodiment, the core code used is as follows: import numpy as np # ============================ # Step S1: Constructing the Capacitor Response Signal # ============================ # Simulated acquisition of raw capacitance response signal C_raw = np.array([ 0.83, 0.85, 0.87, 0.90, 0.92, 0.91, 0.89, 0.88, 0.87, 0.86, 0.88, 0.91, 0.93, 0.92, 0.90, 0.89 ]) # Edge enhancement weight coefficient lam = 0.6 # Differential operator for calculating edge response features E = np.diff(C_raw, prepend=C_raw[0]) # Constructing the enhanced capacitive response signal C = C_raw + lam E print("Enhanced capacitive response signal:") print(C) # ============================ # Step S2: Haar wavelet first-level decomposition # ============================ def haar_decompose(signal): n = len(signal) / / 2 A = [] D = [] for k in range(n): a = (signal[2 k] + signal[2 k+1]) / np.sqrt(2) d = (signal[2 k] - signal[2 k+1]) / np.sqrt(2) A.append(a) D. append(d) return np.array(A), np.array(D) # First-level decomposition A1, D1 = haar_decompose(C) print("\nFirst layer low frequency component A1:") print(A1) print("\nFirst layer high frequency component D1:") print(D1) # ============================ # Step S3: Multi-scale recursive decomposition # ============================ A2, D2 = haar_decompose(A1) A3, D3 = haar_decompose(A2) print("\nSecond layer low frequency component A2:") print(A2) print("\nSecond layer high frequency component D2:") print(D2) print("\nThird layer low frequency component A3:") print(A3) print("\nThird layer high frequency component D3:") print(D3) # ============================ # Step S4: Bandwidth Energy Calculation # ============================ def energy(D): return np.sum(np.abs(D) 2) E1 = energy(D1) E2 = energy(D2) E3 = energy(D3) print("\nBandwidth energy:") print("E1 =", E1) print("E2 =", E2) print("E3 =", E3) # ============================ # Step S5: Construction of Multi-Scale Feature Sets # ============================ F = { "A_n": A3, "D1": D1, "D2": D2, "D3": D3, "E1": E1, "E2": E2, "E3": E3 } print("\nMultiscale capacitive response feature set F:") For key, value in F.items(): print(key, ":", value).
[0015] Example 3, based on the above examples, the anomaly perception response graph construction module specifically includes the following steps: Step Q1: Acquisition of the capacitance response features to be detected. Obtain the multi-scale capacitance response feature set of the probe to be detected, as shown below: ; in, This represents the set of capacitive response characteristics of the probe to be tested. Indicates the first The capacitance response feature vector at each detection location This indicates the number of detection locations obtained during the guide needle scanning process; Step Q2: Capacitance feature memory database retrieval. The capacitance feature memory database is called, as shown below: ; The distance between the feature to be detected and the features in the memory database is calculated using nearest neighbor search: ; in, The first character in the capacitor feature memory library One reference feature, Represents Euclidean distance. Indicates the detection location The minimum feature distance, Indicates the number of features in the memory library; Step Q3: Anomaly calculation. The anomaly score of the detected location is calculated based on the nearest neighbor distance. The formula used is as follows: ; in, Indicates the detection location abnormality This represents the nearest neighbor distance. This represents the maximum value among all detected distances; Step Q4: Local anomaly enhancement calculation. The anomaly degree at the detection location is calculated using local neighborhood aggregation. The formula used is as follows: ; in, Indicates the enhanced anomaly degree. Indicates the detection location The neighborhood set, Indicates the detection location within the neighborhood. abnormality Indicates the number of neighboring detection points; Step Q5: Anomaly response map construction. Based on the enhanced anomaly degree distribution, a capacitance anomaly response map is constructed, as shown below: ; in, This represents a capacitor abnormal response diagram. Indicates the detection location The intensity of the abnormal response; Step Q6: Output the abnormal response map. Input the abnormal response map of the capacitor into the retrieval-enhanced discrimination fusion module.
[0016] In this embodiment, the core code used is as follows: import numpy as np import matplotlib.pyplot as plt # --------------------------- # Step Q1: Acquisition of the response characteristics of the capacitor to be detected # --------------------------- # Assume that the feature vector of each guide needle detection position is 3-dimensional, and the number of detection positions m=8 F_t = np.array([ [0.82, 0.11, 0.03], [0.85, 0.10, 0.04], [0.83, 0.12, 0.05], [0.86, 0.13, 0.04], [0.92, 0.25, 0.15], # Outlier [0.84, 0.11, 0.04], [0.83, 0.12, 0.04], [0.82, 0.10, 0.03] ]) # --------------------------- # Step Q2: Capacitor Feature Memory Database Retrieval # --------------------------- # Assume the memory library has 5 normal guide features M = np.array([ [0.83, 0.11, 0.04], [0.84, 0.10, 0.03], [0.82, 0.12, 0.04], [0.85, 0.11, 0.04], [0.83, 0.10, 0.03] ]) # Calculate the Euclidean distance between each detection location and each feature in the memory database, and take the minimum value. d = np.array([np.min(np.linalg.norm(F_t[i] - M, axis=1)) for i inrange(F_t.shape[0])]) # --------------------------- # Step Q3: Anomaly Calculation # --------------------------- S = d / np.max(d) # Normalized outlier print("Original anomaly level S:", S) # --------------------------- # Step Q4: Local Anomaly Enhancement Calculation # --------------------------- # Using neighborhood aggregation, k=3, simple sliding window averaging S_enhanced = np.zeros_like(S) k = 3 for i in range(len(S)): neighbors = S[max(0, i-1):min(len(S), i+2)] # One neighbor before and one after. S_enhanced[i] = np.mean(neighbors) print("Enhanced anomaly score S':", S_enhanced) # --------------------------- # Step Q5: Construction of the anomaly response graph # --------------------------- A = S_enhanced# The anomaly response graph represents the enhanced anomaly level. print("Capacitor Abnormal Response Diagram A:", A) # Visualizing anomaly response graphs plt.figure(figsize=(8,4)) plt.plot(range(1, len(A)+1), A, marker='o', linestyle='-', color='r') plt.title("Guide Needle Abnormal Response Chart") plt.xlabel("Detection Location") plt.ylabel("Abnormal response intensity") plt.grid(True) plt.show() # --------------------------- # Step Q6: Output of the anomaly response graph # --------------------------- # Output the abnormal response graph for use in subsequent discrimination modules def get_anomaly_map(): return A.
[0017] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0018] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
[0019] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A smart needle quality discrimination system based on capacitance response feature learning, characterized in that: It includes a capacitor edge response enhancement module, a multi-band wavelet decomposition module, a response template generation module, a capacitor feature memory library construction module, an anomaly perception response map construction module, a retrieval-enhanced discrimination fusion module, and a consistency self-diagnosis module, specifically including the following: The capacitor edge response enhancement module acquires the original capacitor response signal during the guide needle detection process, and performs gradient enhancement processing on the original capacitor response signal in the scanning sequence dimension and frequency dimension by constructing a capacitor response differential operator to obtain capacitor edge response enhancement features. The capacitor edge response enhancement features are then input to the multi-band wavelet decomposition module. The multi-band wavelet decomposition module constructs a multi-scale decomposition structure based on Haar wavelets, performs multi-scale decomposition processing on the capacitor edge response enhancement features at the frequency band level, splits the original capacitor response signal into low-frequency structural features and high-frequency detail features, and fuses the features of each frequency band to construct a multi-scale capacitor response feature set. The multi-scale capacitor response features are input to the response template generation module. The response template generation module collects historical normal guide needle detection data, performs statistical modeling and similarity analysis on multi-scale capacitance response features, generates a standard capacitance response template set, and inputs the standard capacitance response templates into the capacitance feature memory library construction module. The capacitor feature memory library construction module performs feature encoding and storage on the standard capacitor response template to construct a normal guide needle capacitor feature memory library, which is then provided to the anomaly perception response map construction module. The anomaly perception response map construction module calculates the similarity between the capacitance response features of the probe to be detected and the features in the capacitance feature memory library to obtain the anomaly distribution at the detection location, and constructs a capacitance anomaly response map, which is then input into the retrieval-enhanced discrimination fusion module. The enhanced retrieval and discrimination fusion module integrates the capacitance anomaly response map and multi-scale capacitance response features to construct a comprehensive discrimination feature vector. It then uses a machine learning model to discriminate the quality status of the guide needle, obtains the guide needle quality discrimination result, and inputs the guide needle quality discrimination result into the consistency self-diagnosis module. The consistency self-diagnosis module evaluates the consistency between the guide needle quality discrimination result and the abnormal response map, and corrects the confidence of the discrimination result according to the consistency index, and outputs the final guide needle quality discrimination result.
2. The intelligent needle quality discrimination system based on capacitance response feature learning according to claim 1, characterized in that: The multi-band wavelet decomposition module constructs a multi-scale decomposition structure based on Haar wavelets, performs multi-scale decomposition processing on the enhanced features of the capacitor edge response at the frequency band level, and decomposes the original capacitor response signal into low-frequency structural features and high-frequency detail features. Specifically, it includes the following steps: Step S1: Capacitive response signal construction. The capacitor edge response enhancement feature and the original capacitor response signal are used to perform edge response enhancement fusion processing on the original capacitor response signal, constructing an enhanced capacitor response signal sequence, as shown below: ; in, This represents the original capacitor response signal. This indicates enhanced edge response characteristics of the capacitor. Indicates the edge enhancement weight coefficient. This represents the enhanced capacitor response signal sequence. Indicates the sampling time of the capacitor signal; Step S2: Construction of Haar wavelet multi-scale decomposition structure. Based on the Haar wavelet basis functions, a multi-scale decomposition structure is constructed. The enhanced capacitance response signal sequence is decomposed into a first-level scale to obtain low-frequency approximate components and high-frequency detail components, as shown below: ; ; in, This represents the low-frequency structural components of the first layer. This represents the first layer of high-frequency detail components. This represents the discrete sampling index after wavelet decomposition. and This indicates the signal value of the enhanced capacitor response signal at adjacent sampling points; Step S3: Multi-scale recursive frequency band decomposition. Using the low-frequency structural components as the input for the next level of decomposition, a multi-scale recursive decomposition process is constructed to perform multi-level frequency band splitting on the capacitance response signal, obtaining multi-scale low-frequency structural components and high-frequency detail components, as shown below: ; ; in, Indicates the wavelet decomposition level. Indicates the first Low-frequency structural components of the layer, Indicates the first High-frequency detail components of the layer, Indicates the first Low-frequency structural components of the layer, Indicates the first High-frequency detail components of the layer; Step S4: Calculate the frequency band response energy. Calculate the frequency band response energy for each scale's high-frequency detail components to characterize the intensity of changes at the capacitive touch edge. The formula used is as follows: ; in, Indicates the first The frequency band energy value of the high-frequency detail components of the layer. Indicates the first High-frequency detail components of the layer, This represents the discrete sampling index at this scale; Step S5: Construction of multi-scale capacitance response feature set. The low-frequency structural components and high-frequency detail components at each scale are combined to construct a multi-scale capacitance response feature set, as shown below: ; in, This represents a set of multi-scale capacitive response characteristics. Indicates the first Low-frequency structural components of the layer, Represents high-frequency detail components at various scales. This represents the frequency band energy value corresponding to the high-frequency detail components at each scale. This represents the maximum number of levels in wavelet decomposition.
3. The intelligent needle quality discrimination system based on capacitance response feature learning according to claim 2, characterized in that: The anomaly perception response graph construction module specifically includes the following steps: Step Q1: Acquisition of the capacitance response features to be detected. Obtain the multi-scale capacitance response feature set of the probe to be detected, as shown below: ; in, This represents the set of capacitive response characteristics of the probe to be tested. Indicates the first The capacitance response feature vector at each detection location This indicates the number of detection locations obtained during the guide needle scanning process; Step Q2: Capacitance feature memory database retrieval. The capacitance feature memory database is called, as shown below: ; The distance between the feature to be detected and the features in the memory database is calculated using nearest neighbor search: ; in, The first character in the capacitor feature memory library One reference feature, Represents Euclidean distance. Indicates the detection location The minimum feature distance, Indicates the number of features in the memory library; Step Q3: Anomaly calculation. The anomaly score of the detected location is calculated based on the nearest neighbor distance. The formula used is as follows: ; in, Indicates the detection location abnormality This represents the nearest neighbor distance. This represents the maximum value among all detected distances; Step Q4: Local anomaly enhancement calculation. The anomaly degree at the detection location is calculated using local neighborhood aggregation. The formula used is as follows: ; in, Indicates the enhanced anomaly degree. Indicates the detection location The neighborhood set, Indicates the detection location within the neighborhood. abnormality Indicates the number of neighboring detection points; Step Q5: Anomaly response map construction. Based on the enhanced anomaly degree distribution, a capacitance anomaly response map is constructed, as shown below: ; in, This represents a capacitor abnormal response diagram. Indicates the detection location The intensity of the abnormal response; Step Q6: Output the abnormal response map. Input the abnormal response map of the capacitor into the retrieval-enhanced discrimination fusion module.