Communication protocol suitable for distributed system equipment control

By designing a communication protocol based on the open system interconnection model, the problems of traditional protocols falling communication efficiency, insufficient flexibility and lack of management and diagnostic functions in distributed systems are solved, efficient equipment control and data transmission are achieved, and the system management and diagnostic capabilities are enhanced.

CN119544807APending Publication Date: 2025-02-28SHANGHAI MINGJIAN ELECTRONIC TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311476502.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-07
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Traditional communication protocols have problems in distributed systems with reduced communication efficiency, inadequate flexibility, and lack of equipment management and diagnostic functions, especially in weak network environments and complex systems.

Method used

A communication protocol based on the open system interconnection model is designed, including the transport layer interface standard module, the session layer message and communication control module and the application layer service module, providing data transmission, device management, diagnosis and flexible application service interfaces.

Benefits of technology

It realizes efficient equipment control and data transmission in distributed systems, provides flexible application service interfaces, enhances the system's management and diagnosis capabilities, and is suitable for multi-level and multi-node distributed systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544807A_ABST
    Figure CN119544807A_ABST
Patent Text Reader

Abstract

The invention relates to a communication protocol suitable for distributed system equipment control. The communication protocol is based on an open system interconnection model constructed by an application layer, a presentation layer, a session layer, a transmission layer, a network layer, a data link layer and a physical layer. The communication protocol specifically comprises the following modules: a transport layer interface standard module; a session layer message and communication control module; and an application layer service module. The protocol provided by the invention is a distributed control system, particularly a multi-device system with a tree structure, and provides a device control and data transmission standard which is easy to manage, flexible, efficient and better in robustness, and the protocol does not depend on a physical layer, is easy to transplant and strong in expansibility, and has user friendliness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to communication protocols, and in particular to a communication protocol suitable for distributed system equipment control. Background Art

[0002] Communication protocols are widely used in the field of modern information technology and are used for communication and data exchange between devices. Various common application layer protocols provide various services and application layer data exchange standards for devices on the bus / network, and different application layer protocols have different uses and focus areas, some focusing on user access to the server, and others focusing on large amounts of real-time data transmission, node status monitoring or automated equipment control, etc.

[0003] Distributed systems have been widely used in modern industrial automation, network collaboration systems, semiconductor test systems, and IoT embedded systems. These systems usually include multiple levels, multiple devices or modules. Multiple devices at different levels need to coordinate and communicate to achieve complex device control and task execution. In order to ensure the normal operation of each device node in the system, it is necessary to establish a complete communication link and ensure that data can be exchanged smoothly and stably. A highly applicable communication protocol is essential.

[0004] In the past, the design of communication protocols for device control in distributed systems usually focused on the underlying communication technology, but less consideration was given to the services and functions provided at the application layer. Therefore, it is necessary to develop a high-level communication protocol for the application scenarios of such systems, which can better meet the multi-level and multi-node device control requirements, including efficient data transmission, device management, diagnosis, and various flexible application service interfaces.

[0005] In addition, traditional communication protocols have some problems in distributed systems. For example, Figure 1 In the multi-level tree-structured system shown, the communication efficiency between nodes of some protocols may decrease in a weak network environment; or it may be difficult for inflexible devices to support complex application layer protocols; in addition, some protocols may not provide sufficient device management and diagnostic functions, which is particularly important in complex systems.

[0006] In view of the above-mentioned defects, the designers have actively carried out research and innovation in order to create a communication protocol suitable for distributed system equipment control, making it more valuable for industrial use. Summary of the invention

[0007] In order to solve the above technical problems, an object of the present invention is to provide a communication protocol suitable for distributed system equipment control.

[0008] To achieve the above object, the present invention adopts the following technical solution:

[0009] A communication protocol suitable for distributed system device control, the communication protocol is based on the open system interconnection model constructed by the application layer, presentation layer, session layer, transport layer, network layer, data link layer and physical layer;

[0010] The communication protocol specifically includes the following modules:

[0011] Transport layer interface standard module: used to specify the interface between the protocol session layer and the transport layer, and defines the format of the data packets that the user transport layer needs to provide and the protocol session layer provides;

