PDU message visualization methods, devices, equipment, and media

By automatically parsing the core fields of EtherCAT protocol PDUs and displaying them in a PDU list view, the problem of insufficient parsing capabilities and lack of visualization in existing tools is solved, thereby improving the efficiency of fault location.

CN121644398BActive Publication Date: 2026-07-17INSPUR GENERSOFT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR GENERSOFT CO LTD
Filing Date
2026-01-04
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing tools lack sufficient parsing capabilities in EtherCAT network debugging, failing to quickly parse core PDU fields, and are deficient in visualization and interactivity, resulting in low efficiency in fault location.

Method used

This paper provides a method for visualizing PDU messages. By collecting EtherCAT protocol communication messages, it automatically parses the core fields of PDUs according to the predetermined link layer protocol specifications and visualizes the key information in the form of a PDU list view. It supports viewing field details and filtering by conditions.

Benefits of technology

It enables intuitive visualization of PDU structure and key information, reduces protocol learning costs, improves fault location efficiency, and supports basic interactive operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121644398B_ABST
    Figure CN121644398B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and medium for visualizing PDU messages, belonging to the field of industrial automation technology. The PDU message visualization method includes: acquiring communication messages of the EtherCAT protocol; parsing the core fields of the PDUs in the communication messages according to a predetermined link layer protocol specification to obtain PDU parsing information; visually displaying the PDU parsing information in a PDU list view; and viewing field details and filtering target PDUs according to the PDU list view. This application can solve the problems of insufficient parsing capabilities and lack of visualization and interactivity in existing general-purpose tools.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of industrial automation technology, specifically relating to a PDU message visualization method, device, equipment, and medium. Background Technology

[0002] EtherCAT is the mainstream real-time Ethernet protocol in the field of industrial automation. The Protocol Data Unit (PDU) is the core data unit of EtherCAT communication, containing key information such as command code (CMD), address (ADP / ADO), data, and working counter, which directly determines the data interaction logic such as read / write operations between master and slave stations and slave addressing.

[0003] In EtherCAT network debugging, PDU parsing is crucial for locating communication faults. Existing technologies typically rely on message detection models to determine whether EtherCAT protocol messages are abnormal, thereby blocking their transmission. Specifically, CN119728816A discloses a method for processing EtherCAT protocol messages. This method determines anomaly detection scores for EtherCAT protocol messages based on a message detection model, extracts key data from the message when the score is low, and blocks EtherCAT protocol message transmission when the key data does not meet the allowed transmission conditions. This adapts to constantly changing network environments and new attack methods.

[0004] However, existing technologies have the following shortcomings:

[0005] Insufficient parsing capabilities of general-purpose tools: General packet capture tools such as Wireshark can only display EtherCAT packets as hexadecimal / binary streams, or only perform preliminary parsing of the packet structure. Detailed packet parsing still requires users to manually interpret the meaning of each field of the PDU by referring to the "ETG.1000.4 Data Link Layer Protocol Specification", which is difficult and inefficient.

[0006] Lack of visualization and interactivity: Existing tools mostly display PDUs in plain text or simple lists, which cannot intuitively present the structural hierarchy and key information of PDUs (such as the meaning of command codes, the corresponding slave stations at the addresses, and the actual meaning of the data); they also lack interactive operations for PDU information, and fault location requires manual analysis frame by frame, which is time-consuming.

[0007] In summary, there is an urgent need for a dedicated tool that can quickly parse PDU core fields, provide intuitive visualization, and support basic interactions. Summary of the Invention

[0008] This application aims to provide an EtherCAT PDU message visualization solution, which automatically parses the core fields of the PDU (command code CMD, address ADP / ADO, data, and work counter WKC, etc.); visualizes the PDU structure and key information in an intuitive way, reducing the protocol learning cost; and supports basic interactive operations (viewing field details and filtering PDUs by conditions), improving fault location efficiency.

[0009] According to a first aspect of this application, this application provides a method for visualizing PDU messages, including:

[0010] Collect communication messages of the EtherCAT protocol;

[0011] According to the predetermined link layer protocol specifications, the core fields of the PDU in the communication message are parsed to obtain the PDU parsing information;

[0012] The PDU parsing information is displayed visually in the form of a PDU list view;

[0013] The PDU list view allows users to view field details and filter target PDUs based on the parsed PDU information.

[0014] Preferably, in the above PDU message visualization method, the collection of EtherCAT protocol communication messages includes:

