Communication fault positioning method based on comparative learning
By using a contrastive learning method to locate communication network faults, the problems of feature unification and gradient conflict in multi-source data are solved, and the clear expression of fault features and stability of location results are achieved, thereby improving the accuracy and consistency of communication network fault location.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHENGZHOU UNIV
- Filing Date
- 2026-04-03
- Publication Date
- 2026-05-19
AI Technical Summary
Existing fault location methods for communication networks struggle to unify feature representations when processing multi-source heterogeneous data, leading to inaccurate location. Furthermore, the models are sensitive to environmental changes, and gradient update conflicts affect stability.
A contrastive learning-based approach is adopted to construct sample pair relationships by using a unified temporal index structure for multi-source data, subspace decomposition, and contrastive loss. Combined with gradient conflict projection decomposition, this approach enables the separation of fault features and environmental features and the coordinated process of parameter updates.
It improves the accuracy and stability of fault identification in complex network environments, enhances the clarity of feature representation and the reliability of location results, and reduces the impact of environmental interference on fault identification.
Smart Images

Figure CN122069175A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication fault location technology, and in particular to a communication fault location method based on contrastive learning. Background Technology
[0002] During large-scale deployment, communication network systems exhibit complex link structures, dense node numbers, diverse service types, and continuously changing operational states over time. In real-world operating environments, link status data, node operation data, and alarm data exhibit multi-source heterogeneity, with differences in time granularity, sampling frequency, and data structure, making unified data processing difficult. Traditional fault location methods typically rely on a single data source or rule-based judgment methods, identifying anomalies through threshold comparisons or empirical models. However, these methods are prone to inaccurate location or delayed response in complex network environments.
[0003] As communication networks continue to expand, network states exhibit high-dimensional and multivariate characteristics, with closer relationships between nodes and fault propagation paths becoming more concealed and dynamically changing. Existing methods lack a unified feature representation mechanism when processing multi-source data, making it difficult to simultaneously characterize the correlation structure between links, nodes, and alarms, resulting in insufficient feature representation capabilities. Furthermore, traditional methods typically employ fixed rules for sample construction, making it difficult to effectively distinguish differences between various operating states. Inappropriate sample pair construction negatively impacts subsequent model training performance.
[0004] Furthermore, existing methods struggle to effectively separate environmental interference factors from actual fault features during fault feature extraction, leading to model sensitivity to environmental changes and insufficient stability. During optimization, inconsistent gradient directions among different loss components can cause conflicts during parameter updates, impacting model convergence. Therefore, there is an urgent need to develop a communication fault localization method that can unify the representation of multi-source data, rationally construct sample pair relationships, separate fault features from environmental features, and handle gradient conflicts. Summary of the Invention
[0005] One objective of this invention is to propose a communication fault location method based on contrastive learning. This invention introduces a unified time index structure for multi-source data and a subspace decomposition constraint representation model to perform fault feature and environmental feature separation processing on communication state features. It combines contrastive loss to construct a sample pair relationship and gradient conflict projection decomposition mechanism, forming a collaborative process of feature representation optimization and parameter update. This method has the advantages of accurate fault identification, clear feature expression, and stable location results.
[0006] A communication fault location method based on contrastive learning according to an embodiment of the present invention includes the following steps: Acquire communication network link status data, node operation data, and alarm data; establish a unified time index sequence; and generate a communication status feature sequence at the time index position. Perform vector encoding operations on the communication state feature sequence to generate a state representation vector sequence, and perform normalization processing on the state representation vector sequence to generate an initial feature representation set; Perform a sample partitioning operation on the state representation vector sequence to generate a sample set, and perform a sample pair construction operation on the sample set to generate a positive sample pair set and a negative sample pair set; Subspace decomposition operation is performed on the state representation vector sequence to generate fault feature subspace and environmental feature subspace. Clustering mapping operation is performed in the fault feature subspace to generate fault prototype vector set. Prototype drift sequence is generated in time order. Information constraint operation is performed on the state representation vector to generate constraint feature representation set. Similarity calculation is performed on the positive sample pair set and the negative sample pair set to generate a contrastive loss component. Gradient calculation is performed on the contrastive loss component to generate a gradient vector set. Direction determination is performed on the gradient vector set. Projection decomposition is performed on the conflicting gradients to generate a corrected gradient set. Based on the modified gradient set, parameter update operations are performed to generate a set of communication state feature representations; Read the set of communication status feature representations, calculate the distance value between the feature space and the set of fault prototype vectors, determine the fault type identifier at the minimum distance position, and output the fault location result at the network index position.
[0007] Optionally, the communication network link status data, node operation data, and alarm data specifically include: Record link connectivity status, link bandwidth usage, link latency, and link packet loss rate values at the link identifier position, and write them into the link status sequence in time index order. Record processor utilization, memory utilization, interface traffic, and device operation status identifier values at the node identifier position, and write them into the node operation sequence in time index order. Record alarm type identifier, alarm level identifier, alarm trigger time index, and alarm duration values at the alarm identifier position, and write them into the alarm event sequence in time index order. Perform a unified index alignment operation on the link status sequence, node operation sequence, and alarm event sequence, establish a multi-source data splicing structure at the unified time index position, and write the corresponding values in the feature dimension position in the order of link component, node component, and alarm component to generate a communication status feature sequence.
[0008] Optionally, the step of performing a sample partitioning operation on the state representation vector sequence to generate a sample set, and performing a sample pair construction operation on the sample set to generate a positive sample pair set and a negative sample pair set includes the following steps: Vector data in the state representation vector sequence is extracted chronologically from a unified time index sequence. Vector number identifiers are written at the time index positions to form a sample index sequence. The sample index sequence is then divided into continuous vector segments with a fixed time window length. The index range is recorded at the start and end positions of the window to generate a sample set. A sample identifier record table is established for each sample segment in the sample set, recording the corresponding time index range value and vector number sequence. Two sample segments are extracted item by item from the sample identifier record table in the sample set. The vector distance between the state representation vectors is calculated within the corresponding time index range. The distance result value is written at the distance calculation position. A threshold judgment condition is established at the distance threshold position. The distance result value is compared with the distance threshold value. A positive sample pair identifier is written at the position where the distance result value is less than the distance threshold value, and a negative sample pair identifier is written at the position where the distance result value is greater than the distance threshold value. The corresponding sample number pairs are extracted from the sample identifier record table according to the positive sample pair identifiers, and the sample number combination is written at the sample pair index position to generate a positive sample pair set. Similarly, the corresponding sample number pairs are extracted from the sample identifier record table according to the negative sample pair identifiers, and the sample number combination is written at the sample pair index position to generate a negative sample pair set.
[0009] Optionally, the subspace decomposition operation performed on the state representation vector sequence to generate the fault feature subspace and the environmental feature subspace includes: reading the values of each vector component in the state representation vector sequence at the feature dimension index position; generating a component combination sequence within the feature dimension index range according to a fixed dimension division method; generating a latent variable number at each component combination position; performing a product calculation on the component values and mapping parameter values in the component combination; performing an accumulation calculation on the product result at the same latent variable number position; performing a nonlinear transformation calculation on the accumulation result; arranging the latent variable representation vectors in the latent variable number order; and arranging them in the time index order to form a latent variable representation sequence; reading the latent variable component values in the latent variable representation sequence at the feature dimension index position; performing grouping within the feature dimension index range according to the component number division method; writing the fault feature component values and the environmental feature component values at the grouping positions respectively; and arranging them in the time index order to form a fault feature subspace representation sequence and an environmental feature subspace representation sequence. At the feature dimension index position, perform combination calculation on the corresponding components in the fault feature subspace representation sequence and the environment feature subspace representation sequence, perform constraint calculation on the combination result, set threshold conditions at the constraint judgment position, perform numerical update calculation on the corresponding components at the position where the threshold conditions are not met, and form the fault feature subspace and the environment feature subspace at the position where the threshold conditions are met.
[0010] Optionally, the generation of the constraint feature representation set includes: establishing a vector number sequence in the fault feature subspace representation sequence according to the time index, establishing a clustering mapping record table at the vector number positions, establishing a cluster center parameter position set in the clustering mapping record table, and recording the number of each cluster center in the parameter position set; extracting vector data from the fault feature subspace representation sequence item by item in the time index order, performing distance calculation operations in the clustering mapping record table according to the cluster center parameter position set, writing the distance value between the vector and each cluster center at the distance record position, writing the cluster center number at the minimum distance position, updating the corresponding center vector value at the cluster center parameter position, and forming a fault prototype vector set after completing the clustering mapping calculation at all vector number positions; performing difference calculation on the cluster center vectors at adjacent time positions in the fault prototype vector set in the time index order, writing the vector difference value at the adjacent time position at the difference record position, and arranging the difference values in the time order at the difference sequence position to form a prototype drift sequence; At the feature dimension index positions, establish component correspondences between the state representation vector sequence and the environmental feature subspace representation sequence. Create an information constraint record table at each correspondence position, recording the index positions of each component. Calculate component differences for corresponding components in the information constraint record table, writing the component difference values at the difference positions, and arranging the difference values in the difference sequence positions according to component index order. Perform constraint calculations on the difference values in the information constraint record table, writing the constraint result values at the constraint parameter positions, establishing constraint threshold conditions at the constraint determination positions, writing valid identifiers at positions where constraint conditions are met, performing numerical replacement calculations on the corresponding components at invalid identifier positions, and writing the replaced values at the replacement positions. Combine the component values corresponding to the valid identifiers at the feature dimension index positions according to component number order to generate a constraint feature representation set.
[0011] Optionally, the step of performing similarity calculation operations on the positive sample pair set and the negative sample pair set to generate a contrastive loss component specifically includes: The process involves: Reading sample number combinations from the positive sample pair set item by item at the sample pair index position; extracting the corresponding state representation vector at the feature dimension index position; performing a cumulative calculation at the same index position to generate an inner product value for the state representation vector corresponding to the first sample number and the state representation vector corresponding to the second sample number in the sample number combination; performing a normalization calculation on the inner product value and the magnitude values of each vector to generate a similarity value; and writing the positive sample similarity sequence at the positive sample pair index position. Similarly, the process involves: Reading sample number combinations from the negative sample pair set item by item at the sample pair index position; extracting the corresponding state representation vector at the feature dimension index position; performing a component product calculation on the state representation vector corresponding to the first sample number and the state representation vector corresponding to the second sample number in the sample number combination; performing a cumulative calculation at the same index position to generate an inner product value; performing a normalization calculation on the inner product value and the magnitude values of each vector to generate a similarity value; and writing the negative sample similarity sequence at the negative sample pair index position. In the positive sample similarity sequence, an exponential mapping calculation is performed on each similarity value. In the negative sample similarity sequence, an exponential mapping calculation is performed on each similarity value. At the same index position, a ratio calculation is performed between the positive sample exponential value and the corresponding negative sample exponential value. The ratio value is written at the ratio calculation position. A logarithmic transformation calculation is performed on the comparison value. The transformed value is written at the logarithmic transformation position. The comparison loss components are arranged in the order of the sample pair indexes to form a comparison loss component sequence.
[0012] Optionally, performing projection decomposition on the conflicting gradients to generate a corrected gradient set includes the following steps: Extract each gradient vector from the gradient vector set item by item at the gradient index position, extract the corresponding component value at the feature dimension index position, perform component product calculation on any two gradient vectors at the same feature dimension index position, perform accumulation calculation on the same index position to generate gradient inner product value, perform sign determination on gradient inner product value at inner product determination position, and write conflict flag at the position where inner product value is less than zero; extract the first gradient vector and the second gradient vector at the conflict flag position, perform component square calculation on the second gradient vector at the feature dimension index position, perform accumulation calculation on the square result position to generate norm square value, perform the ratio of inner product value to norm square value on the first gradient vector and the second gradient vector at the projection calculation position to generate projection coefficient value, perform product calculation on each component value of the second gradient vector and the projection coefficient value at the feature dimension index position to generate projection component value; perform difference calculation on each component value of the first gradient vector and the corresponding projection component value at the feature dimension index position, write the difference result value at the difference position to generate conflict-free gradient vector, and write the updated gradient vector value at the gradient index position; At the gradient index position, perform projection decomposition operation on all gradient vectors with conflict indicators in sequence, and after all gradient vectors have been updated, arrange them in gradient index order to form a corrected gradient set.
[0013] Optionally, the step of performing parameter update operations based on the modified gradient set to generate a communication state feature representation set specifically includes: Extract the values of each parameter in the model parameter set one by one at the parameter index position, extract the gradient vectors in the modified gradient set one by one at the gradient index position, and establish the correspondence between the gradient vector component values and the parameter values at the feature dimension index position. Extract the parameter values from the feature mapping parameter set item by item at the parameter index position, perform step size coefficient product calculation on the gradient vector component values at the feature dimension index position, write the gradient scaling value at the product calculation position, perform difference calculation on the feature mapping parameter value and the corresponding gradient scaling value at the same parameter index position, and write the updated feature mapping parameter value at the difference position. At the parameter index position, the updated parameter values are arranged in parameter number order to generate an updated parameter set. Under the time index order, vector data is extracted item by item from the state representation vector sequence. At the feature dimension index position, a mapping calculation is performed between the vector component values and the updated parameter set. The calculation result value is written at the mapping calculation position. Arranged under the time index order to form a communication state feature representation set. At the time index position, a normalization calculation is performed on the communication state feature representation set in vector number order. The normalized value is written at the normalization position. Arranged under the time index order to generate a communication state feature representation set.
[0014] The beneficial effects of this invention are: (1) By establishing a unified time index structure, this invention performs alignment and splicing processing on link status data, node operation data and alarm data, forming a multi-source fusion communication status feature sequence under the same time dimension, solving the problem of inconsistent time and dispersed structure of multi-source data, maintaining the continuity and consistency of data expression in complex network environments, thereby supporting the stable execution of subsequent feature calculation and fault judgment processes.
[0015] (2) By constructing a fault feature subspace and an environmental feature subspace, the present invention separates the fault-related components and environmental interference components in the communication state features, generates a set of fault prototype vectors and a prototype drift sequence in the fault feature subspace, realizes the structured expression of fault features, maintains the feature discrimination ability in the process of dynamic network state changes, and avoids the interference of environmental changes on the fault identification process.
[0016] (3) This invention performs conflict determination and projection decomposition on the gradient vector generated by the contrast loss, corrects gradients with conflicting directions, and forms a consistent set of corrected gradients. In the parameter update process, it avoids the problem of gradient cancellation or direction shift, ensures the stability of the feature representation update process, and maintains the consistency of the convergence path in the continuous iteration process, thereby improving the reliability and consistency of the fault location results. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a communication fault location method based on contrastive learning proposed in this invention. Figure 2 This is a schematic diagram illustrating the subspace decomposition and fault prototype construction of a communication fault localization method based on contrastive learning proposed in this invention. Figure 3 This is a schematic diagram illustrating the contrastive learning and gradient conflict decomposition of a communication fault location method based on contrastive learning proposed in this invention. Detailed Implementation
[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0019] refer to Figures 1-3 A communication fault location method based on contrastive learning includes the following steps: Acquire communication network link status data, node operation data, and alarm data; establish a unified time index sequence; and generate a communication status feature sequence at the time index position. Perform vector encoding operations on the communication state feature sequence to generate a state representation vector sequence, and perform normalization processing on the state representation vector sequence to generate an initial feature representation set; Perform a sample partitioning operation on the state representation vector sequence to generate a sample set, and perform a sample pair construction operation on the sample set to generate a positive sample pair set and a negative sample pair set; Subspace decomposition operation is performed on the state representation vector sequence to generate fault feature subspace and environmental feature subspace. Clustering mapping operation is performed in the fault feature subspace to generate fault prototype vector set. Prototype drift sequence is generated in time order. Information constraint operation is performed on the state representation vector to generate constraint feature representation set. Similarity calculation is performed on the positive sample pair set and the negative sample pair set to generate a contrastive loss component. Gradient calculation is performed on the contrastive loss component to generate a gradient vector set. Direction determination is performed on the gradient vector set. Projection decomposition is performed on the conflicting gradients to generate a corrected gradient set. Based on the modified gradient set, parameter update operations are performed to generate a set of communication state feature representations; Read the set of communication status feature representations, calculate the distance value between the feature space and the set of fault prototype vectors, determine the fault type identifier at the minimum distance position, and output the fault location result at the network index position.
[0020] In this embodiment, the communication network link status data, node operation data, and alarm data specifically include: Record link connectivity status, link bandwidth usage, link latency, and link packet loss rate values at the link identifier position, and write them into the link status sequence in time index order. Record processor utilization, memory utilization, interface traffic, and device operation status identifier values at the node identifier position, and write them into the node operation sequence in time index order. Record alarm type identifier, alarm level identifier, alarm trigger time index, and alarm duration values at the alarm identifier position, and write them into the alarm event sequence in time index order. Perform a unified index alignment operation on the link status sequence, node operation sequence, and alarm event sequence, establish a multi-source data splicing structure at the unified time index position, and write the corresponding values in the feature dimension position in the order of link component, node component, and alarm component to generate a communication status feature sequence.
[0021] In this embodiment, performing a sample partitioning operation on the state representation vector sequence to generate a sample set, and performing a sample pair construction operation on the sample set to generate a positive sample pair set and a negative sample pair set includes the following steps: Vector data in the state representation vector sequence is extracted chronologically from a unified time index sequence. Vector number identifiers are written at the time index positions to form a sample index sequence. The sample index sequence is then divided into continuous vector segments with a fixed time window length. The index range is recorded at the start and end positions of the window to generate a sample set. A sample identifier record table is established for each sample segment in the sample set, recording the corresponding time index range value and vector number sequence. Two sample segments are extracted item by item from the sample identifier record table in the sample set. The vector distance between the state representation vectors is calculated within the corresponding time index range. The distance result value is written at the distance calculation position. A threshold judgment condition is established at the distance threshold position. The distance result value is compared with the distance threshold value. A positive sample pair identifier is written at the position where the distance result value is less than the distance threshold value, and a negative sample pair identifier is written at the position where the distance result value is greater than the distance threshold value. The corresponding sample number pairs are extracted from the sample identifier record table according to the positive sample pair identifiers, and the sample number combination is written at the sample pair index position to generate a positive sample pair set. Similarly, the corresponding sample number pairs are extracted from the sample identifier record table according to the negative sample pair identifiers, and the sample number combination is written at the sample pair index position to generate a negative sample pair set.
[0022] In this embodiment, performing subspace decomposition on the state representation vector sequence to generate fault feature subspace and environmental feature subspace includes: reading the values of each vector component in the state representation vector sequence at the feature dimension index position; generating a component combination sequence within the feature dimension index range according to a fixed dimension division method; generating a latent variable number at each component combination position; performing a product calculation on the component values and mapping parameter values in the component combination; performing an accumulation calculation on the product result at the same latent variable number position; performing a nonlinear transformation calculation on the accumulation result; arranging the latent variable representation vectors in the latent variable number order; and arranging them in the time index order to form a latent variable representation sequence; reading the latent variable component values in the latent variable representation sequence at the feature dimension index position; performing grouping within the feature dimension index range according to the component number division method; writing fault feature component values and environmental feature component values at the grouping positions respectively; and arranging them in the time index order to form a fault feature subspace representation sequence and an environmental feature subspace representation sequence. At the feature dimension index position, perform combination calculation on the corresponding components in the fault feature subspace representation sequence and the environment feature subspace representation sequence, perform constraint calculation on the combination result, set threshold conditions at the constraint judgment position, perform numerical update calculation on the corresponding components at the position where the threshold conditions are not met, and form the fault feature subspace and the environment feature subspace at the position where the threshold conditions are met.
[0023] In this embodiment, writing fault feature component values and environmental feature component values at the grouping positions specifically includes: The latent variable component values in the latent variable representation sequence are read within the feature dimension index range. A component attribute record table is established at the component number position, and a component attribute identifier is pre-written for each component number in the component attribute record table. The component attribute identifier is generated by the statistical results of historical samples. Marked fault samples and non-fault samples are extracted from the historical sample set respectively. The mean difference value of the component value in the two types of samples is calculated at the corresponding component number position, and the difference result is written at the difference record position. A threshold condition is set at the difference threshold position. A fault feature identifier is written at the position where the difference value is greater than the threshold, and an environmental feature identifier is written at the position where the difference value is less than or equal to the threshold. Grouping is performed at the component number index position according to the component attribute identifier. The corresponding component value is extracted at the position marked as the fault feature identifier and written into the fault feature subspace. The corresponding component value is extracted at the position marked as the environmental feature identifier and written into the environmental feature subspace. The components are arranged in time index order to form the fault feature subspace representation sequence and the environmental feature subspace representation sequence.
[0024] In this embodiment, performing combined calculations on the corresponding components in the fault feature subspace representation sequence and the environmental feature subspace representation sequence at the feature dimension index position specifically includes: reading the component values in the fault feature subspace representation sequence and the component values at the corresponding index positions in the environmental feature subspace representation sequence item by item at the feature dimension index position, and establishing a component correspondence relationship at the same feature dimension index position; At the corresponding relationship position, perform component product calculation on the fault feature component value and the environmental feature component value, and write the product result value at the product calculation position; at the same feature dimension index position, perform difference calculation on the fault feature component value and the environmental feature component value, and write the difference result value at the difference calculation position; at the combination calculation position, perform weighted accumulation calculation on the product result value and the difference result value, write the preset weight coefficient at the weight parameter position, and write the combination calculation result value at the combination result position; arrange the combination result values in the feature dimension index order to form a combination feature sequence.
[0025] In this embodiment, generating the constraint feature representation set includes: establishing a vector number sequence in the fault feature subspace representation sequence according to the time index; establishing a clustering mapping record table at the vector number positions; establishing a cluster center parameter position set in the clustering mapping record table; and recording the cluster center numbers in the parameter position set. Then, extracting vector data from the fault feature subspace representation sequence item by item in the time index order; performing distance calculation operations in the clustering mapping record table according to the cluster center parameter position set; writing the distance values between the vectors and each cluster center at the distance record positions; writing the cluster center number at the minimum distance position; updating the corresponding center vector values at the cluster center parameter positions; and forming a fault prototype vector set after completing the clustering mapping calculation at all vector number positions. Finally, performing difference calculations on the cluster center vectors at adjacent time positions in the fault prototype vector set in the time index order; writing the vector difference values at adjacent time positions at the difference record positions; and arranging the difference values in the difference sequence positions in time order to form a prototype drift sequence. Establish component correspondences between the state representation vector sequence and the environmental feature subspace representation sequence at the feature dimension index positions. Create an information constraint record table at each correspondence position, recording the index positions of each component. Perform component difference calculations on the corresponding components in the information constraint record table, writing the component difference values at the difference positions, and arranging the difference values in the component index order at the difference sequence positions. Perform constraint calculations on the difference values in the information constraint record table, writing the constraint result values at the constraint parameter positions, establishing constraint threshold conditions at the constraint determination positions, writing valid identifiers at positions where the constraint conditions are met, performing numerical replacement calculations on the corresponding components at invalid identifier positions, and writing the replaced values at the replacement positions. Combine the component values corresponding to the valid identifiers at the feature dimension index positions in the component number order to generate a constraint feature representation set.
[0026] In this embodiment, the constraint threshold condition is specifically as follows: The mean and standard deviation of the difference values are calculated at the component index position. A dynamic threshold value is generated at the threshold parameter position based on the multiple of the mean and standard deviation. The result of comparing the difference value and the dynamic threshold value is used as the constraint threshold condition at the constraint decision position. At the component index position, the difference value is compared with the corresponding dynamic threshold value. If the difference value is less than or equal to the dynamic threshold value, the constraint condition is determined to be met. If the difference value is greater than the dynamic threshold value, the constraint condition is determined to be not met.
[0027] In this embodiment, performing similarity calculation operations on the positive sample pair set and the negative sample pair set to generate a contrast loss component specifically includes: The process involves: Reading sample number combinations from the positive sample pair set item by item at the sample pair index position; extracting the corresponding state representation vector at the feature dimension index position; performing a cumulative calculation at the same index position to generate an inner product value for the state representation vector corresponding to the first sample number and the state representation vector corresponding to the second sample number in the sample number combination; performing a normalization calculation on the inner product value and the magnitude values of each vector to generate a similarity value; and writing the positive sample similarity sequence at the positive sample pair index position. Similarly, the process involves: Reading sample number combinations from the negative sample pair set item by item at the sample pair index position; extracting the corresponding state representation vector at the feature dimension index position; performing a component product calculation on the state representation vector corresponding to the first sample number and the state representation vector corresponding to the second sample number in the sample number combination; performing a cumulative calculation at the same index position to generate an inner product value; performing a normalization calculation on the inner product value and the magnitude values of each vector to generate a similarity value; and writing the negative sample similarity sequence at the negative sample pair index position. In the positive sample similarity sequence, an exponential mapping calculation is performed on each similarity value. In the negative sample similarity sequence, an exponential mapping calculation is performed on each similarity value. At the same index position, a ratio calculation is performed between the positive sample exponential value and the corresponding negative sample exponential value. The ratio value is written at the ratio calculation position. A logarithmic transformation calculation is performed on the comparison value. The transformed value is written at the logarithmic transformation position. The comparison loss components are arranged in the order of the sample pair indexes to form a comparison loss component sequence.
[0028] In this embodiment, performing cumulative calculations at the same index position to generate the inner product value specifically includes: Extract the corresponding component values of the first state representation vector and the second state representation vector item by item at the feature dimension index position. Perform component product calculation on the two component values at the same feature dimension index position and write the product result value at the product position. Perform cumulative calculation on all product result values within the feature dimension index range and write the summation result value at the cumulative position. The summation result value is used as the inner product value.
[0029] In this embodiment, performing projection decomposition on the conflicting gradients to generate a corrected gradient set includes the following steps: Extract each gradient vector from the gradient vector set item by item at the gradient index position, extract the corresponding component value at the feature dimension index position, perform component product calculation on any two gradient vectors at the same feature dimension index position, perform accumulation calculation on the same index position to generate gradient inner product value, perform sign determination on gradient inner product value at inner product determination position, and write conflict flag at the position where inner product value is less than zero; extract the first gradient vector and the second gradient vector at the conflict flag position, perform component square calculation on the second gradient vector at the feature dimension index position, perform accumulation calculation on the square result position to generate norm square value, perform the ratio of inner product value to norm square value on the first gradient vector and the second gradient vector at the projection calculation position to generate projection coefficient value, perform product calculation on each component value of the second gradient vector and the projection coefficient value at the feature dimension index position to generate projection component value; perform difference calculation on each component value of the first gradient vector and the corresponding projection component value at the feature dimension index position, write the difference result value at the difference position to generate conflict-free gradient vector, and write the updated gradient vector value at the gradient index position; At the gradient index position, perform projection decomposition operation on all gradient vectors with conflict indicators in sequence, and after all gradient vectors have been updated, arrange them in gradient index order to form a corrected gradient set.
[0030] In this embodiment, extracting the first gradient vector and the second gradient vector at the conflict marker location specifically includes: At the gradient index position, each gradient vector in the gradient vector set is read in a preset order, and a gradient number sequence is established at the gradient number position. When combining any two gradient vectors at the same index position, the gradient vector with the smaller number in the gradient number sequence is determined as the first gradient vector, and the gradient vector with the larger number in the gradient number sequence is determined as the second gradient vector. At the conflict mark position, the component values of the first gradient vector and the second gradient vector are extracted according to the corresponding gradient number.
[0031] In this embodiment, generating a communication state feature representation set by performing parameter update operations based on the modified gradient set specifically includes: Extract the values of each parameter in the model parameter set one by one at the parameter index position, extract the gradient vectors in the modified gradient set one by one at the gradient index position, and establish the correspondence between the gradient vector component values and the parameter values at the feature dimension index position. Extract the parameter values from the feature mapping parameter set item by item at the parameter index position, perform step size coefficient product calculation on the gradient vector component values at the feature dimension index position, write the gradient scaling value at the product calculation position, perform difference calculation on the feature mapping parameter value and the corresponding gradient scaling value at the same parameter index position, and write the updated feature mapping parameter value at the difference position. At the parameter index position, the updated parameter values are arranged in parameter number order to generate an updated parameter set. Vector data is extracted item by item from the state representation vector sequence in time index order. At the feature dimension index position, a mapping calculation is performed between the vector component values and the updated feature mapping parameter set. The calculation result is written at the mapping calculation position, and arranged in time index order to form a communication state feature representation set. At the time index position, a normalization calculation is performed on the communication state feature representation set in vector number order. The normalized value is written at the normalization position, and arranged in time index order to generate a communication state feature representation set.
[0032] In this embodiment, the fault types include: At the locations where the link connectivity status value, link latency value, and link packet loss rate value corresponding to the link identifier position meet the threshold judgment conditions, mark the link interruption fault type identifier; at the locations where the link latency value corresponding to the link identifier position exceeds the latency threshold, mark the link high latency fault type identifier; at the locations where the link packet loss rate value corresponding to the link identifier position exceeds the packet loss threshold, mark the link packet loss fault type identifier; at the locations where the processor utilization rate value corresponding to the node identifier position exceeds the processing threshold, mark the node overload fault type identifier; at the locations where the memory utilization rate value corresponding to the node identifier position exceeds the memory threshold, mark the node resource abnormality fault type identifier; at the locations where the interface traffic value corresponding to the interface identifier position exceeds the traffic threshold, mark the interface congestion fault type identifier; at the locations where the alarm type identifier value and alarm level identifier value corresponding to the alarm identifier position meet the judgment conditions, mark the device abnormality fault type identifier.
[0033] Example 1: To verify the feasibility of this invention in practice, it was applied to a large-scale communication network operating environment. In this environment, the network consists of multiple communication links and multiple operating nodes. During long-term operation, these links and nodes experience problems such as link latency fluctuations, increased packet loss rates, and abnormal node resource usage. Because the link status data, node operation data, and alarm data come from different sources and have different time granularities, traditional methods struggle to accurately determine fault locations, often resulting in misjudgments and delayed localization. In this scenario, the link status data, node operation data, and alarm data are first processed with a unified time index, aligning data from different sources on the same time axis to form a communication status feature sequence at the time index position. Subsequently, the communication status feature sequence undergoes vector encoding, mapping values such as link latency, packet loss rate, bandwidth usage, and node resource usage to a unified structured state representation vector. Normalization eliminates dimensional differences, making data from different dimensions comparable. During sample construction, the state representation vector within a continuous time window is divided into multiple sample segments. By calculating the vector distance between samples, sample segments with high similarity are constructed as positive sample pairs, and sample segments with large differences are constructed as negative sample pairs. In the feature decomposition stage, the state representation vector is decomposed into a fault feature subspace and an environmental feature subspace. This concentrates information such as link anomalies and node anomalies in the fault feature subspace, while separating environmental fluctuation factors into the environmental feature subspace, thereby reducing interference. During model optimization, similarity calculation is performed on positive and negative sample pairs to generate a contrastive loss. During gradient calculation, gradients with conflicting directions are identified, and conflicting gradients are corrected through projection decomposition to maintain consistency in parameter updates. After multiple iterations, a stable set of communication state feature representations is generated. Finally, the distance between each state representation and the fault prototype vector is calculated in the feature space, and the fault type and location are determined using the minimum distance principle. Verification through actual operating data shows that within a continuous operating cycle, this invention can effectively identify various fault types such as link interruption, high link latency, and node overload, maintaining high positioning accuracy under complex network state changes.
[0034] Table 1: Comparison of Communication Fault Location Results
[0035] As shown in Table 1, the method of this invention exhibits stable and significant advantages in both location accuracy and response time across different types of communication fault scenarios. In link interruption scenarios, the traditional method achieves an accuracy of 82%, while this invention reaches 96%, a difference of 14 percentage points. Simultaneously, the location time is controlled at approximately 120ms, indicating that this invention can quickly complete feature matching and fault determination in cases of sudden and distinctive faults. In high-latency link scenarios, the traditional method achieves an accuracy of 78%, while this invention reaches 94%, an improvement of 16 percentage points. This demonstrates that when handling continuously changing fault characteristics, this invention can effectively capture abnormal trends through feature sequence comparison.
[0036] In link packet loss scenarios, the traditional method achieved an accuracy of 80%, while this invention achieved 95%, an improvement of 15 percentage points. The location time was 128ms, remaining within a stable range, indicating that this invention can maintain high recognition capability even under frequent network quality fluctuations. In node overload scenarios, the traditional method achieved an accuracy of 76%, while this invention achieved 93%, an improvement of 17 percentage points, the largest improvement among all tests. This demonstrates that by centrally expressing resource occupancy-related features through subspace decomposition, it can effectively distinguish between load changes and actual fault states. In interface congestion scenarios, this invention achieved an accuracy of 94%, an improvement of 15 percentage points compared to the traditional method's 79%, while the location time was approximately 130ms, with a relatively small fluctuation range.
[0037] Overall, statistical results show that across the five test sets, the average accuracy of this invention reached 94.4%, while the average accuracy of the traditional method was 79%, representing an overall improvement of approximately 15.4 percentage points. Regarding positioning time, all test results for this invention fell within the range of 120ms to 142ms, with a maximum fluctuation of no more than 22ms, indicating that the processing of this invention exhibits consistency and stability under different fault types and network load conditions. In contrast, traditional methods often result in positioning times exceeding 160ms or even significant fluctuations in complex scenarios, demonstrating greater stability in response consistency.
[0038] Further analysis reveals that the unified time index structure for multi-source data ensures that different data sources are represented at the same time scale, avoiding misjudgments caused by data misalignment; the subspace decomposition mechanism separates fault features from environmental features, making key features more concentrated; and the contrastive loss and gradient conflict handling mechanism ensure that the model's update direction is consistent during iteration, thus forming a stable feature representation structure after multiple rounds of training. Based on the above data and analysis results, it can be seen that this invention has high practical value in complex communication network environments.
[0039] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A communication fault location method based on contrastive learning, characterized in that, Includes the following steps: Acquire communication network link status data, node operation data, and alarm data; establish a unified time index sequence; and generate a communication status feature sequence at the time index position. Perform vector encoding operations on the communication state feature sequence to generate a state representation vector sequence, and perform normalization processing on the state representation vector sequence to generate an initial feature representation set; Perform a sample partitioning operation on the state representation vector sequence to generate a sample set, and perform a sample pair construction operation on the sample set to generate a positive sample pair set and a negative sample pair set; Subspace decomposition operation is performed on the state representation vector sequence to generate fault feature subspace and environmental feature subspace. Clustering mapping operation is performed in the fault feature subspace to generate fault prototype vector set. Prototype drift sequence is generated in time order. Information constraint operation is performed on the state representation vector to generate constraint feature representation set. Similarity calculation is performed on the positive sample pair set and the negative sample pair set to generate a contrastive loss component. Gradient calculation is performed on the contrastive loss component to generate a gradient vector set. Direction determination is performed on the gradient vector set. Projection decomposition is performed on the conflicting gradients to generate a corrected gradient set. Based on the modified gradient set, parameter update operations are performed to generate a set of communication state feature representations; Read the set of communication status feature representations, calculate the distance value between the feature space and the set of fault prototype vectors, determine the fault type identifier at the minimum distance position, and output the fault location result at the network index position.
2. The communication fault location method based on contrastive learning according to claim 1, characterized in that, The communication network link status data, node operation data, and alarm data specifically include: Record link connectivity status, link bandwidth usage, link latency, and link packet loss rate values at the link identifier position, and write them into the link status sequence in time index order. Record processor utilization, memory utilization, interface traffic, and device operation status identifier values at the node identifier position, and write them into the node operation sequence in time index order. Record alarm type identifier, alarm level identifier, alarm trigger time index, and alarm duration values at the alarm identifier position, and write them into the alarm event sequence in time index order. Perform a unified index alignment operation on the link status sequence, node operation sequence, and alarm event sequence, establish a multi-source data splicing structure at the unified time index position, and write the corresponding values in the feature dimension position in the order of link component, node component, and alarm component to generate a communication status feature sequence.
3. The communication fault location method based on contrastive learning according to claim 2, characterized in that, The step of performing sample partitioning operations on the state representation vector sequence to generate a sample set, and performing sample pair construction operations on the sample set to generate a positive sample pair set and a negative sample pair set includes the following steps: Vector data in the state representation vector sequence is extracted chronologically from a unified time index sequence. Vector number identifiers are written at the time index positions to form a sample index sequence. The sample index sequence is then divided into continuous vector segments with a fixed time window length. The index range is recorded at the start and end positions of the window to generate a sample set. A sample identifier record table is established for each sample segment in the sample set, recording the corresponding time index range value and vector number sequence. Two sample segments are extracted item by item from the sample identifier record table in the sample set. The vector distance between the state representation vectors is calculated within the corresponding time index range. The distance result value is written at the distance calculation position. A threshold judgment condition is established at the distance threshold position. The distance result value is compared with the distance threshold value. A positive sample pair identifier is written at the position where the distance result value is less than the distance threshold value, and a negative sample pair identifier is written at the position where the distance result value is greater than the distance threshold value. The corresponding sample number pairs are extracted from the sample identifier record table according to the positive sample pair identifiers, and the sample number combination is written at the sample pair index position to generate a positive sample pair set. Similarly, the corresponding sample number pairs are extracted from the sample identifier record table according to the negative sample pair identifiers, and the sample number combination is written at the sample pair index position to generate a negative sample pair set.
4. The communication fault location method based on contrastive learning according to claim 3, characterized in that, The step of performing subspace decomposition on the state representation vector sequence to generate fault feature subspace and environmental feature subspace includes: reading the values of each vector component in the state representation vector sequence at the feature dimension index position; generating a component combination sequence within the feature dimension index range according to a fixed dimension division method; generating a latent variable number at each component combination position; performing a product calculation on the component values and mapping parameter values in the component combination; performing an accumulation calculation on the product result at the same latent variable number position; performing a nonlinear transformation calculation on the accumulation result; arranging the latent variable representation vectors in the latent variable number order; and arranging them in the time index order to form a latent variable representation sequence; reading the latent variable component values in the latent variable representation sequence at the feature dimension index position; performing grouping within the feature dimension index range according to the component number division method; writing fault feature component values and environmental feature value values at the grouping positions respectively; and arranging them in the time index order to form a fault feature subspace representation sequence and an environmental feature subspace representation sequence. At the feature dimension index position, perform combination calculation on the corresponding components in the fault feature subspace representation sequence and the environment feature subspace representation sequence, perform constraint calculation on the combination result, set threshold conditions at the constraint judgment position, perform numerical update calculation on the corresponding components at the position where the threshold conditions are not met, and form the fault feature subspace and the environment feature subspace at the position where the threshold conditions are met.
5. The communication fault location method based on contrastive learning according to claim 4, characterized in that, The generation of the constraint feature representation set includes: establishing a vector number sequence in the fault feature subspace representation sequence according to the time index; establishing a clustering mapping record table at the vector number positions; establishing a cluster center parameter position set in the clustering mapping record table; and recording the cluster center numbers in the parameter position set; extracting vector data from the fault feature subspace representation sequence item by item in the time index order; performing distance calculation operations in the clustering mapping record table according to the cluster center parameter position set; writing the distance values between the vectors and each cluster center at the distance record positions; writing the cluster center number at the minimum distance position; updating the corresponding center vector values at the cluster center parameter positions; and forming a fault prototype vector set after completing the clustering mapping calculation at all vector number positions; performing difference calculations on the cluster center vectors at adjacent time positions in the fault prototype vector set in the time index order; writing the vector difference values at adjacent time positions at the difference record positions; and arranging the difference values in the difference sequence positions in time order to form a prototype drift sequence. At the feature dimension index positions, establish component correspondences between the state representation vector sequence and the environmental feature subspace representation sequence. Create an information constraint record table at each correspondence position, recording the index positions of each component. Calculate component differences for corresponding components in the information constraint record table, writing the component difference values at the difference positions, and arranging the difference values in the difference sequence positions according to component index order. Perform constraint calculations on the difference values in the information constraint record table, writing the constraint result values at the constraint parameter positions, establishing constraint threshold conditions at the constraint determination positions, writing valid identifiers at positions where constraint conditions are met, performing numerical replacement calculations on the corresponding components at invalid identifier positions, and writing the replaced values at the replacement positions. Combine the component values corresponding to the valid identifiers at the feature dimension index positions according to component number order to generate a constraint feature representation set.
6. The communication fault location method based on contrastive learning according to claim 5, characterized in that, The process of performing similarity calculations on the positive sample pair set and the negative sample pair set to generate a contrast loss component specifically includes: The process involves: Reading sample number combinations from the positive sample pair set item by item at the sample pair index position; extracting the corresponding state representation vector at the feature dimension index position; performing a cumulative calculation at the same index position to generate an inner product value for the state representation vector corresponding to the first sample number and the state representation vector corresponding to the second sample number in the sample number combination; performing a normalization calculation on the inner product value and the magnitude values of each vector to generate a similarity value; and writing the positive sample similarity sequence at the positive sample pair index position. Similarly, the process involves: Reading sample number combinations from the negative sample pair set item by item at the sample pair index position; extracting the corresponding state representation vector at the feature dimension index position; performing a component product calculation on the state representation vector corresponding to the first sample number and the state representation vector corresponding to the second sample number in the sample number combination; performing a cumulative calculation at the same index position to generate an inner product value; performing a normalization calculation on the inner product value and the magnitude values of each vector to generate a similarity value; and writing the negative sample similarity sequence at the negative sample pair index position. In the positive sample similarity sequence, an exponential mapping calculation is performed on each similarity value. In the negative sample similarity sequence, an exponential mapping calculation is performed on each similarity value. At the same index position, a ratio calculation is performed between the positive sample exponential value and the corresponding negative sample exponential value. The ratio value is written at the ratio calculation position. A logarithmic transformation calculation is performed on the comparison value. The transformed value is written at the logarithmic transformation position. The comparison loss components are arranged in the order of the sample pair indexes to form a comparison loss component sequence.
7. The communication fault location method based on contrastive learning according to claim 6, characterized in that, The step of performing projection decomposition on the conflicting gradients to generate a corrected gradient set includes the following steps: Extract each gradient vector from the gradient vector set item by item at the gradient index position, extract the corresponding component value at the feature dimension index position, perform component product calculation on any two gradient vectors at the same feature dimension index position, perform accumulation calculation on the same index position to generate gradient inner product value, perform sign determination on gradient inner product value at inner product determination position, and write conflict flag at the position where inner product value is less than zero; extract the first gradient vector and the second gradient vector at the conflict flag position, perform component square calculation on the second gradient vector at the feature dimension index position, perform accumulation calculation on the square result position to generate norm square value, perform the ratio of inner product value to norm square value on the first gradient vector and the second gradient vector at the projection calculation position to generate projection coefficient value, perform product calculation on each component value of the second gradient vector and the projection coefficient value at the feature dimension index position to generate projection component value; perform difference calculation on each component value of the first gradient vector and the corresponding projection component value at the feature dimension index position, write the difference result value at the difference position to generate conflict-free gradient vector, and write the updated gradient vector value at the gradient index position; At the gradient index position, perform projection decomposition operation on all gradient vectors with conflict indicators in sequence, and after all gradient vectors have been updated, arrange them in gradient index order to form a corrected gradient set.
8. The communication fault location method based on contrastive learning according to claim 7, characterized in that, The step of performing parameter update operations based on the modified gradient set to generate a communication state feature representation set specifically includes: Extract the values of each parameter in the model parameter set one by one at the parameter index position, extract the gradient vectors in the modified gradient set one by one at the gradient index position, and establish the correspondence between the gradient vector component values and the parameter values at the feature dimension index position. Extract the parameter values from the feature mapping parameter set item by item at the parameter index position, perform step size coefficient product calculation on the gradient vector component values at the feature dimension index position, write the gradient scaling value at the product calculation position, perform difference calculation on the feature mapping parameter value and the corresponding gradient scaling value at the same parameter index position, and write the updated feature mapping parameter value at the difference position. At the parameter index position, the updated parameter values are arranged in parameter number order to generate an updated parameter set. Under the time index order, vector data is extracted item by item from the state representation vector sequence. At the feature dimension index position, a mapping calculation is performed between the vector component values and the updated parameter set. The calculation result value is written at the mapping calculation position. Arranged under the time index order to form a communication state feature representation set. At the time index position, a normalization calculation is performed on the communication state feature representation set in vector number order. The normalized value is written at the normalization position. Arranged under the time index order to generate a communication state feature representation set.