Node fault diagnosis algorithm for wireless sensor networks based on BN and WSN

Wireless sensor networks, as an emerging information exchange technology, have been widely applied in many fields. However, nodes tend to become damaged in harsh and complex environmental conditions. In order to effectively diagnose node faults, a Bayesian model-based node fault diagnosis model was proposed. Firstly, a comprehensive analysis was conducted into the operative principles of wireless sensor systems, whereby fault-related features were then extrapolated. A Bayesian diagnostic model was constructed using the maximum likelihood method with sufficient sample features, and a joint tree model was introduced for node diagnosis. Due to the insufficient accuracy of Bayesian models in processing small sample data, a constrained maximum entropy method was proposed as the prediction module of the model. The use of small sample data to obtain the initial model parameters leads to improved performance and accuracy of the model. During parameter learning tests, the limited maximum entropy model outperformed the other two learning models on a smaller dataset of 35 with a distance value of 2.65. In node fault diagnosis, the diagnostic time of the three models was compared, and the average diagnostic time of the proposed diagnostic model was 41.2 seconds. In the node diagnosis accuracy test, the proposed model has the highest node fault diagnosis accuracy, with an average diagnosis accuracy of 0.946, which is superior to the other two models. In summary, the node fault diagnosis model based on Bayesian model proposed in this study has important research significance and practical application value in wireless sensor networks. By improving the reliability and maintenance efficiency of the network, this model provides strong support for the development and application of wireless sensor networks.


Introduction
In the era of data informatization, data collection is one of the main ways to obtain information.Wireless sensor networks have been widely used in many fields due to their advantages such as low cost, strong adaptability, and small size.However, in complex and harsh environments, WSN nodes are prone to damage, such as node energy depletion, node hardware damage, etc. [1].These faults can hinder the functionality of nodes and reduce the efficiency of the entire system.In order to help system administrators, detect node failures in a timely manner, it is necessary to take timely measures to repair or replace nodes.The traditional rule-based sensor fault detection method uses predefined rules and thresholds to determine whether a node has failed [2].Based on rules and threshold methods, when the output value of a sensor exceeds a certain threshold or is not within a predetermined range, it is considered that the sensor has failed.These rules and thresholds are usually based on experience or expert knowledge.In addition, there are also fault detection methods based on pattern matching.This method establishes a statistical model by analyzing historical data and prior knowledge, and determines whether a node has faults by calculating the probability of each type of fault.The fault diagnosis effect of this technology is average, but the diagnostic efficiency is poor [3].At present, machine learning has good applications in the field of sensor fault node diagnosis.For example, the latest machine learning fault diagnosis method adopts a data-driven approach, which identifies fault patterns by analyzing a large amount of data [4].
Compared with traditional methods, it does not rely on predefined rules and thresholds, has higher automation capabilities, and has higher diagnostic accuracy [5].However, data-driven node diagnosis methods are not suitable for low data feature scenarios and harsh scenarios.Therefore, an improved Bayesian network (BN) node fault diagnosis model is innovatively proposed.This study analyzed the working principle of wireless sensor networks, extracted node fault features, constructed a Bayesian diagnostic model using maximum likelihood method, and introduced a joint tree model to jointly achieve node diagnosis.However, Bayesian models face the problem of insufficient accuracy when dealing with small data.Therefore, this study also proposes a method of constraining maximum entropy as the prediction module of the model, which obtains the initial parameters of the model through small data, thereby improving the performance of the model.The proposed diagnostic technology can detect and diagnose node faults in a timely manner, ensuring the stability and reliability of the system.The research content provides technical reference for fault diagnosis and prevention of wireless sensor network nodes.
The research content is divided into four sections.The first introduces the application and effectiveness of WSN technology in different fields, and discusses and analyzes the relevant cutting-edge technologies of machine learning in WSN node fault diagnosis.The second analyzes the types and characteristics of WSN node faults, introduces machine learning for constructing a node fault diagnosis model, and optimizes the training problem under small data of the model.The third is to apply the mentioned technology to specific scenarios and verify the application effect of the proposed fault diagnosis model in actual node fault diagnosis.The fourth summarizes and analyzes the entire article, and elaborates on the improvement direction of the research.