[0015] By importing packet capture files offline and / or using real-time packet capture, offline packet analysis can be performed on communication messages to obtain the data packets corresponding to the communication messages.

[0016] The EtherType identifier is used to identify and filter non-EtherCAT frames in the data packet.

[0017] Preferably, in the above PDU message visualization method, the core fields of the PDU in the communication message are parsed according to the predetermined link layer protocol specification to obtain PDU parsing information, including: identifying the command code in the communication message and marking the command meaning corresponding to the command code according to the predetermined link layer protocol specification;

[0018] According to the predetermined link layer protocol specification, the physical address in the communication message is parsed to identify the slave station identifier corresponding to the physical address;

[0019] Extract the data field content from the communication message and provide format conversion prompts according to common slave station types;

[0020] Based on the working counter, mark the abnormal status in the communication message.

[0021] Preferably, in the above PDU message visualization method, the PDU parsing information is visualized in the form of a PDU list view, including: displaying the PDU parsing information hierarchically according to the PDU list view format;

[0022] Based on the displayed PDU parsing information, determine whether there is any abnormal state in the PDU parsing information;

[0023] If an abnormal state is determined in the PDU parsing information, the abnormal state will be displayed in a special way.

[0024] Preferably, in the above PDU message visualization method, the PDU parsing information is viewed for field details and the target PDU is filtered according to the PDU list view format, including: when a field details viewing instruction for any field in the PDU list view format is obtained, the value range and specification basis of the core PDU field are displayed; wherein, the specification basis corresponds to the predetermined link layer protocol specification;

[0025] Filter the target PDUs in the PDU parsing information according to the preset filtering conditions.

[0026] Preferably, in the above PDU message visualization method, filtering the target PDUs in the PDU parsing information according to preset filtering conditions includes:

[0027] When a target PDU is found to be in an abnormal state according to the preset filtering conditions, locate the abnormal state and the corresponding fault cause.

[0028] According to the cause of the fault, check the slave station hardware or register configuration and then recollect communication packets until the target PDU is in a normal state according to the preset filtering conditions.

[0029] Preferably, the above-mentioned PDU message visualization method, after viewing the field details and filtering the target PDUs in the PDU list view format, further includes:

[0030] Based on the filtered target PDU, determine whether the field details corresponding to the target PDU involve communication privacy content;

[0031] If the field details are determined to involve communication privacy information, then the transmission of the communication message will be blocked.

[0032] The corresponding replacement message is generated and transmitted according to the predetermined link protocol specification.

[0033] According to a second aspect of this application, this application also provides a PDU message visualization device, comprising:

[0034] The message acquisition module is used to acquire communication messages of the EtherCAT protocol;

[0035] The content parsing module is used to parse the core fields of the PDU in the communication message according to the predetermined link layer protocol specifications to obtain the PDU parsing information;

[0036] The list visualization module is used to visually display PDU parsing information in the form of a PDU list view;

[0037] The basic interaction module is used to view field details and filter target PDUs according to the PDU list view.

[0038] According to a third aspect of this application, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the PDU message visualization method provided by any of the above technical solutions.

[0039] According to a fourth aspect of this application, this application also provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed, it implements the PDU message visualization method provided by any of the above technical solutions.

[0040] The technical solution of this application has at least the following technical effects:

[0041] The PDU message visualization solution provided in this application collects communication messages of the EtherCAT protocol and then, according to a predetermined link layer protocol specification, automatically parses the content of the core fields of the PDU in the communication messages to obtain PDU parsing information. After obtaining the PDU parsing information, it can be visualized in the form of a PDU list view. Finally, the field details of the above PDU parsing information can be viewed and target PDUs can be filtered according to the PDU list view. The EtherCAT PDU message visualization tool provided in the above manner can automatically parse the core fields of the PDU (command code CMD, address ADP / ADO, data, and work counter WKC, etc.); thereby visualizing the PDU structure and key information in an intuitive way, reducing the protocol learning cost; and supporting basic PDU interactive operations (viewing field details, filtering PDUs by conditions), thus improving the efficiency of fault location. Attached Figure Description

[0042] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0043] Figure 1 A flowchart illustrating a PDU message visualization method provided in this application embodiment;

[0044] Figure 2 for Figure 1 The illustrated embodiment provides a flowchart of a message filtering method;