[0012] Session layer message and communication control module: used to define the basic data exchange mode and basic communication message format between the host and the slave in the session layer, and define the communication control method of the session layer according to the message characteristics;

[0013] Application layer service module: Based on the above basic communication messages and communication control methods, the protocol defines register operations, file transfers, command functions, network management and diagnostic services at the application layer to control and manage multiple devices in the system.

[0014] As a further improvement of the present invention, the interface between the session layer and the transport layer specifically includes:

[0015] Data transmission interface: sends data from local to remote devices, including two key elements: data length and data content;

[0016] Data receiving interface: receives data sent from remote devices to local devices, including two key elements: data length detection and data content reception.

[0017] As a further improvement of the present invention, the basic data exchange mode defined by the session layer includes:

[0018] Communication data description: defines the frame type, format and meaning of each field of the basic communication message;

[0019] Data format: defines the data format, encoding, decoding, encryption and decryption methods of each field in the basic communication message.

[0020] As a further improvement of the present invention, the session layer basic communication message includes a quick access message and a short message message.

[0021] As a further improvement of the present invention, the fast access message is implemented based on a point-to-point question-and-answer communication model. During the fast access process, the master device sends a request, and the slave device immediately responds, and a fast access is completed through one question and one answer.

[0022] Short message messaging is implemented based on a production-consumption communication model, with data transmitted in one direction, and no response is required from the device receiving the message.

[0023] As a further improvement of the present invention, the quick access message includes a quick access request message and a quick access response message;

[0024] The fast access request message consists of a protocol header, a message type, a random code, a timeout retransmission parameter, an application data field, and a 16-bit checksum field;

[0025] The quick access response message consists of a protocol header, a response result, a random code, an application data field, and a 16-bit checksum field.

[0026] As a further improvement of the present invention, short message messages can be sent periodically or event-based according to the configuration of the mailbox and short message list, and no reply is required from the recipient; the short message message consists of a protocol, a message identifier, a mailbox number, a message number, a message length, a data field and a message check code.

[0027] As a further improvement of the present invention, the communication control method of the session layer is: specifying the communication process between the master device and the slave device, and using the message header, random synchronization code, timeout retransmission parameter and message check code of the transport layer message for communication control.

[0028] As a further improvement of the present invention, register operation: the master device requests to operate the register of the slave device, and after establishing the service process, the master device reads or writes the register of the slave device;

[0029] File transfer: The master device requests to download files to the slave device or upload files to the slave device according to conditions or user input. After the service process is established, the file upload or download is completed through the file transfer control module;

[0030] Command function: The master device calls the command service to enable the slave device to execute the command quickly;

[0031] Network management: No need to establish a service process first. When the slave device is powered on, it sends an online notification to the specified master device and waits for the master device to be configured. Then, after the configuration is completed through other services, there is no need to establish a service process. The master device cyclically sends network synchronization signals to all slave devices. The slave device periodically sends its own device descriptor and real-time status as an online identification message to the master device.

[0032] Diagnosis: After the master device is connected to the slave device, the host collects information about each diagnostic point of the slave device based on the real-time status of the device cyclically broadcast by the slave device in the network management, and calls the fault diagnosis service including but not limited to fault code, reset, flash, safety test, and device control based on the results.

[0033] As a further improvement of the present invention, the transport layer is UDP protocol or TCP protocol;

[0034] The network layer is Internet IP;

[0035] The data link layer is Ethernet;

[0036] The physical layer is an electrical signal network port or an optical signal network port.

[0037] By means of the above scheme, the present invention has at least the following advantages:

[0038] The protocol of the present invention provides a device control and data transmission standard that is easy to manage, flexible, efficient, and robust for distributed control systems, especially multi-device systems with a tree structure. The protocol is independent of the physical layer, easy to transplant, highly scalable, and user-friendly. After actual engineering verification, the protocol has excellent system applicability and stability.

[0039] High system adaptability: Designed for distributed systems, especially for distributed systems with multiple types of devices and multi-level tree structures, it solves the problem of application standards for such systems.

[0040] Wide applicability: The protocol is applicable to various types of buses and is compatible with various types of devices.