Related work
WSN is a distributed sensor network and a brand-new platform for information data acquisition.Currently, WSN technology is widely used in medical, industrial manufacturing, military and other fields.Chowdhury et al. found that WSN has been promoted in a large number of scenarios, but nodes are limited, but some regions cannot effectively replace node batteries.It is necessary to introduce a duty cycle method to reduce nodes and achieve node energy conservation.The technology proposed after testing has good energy-saving effects and is suitable for different fields [6].Jamshed et al. conducted a study on optimizing system performance through WSN node design.Through the analysis and definition of nodes, the application of WSN technology in various scenarios was discussed, and the actual deployment effect of WSN technology was improved through analysis of different technologies.By examining the relationship between WSN technology and its ability to meet the demands of future network technology progress [7].To solve the energy consumption problem of WSN nodes, Verma et al. used cluster routing strategy to optimize nodes, and selected intelligent clustering method to optimize the scheduling of the entire transportation system, so as to improve node energy efficiency and security.Through testing, the node energy consumption has been significantly improved, while the system security has been significantly improved compared to the original system [8].
Singh et al. found that WSN deployment is limited by energy factors.To address energy issues, they proposed an energy harvesting method; This method adjusts and optimizes the system by utilizing multiple power sources.Subsequently, through experimental analysis, the proposed approach improved the sensor performance in different scenarios, lowered the cost of WSN usage, and enhanced the system's stability [9].Keerthika et al. conducted research on existing WSN technology, which is widely used in medical, military, transportation, and other environments.However, the growing deployment of WSN technology is amplifying the severity of network security concerns.To address the security risks associated with WSN deployment and improve the communication effectiveness of WSN technology in unmanned scenarios, research was conducted on active and passive defense technologies in WSN scenarios, and relevant experiments were conducted.Through testing, it has been shown that selecting appropriate system defense technologies in different scenarios will improve the communication security of WSN and ensure the effectiveness of WSN technology usage [10].
WSN technology is prone to node failures in largescale deployment, and machine learning technology has a large number of applications in WSN fault diagnosis.Vazhuthi et al. conducted research on existing IoT systems and widely used WSN technology under the IoT, but the limited impact of battery energy hindered the deployment of WSN technology.To address the above issues, a clustering scheme is introduced in the design of WSN systems.Considering the impact of faulty nodes on WSN performance, a hybrid crawling method is adopted to optimize the problem.Subsequently, the proposed solution is assessed on 1000 nodes, with the final test indicating that the suggested method significantly minimizes system energy usage [11].Liu Y and others proposed a edge computing for industrial IoT, which also adapts to the development of the industrial IoT.However, implementation challenges such as network attacks and privacy concerns have led to costly communication expenses.In this regard, an efficient communication and privacy enhanced asynchronous security framework for edge computing in the Internet of Things is proposed.Firstly, an asynchronous model update scheme was introduced to reduce the computational time for edge nodes to wait for global model aggregation.Secondly, based on an asynchronous local differential privacy mechanism, this mechanism improves communication efficiency and alleviates gradient leakage attacks by adding carefully designed noise to the gradients of edge nodes.Experimental testing has demonstrated this technology's exceptional safety and stability advantages.However, the scale of complex data nodes was not considered, and further optimization is needed in the later stage [12] The experimental results show that it has excellent classification and diagnostic performance, but the convergence and accuracy of Bayesian networks still need to be improved [13].
Wireless sensor network technology has been widely applied in many fields due to its advantages of low energy consumption, small size, and high performance.The above research analyzes the application scenarios and effects of wireless sensors.At the same time, different sensor fault diagnosis techniques were introduced based on the characteristics of the sensors.Although the above research has proposed various diagnostic techniques for sensor faults, sensors are susceptible to environmental interference, especially in scenarios such as insufficient data, which poses significant limitations.Therefore, a fault diagnosis algorithm for wireless sensor networks based on BN and WSN is proposed to adapt to more complex sensor fault diagnosis environments and provide important insights for identifying and managing faults in WSN technology.