[0045] Figure 3 A schematic diagram of the structure of a PDU message visualization device provided in an embodiment of this application;

[0046] Figure 4 A schematic diagram of a PDU message list provided for an embodiment of this application;

[0047] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0048] To more clearly illustrate the overall concept of this application, a detailed explanation is provided below with reference to the accompanying drawings.

[0049] Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below. It should be noted that, unless otherwise specified, the embodiments of this application and the features thereof can be combined with each other.

[0050] In this application, unless otherwise expressly specified and limited, the terms "above" and "below" the second feature can refer to direct contact between the first and second features, or indirect contact between the first and second features through an intermediate medium. In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples.

[0051] The existing technology has the following drawbacks:

[0052] In EtherCAT network debugging, PDU parsing is crucial for locating communication faults, but existing technologies have the following shortcomings:

[0053] Insufficient parsing capabilities of general-purpose tools: General packet capture tools such as Wireshark can only display EtherCAT packets as hexadecimal / binary streams, or only perform preliminary parsing of the packet structure. Detailed packet parsing still requires users to manually interpret the meaning of each field of the PDU by referring to the "ETG.1000.4 Data Link Layer Protocol Specification", which is difficult and inefficient.

[0054] Lack of visualization and interactivity: Existing tools mostly display PDUs in plain text or simple lists, which cannot intuitively present the structural hierarchy and key information of PDUs (such as the meaning of command codes, the corresponding slave stations at the addresses, and the actual meaning of the data); they also lack interactive operations for PDU information, and fault location requires manual analysis frame by frame, which is time-consuming.

[0055] To overcome the above-mentioned technical difficulties, the following embodiments of this application are provided.

[0056] To achieve the above objectives, see [link to relevant documentation]. Figure 1 , Figure 1 This document provides a flowchart illustrating a PDU message visualization method as described in an embodiment of this application. Figure 1 As shown, this PDU message visualization method includes:

[0057] S110: Acquire EtherCAT protocol communication messages. This embodiment supports offline import of EtherCAT protocol communication messages. It can also automatically filter non-EtherCAT frames to reduce interference from invalid data.

[0058] Specifically, in a preferred embodiment, step S110: collecting communication messages of the EtherCAT protocol, specifically includes:

[0059] S111: Perform offline packet analysis on communication packets by importing packet capture files offline and / or using real-time packet capture methods to obtain the data packets corresponding to the communication packets;

[0060] S112: Identify and filter non-EtherCAT frames in data packets using the EtherType identifier.

[0061] The technical solution provided in this application supports importing general packet capture files (such as pcap format) and / or real-time packet capture, thereby supporting offline import of communication packets. This method is also compatible with the output files of tools such as Wireshark, enabling offline packet analysis. After obtaining the data packets of the communication packets, preprocessing is performed. The specific preprocessing process is as follows: non-EtherCAT frames are automatically filtered (identified by EtherType=0x88A4) to reduce interference from invalid data.

[0062] Figure 1The technical solution provided in the illustrated embodiment, after step S110: collecting communication messages of the EtherCAT protocol, further includes:

[0063] S120: According to the predetermined link layer protocol specification, the core field of the PDU in the communication message is parsed to obtain the PDU parsing information.

[0064] The predefined data link layer protocol specification used here is the ETG.1000.4 Data Link Layer Protocol Specification. This specification enables automated parsing of the core fields of the PDU. The resulting PDU parsing information includes the command code (CMD), address field, data field (Data), and working counter (WKC). The WKC value reflects any abnormal state of the PDU message.

[0065] Specifically, as a preferred embodiment, in the technical solution provided by this application embodiment, the above step S120: according to the predetermined link layer protocol specification, the PDU core field in the communication message is parsed to obtain PDU parsing information, including: S121: according to the predetermined link layer protocol specification, the command code in the communication message is identified and the command meaning corresponding to the command code is marked.

[0066] The specific identification of command code CMD is as follows: identify common commands such as APRD (0x01, auto-incrementing physical read), FPWR (0x05, fixed address physical write), LRW (0x0C, logical read / write), and annotate the meaning of the commands.

[0067] S122: According to the predetermined link layer protocol specification, parse the physical address in the communication message and identify the slave station identifier corresponding to the physical address.

[0068] The address field is identified by parsing the physical address (ADP / ADO) and recognizing the corresponding slave identifier.