[0041] For managing devices: With diagnostic and network management functions, the protocol supports device classification and cross-level communication, making device management more flexible and efficient.

[0042] Robustness: The protocol has error detection and retransmission mechanisms to ensure the reliability of data transmission.

[0043] Independent of physical layer: The protocol does not rely on specific physical layer technology and has good portability and scalability.

[0044] User-friendliness: The application layer of the protocol design is very rich in functions and fully considers user-friendliness. It is easy to use, configure and expand. The implementation of the application mainly relies on the master device, and the requirements for the transport layer are relatively simple. It is easy to integrate the DAP protocol on low-cost slave device hardware.

[0045] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 It is a schematic diagram of the system architecture of the prior art of the present invention;

[0048] Figure 2 It is a schematic diagram of the positioning of the present invention in the OSI model;

[0049] Figure 3 This is the application scenario of the protocol of the present invention;

[0050] Figure 4 It is an access model for fast access messages of the protocol of the present invention;

[0051] Figure 5 It is an access model for short message messages of the protocol of the present invention;

[0052] Figure 6 It is a schematic diagram of an application case of the first embodiment of the protocol of the present invention;

[0053] Figure 7 It is a schematic diagram of the system architecture of the first embodiment of the protocol of the present invention. DETAILED DESCRIPTION

[0054] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0055] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, rather than all the embodiments. The components of the embodiment of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiment of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiment of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0056] Example

[0057] like Figure 1 to Figure 7 As shown,

[0058] A communication protocol suitable for distributed system device control, the communication protocol is based on the open system interconnection model constructed by the application layer, presentation layer, session layer, transport layer, network layer, data link layer and physical layer;

[0059] The communication protocol specifically includes the following modules:

[0060] Transport layer interface standard module: used to specify the interface between the protocol session layer and the transport layer, and defines the format of the data packets that the user transport layer needs to provide and the protocol session layer provides;

[0061] Session layer message and communication control module: used to define the basic data exchange mode and basic communication message format between the host and the slave in the session layer, and define the communication control method of the session layer according to the message characteristics;

[0062] Application layer service module: Based on the above basic communication messages and communication control methods, the protocol defines register operations, file transfers, command functions, network management and diagnostic services at the application layer to control and manage multiple devices in the system.

[0063] Preferably, the interface between the session layer and the transport layer specifically includes:

[0064] Data transmission interface: sends data from local to remote devices, including two key elements: data length and data content;

[0065] Data receiving interface: receives data sent from remote devices to local devices, including two key elements: data length detection and data content reception.

[0066] Preferably, the basic data exchange mode defined by the session layer includes:

[0067] Communication data description: defines the frame type, format and meaning of each field of the basic communication message;

[0068] Data format: defines the data format, encoding, decoding, encryption and decryption methods of each field in the basic communication message.

[0069] Preferably, the session layer basic communication messages include quick access messages and short message messages.

[0070] Preferably, the quick access message is implemented based on a point-to-point question-and-answer communication model. During the quick access process, the master device sends a request, and the slave device immediately responds, and a quick access is completed through one question and one answer.

[0071] Short message messaging is implemented based on a production-consumption communication model, with data transmitted in one direction, and no response is required from the device receiving the message.

[0072] Preferably, the quick access message includes a quick access request message and a quick access response message;

[0073] The fast access request message consists of a protocol header, a message type, a random code, a timeout retransmission parameter, an application data field, and a 16-bit checksum field;

[0074] The quick access response message consists of a protocol header, a response result, a random code, an application data field, and a 16-bit checksum field.

[0075] Preferably, the short message message can be sent periodically or eventually according to the configuration of the mailbox and the short message list, and no reply is required from the recipient; the short message message consists of a protocol, a message identifier, a mailbox number, a message number, a message length, a data field and a message check code.

[0076] Preferably, the communication control method of the session layer is: specifying the communication process between the master device and the slave device, and using the message header, random synchronization code, timeout retransmission parameter and message check code of the transport layer message to perform communication control.

[0077] Preferably, register operation: the master device requests to operate the register of the slave device, and after establishing the service process, the master device reads or writes the register of the slave device;

[0078] File transfer: The master device requests to download files to the slave device or upload files to the slave device according to conditions or user input. After the service process is established, the file upload or download is completed through the file transfer control module;