Construction of node fault diagnosis model in view of BN and WSN
This section mainly analyzes the types of WSN node faults and constructs a fault mathematical model.Meanwhile, this study introduces BN network to construct fault diagnosis.Considering the impact of the dataset on the diagnostic model, an improved diagnostic model is developed with the inclusion of constrained maximum entropy.

Analysis of WSN node fault characteristics
The WSN system is composed of a large number of sensor nodes, gateways, and information centers.Among them, the sensor nodes have a primary responsibility to monitor physical characteristic information such as temperature and pressure of system nodes, and these data will be transported to the coordinator service station, and ultimately uniformly input into information processing [14].The basic framework of the entire WSN system is shown in Fig. 1.In the WSN system, the sensor node area, it can serve as the monitoring area of the system.In the monitoring area, each sensor node module is very susceptible to external environmental influences, leading to node failures [15].It can be seen that wireless sensor systems collect environmental information through sensors.Various sensors record data information from which fault features can be extracted.In the research, the main consideration is to use physical quantities measured by sensors, such as temperature, humidity, and light intensity, as feature extraction objects.The main extracted fault features include multiple faults, bias faults, fixed faults, etc.In order to effectively analyze node sensor faults, the sensor node monitoring signals are converted, and the mathematical model is expressed as eq.( 1) [16].
In eq. ( 1), α 0 represents sensor bias; α 1 represents the amplification factor of the sensor; r(t) represents the actual collected value; ε(t) represents the error value.It conducts research on common fault problems of WSN nodes, and the main fault characteristics of sensor module faults include multiple faults, bias faults, fixed faults, and insufficient accuracy faults [17].Using a constant output value as a reference, it performs fault analysis on the module.The fixed fault expression is shown in eq. ( 2). (1) In eq. ( 2), β 0 (t) represents the output value.The analysis of bias faults is mainly determined by the current and voltage, as shown in eq. ( 3).
For multiple faults, it is necessary to judge the sensor circuit, mainly due to drift issues, and mainly analyze the growth mode of sensor data; The expression is shown in eq. ( 4).
For the issue of accuracy degradation, sensors usually have a threshold range, and below a certain standard value, it can be determined that the aging of the parts is causing the decrease in sensor accuracy.After analyzing the sensor module fault, the analysis of the power module fault is usually in view of the power supply voltage to determine whether the power module is faulty.Figure 2 illustrates the three voltage levels [18]. (3) The first level is the normal working voltage, and the second level is the incomplete voltage; Some sensor nodes are limited in operation, while the third type is at an inoperable voltage, making the entire WSN system inoperable.After considering the power module failure, it is necessary to continue analyzing the communication module failure, which is also one of the most prone places for the entire system to malfunction.Communication failures need to be considered from two aspects, one is the reception of communication data, and the other is the transmission of data [19].Communication data receiving is mainly for sensors to obtain the required data from other nodes.Whether there is an error can be established based on the ratio between the ideal and actual values.Through comparison, it can be concluded whether there is a fault in the current WSN system communication.The state model is shown in eq. ( 5).
(5) In eq. ( 5), T represents the signal sampling period; C r represents receiving data in an ideal state; T r is the receiving observation time; C i represents the received data in the observation state.If the r value is large and the numerical fluctuation is small, then the current data reception is normal, otherwise there is a fault.The analysis of communication data transmission faults is similar to that of reception, and judgment is made by comparing the ideal value with the actual value, as expressed in eq. ( 6).
In eq. ( 5), T represents the signal sampling period; K T represents sending data in an ideal state; K j represents the data sent out during the observation period; T s represents the observation duration.Similarly, if the s-value of the data sent by the node communication is large and the fluctuation is small, it indicates that the data transmission is normal, and vice versa, there is a fault.Finally, this section presents a comprehensive analysis of the central processing module faults in WSN.High temperature is identified as one of the most pervasive faults.Due to excessively high ambient temperature, the operating temperature of the node exceeds its normal operating range, resulting in a processor frequency reduction of the node and causing performance degradation or restart.