[0069] S123: Extract the data field content from the communication message and provide format conversion prompts for the data field content according to common slave station types. The identification of the Data field is obtained by extracting the Data segment content and providing basic data format conversion prompts such as "binary to decimal" based on common slave station types (such as servo drives or IO modules).

[0070] S124: Mark abnormal states in communication messages based on the working counter. By extracting the WKC value, abnormal states such as "WKC not incremented" can be marked (under normal circumstances, WKC will be incremented by 1 after the slave station successfully processes the PDU).

[0071] The technical solution provided in this application can automatically identify command codes and their meanings, material addresses and slave identifiers, data format conversion prompts, and abnormal status markers in communication messages according to predetermined link layer protocol specifications. Through this method, detailed PDU parsing information of the communication messages can be obtained, thereby achieving detailed PDU parsing of the EtherCAT protocol and accurately displaying the key information of the PDU. This solves the problem of insufficient parsing capabilities of general-purpose tools in the prior art, automatically interpreting the meaning of each field of the PDU by referring to the "ETG.1000.4 Data Link Layer Protocol Specification," lowering the parsing threshold for key PDU information and improving parsing efficiency.

[0072] Figure 1 The technical solution provided in the illustrated embodiment, after parsing the PDU core field in the communication message according to the predetermined link layer protocol specification to obtain the PDU parsing information in step S120, further includes:

[0073] S130: Displays PDU parsing information visually in the form of a PDU list view.

[0074] The technical solution provided in this application embodiment displays key information of PDUs in a list visualization format, i.e., a PDU list view. For example... Figure 4 As shown, the table format can list the key information of each PDU (command code CMD, address ADP, work counter WKC, and data digest, etc.); if a PDU has an anomaly (such as WKC not incrementing), the corresponding row will be highlighted (e.g., red background).

[0075] Specifically, as a preferred embodiment, in the above PDU message visualization method, step S130: visually displaying PDU parsing information in the form of a PDU list view includes: S131: displaying PDU parsing information hierarchically according to the PDU list view format.

[0076] S132: Based on the displayed PDU parsing information, determine whether there is an abnormal state in the PDU parsing information.

[0077] S133: If an abnormal state is determined in the PDU parsing information, the abnormal state will be highlighted in a special way. For example, it can be highlighted with a red background.

[0078] The technical solution provided in this application, through a PDU list view, can display PDU parsing information in a hierarchical structure. It can also determine whether there are any abnormal states in the displayed PDU parsing information, such as whether the working counter WKC is not incrementing. If WKC is not incrementing, the corresponding row will be highlighted. This method intuitively presents the structural hierarchy and key information of the PDU parsing information (such as the meaning of command codes, the address corresponding to the slave station, and the actual meaning of the data); and enables interactive operation of PDU information without requiring frame-by-frame fault location, thus reducing time consumption.

[0079] Specifically, such as Figure 4 As shown, the generated data digest includes commands (CMD), actions (ADP), addresses (ADO), counts (LENC), fields (NEXT), data (DATA), and work counters (WKC), and is displayed in the form of a message list.

[0080] S140: View the field details and filter the target PDUs according to the PDU list view format.

[0081] In addition, as a preferred embodiment, in the above PDU message visualization method, step S140: according to the PDU list view format, the PDU parsing information is viewed for field details and the target PDU is filtered, including: S141: when a field details viewing instruction for any field in the PDU list view format is obtained, the value range and specification basis of the PDU core field are displayed; wherein, the specification basis corresponds to the predetermined link layer protocol specification.

[0082] S142: Filter the target PDUs in the PDU parsing information according to the preset filtering conditions.

[0083] The technical solution provided in this application embodiment can also realize basic interaction of PDU parsing information, including operations such as viewing field details and conditional filtering. Specifically, viewing field details: clicking on any field in the "PDU Structure View" or "PDU List View" will pop up a details window, displaying the field's value and specification basis (such as "refer to Table 32 of ETG.1000.4"). Conditional filtering: supports quick filtering to the target PDU by conditions such as "command code (e.g., filtering PDUs with CMD=APRD), slave address (e.g., filtering PDUs with ADP=0x0001), WKC status (e.g., filtering abnormal PDUs with WKC=0)".

[0084] In addition, as a preferred embodiment, in the above PDU message visualization method, step S142: filtering the target PDUs in the PDU parsing information according to preset filtering conditions includes:

[0085] When a target PDU is found to be in an abnormal state according to the preset filtering conditions, the abnormal state and the corresponding fault cause are located.