[0079] Command function: The master device calls the command service to enable the slave device to execute the command quickly;

[0080] Network management: No need to establish a service process first. When the slave device is powered on, it sends an online notification to the specified master device and waits for the master device to be configured. Then, after the configuration is completed through other services, there is no need to establish a service process. The master device cyclically sends network synchronization signals to all slave devices. The slave device periodically sends its own device descriptor and real-time status as an online identification message to the master device.

[0081] Diagnosis: After the master device is connected to the slave device, the host collects information about each diagnostic point of the slave device based on the real-time status of the device cyclically broadcast by the slave device in the network management, and calls the fault diagnosis service including but not limited to fault code, reset, flash, safety test, and device control based on the results.

[0082] Preferably, the transport layer is UDP protocol or TCP protocol;

[0083] The network layer is Internet IP;

[0084] The data link layer is Ethernet;

[0085] The physical layer is an electrical signal network port or an optical signal network port.

[0086] The protocol of the present invention is used for communication control and data exchange between device application layers, involves the communication protocol from the transport layer to the application layer specified by OSI (defined in ISO / IEC 7498-1), and provides device control methods such as device control, data transmission, network management and diagnosis.

[0087] The background technology section introduces the problems and limitations of traditional communication protocols, and emphasizes the need for a more advanced and comprehensive communication protocol for the field of distributed system device control. The communication protocol of the present invention is designed to overcome these problems, is independent of specific physical layer and link layer technologies, and is therefore applicable to various types of communication media and bus structures, and provides a universal, efficient and scalable device control standard at the transport layer and application layer.

[0088] The present invention discloses a device application communication protocol suitable for distributed system device control. The protocol specifies the contents above the transport layer, has no requirements for the contents of the link layer and the physical layer, and can be widely applied to various types of buses. The application and deployment of the protocol require that the system has a complete transport layer, and two types of messages, fast request and short message, are specified based on the transport layer. At the application layer, the devices are divided into control master devices and controlled slave devices, and application layer services such as register operation, file transfer, command, network management and diagnosis are provided.

[0089] The present invention relates to an application layer communication protocol suitable for distributed system device control. The protocol is located above the transport layer and is used to realize data exchange and control between devices. It provides application layer services for device register operation, file transfer, command, network management and diagnosis. The name of this protocol is Device Application Protocol, hereinafter referred to as "protocol" or "DAP". The specific content of the present invention will be described in detail from the perspective of protocol usage scenarios, specific implementation of each layer, characteristics of the invention content and actual application verification.

[0090] 1. Introduction to the Protocol Principle

[0091] 1. Protocol usage positioning

[0092] This protocol is an application-oriented standard. The positioning of DAP in the OSI model is as follows: Figure 2 shown.

[0093] like Figure 2 As shown, DAP does not care about the specific technical implementation below the transport layer, but only specifies the interface definition of the transport layer and the content above the transport layer to the application layer. Any communication network or bus that meets the following conditions can use the protocol of the present invention as a high-level application standard:

[0094] 1) Buses suitable for medium- and long-distance, large data transmission, such as Ethernet networks, RS232 / RS485, USB and other serial buses;

[0095] 2) The transport layer and below can support the sending and receiving of variable-length data from the source to the target.

[0096] 2. Module division principle

[0097] 1) Transport layer interface standard: specifies the interface between the protocol session layer and the transport layer, and defines the format of the data packets that the user transport layer needs to provide and the DAP protocol session layer provides;

[0098] 2) Session layer messages and communication control: In the session layer, the basic data exchange method and basic communication message format between the DAP host and the slave are first defined, and the communication control method of the session layer is defined according to the message characteristics;

[0099] 3) Application layer services: Based on the above basic communication messages and communication control methods, DAP defines register operations, file transfers, command functions, network management and diagnostic services in the application layer, which are used to control and manage multiple devices in the system. At the same time, for specific services, DAP stipulates the general basic part and also supports users to expand and define.

[0100] 3. Equipment control principle