Construction of node fault diagnosis model in
Structural learning is necessary for obtaining logical relationships between variables in a specific domain when using the BN model.Structural learning is the process of optimizing the structure of a model through a large amount of modeling data.To reduce computational complexity and improve efficiency, sparsity research is usually used to solve the problem of Bayesian structure learning.The set of variables is shown in eq. ( 7).
In eq. ( 7), X i represents the i-th variable; In the BN model, the variable node X i of the node has r i × q i parameters and forms an r i × q i -dimensional matrix, represented by the Node Probability Table (NPT) of the variable node X i .Meanwhile, if the variable distribution is discrete, its child node and parent node have different Conditional probability Table (CPT) values.The goal of the study is to find an optimal network structure G, so that the Conditional probability distribution in the structure meets the requirements of the study.This study uses the constraint set Ω to represent the constraint conditions for network structure G [20].This study can use different evaluation criteria to measure the quality of structural fitting,, such as using the Bayesian Information Criterion, as shown in eq. ( 8).
In formula (8), L(D| G) represents the Likelihood function value of dataset D under given network structure G; k represents the number of parameters in the network structure G; n represents the sample size of dataset D.Then, parameter learning is a process of solving the Conditional probability distribution function corresponding to BN structure through prior knowledge and sample data.In this study, P(X i | Pa(X i )) is assumed to represent (7 the Conditional probability distribution of variable X i given its parent node set Pa(X i ).The goal of parameter learning is to estimate the parameters for each conditional probability distribution.In BN model, its assumption has some prior knowledge and sample data D, and research can estimate Conditional probability distribution through Posterior probability probability.The Posterior probability can be expressed as shown in Formula (9).
In eq. ( 9), P(θ| G, Ω) represents the prior distribution of the parameter; P(D| θ, G, Ω) represents the Likelihood function of dataset D; P(D| G, Ω) represents the Marginal likelihood of dataset D with a given network structure.After structural and parameter learning, the BN model can be used to predict the distribution probability of faulty nodes.This study assumes that node X i represents a possible faulty node, which can obtain the Conditional probability distribution P(X i | Pa(X i )) of node X through BN model.The hypothesis posits that the study possesses a predetermined set of input observations, as shown in eq. ( 10).
In eq. ( 10), e j represents the observed value of group j.This study can calculate the predicted probability distribution of node X i , as shown in eq.(11).
In eq. ( 11), X i ) represents the probability of observing input data E at node X i ; P(X i ) is the Prior ( 9) probability of node X i ; P(E) represents the probability of observing input data E. In actual node prediction, effective inference needs to be made in view of the distribution results to effectively diagnose node faults.The BN model utilizes two primary forms of reasoning, as shown in Fig. 4.
Considering the characteristics of node faults, it is necessary to accurately locate the fault type, while possessing the characteristics of low energy consumption and high efficiency.Therefore, the joint tree method is the preferred method of inference for the model.This study defines the two adjacent nodes of the joint tree as C i and C j , defines the interval set between the two as S sepi, j , and defines the corresponding potential functions of the two adjacent nodes as c i and c j .Firstly, it updates c j as shown in eq. ( 12).
In eq. ( 12), L mev represents cluster likelihood.Next, it calculates the message received by S sepi, j , as shown in eq. ( 13).
Then, c j absorbs the message, as shown in eq. ( 14).
The training fault feature samples are fed into the joint Tree model, which results in the node fault condition being obtained through the aforementioned reasoning process.This process leads to the diagnosis of node sensor fault, power fault, central processor fault and other problems.( Fig. 4 BN model reasoning method

Construction of node fault diagnosis model in view of improved data BN
In WSN node fault detection, obtaining detailed fault sample features is difficult due to external uncertainty factors, resulting in various types of node faults.In order to solve the problem of complex and small feature data, a Constrained Data Maximum Entropy (CDME) training method is proposed to apply to the BN model inference process and construct a CM-BN node fault diagnosis model.In BN networks, the conditional probability between nodes is estimated through observed data.However, on small-scale datasets, the conditional probabilities between nodes may be inaccurate, resulting in unreliable inference results for BN.To address this problem, the CDME method adds constraints to improve accuracy.Specifically, CDME can utilize prior or domain knowledge to introduce constraints to ensure that the estimated probability distribution meets expectations.
The improved CM-BN node fault diagnosis process is shown in Fig. 5.
To solve the problem of insufficient fault diagnosis in small feature datasets using BN model, CDME model is introduced as an inference model to solve the problem of small feature datasets.Firstly, the fault characteristics of the small data nodes are analyzed to determine the initial training parameters of the BN model [21].Meanwhile, the diagnostic model diagnosis constraint conditions are obtained through the node fault diagnosis expert experience knowledge base, and a candidate set of fault parameters with constraints is generated; Then it uses the CDME model idea to conduct weighted calculations, optimizing the training information of the BN.The definition of p * ∈ C with the maximum entropy H(p) in the CDME model can be described using a mathematical model, as shown in eq. ( 15).In eq. ( 15), C represents the set of distributions that meet the probability requirements.In the model, p * can also be represented by a conditional distribution, as shown in eq. ( 16).
In eq. ( 16), x and y both represent events that occur under random variables; p(y| x) represents conditional distribution, and its mathematical measurement is obtained through Conditional entropy.In constructing a model, it is crucial to choose the maximum entropy model to achieve recognition and analysis of sample data features.Also, during model construction, there is no need to take into account the prior distribution of the data, as it has no effect on the consistency of model estimation.Meanwhile, the BN model parameter smoothing problem will be optimized during model construction.When constructing the maximum entropy model, it is necessary for the BN parameter to meet the Ω-constraint set requirements.This study defines T reference candidate sets that satisfy the constraints of expert knowledge.Given the idea of the CDME model, the reference selection set is likely to have probability approximating the (15) p * = arg max true BN model parameters.Consequently, this enables the inference of small data feature samples.The incorporation of the model's prior facilitates the BN model's ability to achieve improved node fault diagnosis in smaller datasets.It determines whether the T candidate reference set is less than 1, and when it is less than 1, it can output the final trained BN learning parameters, as shown in eq. ( 17).
In eq. ( 17), θ B ijk (�) represents the candidate set of con- strained parameters after parameter expansion; θ * ijk (S) represents the initial parameters obtained from the calculation of small sample feature diagnostic data; a represents the weight factor.In the training of the CDME model, when a = 0 is set, the value of T is 1, and the sample parameters are consistent with the BN training parameters in the sufficient state.When the value of a is large, expert constraints have an impact on model training and optimize the impact of small dataset training on model accuracy.

Simulation testing of node fault diagnosis model
This section mainly verifies the application effect of the proposed node fault diagnosis model in practical scenarios, and creates an experimental running environment.The key metrics for testing encompass parameter learning proficiency, diagnostic time utilization, diagnostic accuracy, etc.

Parameter learning performance analysis
In order to verify the performance of the proposed fault diagnosis model, experimental testing will be conducted on the Windows 10 64 bit platform, and simulation experimental analysis will be completed on the Matlab platform.Additionally, node fault data will be collected in the real operating setting of wireless sensor networks via on-site observation, system recording, and other methods.The system obtains fault data by monitoring the operating status of nodes, collecting error logs or fault reports, and other methods.Then, organize and extract these data to obtain a fault dataset.To create a training data set for the model, different types of node faults are selected, while the first 300 data sets are considered sufficient.The initialization parameters of the experimental model are shown in Table 1.
In the experiment, the CDME model, the Quality Maximum Posterior (QMAP) model and the Maximum likelihood estimation (MLE) model were selected to learn the node parameters.To effectively evaluate the effectiveness (17 of the BN model parameter construction, the KL distance in Bayesian models was introduced in the experiment to reflect the model construction accuracy.The smaller the KL distance value, the higher the accuracy of the model construction was.The learning node parameters under the small dataset are shown in Fig. 6 for the KL distance training results of the three models.Figures 6 (a), (b), and (c) represent the KL distance box plots of MLE, QMAP, and CDME models, respectively.The results demonstrate that increasing the dataset for feature learning leads to a gradual decline in training KL distance.The worst performing model is the MLE model, with a KL distance of 2.65 when the dataset is 35; The QMAP model performs second, with a KL distance of 1.65 when the data is 35; The CDME model outperforms the others with a KL distance of 0.65 for a data of 35.It compares the KL distance between the real parameters and the CPT parameters, as shown in Fig. 7.
Figures 7(a) and (c) show the KL distance results for small and sufficient datasets, respectively.The CDME model outperforms the other models in small datasets.When the dataset is 35, the KL distances of MLE, QMAP, and CDME models are 2.65, − 1.65, and − 9.65, respectively.The CDME model demonstrates a more apparent advantage in the comparison of adequate group data.At lower data levels, the CDME model is significantly superior to the other two models.However, when the dataset reaches 300, the learning parameter ability of the MLE model is significantly improved.The KL distances for the MLE, QMAP, and CDME models on the 300 dataset are − 9.65, − 1.65, and − 9.86, respectively.The CPT of two types of scale data node learning is statistically analyzed, as shown in Table 2.
In Table 2, the CDME model performed best among the 8 node CPTs by selecting small data feature sets and sufficient feature sets for parameter learning; In small datasets, the MLE model's KL distance for parameter learning is relatively large, while the KL distance of CDME and QMAP is significantly smaller, with more obvious advantages; And the CDME model is closer to the standard CPT.In a large and sufficient dataset, the sample size increases and the accuracy of the MLE model

Experimental analysis node fault diagnosis
The experiment for diagnosing node faults continues to use the same computer configuration and includes 35   9.
Figures 9(a) and (b) show the test results under small and sufficient datasets, respectively.As iterations increase in small datasets, diagnostic loss progressively decreases to reach convergence values.The loss values for RBF, BN, and CM-BN are 0.116, 0.085, and 0.075, respectively.The RBF model has significant losses and diagnostic losses.In the recombination data testing, the RBF model showed significant improvement in loss, with a loss of 0.062 during convergence, 0.032 for BN and 0.023 for CM-BN models, respectively.It is noticeable that CM-BN has the lowest loss in fault diagnosis and the best performance in loss interruption.It selects 500 nodes to test the diagnostic effectiveness of different models, as shown in Fig. 10.
Figures 10(a  To evaluate the actual diagnostic effectiveness of various methods, specific fault types were used as detection benchmarks with sufficient data sets, as depicted in Table 3.
Table 3 shows the diagnostic results under different actual faults.Among the three types of node faults, the proposed CM-BN model has the best comprehensive judgment effect.Among the 100 validation faults, the accurate number of comprehensive judgments is above 90, surpassing other approaches.At the same time, the actual fault diagnosis performance of the three models was tested, and the CM-BN model was also significantly better than the other two, with fault diagnosis results higher than 93.01% in all three nodes.These results demonstrate that the proposed approach excels in fault detection performance.

Conclusion
In complex and harsh environments, WSN nodes are prone to damage, including node energy depletion and hardware damage.These failures can lead to nodes being unable to function properly and reduce the performance of the entire system.To promptly address WSN node faults, a BN network is examined to create

Fig. 1 Fig. 2
Fig. 1 Basic framework of WSN system view of BN Node faults have uncertainty and complexity.To effectively diagnose node faults, Bayesian network (BN) is introduced for diagnosis; This model effectively handles uncertain data and accurately detects common node faults in WSN systems.The entire WSN node fault diagnosis process is shown in Fig. 3.(

Fig. 6 Fig. 7
Fig. 6 KL distance training results of three models Figures 9(a) and (b) show the test results under small and sufficient datasets, respectively.As iterations increase in small datasets, diagnostic loss progressively decreases to reach convergence values.The loss values for RBF, BN, and CM-BN are 0.116, 0.085, and 0.075, respectively.The RBF model has significant losses and diagnostic losses.In the recombination data testing, the RBF model showed significant improvement in loss, with a loss of 0.062 during convergence, 0.032 for BN and 0.023 for CM-BN models, respectively.It is noticeable that CM-BN has the lowest loss in fault diagnosis and the best performance in loss interruption.It selects 500 nodes to test the diagnostic effectiveness of different models, as shown in Fig.10.Figures10(a), (b), and (c) show the diagnostic results of RBF, BN, and CM-BN models, respectively.From the diagnostic data, it can be seen that the RBF model has significant fluctuations during diagnosis, with an average diagnostic accuracy of 0.756.The BN model has less overall fluctuation in diagnosis compared to the RBF model, with an average diagnostic accuracy of 0.821.The best model for node fault diagnosis is the CM-BN model, which boasts an average diagnostic accuracy of 0.946 and minimal fluctuations.It demonstrates that the proposed CM-BN model has good fault diagnosis performance.

Fig. Comparison of consumptionFig. 9
Fig. Comparison of consumption

a
model for diagnosing node faults.Firstly, it studies the common fault characteristics and problems of nodes and constructs a fault model.Then it constructs a node fault model for BN and introduces a joint tree for diagnostic inference.Considering the impact of a small dataset on parameter learning, this study introduces the CDME model for parameter learning to optimize model diagnosis.In the parameter learning test, sufficient datasets were selected for testing.The KL distances of the MLE, QMAP, and CDME models on the 300 dataset were − 9.65, − 1.65, and − 9.86, respectively.The CDME model utilized in this study displayed improved parameter learning.In the model fault diagnosis testing, the diagnostic time of three diagnostic models was tested.The average time of RBF model, BN model, and CM-BN model was 75.8 seconds, 49.6 seconds, and 41.2 seconds, respectively.The proposed CM-BN model performed better in fault node diagnosis efficiency.Meanwhile, the study selected 500 fault nodes to test the diagnostic accuracy of the model, and the RBF model had the worst diagnostic accuracy, with significant fluctuations in the diagnostic process, with an average diagnostic accuracy of 0.756.The BN model and CM-BN model have better diagnostic stability, with an average diagnostic accuracy of 0.821 and 0.946, respectively.It illustrates that the proposed fault diagnosis model performs better in stability, time consumption, and fault diagnosis accuracy, meeting the fault diagnosis requirements of WSN nodes.While the node fault diagnosis model introduced in this study demonstrates relative superiority concerning stability, time consumption, and diagnostic accuracy, enhancing the diagnostic effectiveness of the model may be achievable through enlarging the dataset and incorporating more comprehensive expert databases in future research.

Table 1
Model initial parameters

Table 2
CPT for node parameter learning There are three types of situations where fault diagnosis is time-consuming, as indicated by the horizontal axis representing the number of learning iterations and the red dashed line marking the annotated value.Within 60 seconds, it indicates that the fault diagnosis is within the annotated time range and meets the requirements.The RBD model takes more than 60 seconds for 7, 12, and 15 learning cycles; Overall comparison, both the BR model and the CM-BN model are within 60 seconds, with an average time consumption of 49.6 seconds and 41.2 seconds, respectively.The proposed CM-BN model is overall better.Meanwhile, two scale datasets were selected for testing the model's ability to diagnose losses, as shown in Fig.

10
Fault diagnosis accuracy under 500 nodes

Table 3
Comparison of Fault Diagnosis Effects for Different Node Types