[0086] According to the cause of the fault, check the slave station hardware or register configuration and then recollect communication packets until the target PDU is in a normal state according to the preset filtering conditions.

[0087] The technical solution provided in this application embodiment can quickly filter to the target PDU by using WKC status, such as filtering abnormal PDUs with WKC=0, thereby achieving rapid fault location.

[0088] As a specific example, when the EtherCAT master sends a "write data" message to the slave (address 0x0001), if the slave does not respond, the problem needs to be found by analyzing the PDU using tools.

[0089] The embodiments of this application perform the following operations:

[0090] 1. Start packet capture: Select the "Real-time packet capture" mode, specify the Ethernet network card, and click "Start Capture". The tool will capture EtherCAT packets between the master station and the slave station (0x0001).

[0091] 2. PDU parsing and visualization: The tool automatically parses the PDUs of the target slave station and highlights abnormal PDUs in the "PDU list view": CMD=0x05 (FPWR, fixed address write), ADP=0x0001 (slave station address), Data=0x1234 (write data), WKC=0 (abnormal, should be ≥1);

[0092] 3. Interactive Fault Analysis: Click on the PDU row and view the details in the "PDU Structure View". You will find that WKC=0 (the slave failed to process the write operation); combined with CMD=FPWR (write command), you can quickly locate the problem as "the slave did not respond to the write operation to this address".

[0093] 4. Fault verification and repair: After checking the slave hardware or register configuration, recollect the message. The PDU's WKC=1 (normal) and the slave starts responding to the write operation.

[0094] In addition, as a preferred embodiment, such as Figure 2 As shown, in the above PDU message visualization method, after step S140—viewing field details and filtering target PDUs according to the PDU list view—it further includes:

[0095] S201: Based on the filtered target PDU, determine whether the field details corresponding to the target PDU involve communication privacy content.

[0096] S202: If the field details are determined to involve communication privacy content, then block the transmission of communication messages.

[0097] S203: Generate the corresponding replacement message according to the predetermined link protocol specification and transmit it.

[0098] The technical solution provided in this application, if involving communication privacy content, blocks the transmission of communication messages, thereby preventing the slave station from receiving privacy content involving the master station. Furthermore, it generates a replacement message according to a predetermined link protocol specification and transmits it to the slave station, thus avoiding problems such as fault alarms caused by the slave station not receiving content from the master station for an extended period.

[0099] Furthermore, the beneficial effects of the product embodiments provided in the following embodiments of this application are the same as the beneficial effects of the PDU message visualization method provided in the above embodiments, and other technical features in the product embodiments are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.

[0100] See below. Figure 3 , Figure 3 This is a schematic diagram of the structure of a PDU message visualization device provided in an embodiment of this application. Figure 3 As shown, the PDU message visualization device includes:

[0101] The message acquisition module 110 is used to acquire communication messages of the EtherCAT protocol;

[0102] The content parsing module 120 is used to parse the core PDU field in the communication message according to a predetermined link layer protocol specification to obtain PDU parsing information;

[0103] The list visualization module 130 is used to visually display the PDU parsing information in the form of a PDU list view;

[0104] The basic interaction module 140 is used to view field details and filter target PDUs according to the PDU list view format of the PDU parsing information.

[0105] In summary, the PDU message visualization scheme provided in this application collects communication messages of the EtherCAT protocol and then, according to a predetermined link layer protocol specification, automatically parses the content of the core fields of the PDU in the communication messages to obtain PDU parsing information. After obtaining the PDU parsing information, it can be visualized in the form of a PDU list view. Finally, the field details of the above PDU parsing information can be viewed and target PDUs can be filtered according to the PDU list view. The EtherCAT PDU message visualization tool provided in the above manner can automatically parse the core fields of the PDU (command code CMD, address ADP / ADO, data, and work counter WKC, etc.); thereby visualizing the PDU structure and key information in an intuitive way, reducing the protocol learning cost; and supporting basic interactive operations of PDUs (viewing field details, filtering PDUs by conditions), thus improving the efficiency of fault location.

[0106] See below. Figure 5 , Figure 5 An electronic device provided in this application includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the PDU message visualization method provided in any of the above embodiments.