[0101] DAP is an open high-level application protocol that supports one master and multiple slaves. It is highly suitable for distributed systems with device control requirements, especially for systems that distinguish between master and slave devices and mount multiple numbers and types of devices. The protocol of the present invention implements the management of devices in the system through the following five services specified in its application layer:

[0102] 1) Register operation: The master device requests to operate the register of the slave device. After establishing the service process, the master device reads or writes the register of the slave device;

[0103] 2) File transfer: The master device requests to download files to the slave device or requests to upload files from the slave device according to conditions or user input. After the service process is established, the file upload or download is completed through the file transfer control module;

[0104] 3) Command function: The master device calls the command service to enable the slave device to execute the command quickly;

[0105] 4) Network management: No need to establish a service process first. When the slave device is powered on, it sends an online notification to the specified master device and waits for the master device to configure it. Then, after the configuration is completed through other services, there is no need to establish a service process. The master device cyclically sends network synchronization signals to all slave devices, and the slave device regularly sends its own device descriptor and real-time status as an online identification message to the master device;

[0106] 5) Diagnosis: After the master device is connected to the slave device, the real-time status of the device is cyclically broadcast by the slave device in the network management. The host collects information from each diagnostic point of the slave device according to the status of the slave device, and calls fault diagnosis services such as collection or clearing fault codes, resetting, flashing, safety testing, and equipment control according to the results.

[0107] Figure 3 In the scenario shown, on the right is a distributed system with a multi-layer tree structure. All devices in the system support the DAP standard. The DAP master is the highest-level master device. The devices at each layer below can act as slave devices or master devices for multi-level connections. Users can also use other high-level application protocols to enable the DAP master to participate in the user group network and connect with other types of devices or systems. In this application scenario example, the DAP protocol provides communication standards and a unified application interface for all device nodes in the distributed system on the right. Even devices with different physical bus types can establish communication indirectly, which makes the entire system easy to divide modules according to functions and easy to manage, and greatly reduces the complexity of application layer protocol development and the difficulty of application layer protocol transplantation.

[0108] 2. Implementation and use of each layer of the protocol

[0109] 1. Transport layer interface definition

[0110] The DAP protocol has no specific requirements for the transport layer and the following technical implementations in the communication model. It only requires the transport layer to provide interfaces for sending and receiving two types of point-to-point communications:

[0111] Data transmission interface: sends data from the local (source end) to the remote device (destination end), including two key elements: data length and data content.

[0112] 2) Data receiving interface: receiving data sent from the remote device (source end) to the local (destination end), including two key elements: data length detection and data content reception.

[0113] In order to reduce the occurrence of communication failures and improve response speed, the maximum length of data in the current transport layer is limited to 548 bytes.

[0114] The interface contract of the transport layer does not make strict requirements on the device identification and transmission control information of the source and target ends. It only needs to ensure relatively stable data transmission from end to end. The interface contract content is very concise, making the DAP protocol easy to apply to devices with relatively simple underlying communication logic. When using DAP, users need to provide a transport layer interface that meets the requirements. Data parsing, error detection and processing, and application layer services are all specified in the upper layer content.

[0115] 2. Session layer messages and basic communication control

[0116] The DAP protocol session layer mainly defines two modules, namely the basic communication messages of the session layer and the basic communication control method between devices.

[0117] The basic communication data description and data format defined by the session layer:

[0118] 1) Communication profile: defines the frame type and format of basic communication messages and the meaning of each field;

[0119] 2) Data format: defines the data format of each field in the basic communication message, as well as the encoding and decoding and encryption and decryption (if any) methods.

[0120] In the protocol, the most basic data transmission messages are divided into quick access frame (QAF) and short message frame (SMF). The implementation of all types of communication at the application layer is based on QAF and SMF.

[0121] QAF is implemented based on a peer-to-peer question-answering communication model, such as Figure 4 As shown in the figure, during the fast access process, the master device sends a request, and the slave device responds immediately, completing a fast access with one question and one answer. QAF uses a fixed "one question and one answer", where the master device only "asks" and the slave device only "answers", which sacrifices a small amount of bandwidth resources, but fully guarantees the security and low latency of communication, and effectively reduces the development complexity of the slave device protocol layer. Application layer services such as register operations, file transfers, and commands are all implemented based on QAF messages.

