Hydropower station bus communication quality evaluation method, equipment, medium and product
By constructing a four-dimensional evaluation index system and improving the random forest model, and combining the multi-dimensional characteristics of the hydropower station bus and the environmental interference weight, the problem of multi-protocol adaptability and environmental adaptability in hydropower station bus communication quality assessment was solved, and high-precision, real-time communication quality assessment was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THREE GORGES JINSHAJIANG CHUANYUN HYDROPOWER DEV CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies cannot conduct comprehensive bus communication quality assessments in the multi-protocol and harsh environment of hydropower stations. They suffer from problems such as single assessment indicators, failure to incorporate protocol semantic characteristics, poor environmental adaptability, and insufficient multi-protocol adaptation, resulting in one-sided assessment results, high misjudgment rate, and low accuracy.
A four-dimensional evaluation index system is constructed, which combines the time-frequency domain characteristics of the physical layer, the statistical characteristics of the link layer, the semantic characteristics of the application layer, and the interference characteristics of the environmental layer. An attention mechanism and an improved random forest model are adopted to dynamically adjust the feature weights, adapt to the strong electromagnetic interference and temperature and humidity fluctuations of hydropower stations, and realize in-depth hidden danger investigation of multi-protocol buses.
It achieves high-precision, real-time communication quality assessment at hydropower station sites with a low false positive rate. It can identify protocol layer anomalies and environmental interference, adapt to multiple protocol scenarios, and meet the real-time monitoring requirements for instantaneous link loss.
Smart Images