[0107] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in the embodiments of this application may include, but are not limited to, mobile terminals and / or fixed terminals. Figure 5 The device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0108] like Figure 5As shown, the electronic device can include a processing unit 1001, such as a central processing unit and / or a graphics processing unit, which can perform various appropriate actions and processes according to a program stored in ROM 1002 or a program loaded from storage device 1003 into RAM 1004. RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output interface 1006 is also connected to bus 1005. Typically, the following systems can be connected to input / output interface 1006: input devices 1007, such as touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, and / or gyroscopes; output devices 1008, such as liquid crystal displays (LCDs), speakers, and / or vibrators; storage devices 1003, such as magnetic tape and / or hard disks; and communication devices 1009. Communication device 1009 is capable of enabling the electronic device to exchange data with other devices wirelessly or via wired communication. Although the diagram shows a model building device with various systems, it should be understood that it is not required to implement or have all of the systems shown. It is possible to implement or have more or fewer systems alternatively.

[0109] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0110] This application provides a computer-readable storage medium having computer-readable program instructions stored thereon, namely the computer program described above, which is used to perform the methods in the above embodiments. The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram can represent a module, program segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than those marked in the drawings. For example, two consecutively indicated blocks can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0111] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0112] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0113] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for visualizing PDU messages, characterized in that, include: Collect communication messages of the EtherCAT protocol; According to the predetermined link layer protocol specification, the core field of the PDU in the communication message is parsed to obtain the PDU parsing information; The PDU parsing information is displayed visually in the form of a PDU list view; According to the PDU list view format, the PDU parsing information can be viewed for field details and the target PDU can be filtered. The step of parsing the core PDU fields in the communication message according to the predetermined link layer protocol specification to obtain PDU parsing information includes: identifying the command code in the communication message and marking the command meaning corresponding to the command code according to the predetermined link layer protocol specification; parsing the physical address in the communication message and identifying the slave identifier corresponding to the physical address according to the predetermined link layer protocol specification; extracting the data field content in the communication message and providing format conversion prompts for the data field content according to common slave types; and marking the abnormal status in the communication message according to the working counter. The step of visually displaying the PDU parsing information in the form of a PDU list view includes: displaying the PDU parsing information in a hierarchical structure according to the PDU list view format; determining whether the displayed PDU parsing information has an abnormal state; and if the PDU parsing information is determined to have an abnormal state, then displaying the display position of the abnormal state. The step of viewing field details and filtering target PDUs in the PDU parsing information according to the PDU list view format includes: when a field details viewing instruction is obtained for any field in the PDU list view format, displaying the value range and specification basis of the core field of the PDU; wherein, the specification basis corresponds to the predetermined link layer protocol specification; and filtering the target PDUs in the PDU parsing information according to preset filtering conditions. The step of filtering the target PDU in the PDU parsing information according to the preset filtering conditions includes: when the target PDU is in an abnormal state according to the preset filtering conditions, locating the abnormal state and the fault cause corresponding to the abnormal state; and after checking the slave station hardware or register configuration according to the fault cause, re-collecting the communication packets until the target PDU is in a normal state according to the preset filtering conditions. After viewing the field details and filtering the target PDUs according to the PDU list view, the method further includes: determining whether the field details corresponding to the filtered target PDUs involve communication privacy content; if the field details involve communication privacy content, blocking the transmission of the communication message; and generating and transmitting a corresponding replacement message according to the predetermined link layer protocol specification.

2. The method according to claim 1, characterized in that, The acquisition of EtherCAT protocol communication messages includes: The communication messages are analyzed offline by importing packet capture files offline and / or by real-time packet capture to obtain the data packets corresponding to the communication messages. The EtherType identifier is used to identify and filter non-EtherCAT frames in the data packet.

3. A PDU message visualization device, characterized in that, The apparatus for the PDU message visualization method according to any one of claims 1-2 comprises: The message acquisition module is used to acquire communication messages of the EtherCAT protocol; The content parsing module is used to parse the core PDU fields in the communication message according to the predetermined link layer protocol specifications to obtain PDU parsing information; The list visualization module is used to visually display the parsed information of the PDU in the form of a PDU list view; The basic interaction module is used to view field details and filter target PDUs according to the PDU list view format.

4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the PDU message visualization method as described in any one of claims 1 to 2.

5. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the PDU message visualization method as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Processing method and device for EtherCAT protocol message, storage medium and program product

    CN119728816A

  • Slave station equipment information processing method and device, terminal equipment and industrial network system

    CN118694481A

  • Communication method, system and equipment based on improved Ethercat protocol

    CN120567953A