[0122] The QAF request message consists of a DAP header, message type, random code, timeout retransmission parameter, application data field, and a 16-bit check code field. The QAF response message consists of a DAP header, response result, random code, application data field, and a 16-bit check code field. The length and definition of each field are as follows:

[0123] QAF host request message fields:

[0124] DAP header: 4 bytes, custom data format;

[0125] Message type: 1bits, no data format requirement;

[0126] Random synchronization code: 4bits, no data format requirement;

[0127] Timeout retransmission parameter: 4Bytes, little endian format;

[0128] Data field: variable length, different types of messages have custom data formats;

[0129] Message checksum: 2 bytes, little endian format.

[0130] QAF slave response message fields:

[0131] DAP header: 4 bytes, custom data format;

[0132] Message response result: 1bits, no data format requirement;

[0133] Random synchronization code: 4bits, no data format requirement;

[0134] Data field: variable length, different types of messages have custom data formats;

[0135] Message checksum: 2 bytes, little endian format.

[0136] SMF is different from QAF in that it is implemented based on the communication model of production and consumption, such as Figure 5 As shown, data is transmitted in one direction without the need for a response from the device receiving the message.

[0137] The master and slave devices specified in the DAP protocol can be both producers and consumers in the short message model. They can send short messages periodically or event-based according to the configuration of mailboxes (Message boxes) and short message lists (Message lists), and do not require the recipient to reply. Based on the SMF model, this protocol implements network node management and diagnosis functions.

[0138] The details of each field of the SMF message are as follows:

[0139] DAP header: 4 bytes, custom data format;

[0140] SMF message identifier: 1bytes, no data format requirement;

[0141] Email address: 4byts, custom data format;

[0142] Message number: 2Bytes, little endian format;

[0143] Message length: 2Bytes, little endian format;

[0144] Data field: variable length, custom data format;

[0145] Message checksum: 2 bytes, little endian format.

[0146] For the specific content of mailboxes and short messages in SMF messages, on the one hand, this protocol defines the common parts; on the other hand, users can define custom objects or create and use SMF objects in real time through DAP application services.

[0147] At the same time, the present invention defines a basic communication control method, stipulates the communication process between the master device and the slave device, and uses the message header, random synchronization code, timeout retransmission parameter and message check code of the transport layer message for communication control.

[0148] A message header is defined to quickly distinguish DAP protocol messages from messages of other protocols in the bus;

[0149] Defines random synchronization codes for frame synchronization and frame reorganization when out of order;

[0150] Defines timeout retransmission parameters for automatic retransmission when a master device and slave device time out during a session. The timeout retransmission parameters are dynamically calculated in the session layer.

[0151] Message checksum, used for fast verification of session layer communication messages.

[0152] 3. Application layer service description

[0153] The DAP protocol specifies five core services that can be used for device control and supervision, data transmission, and action execution in distributed systems:

[0154] 1) Register operation: The slave device provides a register list or mapping table (Register Mapping List), which contains information such as device descriptors, system configuration, function configuration, and software and hardware licenses; and can directly operate the physical memory of the device through the mapping relationship between the register logical address and the physical address.

[0155] 2) File transfer: The device provides file directories and data table directories for large data transmission, which can support the transfer of a single file of up to 4GB in size; it can be used to transfer device program fields, configuration files, factory information forms, real-time sampling data and other information;

[0156] 3) Command function: The DAI provided by the slave device and can be directly called by the master device, that is, the direct application interface; by receiving commands, the slave device can perform various actions, such as reset, sleep, wake up and state switching.

[0157] 4) Network management: used to monitor the network status and load rate and the performance and status of multiple slave devices, as well as to configure and manage network resources;

[0158] 5) Diagnosis: It is used to monitor multiple diagnostic points of slave devices and can perform fault detection, error troubleshooting and performance analysis on slave devices in real time or offline.

[0159] For many contents of the application layer, this protocol specifies the common parts and allows users to expand them freely; in other words, each slave device board has a public and unique register list, stream transfer directory, DAI (direct application interface) command table and diagnostic interface.

[0160] like Figures 6-7 , specific implementation cases of the present invention:

[0161] The DAP protocol of the present invention has been implemented and verified in actual engineering cases, and has shown excellent system applicability and stability. It has been successfully applied to distributed control systems, especially multi-device systems with tree structures.

[0162] As example attached Figure 6 As shown, the present invention is applied in a distributed system, and each controlled device in the system is distributed in a tree structure. In the embodiment, the first-level master control in the system is a PC, which only acts as a master device and controls and manages the second-level device through the DAP protocol. The second-level device is a node core or gateway device, which is managed by the first-level master control as a DAP slave device and controls and manages the third-level device as a DAP master device. The third-level device is a dedicated unit that realizes various functions and only acts as a DAP slave device to provide accessible services to the master device.

[0163] As example attached Figure 7 As shown, the embodiment of the present invention provides an application structure based on Ethernet communication. The underlying physical layer uses electrical signal or optical signal network port as the basis for physical connection, the data link layer uses Ethernet protocol, the main network layer protocol is Internet Protocol (IP), including IPv4 and IPv6, and the transport layer uses UDP or TCP protocol.

[0164] The present invention stipulates the interface specification of the transport layer. The data of the transport layer needs to indicate the data transmission source and data receiving target, and explain the length of the data. The DAP session layer completes data exchange with the communication bottom layer through the data transceiver interface that complies with the interface specification.

[0165] The session layer includes multiple data messages, which are divided into two basic data messages: QAF and SMF. QAF completes the session based on a reliable access mechanism, while SMF provides data based on a production and consumption model. The present invention fully utilizes the advantages of the two models, establishes a communication control mechanism for the session layer, and provides a basis for the expansion of various services at the application layer.

[0166] In the communication control of the session layer, all session layer messages contain a DAP header to quickly distinguish them from other messages on the bus or in the network.

[0167] For the reliable transmission of QAF messages, random synchronization codes are used as the basis for frame synchronization, and real-time calculated timeout retransmission parameters are used to guide the communication control module to retransmit. A 16-bit check code is used to check the data fields of all QAF frames at the session layer, avoiding the establishment of a connection every time data is exchanged, sacrificing a small amount of bandwidth in exchange for strong communication reliability.

[0168] SMF does not need to establish a session process to send data. Data is sent and received periodically according to the configured mailbox number and message list. On the one hand, it serves as a supplement to QAF and flexibly completes some things that QAF is not convenient to do. On the other hand, it provides a standard for unified network management and diagnosis for all devices in a large distributed system.

[0169] Based on the basic data messages and communication control methods established by the session layer, the application layer provides five application layer services to meet the needs of device control and management in the system.

[0170] For the use or application implementation of DAP, you can choose the appropriate platform and underlying driver according to the given protocol specifications, design the protocol implementation program, and provide the DAP API interface for the user to call; or use the secondary development kit of the driver to complete the application implementation and API provision of DAP. The user only needs to supplement the definition of the content that needs to be expanded in the application layer, such as the register list, file transfer directory, command function description, and expanded diagnostic points.

[0171] In this embodiment, both the master and slave devices support the DAP standard, and labels of the master and slave devices are assigned. The application layer supports the master device to operate the register of the slave device, download and upload files from the slave device, and the master device to call the slave device function or make the slave device execute commands. It also includes passive programs for network management and device diagnosis. By calling the API or passing in the callback application, the master device can complete the control and management of the slave device.

[0172] in,

[0173] Some of the terms in this article are compared:

[0174] Device application protocol (DAP): Device application protocol

[0175] Open Systems Interconnection model(OSI): Open Systems Interconnection model

[0176] Physical layer: Physical layer

[0177] Data link layer: Data link layer

[0178] Transport layer:

[0179] Application layer: Application layer

[0180] Application Programming Interface (API): Application Programming Interface

[0181] Quick access frame (QAF): Quick access message

[0182] Short message frame (SMF): short message

[0183] Register Mapping List: Register List

[0184] Direct Application Interface (DAI): Direct Application Interface

[0185] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly referring to the number of technical features indicated. Therefore, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0186] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood through specific circumstances.