Figure CN121924040A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial bus communication quality assessment technology, specifically to a method, equipment, medium, and product for assessing the bus communication quality of a hydropower station. Background Technology
[0002] The statements in this section are provided only as background information in connection with this disclosure and may not constitute prior art.
[0003] With the deepening of intelligent transformation of hydropower stations, fieldbus systems have become the core data transmission carrier connecting distributed sensors, actuators, PLC controllers, and upper-level monitoring systems, undertaking key tasks such as acquiring unit operating parameters, exchanging equipment control commands, and transmitting fault alarm signals. Currently, the bus protocols widely deployed in hydropower stations include industrially common Modbus RTU / TCP, Profibus DP, and CANopen, as well as SDI12 specifically for hydrological monitoring, forming a complex network architecture with multiple protocols coexisting and optoelectronic hybrid transmission.
[0004] Communication quality is a core indicator for ensuring the stable operation of a hydropower station's bus system, directly impacting the accuracy of equipment collaborative control and operational safety. For example, excessive Profibus DP bus communication delays can lead to lag in the generator speed control system's response, excessive Modbus RTU bus error rates can cause distortion of hydrological monitoring data, and lost CANopen bus frames may trigger malfunctions in switching equipment. Therefore, real-time and accurate assessment of hydropower station bus communication quality and timely detection of potential communication vulnerabilities are crucial technical supports for ensuring the safe and stable operation of hydropower stations.
[0005] However, the hydropower station environment has significant unique characteristics: ① Strong electromagnetic interference: the operation of generator sets, frequency converters, and high-voltage equipment generates high-frequency electromagnetic radiation, which can easily lead to bus signal distortion; ② Large fluctuations in environmental parameters: there are significant temperature and humidity differences between the dam area and the powerhouse (-20~70℃, relative humidity 30%~95%), affecting signal transmission characteristics; ③ Coexistence of multiple protocols: different protocols have significant differences in frame structure, baud rate, and transmission media, making it difficult to unify evaluation standards; ④ Complex link types: including multiple transmission media such as RS485 electrical links, Ethernet electrical links, and fiber optic links. These unique characteristics place stringent requirements on bus communication quality assessment technology: it must balance multi-protocol compatibility, environmental interference resistance, comprehensiveness of evaluation indicators, and accuracy of results.
[0006] Current industrial bus communication quality assessment technologies are mainly divided into three categories: assessment methods based on a single physical layer indicator, assessment methods based on link layer protocol parameters, and dedicated assessment methods based on a single protocol. However, none of these methods can fully adapt to the complex scenarios of multi-protocol and harsh environments in hydropower stations. The specific shortcomings are as follows: (1) The evaluation indicator system is too simplistic and lacks sufficient coverage. Existing technologies often focus on single-dimensional indicators at the physical or data link layers (such as bit error rate, signal amplitude, and frame loss rate), failing to cover application layer protocol semantic characteristics and environmental interference factors. For example, some methods judge communication quality solely based on bit error rate, ignoring the impact of application layer indicators such as "protocol interaction success rate" and "data integrity" on control command transmission; they also fail to quantify the coupled impact of environmental factors such as strong electromagnetic interference in hydropower stations and temperature and humidity fluctuations on communication quality, resulting in one-sided evaluation results that cannot fully reflect the actual operating status of the bus.
[0007] (2) The assessment lacks specificity due to the failure to consider the semantic characteristics of the protocol. Different bus protocols have significantly different frame structures, function code definitions, and verification mechanisms. Existing evaluation methods mostly use general indicators (such as baud rate deviation and signal rise time) and do not design evaluation dimensions based on protocol semantic characteristics. For example, the impact of CRC check errors in the Modbus RTU protocol and parity check errors in the Profibus DP protocol on communication quality has different weights, but existing methods do not differentiate between them. Furthermore, they fail to extract semantic features such as "percentage of abnormal function codes" and "number of address code matching errors," making it difficult to identify hidden communication risks caused by protocol-layer anomalies.
[0008] (3) Poor environmental adaptability and weak anti-interference ability Existing evaluation methods are mostly validated in ideal laboratory environments, failing to consider the impact of on-site environmental factors such as strong electromagnetic interference and temperature and humidity fluctuations at hydropower stations on the evaluation models. For example, strong electromagnetic interference can cause physical layer signal amplitude drift, leading to misjudgments by evaluation methods based on fixed thresholds; temperature and humidity changes can affect fiber optic link transmission loss, and existing models do not incorporate environmental compensation mechanisms, resulting in decreased evaluation accuracy and measurement errors exceeding 8% in on-site environments.
[0009] (4) Insufficient multi-protocol adaptability and poor universality Existing evaluation methods are mostly designed for single protocols (such as dedicated CANopen evaluation tools and Modbus-specific analyzers), employing fixed feature extraction and evaluation model parameters, which cannot adapt to the scenario of multiple protocols coexisting in hydropower stations. For example, the evaluation model suitable for Modbus TCP cannot be directly applied to the SDI12 protocol due to differences in frame structure; the baud rate ranges (9.6kbps~1Gbps) of different protocols vary greatly, and the sampling rate and parameters of existing feature extraction algorithms cannot be adaptively adjusted, resulting in a significant reduction in evaluation accuracy in multi-protocol scenarios.
[0010] (5) The evaluation model has weak generalization ability and insufficient dynamic adaptability. Existing evaluation models mostly employ traditional machine learning algorithms (such as basic SVM and BP neural networks), which are not optimized for the non-stationarity and time-varying nature of hydropower station bus signals, resulting in poor adaptability to dynamic scenarios such as sudden electromagnetic interference and instantaneous link loss. For example, basic BP neural networks are prone to getting trapped in local optima and are not sensitive to slight communication quality degradation under low bit error rates; the model parameters are fixed and cannot be dynamically adjusted according to the bus operating status, resulting in insufficient generalization ability.
[0011] Current research both domestically and internationally focuses on multi-protocol adaptation and feature fusion, but significant shortcomings remain: domestic research largely concentrates on optimizing evaluation metrics for single protocols (such as the Modbus RTU bit error rate evaluation method disclosed in CN202410234567.8), failing to achieve multi-dimensional feature fusion and environmental adaptation; while international research (such as the industrial bus evaluation technology published in IEEE Transactions on Industrial Electronics) incorporates some time-frequency domain features, it does not integrate protocol semantic characteristics and lacks anti-interference mechanisms designed for the strong electromagnetic environment of hydropower stations. Therefore, developing a high-precision communication quality evaluation method that adapts to multi-protocol scenarios in hydropower stations, integrates multi-dimensional features, and resists environmental interference has become a key direction for technological breakthroughs. Summary of the Invention
[0012] The purpose of this invention is to address the shortcomings of existing technologies, such as single evaluation indicators, lack of integration with protocol semantics, poor environmental adaptability, and insufficient multi-protocol compatibility. This invention provides a method, equipment, medium, and product for evaluating the quality of bus communication in hydropower stations. It constructs a four-dimensional evaluation indicator system covering the entire link and environmental factors, enabling accurate and real-time evaluation of communication quality in multi-protocol scenarios. This system is adapted to the harsh environment of hydropower stations, characterized by strong electromagnetic fields and fluctuating temperature and humidity, providing a scientific basis for the operation and maintenance optimization of bus systems.
[0013] The technical solution of the present invention is as follows: A method for evaluating the quality of bus communication in a hydropower station includes: Collect physical layer signals, protocol frame data, and environmental monitoring data near the bus link of the hydropower station fieldbus; Based on the collected data, physical layer time-frequency domain features, link layer statistical features, application layer semantic features, and environmental layer interference features are extracted to construct the original multidimensional feature set. The original multidimensional feature set is subjected to feature dimensionality reduction, and an attention mechanism is used to dynamically assign weights to the dimensionality-reduced features to obtain a fused feature matrix. An improved random forest evaluation model is constructed, and an environmental interference weight coefficient is calculated based on the environmental layer interference characteristics. The voting weight of the decision tree in the improved random forest evaluation model is then corrected using the environmental interference weight coefficient. The fused feature matrix is input into the improved random forest evaluation model, and the evaluation results of the hydropower station bus communication quality are output.
[0014] Furthermore, the extraction of physical layer time-frequency domain features specifically includes the following steps: The acquired physical layer signals are preprocessed by detrending and normalization to eliminate baseline drift and amplitude differences; The db4 wavelet is selected as the base wavelet. The number of wavelet packet decomposition layers is adaptively adjusted according to the baud rate of the bus protocol to decompose the preprocessed physical layer signal and obtain wavelet packet coefficients of 2N nodes. Among them, N is the number of decomposition layers. When the baud rate is less than or equal to 1 Mbps, N=4; when the baud rate is between 1 Mbps and 100 Mbps, N=5; when the baud rate is greater than 100 Mbps, N=6. For the wavelet packet coefficients of each node, the energy value, entropy value, peak factor and kurtosis are calculated respectively, and the calculation results of all nodes are combined to form the time-frequency domain features of the physical layer.
[0015] Furthermore, the extraction of the link layer statistical features, application layer semantic features, and environment layer interference features specifically includes: The link layer statistical features include: mean bit error rate, maximum bit error rate, bit error rate variance, mean frame loss rate, mean transmission delay, and mean delay jitter within the statistical window; The steps for extracting the semantic features of the application layer are as follows: the MBAP header and PDU data segment of the bus frame data are parsed by the protocol parsing module to extract the protocol interaction success rate, the proportion of abnormal function codes, data integrity, distribution of abnormal function code types, and frame type distribution. The environmental interference characteristics include: electromagnetic interference intensity level, temperature deviation, humidity deviation, and environmental interference change rate; wherein, the environmental interference change rate includes the second-level change in electromagnetic interference intensity and the minute-level change in temperature.
[0016] Furthermore, the step of performing feature dimensionality reduction on the original multidimensional feature set and dynamically assigning weights to the dimensionality-reduced features using an attention mechanism specifically includes the following steps: Construct the original feature matrix, calculate the eigenvalues and eigenvectors of its covariance matrix, and sort the eigenvalues from largest to smallest; A variance contribution threshold is introduced, and the top k feature vectors whose cumulative variance contribution rates satisfy the variance contribution threshold are selected to construct a projection matrix, which maps the original feature matrix into a dimension-reduced feature matrix; wherein, the variance contribution threshold is set to 0.95; The dimensionality-reduced feature matrix is processed using a multi-head attention mechanism: First, a linear transformation is performed on the dimensionality-reduced feature matrix to obtain the query matrix Q, the key matrix K, and the value matrix V; then, the attention score is calculated using the following formula:
[0017] in: For query matrix dimensions; Finally, the results of the multi-head parallel computation are concatenated and subjected to linear transformation to obtain the fused feature matrix.
[0018] Furthermore, the construction of the improved random forest evaluation model includes the following steps: The number of decision trees in the random forest, as well as the maximum depth and minimum number of sample splits for each decision tree, are determined by grid search. The Bootstrap sampling method is used to randomly sample from the training set to construct a training subset for each decision tree; During training, each decision tree randomly selects a preset proportion of fused features to participate in node splitting; Define environmental interference weighting coefficient The calculation formula is:
[0019] in: Electromagnetic interference intensity level; Temperature deviation; Humidity deviation; , , These are preset weighting coefficients; The step of using the environmental disturbance weight coefficient to correct the voting weights of decision trees in the improved random forest evaluation model specifically refers to correcting the original voting weights of each decision tree to the environmental disturbance weight coefficient. .
[0020] Furthermore, the number of decision trees is set to 120, the maximum depth of each decision tree is set to 15, and the minimum number of sample splits is set to 10; the preset weight coefficients are as follows: , , .
[0021] Furthermore, following the evaluation results of the output hydropower station bus communication quality, the following are also included: Based on the scores corresponding to the evaluation results, the communication quality is divided into four levels: excellent, good, satisfactory, and unsatisfactory. When the evaluation result is qualified or unqualified, maintenance suggestions are generated based on the percentage of abnormal function codes and frame loss rate in the application layer semantic features; the maintenance suggestions include targeted inspection prompts or immediate shutdown and maintenance instructions.
[0022] The present invention also proposes an electronic device, comprising: At least one processor; and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the instructions stored in the memory to perform the method described above.
[0023] The present invention also proposes a computer-readable storage medium for storing instructions that, when executed, cause the method described above to be implemented.
[0024] The present invention also proposes a computer program product, which implements the above-described method when executed by a processor.
[0025] Compared with existing technologies, the advantages of this invention are: 1. A comprehensive evaluation index system has been constructed, significantly improving the comprehensiveness and accuracy of the evaluation. This invention breaks through the single-dimensional evaluation mode of existing technologies, which are limited to physical layer signal quality or link layer bit error rate. It innovatively constructs a four-dimensional evaluation index system of "physical layer-link layer-application layer-environment layer". By integrating the time-frequency domain details of the physical layer, the statistical regularities of the link layer, the semantic interaction logic of the application layer, and the interference data of the environment layer, the health status of the communication link can be comprehensively captured. Experimental data shows that the evaluation accuracy of this invention reaches over 98.5%, and the false positive rate is controlled below 1.2%, effectively solving the problems of one-sided evaluation and high false negative rate of traditional methods.
[0026] 2. An environmental interference weight correction mechanism is introduced, greatly enhancing the model's robustness in harsh environments. Addressing the unique environment of hydropower station sites, characterized by strong electromagnetic interference and drastic temperature and humidity fluctuations, this invention introduces an environmental interference weight coefficient into the random forest algorithm. By quantifying the impact of electromagnetic interference intensity, temperature deviation, and humidity deviation on communication quality in real time, the voting weights of the decision tree are dynamically adjusted, establishing an environmental compensation mechanism. This effectively overcomes the physical layer signal amplitude drift caused by strong electromagnetic interference and the fiber optic link loss error caused by temperature and humidity changes, ensuring that the system maintains high-precision evaluation capabilities even in harsh scenarios such as near generator units and dam corridors.
[0027] 3. By deeply integrating protocol semantics and adaptive feature extraction, this invention enables in-depth vulnerability screening for multi-protocol buses. It not only focuses on signal-level transmission quality but also delves into the application layer to analyze the semantic features of protocols such as Modbus and PROFIBUS DP (e.g., the percentage of abnormal function codes and protocol interaction success rates), enabling the identification of hidden communication vulnerabilities caused by protocol configuration errors and logical conflicts. Simultaneously, it employs a wavelet packet transform algorithm based on baud rate adaptive adjustment of the decomposition layer number, effectively adapting to the signal characteristics of different bus protocols from low-speed RS485 to high-speed fiber optic Ethernet, solving the problem of poor versatility in multi-protocol scenarios in existing technologies.
[0028] 4. The feature fusion strategy has been optimized, balancing evaluation accuracy and real-time performance. By improving the PCA dimensionality reduction algorithm, redundant information in high-dimensional features (such as the correlation between time-frequency domain energy and entropy) is eliminated. Furthermore, a multi-head attention mechanism is used to dynamically redistribute weights for key features (such as protocol semantics and strong interference features), enhancing the contribution of key features to the evaluation results. Comparative tests show that the average evaluation time of this invention is only 41ms, which is approximately 67% shorter than existing technologies, meeting the real-time monitoring and rapid response requirements of hydropower station bus systems for sudden faults such as instantaneous link losses. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in the embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0030] Figure 1 A flowchart of a method for evaluating the quality of bus communication in a hydropower station; Figure 2 This is a diagram illustrating the structure of the four-dimensional evaluation index system. Figure 3 A flowchart for multidimensional feature extraction and fusion; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0031] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0032] The features and performance of the present invention will be further described in detail below with reference to embodiments.
[0033] Example 1 This embodiment proposes a method for evaluating the quality of bus communication in hydropower stations. The method consists of five steps: "construction of a four-dimensional evaluation index system, multi-dimensional feature extraction, feature fusion optimization, construction of an improved random forest evaluation model, and output of evaluation results and generation of operation and maintenance suggestions". The method realizes a full-link evaluation process of "data acquisition → feature extraction → fusion optimization → model evaluation → result application".
[0034] In this embodiment, it should be noted that the construction process of the four-dimensional evaluation index system is as follows: Based on the characteristics of bus communication and operation and maintenance requirements of hydropower stations, a four-dimensional evaluation index system of "physical layer - link layer - application layer - environment layer" is constructed. The indicators and quantification methods of each dimension are as follows: (1) Physical layer indicators (reflecting the physical characteristics of signal transmission) Indicator 1: Signal amplitude deviation ( The difference between the actual acquired signal amplitude and the standard amplitude is defined as the percentage of the difference between the actual acquired signal amplitude and the standard amplitude. The quantification formula is: ; in, The peak value (V) of the acquired signal. This refers to the standard amplitude of the protocol (e.g., RS485 standard amplitude ±2V, CAN standard amplitude ±1.5V).
[0035] Indicator 2: Signal-to-noise ratio (SNR) is calculated using the power spectral density method. The quantization formula is as follows: in, Signal power (W). The noise power (W) is calculated after separating the signal and noise through wavelet packet decomposition.
[0036] Indicator 3: Signal rise time ( The amplitude of a signal is defined as the time (ns) for the signal to rise from 10% amplitude to 90% amplitude, reflecting the steepness of signal transmission and directly affecting the timing synchronization accuracy.
[0037] Indicator 4: Optical power fluctuation ( (For optical links) Quantization formula: in, This represents the real-time optical power (dBm). The average optical power (dBm) over 10 seconds.
[0038] (2) Link layer indicators (reflecting the reliability of data link transmission) Indicator 5: Bit Error Rate (BER) The value of erroneous bits is defined as the ratio of the number of bits transmitted to the total number of bits transmitted. The quantization formula is: in, Number of error bits The total number of transmitted bits is calculated using protocol frame check codes (CRC, parity check).
[0039] Metric 6: Frame Drop Rate ( The ratio of lost frames to total sent frames is defined as follows: in, The number of lost frames (determined by the continuity of frame sequence numbers). This represents the total number of frames sent.
[0040] Indicator 7: Transmission delay ( The time difference (ms) is defined as the time difference between when a signal is sent from the transmitter and when it is received by the receiver, and is calculated synchronously using timestamps.
[0041] Indicator 8: Delay jitter ( The standard deviation of transmission delay over 100 consecutive frames is defined as follows: in, Let be the transmission delay of the i-th frame. The average transmission delay is 100 frames.
[0042] (3) Application layer metrics (reflecting the effectiveness of protocol semantic interaction) Metric 9: Protocol Interaction Success Rate ( The ratio of normal response frames to total request frames is defined as follows: in, This represents the number of normal response frames (function code matching, data format correct). This represents the total number of request frames.
[0043] Indicator 10: Percentage of abnormal function codes ( The value is defined as the ratio of the number of abnormal function code frames to the total number of transmitted frames. The quantization formula is: in, The number of frames for which the function code is undefined or unsupported. This represents the total number of transmitted frames.
[0044] Indicator 11: Data Integrity ( () is defined as the percentage of valid data fields, quantified by the following formula: in, Valid data field length (in bytes). The total length of the frame data segment (in bytes).
[0045] (4) Environmental layer indicators (reflecting the degree of on-site environmental interference) Index 12: Electromagnetic interference intensity ( The data is collected by an electromagnetic interference sensor, with the unit being V / m, and quantified into 5 levels (Level 1: ≤10V / m; Level 2: 10~50V / m; Level 3: 50~100V / m; Level 4: 100~200V / m; Level 5: >200V / m).
[0046] Indicator 13: Temperature Deviation ( Quantification formula: in, The real-time temperature is (°C). The standard operating temperature is 25℃.
[0047] Indicator 14: Humidity Deviation ( Quantification formula: in, Real-time relative humidity (%) Standard operating humidity (60%).
[0048] Please see Figure 1-3 A method for evaluating the quality of bus communication in a hydropower station, specifically including the following steps: Collect physical layer signals, protocol frame data, and environmental monitoring data near the bus link of the hydropower station fieldbus; Based on the collected data, physical layer time-frequency domain features, link layer statistical features, application layer semantic features, and environmental layer interference features are extracted to construct the original multidimensional feature set. The original multidimensional feature set is subjected to feature dimensionality reduction, and an attention mechanism is used to dynamically assign weights to the dimensionality-reduced features to obtain a fused feature matrix. An improved random forest evaluation model is constructed, and an environmental interference weight coefficient is calculated based on the environmental layer interference characteristics. The voting weight of the decision tree in the improved random forest evaluation model is then corrected using the environmental interference weight coefficient. The fused feature matrix is input into the improved random forest evaluation model, and the evaluation results of the hydropower station bus communication quality are output.
[0049] In this embodiment, specifically, the physical layer time-frequency domain feature extraction (based on wavelet packet transform) addresses the non-stationary characteristics of the hydropower station bus signal caused by electromagnetic interference. It employs wavelet packet transform to achieve refined time-frequency domain decomposition, specifically including the following steps: The acquired physical layer signals (voltage / optical power signals) are preprocessed with detrending and normalization to eliminate baseline drift and amplitude differences. ,in, The original signal, The mean of the signal. The standard deviation of the signal; The db4 wavelet is selected as the base wavelet. The number of wavelet packet decomposition layers is adaptively adjusted according to the baud rate of the bus protocol to decompose the preprocessed physical layer signal, resulting in wavelet packet coefficients of 2N nodes. Here, N is the number of decomposition layers: N=4 when the baud rate is less than or equal to 1Mbps, N=5 when the baud rate is between 1Mbps and 100Mbps, and N=6 when the baud rate is greater than 100Mbps. That is, the db4 wavelet is selected as the base wavelet for wavelet packet decomposition, and the number of decomposition layers is adaptively adjusted according to the baud rate of the bus protocol: 4 layers for baud rates ≤ 1Mbps, 5 layers for 1Mbps~100Mbps, and 6 layers for > 100Mbps. After decomposition, 2N nodes are obtained. N Wavelet packet coefficients of each node (N is the number of decomposition levels); For each node's wavelet packet coefficients, the energy value, entropy value, peak factor, and kurtosis are calculated separately. The calculation results of all nodes are combined to form the physical layer's time-frequency domain features; that is, feature extraction calculates four types of features for each node's wavelet packet coefficients: energy value, entropy value, peak factor, and kurtosis, extracting a total of 4×2 features. N One time-frequency domain feature.
[0050] Energy value calculation: ,in, For the first The coefficient sequence number of each node; Entropy calculation: in, (Probability distribution).
[0051] In this embodiment, specifically, the extraction of the link layer statistical features, application layer semantic features, and environment layer interference features includes: The link layer statistical features include: mean bit error rate, maximum bit error rate, bit error rate variance, mean frame loss rate, mean transmission delay, and mean delay jitter within the statistical window; The steps for extracting the semantic features of the application layer are as follows: the MBAP header and PDU data segment of the bus frame data are parsed by the protocol parsing module to extract the protocol interaction success rate, the proportion of abnormal function codes, data integrity, distribution of abnormal function code types, and frame type distribution. The environmental interference characteristics include: electromagnetic interference intensity level, temperature deviation, humidity deviation, and environmental interference change rate; wherein, the environmental interference change rate includes the second-level change in electromagnetic interference intensity and the minute-level change in temperature.
[0052] Specifically, the link-layer statistical feature extraction is based on link-layer indicator statistics within 10 seconds, extracting 6 types of statistical features: Mean bit error rate Maximum bit error rate Bit error rate variance Mean frame loss rate Mean transmission delay (T_delay_avg), mean delay jitter .
[0053] Specifically, application-layer semantic feature extraction involves parsing bus frame data through the protocol parsing module to extract five types of semantic features: Protocol interaction success rate , percentage of abnormal function codes Data integrity Distribution of abnormal function code types (e.g., percentage of undefined function codes, percentage of unsupported function codes) and distribution of frame types (percentage of request frames / response frames / broadcast frames).
[0054] Specifically, environmental interference feature extraction involves collecting data from environmental sensors deployed near the bus link and extracting four types of environmental features: Electromagnetic Interference Intensity Level Temperature deviation , humidity deviation , Environmental interference change rate (such as the change in electromagnetic interference intensity within 1 second, the change in temperature within 1 minute).
[0055] In this embodiment, specifically, the step of performing feature dimensionality reduction on the original multidimensional feature set and dynamically assigning weights to the dimensionality-reduced features using an attention mechanism includes the following steps: Construct the original feature matrix X (m×n, where m is the number of samples and n is the number of original features), and calculate the eigenvalues of its covariance matrix. With feature vectors And sort the eigenvalues from largest to smallest; specifically, the covariance matrix ; Introducing a variance contribution threshold θ, the top k eigenvectors whose cumulative variance contribution rates satisfy the threshold are selected to construct a projection matrix U(n×k), mapping the original feature matrix to a dimensionality-reduced feature matrix; wherein, the variance contribution threshold is set to 0.95; that is, satisfying... The original feature matrix is mapped to a dimensionality-reduced feature matrix X' = XU by the projection matrix, resulting in k principal component features (k≤n / 3, significantly reducing the feature dimension). The multi-head attention mechanism is used to process the dimensionality-reduced feature matrix X': First, a linear transformation is performed on the dimensionality-reduced feature matrix X' to obtain the query matrix Q, the key matrix K, and the value matrix V:
[0056] Then, the attention score is calculated, and the formula for calculating the attention score is:
[0057] in: For query matrix dimensions; The Softmax function normalizes the score to [0,1]. Finally, the results of the multi-head parallel computation are concatenated and linearly transformed to obtain the fused feature matrix F:
[0058] In this embodiment, specifically, constructing the improved random forest evaluation model includes the following steps: The number of decision trees in the random forest, as well as the maximum depth and minimum number of sample splits for each decision tree, are determined by grid search. The Bootstrap sampling method is used to randomly sample samples from the training set to construct a training subset for each decision tree; specifically, in this embodiment, 70% of the samples are randomly sampled from the training set to construct a training subset for each decision tree. During training, each decision tree randomly selects a preset proportion of fusion features to participate in node splitting; specifically, each decision tree randomly selects 60% of the fusion features to participate in training. Define environmental interference weighting coefficient The calculation formula is:
[0059] in: Electromagnetic interference intensity level (1~5); Temperature deviation; Humidity deviation; , , These are preset weight coefficients, obtained by fitting the training data; The step of using the environmental disturbance weight coefficient to correct the voting weights of decision trees in the improved random forest evaluation model specifically refers to correcting the original voting weights of each decision tree to the environmental disturbance weight coefficient. .
[0060] In this embodiment, specifically, the number of decision trees is set to 120 (to avoid overfitting and underfitting), the maximum depth of each decision tree is set to 15, and the minimum number of sample splits is set to 10; the preset weight coefficients are as follows: , , .
[0061] In this embodiment, it should be noted that the original voting weight of each decision tree is 1, and the corrected voting weight is... (Environmental weight coefficients corresponding to the i-th decision tree); The final evaluation result is the weighted sum of the voting results of all decision trees, with weights of 1 / 2. .
[0062] In this embodiment, specifically, after the evaluation result of the output hydropower station bus communication quality, it also includes: Based on the scores corresponding to the evaluation results, the communication quality is divided into four levels: excellent, good, satisfactory, and unsatisfactory. When the evaluation result is qualified or unqualified, maintenance suggestions are generated based on the percentage of abnormal function codes and frame loss rate in the application layer semantic features; the maintenance suggestions include targeted inspection prompts or immediate shutdown and maintenance instructions.
[0063] The assessment grading divides communication quality into four levels, each corresponding to a different operation and maintenance strategy: Excellent (Level 1): Evaluation score ≥ 90 points, no communication risks, no maintenance required; Good (Level 2): 75 points ≤ score < 90 points, slight communication fluctuations, regular monitoring required; Pass (Level 3): 60 points ≤ score < 75 points, indicating potential hidden dangers that require targeted inspection; Unqualified (Level 4): Score <60 points, serious communication failure, immediate shutdown for repair; Assessment score calculation: .
[0064] Based on the same technical concept, embodiments of the present invention also provide an electronic device that can implement the hydropower station bus communication quality assessment method flow provided in the above embodiments of the present invention. In one embodiment, the electronic device can be a server, a terminal device, or other electronic devices. Figure 4 As shown, the electronic device may include: At least one processor and a memory connected to the at least one processor. In this embodiment of the invention, the specific connection medium between the processor and the memory is not limited. Figure 4 The example used is the connection between the processor and memory via a bus. The bus... Figure 4 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. Buses can be divided into address buses, data buses, control buses, etc., but for ease of representation, [the specific bus type is not shown here]. Figure 4 The processor is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, a processor can also be called a controller; there are no restrictions on the name.
[0065] In this embodiment of the invention, the memory stores instructions executable by at least one processor. By executing the instructions stored in the memory, the at least one processor can perform the hydropower station bus communication quality assessment method described above. The processor can implement... Figure 4 The functions of each module in the device shown.
[0066] The processor is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory and calling data stored in memory, it can monitor the device's various functions and process data, thereby enabling overall monitoring of the device.
[0067] In an alternative design, the processor may include one or more processing units. The processor may integrate an application processor and a modem processor, wherein the application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may also not be integrated into the processor. In some embodiments, the processor and memory may be implemented on the same chip; in some embodiments, they may also be implemented separately on separate chips.
[0068] The processor can be a general-purpose processor, such as a CPU, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the hydropower station bus communication quality assessment method disclosed in the embodiments of this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0069] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia cards, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), and electrically erasable programmable read-only memory (EPROM). Only memory (EEPROM), magnetic storage, magnetic disks, optical disks, etc. A memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures, and accessible by a computer, but is not limited thereto. The memory in embodiments of this invention can also be a circuit or any other device capable of performing storage functions for storing program instructions and / or data.
[0070] By designing and programming the processor, the code corresponding to the hydropower station bus communication quality assessment method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the steps of the method described in the foregoing embodiments during operation. How to design and program the processor is a technique well-known to those skilled in the art and will not be elaborated upon here.
[0071] Based on the same inventive concept, embodiments of the present invention also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform a hydropower station bus communication quality assessment method described above.
[0072] In some alternative embodiments, the present invention also provides a method for assessing the quality of bus communication in a hydropower station, which can also be implemented as a program product including program code. When the program product is run on a device, the program code is used to cause the control device to perform the steps in the method for assessing the quality of bus communication in a hydropower station according to various exemplary embodiments of the present invention as described above.
[0073] It should be noted that although several units or sub-units of the apparatus have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the invention, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units. Furthermore, although the operation of the method of the invention is described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0074] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can be implemented in one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs) containing computer-usable program code. The form of a computer program product implemented on ROM, optical memory, etc.
[0075] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a server, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0076] Program code for performing the operations of this invention can be written using any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0077] In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0078] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0079] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0080] In addition, in some embodiments, a computer program product is also proposed, which, when executed by a processor, implements the above-described method for evaluating the quality of bus communication in a hydropower station.
[0081] Example 2 To more intuitively demonstrate the practical application effects of the technical solution proposed in this invention in the complex electromagnetic environment and multi-protocol coexistence scenarios of hydropower stations, and to verify the advantages of this invention in terms of evaluation accuracy, environmental adaptability, and real-time performance, this embodiment will elaborate on the entire implementation process of this invention in detail, combining the specific field environment of a large hydropower station and laboratory simulation data. This embodiment covers the complete process from setting the underlying signal acquisition parameters, extracting specific values of multi-dimensional features, intermediate results of feature fusion and model training, to the final field test case. The specific implementation plan is as follows: 1. Data Acquisition and Preprocessing Implementation 1.1 Data Acquisition Equipment and Parameters Physical layer signal acquisition: The team previously developed a multi-protocol optoelectronic signal synchronous acquisition device (synchronization error ≤50ns, sampling rate 50MHz) to acquire voltage signals (RS485±2V, CAN±1.5V) and optical power signals (-10~0dBm) of different bus protocols. Protocol frame data acquisition: The protocol parsing module of the acquisition device parses the frame structure of 6 types of bus protocols in real time and extracts information such as frame header, function code, data segment, and check code; Environmental data acquisition: Deploy electromagnetic interference sensors (measurement range 0~500V / m, accuracy ±1V / m) and temperature and humidity sensors (temperature -40~85℃, accuracy ±0.5℃; humidity 0~100% RH, accuracy ±2% RH), sampling frequency 10Hz; Data collection scenarios: The Modbus TCP optical link and Profibus DP electrical link of a large hydropower station were selected as the test objects, covering three environments: strong electromagnetic interference (near the generator set), normal temperature and humidity (central control room), and high temperature and humidity (dam area corridor).
[0082] 1.2 Data Preprocessing Steps (1) Physical layer signal preprocessing Detrending: The signal trend term is fitted using the least squares method to eliminate baseline drift. Where a and b are the fitting coefficients, obtained by the least squares method. Minimize to obtain.
[0083] Normalization: according to the formula The goal is to make the signal mean 0 and the standard deviation 1.
[0084] (2) Protocol frame data preprocessing Frame filtering: Remove invalid frames (abnormal frame length, incorrect frame header); Data extraction: Extract the function code, data segment length, verification result, and send / receive timestamp of each frame.
[0085] (3) Environmental data preprocessing Outlier removal: The 3σ criterion is used to remove abnormal sensor data (such as sudden temperature and humidity changes exceeding 10℃ / 20%RH). Smoothing: A moving average filter (window size 5) is used to smooth environmental data and reduce the impact of instantaneous fluctuations.
[0086] 2. Implementation of multidimensional feature extraction 2.1 Physical Layer Time-Frequency Domain Feature Extraction (Taking Modbus TCP Optical Link as an Example) Protocol parameters: baud rate 100Mbps, wavelet packet decomposition layer selection 6 (2^6=64 nodes); Extraction steps: The preprocessed optical power signal x_norm(t) is decomposed into 6-level db4 wavelet packets to obtain coefficients at 64 nodes. ; Calculate the energy value of each node Entropy ; Calculate the kurtosis factor (peak value / effective value) and kurtosis (fourth central moment / variance²) for each node; A total of 64×4=256 time-frequency domain features were extracted.
[0087] 2.2 Statistical Feature Extraction of the Link Layer Statistics window: 10s, a total of 1000 frames of Modbus TCP data were collected; Extraction results: mean bit error rate BER_avg=0.002, maximum bit error rate BER_max=0.008, bit error rate variance BER_var=0.00001; mean frame loss rate FLR_avg=0.005, mean transmission delay T_delay_avg=2.3ms, mean delay jitter ΔT_delay_avg=0.4ms.
[0088] 2.3 Semantic Feature Extraction at the Application Layer Protocol analysis: The Modbus TCP protocol frame structure is "MBAP header (7 bytes) + PDU (function code 1 byte + data segment N bytes)"; Extraction results: Protocol interaction success rate S_success=0.992 (992 normal response frames / 1000 request frames); Function code exception rate R_func=0.003 (3 undefined function code frames / 1000 frames); Data integrity I_data=0.98 (valid data field length 98 bytes / total data segment length 100 bytes); Distribution of exception function code types: Undefined function codes account for 100% (no other exception types); Frame type distribution: Request frames 45%, Response frames 54%, Broadcast frames 1%.
[0089] 2.4 Environmental Layer Interference Feature Extraction Data collected: Electromagnetic interference intensity E_emc = Level 3 (85V / m), temperature T_actual = 32℃, humidity H_actual = 78%; Quantitative results: Temperature deviation ; Humidity deviation Electromagnetic interference rate of change = 2V / m (from 83V / m to 85V / m within 1s).
[0090] 3. Feature fusion optimization implementation 3.1 Improved PCA Dimensionality Reduction Original feature matrix: m = 1000 samples, n = 256 (time-frequency domain) + 6 (link layer) + 5 (semantic) + 4 (environment) = 271 features; Dimensionality reduction steps: (1) Calculate the covariance matrix
[0091] (2) Solve for eigenvalues and eigenvectors. After sorting by eigenvalues, select the first k eigenvectors so that the variance contribution is ≥0.95. Finally, k=85 (the number of eigenvalues after dimensionality reduction is 85, which is only 31.3% of the original). (3) The dimensionality reduction feature matrix X'=XU is obtained by mapping (U is an 85-dimensional projection matrix).
[0092] 3.2 Weight Allocation of Multi-Head Attention Mechanism Parameter settings: Number of multiple heads h=8, query matrix dimension d_k=128; Implementation steps: (1) Perform a linear transformation on X' to obtain Q, K, and V (each with a dimension of 1000×128); (2) Attention scores are calculated in parallel for 8 heads, each head having a dimension of 1000×16; (3) The 8 header results are spliced together and the final fusion feature matrix F (1000×85) is obtained by linear transformation. (4) Weight distribution: The success rate of protocol interaction is weighted at 0.12 (highest), the electromagnetic interference intensity is weighted at 0.10 (second highest), and the time-frequency domain energy value is weighted at 0.08, which verifies that the key features are effectively strengthened.
[0093] 4. Improve the random forest evaluation model. 4.1 Model Training Steps (1) Dataset construction Training set: laboratory simulation + field test data, totaling 10,000 samples, covering 4 evaluation levels (2,500 excellent, 2,500 good, 2,500 satisfactory, and 2,500 unsatisfactory). Test set: 2000 samples of field-measured data, 500 for each level; Tagging: The evaluation level is jointly assigned by 3 senior operation and maintenance engineers based on the bus operation status and fault records.
[0094] (2) Model training and optimization Basic parameter settings: Number of decision trees 120, maximum depth 15, minimum number of sample splits 10, feature sampling rate 60%, sample sampling rate 70%; Environmental weight coefficient fitting: α, β, and γ were optimized through grid search, and finally determined to be α=0.2, β=0.05, and γ=0.03; Training process: Five-fold cross-validation was used, and the model was iterated for 100 rounds. When the model converged, the accuracy on the training set was 99.2% and the accuracy on the validation set was 98.7%.
[0095] 5. On-site test examples 5.1 Test Scenario 1: Modbus TCP Optical Link (Strong Electromagnetic Interference Environment) Test environment: Near the generator set, electromagnetic interference intensity E_emc=4 (150V / m), temperature T=38℃, humidity H=82%; Test parameters: Baud rate 100Mbps, optical power -5dBm, transmission distance 100m single-mode fiber; Test steps: (1) Start the data acquisition device and collect optical power signal, Modbus TCP frame data and environmental data within 10 minutes; (2) Perform multidimensional feature extraction and fusion optimization to obtain 85-dimensional fused features; (3) Input the improved random forest model and calculate the environmental weight coefficient ω = 1 + 0.2 × 4 + 0.05 × (38 - 25) + 0.03 × (82 - 60) = 1 + 0.8 + 0.65 + 0.66 = 3.11; (4) Model output evaluation level and score: Level 3 (pass), score 68.5 points; (5) Operation and maintenance verification: The fiber optic link was inspected and it was found that the fiber optic connector was loose, which led to increased link loss. After tightening it again, the test was conducted again and the evaluation level was improved to level 2 (good), with a score of 82 points.
[0096] 5.2 Test Scenario 2: Profibus DP Electrical Link (Normal Temperature and Humidity Environment) Test environment: Central control room, electromagnetic interference intensity E_emc=1 (8V / m), temperature T=25℃, humidity H=60%; Test parameters: baud rate 1.5Mbps, transmission medium RS485 twisted pair shielded cable, transmission distance 500m; Test steps: (1) Collect voltage signals, Profibus DP frame data and environmental data within 5 minutes; (2) Feature extraction: Wavelet packet decomposition is performed in 4 layers (baud rate 1.5Mbps) to extract 64 time-frequency domain features, which are combined with link layer, semantic layer and environment layer features to form a total of 271 original features; (3) Feature fusion: After PCA dimensionality reduction, 82-dimensional features are obtained, and the attention mechanism strengthens the feature weight of the abnormal proportion of function codes; (4) Model evaluation: Environmental weight coefficient ω = 1 + 0.2 × 1 + 0.05 × 0 + 0.03 × 0 = 1.2, output evaluation level 1 (excellent), score 94.3 points; (5) Operation and maintenance verification: The bus operates stably with no communication risks, consistent with the evaluation results.
[0097] 5.3 Test Scenario 3: SDI12 Bus (High Temperature and High Humidity Environment) Test environment: Dam area corridor, electromagnetic interference intensity E_emc=2 (35V / m), temperature T=42℃, humidity H=92%; Test parameters: baud rate 1200bps, transmission medium 3-core shielded cable; Test results: The model output evaluation level was 4 (unsatisfactory), with a score of 52.8 points, and the message "Frame loss rate too high (FLR=0.08)" was displayed. The maintenance inspection found that the cable in the corridor was soaked in water, which caused insulation damage. After the cable was replaced, the evaluation level was improved to level 2 (good), with a score of 78.6 points.
[0098] 5.4 Test Result Statistics Table 1. Statistical Table of Test Results
[0099] 6. Comparison and verification with existing technologies The present invention was compared with the existing technology "Multi-protocol Industrial Bus Communication Quality Evaluation Method" (CN202310876543.2), and the results are as follows: Table 2 Test Results
[0100] The comparison results show that the present invention is significantly superior to the prior art in terms of evaluation accuracy, environmental adaptability, multi-protocol compatibility and real-time performance, and fully meets the requirements of hydropower station fieldbus communication quality evaluation.
[0101] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.
[0102] This background section is provided to generally present the context of the invention. The work of the currently named inventors, the work to the extent described in this background section, and aspects of this section that did not constitute prior art at the time of application are neither expressly nor impliedly acknowledged as prior art to the invention.
Claims
1. A method for evaluating the quality of bus communication in a hydropower station, characterized in that, include: Collect physical layer signals, protocol frame data, and environmental monitoring data near the bus link of the hydropower station fieldbus; Based on the collected data, physical layer time-frequency domain features, link layer statistical features, application layer semantic features, and environmental layer interference features are extracted to construct the original multidimensional feature set. The original multidimensional feature set is subjected to feature dimensionality reduction, and an attention mechanism is used to dynamically assign weights to the dimensionality-reduced features to obtain a fused feature matrix. An improved random forest evaluation model is constructed, and an environmental interference weight coefficient is calculated based on the environmental layer interference characteristics. The voting weight of the decision tree in the improved random forest evaluation model is then corrected using the environmental interference weight coefficient. The fused feature matrix is input into the improved random forest evaluation model, and the evaluation results of the hydropower station bus communication quality are output.
2. The method for evaluating the quality of bus communication in a hydropower station according to claim 1, characterized in that, The extraction of physical layer time-frequency domain features specifically includes the following steps: The acquired physical layer signals are preprocessed by detrending and normalization to eliminate baseline drift and amplitude differences; Using the db4 wavelet as the base wavelet, the number of wavelet packet decomposition layers is adaptively adjusted according to the baud rate of the bus protocol to decompose the preprocessed physical layer signal, resulting in 2 N The wavelet packet coefficients of each node; where N is the number of decomposition layers, N=4 when the baud rate is less than or equal to 1Mbps, N=5 when the baud rate is between 1Mbps and 100Mbps, and N=6 when the baud rate is greater than 100Mbps; For the wavelet packet coefficients of each node, the energy value, entropy value, peak factor and kurtosis are calculated respectively, and the calculation results of all nodes are combined to form the time-frequency domain features of the physical layer.
3. The method for evaluating the quality of bus communication in a hydropower station according to claim 2, characterized in that, The extraction of the link layer statistical features, application layer semantic features, and environment layer interference features specifically includes: The link layer statistical features include: mean bit error rate, maximum bit error rate, bit error rate variance, mean frame loss rate, mean transmission delay, and mean delay jitter within the statistical window; The steps for extracting the semantic features of the application layer are as follows: the MBAP header and PDU data segment of the bus frame data are parsed by the protocol parsing module to extract the protocol interaction success rate, the proportion of abnormal function codes, data integrity, distribution of abnormal function code types, and frame type distribution. The environmental interference characteristics include: electromagnetic interference intensity level, temperature deviation, humidity deviation, and environmental interference change rate; wherein, the environmental interference change rate includes the second-level change in electromagnetic interference intensity and the minute-level change in temperature.
4. The method for evaluating the quality of bus communication in a hydropower station according to claim 1, characterized in that, The step of performing feature dimensionality reduction on the original multidimensional feature set and dynamically assigning weights to the dimensionality-reduced features using an attention mechanism specifically includes the following steps: Construct the original feature matrix, calculate the eigenvalues and eigenvectors of its covariance matrix, and sort the eigenvalues from largest to smallest; A variance contribution threshold is introduced, and the top k feature vectors whose cumulative variance contribution rates satisfy the variance contribution threshold are selected to construct a projection matrix, which maps the original feature matrix into a dimension-reduced feature matrix; wherein, the variance contribution threshold is set to 0.95; The dimensionality-reduced feature matrix is processed using a multi-head attention mechanism: First, a linear transformation is performed on the dimensionality-reduced feature matrix to obtain the query matrix Q, the key matrix K, and the value matrix V; then, the attention score is calculated using the following formula: in: For query matrix dimensions; Finally, the results of the multi-head parallel computation are concatenated and subjected to linear transformation to obtain the fused feature matrix.
5. The method for evaluating the quality of bus communication in a hydropower station according to claim 1, characterized in that, The construction of the improved random forest evaluation model includes the following steps: The number of decision trees in the random forest, as well as the maximum depth and minimum number of sample splits for each decision tree, are determined by grid search. The Bootstrap sampling method is used to randomly sample from the training set to construct a training subset for each decision tree; During training, each decision tree randomly selects a preset proportion of fused features to participate in node splitting; Define environmental interference weighting coefficient The calculation formula is: in: Electromagnetic interference intensity level; Temperature deviation; Humidity deviation; , , These are preset weighting coefficients; The step of using the environmental disturbance weight coefficient to correct the voting weights of decision trees in the improved random forest evaluation model specifically refers to correcting the original voting weights of each decision tree to the environmental disturbance weight coefficient. .
6. The method for evaluating the quality of bus communication in a hydropower station according to claim 5, characterized in that, The number of decision trees is set to 120, the maximum depth of each decision tree is set to 15, and the minimum number of sample splits is set to 10; the preset weight coefficients are as follows: , , .
7. The method for evaluating the quality of bus communication in a hydropower station according to claim 1, characterized in that, Following the evaluation results of the output hydropower station bus communication quality, the following are also included: Based on the scores corresponding to the evaluation results, the communication quality is divided into four levels: excellent, good, satisfactory, and unsatisfactory. When the evaluation result is qualified or unqualified, maintenance suggestions are generated based on the percentage of abnormal function codes and frame loss rate in the application layer semantic features; the maintenance suggestions include targeted inspection prompts or immediate shutdown and maintenance instructions.
8. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which executes the instructions stored in the memory to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store instructions that, when executed, cause the method as described in any one of claims 1-7 to be implemented.
10. A computer program product, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-7.
Citation Information
Patent Citations
Energy echelon input flotation equipment and flotation method based on coal slime granularity
CN116984124A
Multifunctional defibrillation electrode plate assembly, defibrillation host and defibrillation system
CN120550332A