A method and system for testing communication protocols of industrial control devices based on a composite finite state machine model
Patent Information
- Application Number
- CN202611159589.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-02
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]针对工业控制设备及控制系统,引入复合有限状态机模型,优化测试流程,提升测试效率,提供一种准确高效的工业控制设备通信协议测试方法及系统,克服现有协议测试技术中测试模型单一、测试序列不合理、测试维度不全、智能化程度低、无标准化对标体系、场景适配性差的缺陷,实现工业总线通信协议全维度、高精度、智能化、可迭代的自动化测试,完成同类产品性能对标,精准挖掘协议缺陷与性能短板,支撑工控产品质量优化升级,同时拓展多领域协议测试与故障诊断应用场景
[0016]1、提升场景覆盖度与模拟真实性:构建复合有限状态机模型,突破传统单一状态机仅能覆盖基础协议交互的局限,融合工业总线三层协议特征与多类工况状态,精准刻画复杂场景下的协议运行与故障逻辑,大幅提升测试场景覆盖度与状态模拟真实性。
Smart Images

Figure CN123020433A_ABST
Abstract
Description
Technical Field
[0001] This invention patent belongs to the field of industrial communication protocol testing technology, specifically relating to a testing method, system device, and platform for industrial control equipment communication protocols based on a composite finite state machine model. It is applicable to the consistency, interoperability, performance, and robustness testing of various industrial control equipment communication protocols (such as Profinet, EtherCAT, Modbus TCP, OPC UA, etc.), and can be extended to protocol testing and fault diagnosis scenarios in communication chips, communication modules, industrial networks, smart manufacturing, and IoT systems. By decomposing complex communication protocols into multiple sub-state machines and utilizing the transition conditions and rules between states to achieve accurate modeling of protocol behavior, the efficiency and reliability of communication protocol testing are significantly improved. Background Technology
[0002] Industrial communication protocols are the core foundation for data interaction, command transmission, and collaborative operation of industrial intelligent control system equipment. The compliance, stability, compatibility, and performance of these protocols directly affect the reliability and security of the control system. With the rapid development of intelligent manufacturing, the Industrial Internet, and 5G industrial empowerment technologies, the types of industrial control equipment are becoming increasingly diverse, industrial communication protocols are iterating and updating at a faster pace, and heterogeneous interaction scenarios involving multiple devices and protocols are becoming increasingly complex. This places higher demands on the comprehensiveness, accuracy, automation, and intelligence of industrial communication protocol testing. Current industrial communication protocol testing often uses a single finite state machine model, which can only cover the basic interaction states of the protocol. It cannot adapt to the multi-level coupling operation characteristics of the physical layer, link layer, and application layer of industrial communication buses, and it is difficult to simulate abnormal states and fault scenarios under complex working conditions. In addition, current industrial communication protocol testing often adopts fixed sequence traversal testing, without taking into account the state reachability characteristics of different industrial control systems, and without integrating and optimizing mainstream test sequence algorithms such as the transfer traversal method and the feature sequence method. This results in test redundancy, lack of focus, and missed detection of hidden faults. Furthermore, current industrial communication protocol testing focuses on basic protocol consistency testing, ignoring comprehensive testing of interoperability, extreme working condition robustness, and dynamic performance indicators. It cannot comprehensively evaluate the overall performance of the protocol, lacks intelligent analysis capabilities to automatically collect fault characteristics and iteratively optimize test strategies, and has a low level of test automation and intelligence.
[0003] To address the dynamic testing needs of adapting to complex industrial scenarios, there is an urgent need for a testing method and system for industrial control equipment communication protocols that supports multiple scenarios, covers multiple dimensions, and integrates multiple algorithms. Summary of the Invention
[0004] Purpose of the invention
[0005] For industrial control equipment and control systems, a composite finite state machine model is introduced to optimize the testing process and improve testing efficiency. This provides an accurate and efficient testing method and system for industrial control equipment communication protocols, overcoming the shortcomings of existing protocol testing technologies, such as single testing models, unreasonable test sequences, incomplete testing dimensions, low level of intelligence, lack of standardized benchmarking system, and poor scenario adaptability. It achieves full-dimensional, high-precision, intelligent, and iterative automated testing of industrial bus communication protocols, enabling performance benchmarking against similar products, accurately identifying protocol defects and performance shortcomings, supporting the quality optimization and upgrading of industrial control products, and expanding application scenarios for protocol testing and fault diagnosis in multiple fields. Technical solution
[0006] This invention provides a test method for communication protocols of industrial control equipment based on a composite finite state machine model (hereinafter referred to as the protocol test method), and a test system for communication protocols of industrial control equipment based on a composite finite state machine model (hereinafter referred to as the protocol test system).
[0007] The protocol testing method mainly includes the following process.
[0008] S1 Composite Finite State Machine Model Construction: Based on the layered architecture of industrial bus communication protocols, it integrates the physical layer electrical transmission characteristics, link layer frame interaction rules, and application layer instruction interaction logic, and divides the protocol into three types of states: normal interaction, abnormal interference, and fault failure. It constructs a composite finite state machine model with multi-state coupling and multi-level adaptation, which overcomes the shortcomings of traditional single state machine models in terms of limited coverage scenarios.
[0009] S2 Algorithm Reachability Comparison Analysis: For industrial intelligent control systems with different organizational structures, global search algorithm, local search algorithm, and random simulation algorithm are used to conduct protocol state reachability analysis. The state coverage, test time, and fault identification accuracy of each algorithm are statistically analyzed. Based on the complexity of the test scenario, the intensity of the operating condition disturbance, and the type of equipment, the algorithm adaptively selects and matches the configuration.
[0010] S3 Weighted Composite Test Sequence Construction: Combining the technical advantages of the transfer traversal method, feature sequence method, differentiation sequence method, and unique input-output method, weights are allocated differently for four types of test requirements: consistency, interoperability, performance, and robustness. Test paths and verification sequences generated by multiple algorithms are integrated, redundant test items are removed, and a fully covered, highly accurate, and highly efficient weighted composite test sequence is constructed.
[0011] S4 Flexible Simulation Test System Construction and Full-Dimensional Testing: Build an industrial bus communication protocol physical test platform and a flexible scenario simulation verification system, customize and configure flexible test scenarios such as electromagnetic interference, network fluctuations, data packet loss, and heterogeneous device docking, and conduct consistency compliance testing, multi-device interoperability compatibility testing, dynamic performance index testing, and extreme working condition robustness and stability testing of industrial control equipment bus communication protocols.
[0012] S5 Multi-Dimensional Indicator Benchmarking Evaluation: Synchronously collects and compares the full-dimensional performance indicators of the physical layer, link layer, and application layer during the testing process with the bus protocol indicators of similar industrial control products to establish a standardized performance evaluation system, accurately identify the shortcomings and defects of domestic products in protocol design, transmission performance, compatibility and adaptation, and anti-interference capabilities.
[0013] S6 Intelligent Data Processing and Test Sequence Iterative Optimization: Employs big data analytics algorithms to collect, clean, filter, and classify all test data in real time. Deep learning algorithms are used to uncover the implicit correlation between test data and protocol faults, and the bus fault set is iteratively updated. Based on fault type and test indicator deviation, the weight of the test sequence is dynamically adjusted to adaptively optimize the automated test sequence, achieving closed-loop iterative upgrade of the testing process.
[0014] This invention patent provides a testing method for communication protocols of industrial control equipment based on a composite finite state machine model. The system includes a test cabinet and a host computer. The host computer can connect to a cloud server via the internet to acquire / store information. The test cabinet contains mounting fixtures for the industrial equipment under test, test interfaces, a power supply, a signal generator, an arbitrary wave generator, a vector network analyzer, protocol analysis and testing equipment, an oscilloscope, a computer, and control analysis software. The control analysis software includes a model building module, a reachability analysis module, a test sequence generation module, a simulation testing module, a data acquisition and benchmarking module, and an intelligent optimization module. These modules work collaboratively to automate the entire process of model building, algorithm analysis, sequence generation, scenario testing, indicator benchmarking, and intelligent optimization, supporting comprehensive protocol testing. Beneficial effects
[0015] The present invention has the following significant beneficial effects.
[0016] 1. Improve scenario coverage and simulation realism: Construct a composite finite state machine model to break through the limitation of traditional single state machines that can only cover basic protocol interactions. Integrate the characteristics of the three-layer protocol of industrial bus and multiple working conditions to accurately depict the protocol operation and fault logic in complex scenarios, and significantly improve the test scenario coverage and state simulation realism.
[0017] 2. Enhance the ability to identify hidden faults: By fusion and comparison of multiple reachability algorithms and four types of test sequence algorithms, composite test sequences are generated adaptively with weighting. This effectively avoids the problems of redundant testing and missed detection in traditional fixed test sequences, and balances full test coverage and high test efficiency, thus greatly improving the ability to identify hidden faults.
[0018] 3. Improve testing dimensions and system: Achieve integrated testing across four dimensions: protocol consistency, interoperability, performance, and robustness, covering all levels of indicators from the physical layer, link layer, and application layer. Simulate various complex disturbance conditions in industrial settings to fully reproduce real-world operating scenarios, enabling automatic collection of fault characteristics and dynamic optimization of test sequences. Construct a closed-loop iterative intelligent testing system, breaking free from the limitations of traditional manual and fixed testing, and significantly improving the level of testing automation and intelligence.
[0019] 4. Support the improvement of industrial control product quality: Establish a standardized benchmarking and evaluation system for bus protocols of similar products, accurately identify the technical shortcomings of domestic products, provide precise optimization directions for domestic industrial control equipment manufacturers, and effectively improve the quality and market competitiveness of domestic industrial control products.
[0020] 5. High versatility and scalability, with broad application prospects: The system covers common industrial communication protocols and can be easily extended to multiple fields such as communication chip / module communication protocol testing, industrial communication network fault diagnosis, intelligent manufacturing system verification, IoT and industrial network protocol testing, with broad versatility and application prospects. Attached Figure Description
[0021] Figure 1 - Flowchart of a test method for communication protocols of industrial control equipment based on a composite finite state machine model.
[0022] Figure 2 Schematic diagram of the composite finite state machine model architecture.
[0023] Figure 3 Diagram of the overall architecture of the test system. Detailed Implementation
[0024] A method for testing communication protocols of industrial control equipment based on a composite finite state machine model (hereinafter referred to as the protocol testing method), and a system for testing communication protocols of industrial control equipment based on a composite finite state machine model (hereinafter referred to as the protocol testing system). A specific embodiment of the present invention will be described in detail below. This embodiment is only used to explain the present invention and is not intended to limit the scope of protection of the present invention.
[0025] The protocol testing method mainly includes the following process.
[0026] S1 Composite Finite State Machine Model Construction: Based on the layered architecture of industrial bus communication protocols, this model integrates the electrical transmission characteristics of the physical layer, the frame interaction rules of the link layer, and the instruction interaction logic of the application layer. It divides the protocol into three states: normal interaction, abnormal interference, and fault failure, constructing a multi-state coupled, multi-level adapted composite finite state machine model to overcome the limitations of traditional single-state machine models in covering limited scenarios. Using the Modbus bus protocol as the modeling object, the core features of the physical layer, link layer, and application layer are decomposed from top to bottom, and structured parameters are extracted. Physical layer characteristic parameters include: transmission impedance, baud rate range, differential signal characteristics, maximum transmission distance, electromagnetic interference threshold, bus terminal matching resistance, etc., as well as transmission medium-related disturbance parameters, including line attenuation, contact resistance, and electrical characteristics of short-circuit / open-circuit faults. Link layer characteristic parameters include: frame header, check field, data segment, frame tail structure, CRC check algorithm, retransmission determination mechanism, link timeout threshold, frame fragmentation / reassembly logic, collision backoff rules, and packet loss and frame error determination conditions. Application layer characteristic parameters include: read / write commands, control commands, reporting commands, fault alarm commands, and multi-device collaborative interaction timing; distinguishing interaction modes such as master station issuance, slave station response, broadcast interaction, and abnormal command feedback, and recording command response latency, data interaction compliance judgment standards, etc. Then, based on the actual communication conditions in the industrial field, three complete state sets are uniformly divided: normal interaction state set, abnormal interference state set, and fault failure state set. For the switching relationship between any two states, a standardized state transition rule base is established, defining transition input trigger sources, such as physical layer electrical abnormal signals, link layer error frames, application layer illegal commands, external simulation interference signals, and timing timeout signals; binding transition judgment constraints, using three-layer protocol parameters as transition judgment thresholds; and marking transition output behaviors, such as synchronously outputting corresponding messages, electrical signals, fault markers, and log records after state switching, fully reproducing the real device communication feedback behavior. A layered, coupled architecture is used for model integration. The physical layer state submachine manages electrical signals and state transitions related to the transmission medium; the link layer state submachine manages frame transmission and reception, verification, and link connection / disconnection; and the application layer state submachine manages business commands and device collaborative interaction logic. A coupling and association mechanism enables real-time bidirectional linkage among the three layers; when any layer's state changes, the other two layers are synchronously updated. Subsequently, the three-layer characteristic parameters, all state nodes, and state transition rules of each bus protocol are stored in the test system database in the form of structured data tables. Based on the bus protocol type of the device under test, the corresponding protocol parameters are automatically loaded, and a dedicated composite finite state machine is instantiated. Parameters such as interference thresholds, timeout periods, and load limits are manually adjusted to adapt to non-standard industrial bus devices customized by different manufacturers.After completing the construction of the composite finite state machine, a standardized output interface is opened to output complete state space data to downstream modules, including: the complete set of all reachable states, complete state transition paths, and fault and anomaly feature labels corresponding to each state, providing underlying state basis for subsequent weighted test sequence generation and deep learning fault collection.
[0027] S2 Algorithm Reachability Comparison Analysis: After completing the construction of the composite finite state machine model, this step employs global search, local search, and stochastic simulation algorithms in parallel to solve the protocol state reachability for industrial intelligent control systems with different architectures and complexities. Through quantitative index comparison, adaptive optimization matching of algorithms is achieved, realizing the optimal state space solution under different test scenarios. Specific steps include: First, reading the complete state space, state transition conditions, and three-layer protocol constraint parameters of the composite finite state machine constructed in S1. Based on the equipment scale, number of bus nodes, communication complexity, and external disturbance intensity of the industrial control system under test, the test scenarios are automatically divided into three categories: simple and stable scenarios, medium-complexity scenarios, and strong disturbance stochastic scenarios, providing the basic configuration for matching corresponding algorithm solution strategies for different scenarios. Simultaneously, unified initialization of test statistics indicators, including state coverage, single-round test time, fault state identification accuracy, and invalid path ratio, provides a unified quantitative benchmark for the comparative evaluation of the three types of algorithms. For small industrial control systems with simple structure, fixed nodes, and stable operating conditions, a global search algorithm is used to completely traverse all state transition paths of the finite state machine. Starting from the initial idle state of the protocol, the algorithm iteratively expands all reachable states level by level based on all state transition conditions. It traverses all state branches corresponding to normal interactions, abnormal interference, and failures at the physical layer, link layer, and application layer, recording all legal transition paths, state jump logic, and triggering conditions. The global search algorithm achieves 100% full state coverage with no missing paths, suitable for device testing scenarios with fixed protocol logic, low disturbance, and high stability. It can completely enumerate all standard interaction behaviors and deterministic fault behaviors of the protocol. For medium-to-large-scale, multi-node, and multi-service coupled complex industrial intelligent control systems, a controlled local search algorithm is used for state space pruning and solution. While ensuring high coverage of core states, redundant search dimensions are significantly reduced, significantly lowering computational resource consumption and testing time, adapting to the efficient reachability solution requirements of complex industrial control systems, and solving the problems of low efficiency and slow iteration of the global search algorithm in complex scenarios. For strong disturbance testing scenarios in industrial fields with electromagnetic interference, network fluctuations, random packet loss, and abnormal message injection, a stochastic simulation algorithm is used to conduct dynamic state reachability analysis. By randomly generating disturbance inputs that conform to the characteristics of industrial sites, including timing offsets, signal attenuation, random frame errors, sudden packet loss, and abnormal command insertion, a composite finite state machine is driven to perform random state transition iterations, simulating sporadic, irregular, and hidden disturbance conditions in real industrial sites. Through a large number of random simulation iterations, edge states, sporadic fault states, and hidden abnormal states that are difficult to cover by conventional traversal algorithms can be triggered, effectively compensating for the shortcomings of deterministic search algorithms in covering random operating conditions and significantly improving the fault identification capability under complex dynamic operating conditions. During the parallel solution process of the three types of algorithms, the system synchronously collects and statistically analyzes three core evaluation indicators (state coverage, test time, and fault identification accuracy) in real time, forming a quantitative comparison dataset.Based on the quantitative comparison results, the system establishes an adaptive matching strategy. It automatically switches between or combines three types of algorithms according to real-time operating condition complexity, disturbance intensity, and equipment type, achieving intelligent adaptive configuration of the reachability solution strategy. This provides optimal state-space foundational data for the accurate generation of subsequent weighted composite test sequences. Finally, it outputs the optimal reachability state set, the effective transition path set, and the dataset of reachability probabilities and trigger conditions for each state. All of these are imported into the S3 test sequence generation module, providing accurate state-space basis for multi-algorithm sequence fusion, dynamic weight allocation, and redundant sequence removal.
[0028] S3 Weighted Composite Test Sequence Construction: Based on the optimal state reachability space and effective state transition paths obtained in S2, this step integrates the technical advantages of four classic test sequence generation algorithms: the transition traversal method, the feature sequence method, the distinguishing sequence method, and the unique input / output method. Dynamic weights are assigned differently for four test dimensions: protocol consistency, interoperability, performance, and robustness. Test paths and verification sequences generated by multiple algorithms are fused, concatenated, redundantly eliminated, and conflict-checked. Finally, a fully covered, highly accurate, low-redundancy, and highly efficient weighted composite test sequence is constructed. Specific steps: Based on the complete state topology and reachable transition paths of the composite finite state machine, four algorithms are used to independently generate basic test sequences, fully leveraging the differentiated advantages of each algorithm to form a multi-dimensional original test sequence library. For the four core test requirements of industrial bus protocol testing, a dynamic weight allocation mechanism is established to prioritize test sequences output by different algorithms, achieving precise allocation of test resources. Based on the weight assignment, the weighted test sub-sequences generated by the four algorithms are orderly fused and structurally reorganized. Abandoning the traditional model of independent testing of single algorithm sequences, this approach follows a test logic sequence of "state traversal—feature verification—state differentiation—precise positioning," progressively concatenating high-weight effective test units to form a composite sequence structure that balances breadth coverage and depth verification. Global redundancy optimization is implemented to address duplicate test items, invalid traversal paths, and redundant verification steps present after multi-algorithm fusion. Through state matching comparison, test behavior deduplication, and coverage verification, redundant test units such as duplicate state traversals, duplicate feature verifications, and meaningless empty transitions are eliminated. Simultaneously, the fused sequence undergoes state conflict verification, timing validity verification, and fault scenario validity verification, removing invalid test steps that cannot trigger valid state transitions or cover the target operating conditions. This significantly reduces test time while ensuring full state and scenario coverage, overcoming the shortcomings of traditional fixed test sequences, such as large redundancy and low testing efficiency. After algorithm fusion, weight adaptation, redundancy optimization, and validity verification, a structured, adaptively iterative weighted composite test sequence is finally generated.
[0029] S4 Flexible Simulation Test System Construction and Full-Dimensional Testing: Based on the weighted composite test sequence generated by S3, this step builds a flexible simulation test platform for industrial bus protocols that integrates hardware and software and combines virtual and physical environments. Through configurable, reproducible, and iterative flexible disturbance scenario simulation capabilities, it constructs a complex test environment closely resembling industrial sites. It conducts comprehensive, high-precision, and quantifiable bus protocol testing across four dimensions: protocol consistency, multi-device interoperability, dynamic transmission performance, and extreme operating condition robustness. An integrated physical test hardware architecture is constructed, including a host computer main control unit, a multi-protocol bus test motherboard, a flexible operating condition simulation module, multi-type bus adapter interfaces, a physical layer acquisition unit, a message recorder, and the industrial control equipment under test / benchmarked. The host computer is responsible for test process scheduling, algorithm calculation, and data storage; the bus test motherboard realizes multi-protocol message transmission and reception, frame parsing, and timing control; the multi-protocol adapter interface is compatible with mainstream industrial buses such as Modbus, CANopen, Profinet, and EtherNet / IP, and can quickly switch the type of protocol under test; the physical layer acquisition unit collects electrical parameters such as bus level, impedance, transmission delay, and signal attenuation in real time; the message recorder captures and records the full volume of interaction messages between the link layer and the application layer, providing raw data support for subsequent multi-dimensional indicator analysis. The entire hardware platform supports parallel testing of multiple devices, seamless switching of multiple protocols, and virtual-real scene linkage simulation, and has high adaptability and scalability. Relying on the flexible working condition simulation module, it breaks through the limitations of traditional fixed working condition testing and realizes programmable, refined, and flexible reproduction of various complex disturbance scenarios in industrial sites. The system supports custom configuration of various typical industrial disturbance conditions, including electromagnetic interference intensity-graded injection, dynamic fluctuations in bus transmission delay, random / fixed-point data packet loss, out-of-order packets, duplicate frames, error frame injection, gradual bus load rate impact, high and low temperature electrical drift, and complex scenarios such as cross-protocol interfacing conflicts between heterogeneous devices. All disturbance parameters support fine-grained configuration of start and end times, intensity, duration, and random probability, enabling independent testing of single conditions and coupled testing of multiple conditions. It accurately simulates the uncertainties, strong interference, and high dynamics of real-world industrial environments, overcoming the shortcomings of traditional testing scenarios that are limited in scope, simple in operation, and unable to cover edge fault scenarios. It establishes a test environment for interconnecting heterogeneous devices from multiple manufacturers, models, and protocol versions, conducting bus protocol interoperability tests. Through test scenarios such as master-slave station rotation, multi-device polling communication, cross-version protocol interfacing, multi-device concurrent access, and broadcast / multicast interaction, it verifies the interoperability of the device under test with industrial control equipment and bus modules from different brands. The system automatically detects hidden compatibility issues such as device handshake failures, abnormal data interaction, master-slave preemption conflicts, heterogeneous device adaptation failures, and protocol version compatibility vulnerabilities, comprehensively verifying the universality and adaptability of the bus protocol. Quantitative tests are conducted on the dynamic performance of bus communication under different bus load rates, communication frequencies, transmission distances, and disturbance intensities.Key test metrics include average bus transmission latency, maximum latency, latency jitter, data throughput, message success rate, bus load limit, and concurrent communication stability. Robustness and stability enhancement tests are conducted for extreme industrial environments, continuously injecting high-intensity electromagnetic interference, continuous random packet loss, sudden link disconnection and reconnection, high-frequency abnormal messages, instantaneous bus short-circuit pulses, and ultra-high-volume data surges. Long-term continuous automated testing processes verify the equipment's fault tolerance, self-healing ability, fault recovery capability, and long-term operational stability under fault disturbances, boundary conditions, and high-intensity shocks, identifying reliability issues that traditional conventional testing cannot detect, such as occasional crashes, link oscillations, hidden disconnections, and cumulative protocol anomalies. During various tests, the system synchronously completes the full collection and structured storage of physical layer electrical data, link layer frame interaction data, application layer business instruction data, abnormal fault logs, performance time series data, and operating condition disturbance parameters, forming a multi-dimensional, multi-level, and traceable test dataset. This provides a complete data foundation for subsequent benchmarking of domestic and foreign product indicators, big data fault feature mining, deep learning fault set iteration, and dynamic optimization of test sequences, achieving closed-loop retention of test scenarios, test behaviors, and test results throughout the entire process.
[0030] S5 Multi-Dimensional Indicator Benchmarking Evaluation: Building upon the completion of full-dimensional flexible simulation testing, this step simultaneously collects complete test data from the physical layer, link layer, and application layer. It constructs a standardized benchmarking evaluation system for bus protocols of similar industrial control equipment both domestically and internationally. Through multi-dimensional horizontal quantitative comparison, it accurately identifies the technical shortcomings and defects of domestic industrial control products in terms of protocol standardization, transmission performance, compatibility, and anti-interference reliability, providing a quantitative basis for optimizing domestic equipment protocols. Relying on hardware acquisition units and message log recording systems, the entire testing process data is collected in a layered, categorized, and fully structured manner. The physical layer focuses on collecting bus level accuracy, differential signal integrity, transmission impedance matching, signal attenuation characteristics, electromagnetic interference threshold, transmission distance tolerance, and electrical stability indicators. The link layer focuses on collecting frame transmission and reception success rate, CRC check accuracy, retransmission count, link timeout probability, packet loss and out-of-order rate, link establishment and disconnection response speed, and bus load tolerance. The application layer focuses on collecting command response latency, function code parsing accuracy, stability of multi-device polling interaction, fault tolerance of abnormal commands, consistency of business data transmission, and compatibility with multiple protocol versions. All indicators are recorded synchronously with the test conditions, disturbance intensity, and load gradient, forming a complete test database covering normal, fluctuating, and extreme conditions. Industry-leading international brand industrial control equipment is selected as benchmark samples. Under completely identical hardware test environments, identical bus parameters, unified disturbance conditions, and test sequences, the same dimension indicators of the benchmark equipment are tested and data is collected to construct a unified benchmark sample library. By employing the controlled variable method, the testing conditions of the domestically produced equipment under test (DUT) and the imported benchmark equipment are ensured to be completely consistent, eliminating evaluation errors caused by differences in environment, operating conditions, and testing procedures, and ensuring the fairness, authenticity, and comparability of the horizontal comparison results. Based on three-layer protocol index data, a multi-dimensional, hierarchical, and quantitative comprehensive evaluation system for bus protocols is established, with evaluation dimensions comprehensively covering four major modules: protocol consistency, transmission performance, interoperability and compatibility, and robustness under operating conditions. Under various typical operating conditions, the DUT and international benchmark equipment are compared horizontally dimension by dimension. Quantitative analysis is conducted on the specific differences between the two sides in terms of protocol specification fit, transmission latency, throughput performance, timing stability, anti-interference capability, multi-device adaptability, fault self-healing capability, and long-term operational reliability, accurately identifying various explicit and implicit technical defects of the domestically produced equipment, such as imprecise protocol parsing, high-load performance degradation, poor adaptability to disturbance conditions, weak compatibility with heterogeneous devices, and low fault tolerance in edge conditions. The system automatically generates standardized benchmarking evaluation reports, which clearly identify the advantages, disadvantages, blind spots in operating condition adaptation, and technical weaknesses of domestic industrial control products. This provides precise, quantitative, and feasible improvement directions for subsequent protocol algorithm optimization, hardware circuit improvement, firmware program iteration, and product performance upgrades, effectively supporting the iteration of bus protocol technology and the improvement of product quality for domestic industrial control equipment.All benchmarking difference data, defect feature data, and operational condition adaptation shortcoming data are structured and archived, and synchronously fed back to the deep learning intelligent optimization module. This enriches the sample set of fault and weakness features, providing high-quality sample data for subsequent dynamic weight adjustment of test sequences, targeted reinforcement testing of key defects, and in-depth mining of fault features, thus realizing the closed-loop iterative capability of "testing-benchmarking-analysis-optimization".
[0031] S6 Intelligent Data Processing and Test Sequence Iterative Optimization: Based on the completion of full-dimensional flexible simulation testing and multi-index benchmarking evaluation, big data processing technology is used to collect, clean, filter, and structurally classify the data throughout the entire testing process. Combined with deep learning intelligent mining algorithms, a correlation mapping relationship between test data and protocol fault characteristics is constructed. The bus fault sample set is continuously iteratively updated, and the test sequence weight parameters are dynamically adjusted based on fault type distribution, index deviation degree, and weak operating conditions. This achieves adaptive iterative optimization of the weighted composite test sequence, constructing a closed-loop intelligent test upgrade system of "test acquisition—data analysis—fault mining—strategy update—retest verification." The system aggregates multi-source heterogeneous data from the entire testing process in real time, forming a complete test big data sample pool. The collected data encompasses physical layer electrical parameters, link layer frame interaction logs, application layer command interaction records, multi-condition disturbance configuration parameters, performance index data across various dimensions, equipment anomaly logs, test sequence execution records, and various sporadic and latent fault behavior data. This achieves comprehensive, full-time, and complete retention of normal operating condition data, abnormal disturbance data, fault failure data, and index deviation data, providing a complete data foundation for subsequent intelligent analysis and modeling. Big data cleaning and filtering algorithms are used to standardize and preprocess the original sample data, removing invalid empty data, noisy interference data, and abnormally distorted data. Duplicate samples are deduplicated and merged, missing fields are filled in and corrected, and abnormal deviation data is marked and isolated. After data cleaning, the data is structured and classified according to protocol level, fault type, disturbance condition, test dimension, and deviation level, constructing separate libraries for normal communication, minor anomalies, typical faults, extreme operating condition failures, and index shortcomings / deviations. A deep learning feature mining model for industrial bus protocol fault identification is constructed. Using preprocessed structured test data as input, it automatically learns the intrinsic correlation between multi-dimensional parameter changes and protocol anomalies and failures. Based on the deep learning feature mining results, the standardized fault set of industrial bus protocols is continuously updated and iteratively improved. Newly discovered latent faults, edge condition faults, dynamic disturbance faults, and faults unique to domestically produced equipment are all included in the fault sample library. The triggering conditions, feature parameters, risk levels, and operating condition adaptation ranges of various faults are supplemented and improved, achieving continuous expansion and accuracy upgrades of the fault sample library. Based on the updated fault set feature distribution and indicator benchmarking deviation, the weighted composite test sequence constructed by S3 is dynamically and adaptively adjusted. Combined with the dynamic weight parameters, the system automatically reorganizes, optimizes, and updates the weighted composite test sequence structure, generating a new generation of adaptive test sequences adapted to the current equipment status, operating condition characteristics, and fault distribution.By leveraging big data collection and cleaning technologies and deep learning-based intelligent mining techniques, we achieve continuous iteration of fault samples, dynamic adaptation of testing strategies, and autonomous upgrading of testing capabilities. This enables the construction of a comprehensive, high-precision, and evolvable intelligent testing closed-loop system for industrial bus protocols. It effectively addresses the technical pain points of traditional industrial protocol testing, such as fixed testing scenarios, fixed sequences, excessive manual intervention, weak ability to identify hidden faults, and inability to adapt to and optimize equipment shortcomings. This significantly improves the automation, intelligence, and precision of industrial communication protocol testing.
[0032] This invention patent provides a testing method for communication protocols of industrial control equipment based on a composite finite state machine model. The system includes a test cabinet and a host computer. The host computer can connect to a cloud server via the internet to acquire / store information. The test cabinet contains mounting fixtures for the industrial equipment under test, test interfaces, a power supply, a signal generator, an arbitrary wave generator, a vector network analyzer, protocol analysis and testing equipment, an oscilloscope, a computer, and control analysis software. The control analysis software includes a model building module, a reachability analysis module, a test sequence generation module, a simulation testing module, a data acquisition and benchmarking module, and an intelligent optimization module. These modules work collaboratively to automate the entire process of model building, algorithm analysis, sequence generation, scenario testing, indicator benchmarking, and intelligent optimization, supporting comprehensive protocol testing.
Claims
1. A testing method for communication protocols of industrial control equipment based on a composite finite state machine model, characterized in that, Includes the following steps: S1. Construct a composite finite state machine test model; S2. Compare and analyze the reachability of protocol states of different intelligent control systems using global search algorithm, controlled partial search algorithm, and stochastic simulation algorithm respectively; S3. Integrate multiple test sequence generation algorithms, and construct a weighted composite test sequence based on the reachability analysis results and the adaptive allocation of weights according to the protocol test index weights; S4. Construct an industrial bus protocol entity test system and a flexible scenario simulation verification system, build a flexible test scenario compatible with multiple working conditions, multiple interferences, and multiple devices, and conduct full-dimensional testing of consistency, interoperability, performance, and robustness; S5. Conduct benchmarking tests and data acquisition to complete the horizontal evaluation of product performance; S6. Intelligently optimize the test sequence, combine deep learning algorithms to iteratively collect bus fault sets, dynamically match test sequence weights, adaptively optimize automated test sequences, and realize closed-loop iterative optimization of the test process. The industrial control equipment communication protocol test system based on the composite finite state machine model includes a test cabinet and a host computer. The host computer can obtain / store information through the Internet and cloud servers. The test cabinet contains mounting fixtures for the industrial equipment under test, test interfaces, power supplies, signal generators, arbitrary waveform generators, vector network analyzers, protocol analysis and testing equipment, oscilloscopes, computers, and control analysis software. The control analysis software includes modules for model building, reachability analysis, test sequence generation, simulation testing, data acquisition and benchmarking, and intelligent optimization. These modules work collaboratively to automate the entire process from model building and algorithm analysis to sequence generation, scenario testing, performance benchmarking, and intelligent optimization, supporting comprehensive protocol testing.
2. The method according to claim 1, characterized in that, The composite finite state machine model described in step S1 is a multi-state coupled model that integrates the characteristics of layered protocols. It classifies and models the normal interaction state, abnormal interference state, and fault failure state of the industrial bus protocol, and associates the physical layer electrical characteristics, link layer transmission rules, and application layer data interaction logic to achieve accurate characterization of multi-level protocol behavior.
3. The method according to claim 1, characterized in that, The reachability analysis in step S2 specifically includes: using a global search algorithm to achieve full state traversal coverage for simple and stable test scenarios; using a controlled partial search algorithm to reduce invalid search dimensions for complex industrial control systems; and using a random simulation algorithm to simulate real industrial site disturbances for random interference conditions. By comparing the coverage, time consumption, and accuracy indicators of the three types of algorithms, scenario-based algorithm adaptation is achieved.
4. The method according to claim 1, characterized in that, The method for constructing the weighted composite test sequence in step S3 includes: allocating basic weights based on the priority of consistency testing, interoperability testing, performance testing, and robustness testing; combining the adaptation scenarios of the four types of test sequence generation algorithms; and fusion and weighting the state transition path, feature verification sequence, differentiation verification logic, and input-output matching rules to generate a composite test sequence that balances full coverage, high efficiency, and high accuracy.
5. The method according to claim 1, characterized in that, In step S4, the flexible scenario simulation verification system supports custom configuration of operating parameters and can simulate flexible scenarios such as network fluctuations, hot-plugging of equipment, data packet loss, and abnormal command input in industrial sites, adapting to the protocol testing needs of different brands and models of industrial intelligent control equipment.
6. The method according to claim 1, characterized in that, In step S6, the deep learning algorithm is used to mine the correlation features between test data and protocol faults, automatically collect typical bus faults, latent faults, and occasional fault datasets, and dynamically adjust the weight and frequency of corresponding test items in the test sequence based on the fault type to achieve intelligent iterative optimization of automated testing.
7. The method according to claim 1, characterized in that, A testing system for communication protocols of industrial control equipment based on a composite finite state machine model includes a test cabinet and a host computer. The host computer can acquire / store information via the Internet or cloud servers. The test cabinet contains mounting fixtures for the industrial equipment under test, test interfaces, a power supply, a signal generator, an arbitrary wave generator, a vector network analyzer, protocol analysis and testing equipment, an oscilloscope, a computer, and control analysis software. The control analysis software includes a model building module, a reachability analysis module, a test sequence generation module, a simulation testing module, a data acquisition and benchmarking module, and an intelligent optimization module. The model building module is used to construct a composite finite state machine model adapted to multiple protocol layers of industrial buses, characterizing the full-state interaction logic of the protocols; the reachability analysis module is used to run three types of algorithms—global search, controlled partial search, and random simulation—to complete the comparative analysis of the reachability of industrial control system protocol states; the test sequence generation module is used to integrate four types of test sequence algorithms to adaptively generate composite test sequences with weighted averages; the simulation testing module is used to build flexible simulation scenarios to conduct comprehensive testing of protocol consistency, interoperability, performance, and robustness; the data acquisition and benchmarking module is used to collect bus test indicators of similar products at home and abroad, and complete horizontal performance comparison and data storage; the intelligent optimization module is used to process test data through big data and deep learning algorithms, collect fault sets, and dynamically optimize test sequences.
8. The system according to claim 7, characterized in that, The simulation testing module supports both physical equipment docking testing and virtual scene simulation testing modes, enabling data exchange between laboratory simulation verification and industrial field measurement.
9. The system according to claim 7, characterized in that, The system can be expanded to adapt to scenarios such as communication chip protocol testing, industrial communication network fault diagnosis, intelligent manufacturing system protocol verification, and IoT and network communication protocol compliance testing.
10. The system according to claim 7, characterized in that, The testable metrics of the system include the physical layer's transmission rate, anti-interference capability, and electrical performance metrics; the link layer's frame transmission success rate, packet loss rate, and retransmission efficiency metrics; the application layer's command response accuracy, data interaction consistency, and multi-device compatibility metrics; and the protocol's robustness and stability metrics under extreme operating conditions.