[0187] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the technical principles of the present invention, and these improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A communication protocol suitable for distributed system device control, the communication protocol is based on the open system interconnection model constructed by the application layer, presentation layer, session layer, transport layer, network layer, data link layer and physical layer; Features: The communication protocol specifically includes the following modules: Transport layer interface standard module: used to specify the interface between the protocol session layer and the transport layer, and defines the format of the data packets that the user transport layer needs to provide and the protocol session layer provides; Session layer message and communication control module: used to define the basic data exchange mode and basic communication message format between the host and the slave in the session layer, and define the communication control method of the session layer according to the message characteristics; Application layer service module: Based on the above basic communication messages and communication control methods, the protocol defines register operations, file transfers, command functions, network management and diagnostic services at the application layer to control and manage multiple devices in the system.

2. A communication protocol suitable for distributed system device control as claimed in claim 1, characterized in that: The interface between the session layer and the transport layer specifically includes: Data transmission interface: sends data from local to remote devices, including two key elements: data length and data content; Data receiving interface: receives data sent from remote devices to local devices, including two key elements: data length detection and data content reception.

3. A communication protocol suitable for distributed system device control as claimed in claim 1, characterized in that: The basic data exchange methods defined by the session layer include: Communication data description: defines the frame type, format and meaning of each field of the basic communication message; Data format: defines the data format, encoding, decoding, encryption and decryption methods of each field in the basic communication message.

4. A communication protocol suitable for distributed system device control as claimed in claim 3, characterized in that: The session layer basic communication messages include quick access messages and short message messages.

5. A communication protocol suitable for distributed system device control as claimed in claim 4, characterized in that: The quick access message is implemented based on a point-to-point question-and-answer communication model. During the quick access process, the master device sends a request, and the slave device responds immediately, completing a quick access with one question and one answer. The short message is implemented based on a production-consumption communication model, with data transmitted in one direction, and there is no need for the device receiving the message to respond.

6. A communication protocol suitable for distributed system device control as claimed in claim 5, characterized in that: The quick access message includes a quick access request message and a quick access response message; The fast access request message consists of a protocol header, a message type, a random code, a timeout retransmission parameter, an application data field, and a 16-bit check code field; The quick access response message consists of a protocol header, a response result, a random code, an application data field and a 16-bit check code field.

7. A communication protocol suitable for distributed system device control as claimed in claim 5, characterized in that: The short message message can send short messages periodically or event-based according to the configuration of the mailbox and the short message list, and does not require the recipient to reply; the short message message consists of a protocol, a message identifier, a mailbox number, a message number, a message length, a data field and a message check code.

8. A communication protocol suitable for distributed system device control as claimed in claim 1, characterized in that: The communication control method of the session layer is: specifying the communication process of the master device and the slave device, and using the message header, random synchronization code, timeout retransmission parameter and message check code of the transport layer message to perform communication control.

9. A communication protocol suitable for distributed system device control as claimed in claim 1, characterized in that: The register operation: the master device requests to operate the register of the slave device. After the service process is established, the master device reads or writes the register of the slave device; The file transfer: the master device requests to download files to the slave device or requests to upload files from the slave device according to conditions or user input. After the service process is established, the file upload or download is completed through the file transfer control module; The command function: the master device calls the command service to enable the slave device to quickly execute the command; The network management: there is no need to establish a service process first. When the slave device is powered on, it sends an online notification to the specified master device, waits for the configuration of the master device, and then completes the configuration through other services. There is no need to establish a service process. The master device cyclically sends a network synchronization signal to all slave devices, and the slave device regularly sends its own device descriptor and real-time status as an online identification message to the master device; The diagnosis: After the master device is connected to the slave device, the real-time status of the device is cyclically broadcast by the slave device in the network management. The host collects information of each diagnostic point of the slave device according to the status of the slave device, and calls the fault diagnosis service including but not limited to fault code, reset, flash, safety test, and device control according to the results.

10. A communication protocol suitable for distributed system device control as claimed in claim 1, characterized in that: The transport layer is UDP protocol or TCP protocol; The network layer is Internet IP; The data link layer is Ethernet; The physical layer is an electrical signal network port or an optical signal network port.

Citation Information

Cited By

  • Multilayer RS485 bus communication system and method based on Modbus protocol

    CN121486126A