CN111447126B - Ethernet bus communication method, device, robot, equipment and computer readable storage medium - Google Patents

Ethernet bus communication method, device, robot, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111447126B
CN111447126B CN201911237127.4A CN201911237127A CN111447126B CN 111447126 B CN111447126 B CN 111447126B CN 201911237127 A CN201911237127 A CN 201911237127A CN 111447126 B CN111447126 B CN 111447126B
Authority
CN
China
Prior art keywords
node
child node
information
response message
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911237127.4A
Other languages
Chinese (zh)
Other versions
CN111447126A (en
Inventor
郭伟卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Syrius Technology Shenzhen Co Ltd
Original Assignee
Syrius Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Syrius Technology Shenzhen Co Ltd filed Critical Syrius Technology Shenzhen Co Ltd
Priority to CN201911237127.4A priority Critical patent/CN111447126B/en
Publication of CN111447126A publication Critical patent/CN111447126A/en
Application granted granted Critical
Publication of CN111447126B publication Critical patent/CN111447126B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/403Bus networks with centralised control, e.g. polling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Abstract

The invention discloses an Ethernet bus communication method, an Ethernet bus communication device, a robot, equipment and a computer readable storage medium, wherein the method comprises the following steps: in a time slice, the main node sends a round searching request to each sub-node; then, determining a child node receiving the round searching request, and generating a response message corresponding to the round searching request by the child node; and finally, broadcasting the response message to the Ethernet bus through the polled child node, and gradually requesting the next child node in turn within the time slice, and generating and sending the response message corresponding to the turn-searching request by the next child node. The real-time data transmission scheme is clear and definite in design scheme, low in practical difficulty and high in transmission efficiency.

Description

Ethernet bus communication method, device, robot, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of robotics, and in particular, to an ethernet bus communication method, apparatus, robot, device, and computer-readable storage medium.
Background
In the prior art, with the rapid development of the technical field of robots, the field of automatic driving and the field of industrial automation, the communication requirements of real-time data transmission, throughput of large-data-volume data, remote data transmission and the like are higher and higher. On one hand, the traditional remote communication bus RS485 bus, RS232 bus, CAN bus (1MHZ) and Flexray (10MHZ) transmission schemes CAN not meet the current industrial practical requirements; on the other hand, ethernet communication based on the TCP/UDP protocol has a delay (TCP) and an Uncertainty (UDP), and also cannot meet the real-time requirement of data transmission.
In order to meet the real-time requirement on data transmission, the current mainstream real-time ethernet technology openpower link (an OPEN source transmission scheme) adopts the technical scheme of CAN OPEN, the technical scheme has the defects of complex design, higher practical difficulty and low transmission efficiency, and each transmission time slice is divided into a real-time part and a non-real-time part, so that the time slice is lengthened, and the transmission efficiency is reduced.
Therefore, no real-time data transmission scheme with clear and definite design scheme, low practical difficulty and high transmission efficiency exists in the prior art.
Disclosure of Invention
In order to solve the technical defects in the prior art, the invention provides an ethernet bus communication method, which comprises the following steps:
in a time slice, the main node sends a round searching request to each sub-node;
determining a child node which receives the round searching request, and generating a response message corresponding to the round searching request by the child node;
broadcasting the response message to the Ethernet bus through the polled child node, and successively requesting the next child node in turn within the time slice, and generating and sending the response message corresponding to the turn-searching request by the next child node.
Optionally, the sending, by the master node, a round-robin request to each child node in a time slice includes:
determining the number of child nodes connected to the master node, and determining the maximum data volume of a single transmission of the child nodes at the next time, and time synchronization information, wherein,
determining the length of the time slice according to the number of the child nodes and the data volume;
and determining the maximum data volume of the single transmission according to the number of nodes of the current bus and the length of the time slice. Optionally, the sending, by the master node, a round-robin request to each child node in a time slice includes:
determining a child node device table of the master node;
sending, by the master node, the round robin request to each child node in the child node device table.
Optionally, the determining at least one child node that receives the round robin request, and generating, by the at least one child node, a response message corresponding to the round robin request include:
generating, by the at least one child node, the response message, wherein the response message comprises a broadcast message, or a service message, or an anonymous message.
Optionally, the broadcasting the response message to the ethernet bus through the at least one sub-node, and successively determining, within the time slice, a next sub-node that receives the round robin request, and generating and sending a response message corresponding to the round robin request by the next sub-node include:
and in the time slice, after the sub-nodes finish the generation and sending operations of the response message successively, successively determining the next time slice, and simultaneously, starting to send a polling request to each sub-node by the main node.
Optionally, the method further includes:
and acquiring node information of the host computer configuring the main node, and determining each sub-node to be searched under the main node according to the node information.
The invention also provides an Ethernet bus communication method, which comprises the following steps:
configuring a sub-node equipment table of a main node by an upper computer, or determining each sub-node connected with the main node through a CAN bus;
in a time slice, acquiring a round searching request sent by the main node to at least one sub-node;
broadcasting the response message to the Ethernet bus through the at least one child node, successively determining the next child node receiving the round seeking request in the time slice, and generating and sending the response message corresponding to the round seeking request by the next child node. Optionally, the determining each child node connected to the master node through the CAN bus includes:
and the main node manages hot plug, ID distribution, node health management and node firmware update of the child nodes through the CAN bus.
The invention also provides an ethernet bus communication device, which comprises:
the request acquisition module is used for sending a polling request to each sub-node by the main node in a time slice;
the message generation module is used for determining the child node which receives the round searching request and generating a response message corresponding to the round searching request by the child node;
a message sending module, configured to broadcast the response message to the ethernet bus through the at least one child node, and within the time slice, successively determine a next child node that receives the round seeking request, and generate and send a response message corresponding to the round seeking request by the next child node.
The invention also provides a robot, which comprises the Ethernet bus communication device.
The present invention also provides an ethernet bus communication device, which includes a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein when executed by the processor, the computer program implements:
in a time slice, the main node sends a round searching request to each sub-node;
determining a child node which receives the round searching request, and generating a response message corresponding to the round searching request by the child node;
broadcasting the response message to the Ethernet bus through the polled child node, and successively requesting the next child node in turn within the time slice, and generating and sending the response message corresponding to the turn-searching request by the next child node.
The present invention also provides a computer readable storage medium, which stores an ethernet bus communication program, and when the ethernet bus communication program is executed by a processor, the steps of the ethernet bus communication method are implemented.
The method has the advantages that the main node sends the polling requests to the sub-nodes in a time slice; then, determining a child node receiving the round searching request, and generating a response message corresponding to the round searching request by the child node; and finally, broadcasting the response message to the Ethernet bus through the polled child node, and gradually requesting the next child node in turn within the time slice, and generating and sending the response message corresponding to the turn-searching request by the next child node. The real-time data transmission scheme is clear and definite in design scheme, low in practical difficulty and high in transmission efficiency.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a first flowchart of an Ethernet bus communication method according to an embodiment of the present invention
FIG. 2 is a second flowchart of a method for Ethernet bus communication according to an embodiment of the invention;
fig. 3 is a schematic diagram of a first protocol frame of an ethernet bus communication method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a second protocol frame of an ethernet bus communication method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a third protocol frame of an ethernet bus communication method according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a fourth protocol frame of an ethernet bus communication method according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a fifth protocol frame of an ethernet bus communication method according to an embodiment of the present invention;
fig. 8 is a schematic diagram illustrating a master node configuration of an ethernet bus communication method according to an embodiment of the present invention;
fig. 9 is a block diagram of an ethernet bus communication device according to an embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
Example one
Fig. 1 is a first flowchart of an ethernet bus communication method according to an embodiment of the present invention. In this embodiment, an ethernet bus communication method is provided, where the method includes:
s1, in a time slice, the main node sends a round searching request to each sub-node;
s2, determining the child node which receives the round seeking request, and generating a response message corresponding to the round seeking request by the child node;
s3, broadcasting the response message to the ethernet bus through the polled child node, and, within the time slice, successively requesting a next child node, and generating and sending a response message corresponding to the round-robin request by the next child node.
Optionally, in this embodiment, the number of child nodes connected to the master node and the amount of data that the child nodes need to transmit are determined; and determining the length of the time slice according to the number of the child nodes and the data volume. Optionally, in this embodiment, the shorter the length of the time slice is, the higher the real-time performance of the ethernet bus communication is, it can be understood that the real-time performance is compared with the non-real-time performance with a larger time delay, and the time delay of message sending is further reduced by using the time slice with a shorter length, so as to achieve a technical effect similar to real-time transmission.
Optionally, in this embodiment, the number of child nodes connected to the master node is determined, and at the same time, the maximum data volume of a single transmission of the child node at the next time and time synchronization information are determined, where the length of the time slice is determined according to the number of child nodes and the data volume, and the maximum data volume of a single transmission is determined according to the number of nodes of the current bus and the length of the time slice.
Optionally, in this embodiment, a child node device table of the master node is determined; and sending, by the master node, the round-robin request to each child node in the child node device table. For example, each of the child nodes a and B has 4 messages to send, the message queues are arranged according to the priority field in the protocol, and the messages wait for polling of the master node sequentially before the high priority and after the low priority. When a time slice begins, the main node broadcasts to start polling, when the main node starts polling to a sub-node A according to an internal sub-node equipment table, the sub-node A receives a request of the main node and then sends out a message 1 to be sent of the sub-node A, then the sub-node A enters a monitoring mode and monitors the next time slice to send a polling request of the sub-node A, in the time slice, after the main node finishes polling the sub-node A, the main node polls to a sub-node B one by one, when the sub-node B receives the main node polling request, the message 1 to be sent of the sub-node B is sent out, and so on, when the main node searches to the last sub-node, the current time slice is finished.
Optionally, in this embodiment, the response message is generated by the at least one child node, where the response message includes a broadcast message, a service message, or an anonymous message. Specifically, the above three messages will be described in detail through the second embodiment.
Optionally, in this embodiment, in the time slice, after the sub-nodes successively complete the generation and sending operations of the response message, the next time slice is successively determined, and meanwhile, the master node starts sending a round-robin request to the sub-nodes. The master node manages and polls each sub-node connected with the master node in bus communication, for example, when the sub-node is abnormal and needs to cancel the polling of the node, the master node in the next time slice does not poll the sub-node; for another example, when a child node requests ID and MAC address binding, the master node updates MAC and ID information in its device list; for another example, when the master node polls a child node that responds with content that the master node is not interested in, the master node may ignore the information of the child node.
Optionally, in this embodiment, node information of the host computer configuring the master node is obtained, and each sub-node to be searched under the master node is determined according to the node information. For example, the master node discovery sequence is performed according to the configuration of the master node by the upper computer, the upper computer can configure the node information to be discovered by the master node through an interface (the interface includes interfaces such as a serial port and an SPI), for example, a certain product includes A, B, C, D modules in total, after the product is started, the upper computer configures the master node through the interface, registers IDs of A, B, C, D modules, then the master node sequentially discovers corresponding IDs, requests a MAC address of a child node, and the child node responds to the MAC address information and the ID information and stores the ID information by the master node. Optionally, in this embodiment, the bus communication method does not support hot plug, and if a new module needs to be added, the module may be enabled only by upgrading a hardware configuration table in an upper computer thereof, otherwise, the host node may not find the module.
Optionally, in this embodiment, the implementation manner of the present solution is various, for example, the implementation manner may be a pure software implementation manner, an FPGA implementation manner, a CPLD implementation manner, an MCU implementation manner, and the like.
The method has the advantages that the main node sends the polling requests to the sub-nodes in a time slice; then, determining at least one child node which receives the round searching request, and generating a response message corresponding to the round searching request by the at least one child node; finally, the response message is broadcasted to the Ethernet bus through the at least one child node, and in the time slice, the next child node which receives the round seeking request is determined successively, and the response message corresponding to the round seeking request is generated and sent by the next child node. The real-time data transmission scheme is clear and definite in design scheme, low in practical difficulty and high in transmission efficiency.
Example two
Fig. 8 is a schematic configuration diagram of a master node of an ethernet bus communication method according to an embodiment of the present invention.
Based on the foregoing embodiment, in this embodiment, an ethernet bus communication method is further provided, where the method includes:
configuring a sub-node equipment table of a main node by an upper computer, or determining each sub-node connected with the main node through a CAN bus;
in a time slice, acquiring a round searching request sent by the main node to at least one sub-node;
broadcasting the response message to the Ethernet bus through the at least one child node, successively determining the next child node receiving the round seeking request in the time slice, and generating and sending the response message corresponding to the round seeking request by the next child node.
Optionally, in this embodiment, the master node manages hot plug, ID allocation, node health management, and node firmware update of the child nodes through the CAN bus.
Optionally, in this embodiment, the above configuring information of each child node of the master node by using the upper computer is a semi-automatic real-time ethernet implementation scheme, and the ethernet is generally applied to some products such as robots and automobiles, and it should be noted that the above type of products cannot be hot plugged into a child node, and the above type of products are characterized in that the master node needs to be configured correspondingly by using the upper computer. Specifically, the master node includes list information of the child node device table, and when hardware support needs to be added, the child node device table of the master node is updated by upgrading the upper computer program corresponding to the master node, so that device compatibility of the master node is increased.
Optionally, in this embodiment, in addition to the above-described node information scheme that the host computer is used to configure the host node, a full-automatic real-time ethernet network is provided, in this scheme, hot plug of different components CAN be achieved without using the host computer, it should be noted that, in this alternative scheme, a corresponding host computer is not configured for the host node, each child node and the host node are connected together through a CAN bus, and the host node manages operations such as dynamic hot plug, firmware update, health information maintenance, node ID allocation, and the like of each child node through the CAN bus. It will be appreciated that the application scenario of the present alternative is suitable for products that often require changes, such as production lines and the like. Specifically, the production line devices CAN be dynamically combined with each other to achieve different production purposes, wherein the scheme adopts high-low collocation, namely, the production line device is composed of a CAN bus and an Ethernet bus, and the CAN bus is responsible for hot plug registration operation, node health monitoring operation, node online discovery operation, node disconnection operation, node information inquiry operation, node firmware updating operation and the like of each node.
In the above alternative, in the protocol encapsulation manner of the following embodiment, after a layer of software encapsulation is performed on the protocol on the CAN bus and the protocol for communication on the ethernet bus, only the communication protocol of real-time ethernet is seen at the application layer. The messages are classified by the drive layer, the messages with low speed or control type go through the CAN bus, and other messages with large data load capacity go through the real-time Ethernet bus, so that the purpose of reasonably utilizing the bus bandwidth is achieved, and meanwhile, the maximum transmission efficiency of the real-time Ethernet is exerted to the maximum extent.
The method has the advantages that the sub-node equipment list of the main node is configured through the upper computer, or each sub-node connected with the main node through the CAN bus is determined; then, in a time slice, acquiring a round searching request sent by the main node to at least one sub-node; finally, the response message is broadcasted to the Ethernet bus through the at least one child node, and in the time slice, the next child node which receives the round seeking request is determined successively, and the response message corresponding to the round seeking request is generated and sent by the next child node. The main node sends the round searching request response message and the response message to each sub-node, so that a real-time data transmission scheme with clear and definite design scheme, lower practical difficulty and higher transmission efficiency is realized.
EXAMPLE III
Fig. 2 is a second flowchart of an ethernet bus communication method according to an embodiment of the present invention. Based on the above embodiments, this embodiment proposes an ethernet bus communication method for an information sending link of a child node, where the method includes:
s10, generating a message to be sent currently at least one child node, the message including header information, payload information and trailer information, wherein,
describing the current message as a broadcast message, a service message or an anonymous message by the header information;
carrying real-time Ethernet data contained in the message by the payload information;
indicating the transmission state of the real-time Ethernet data by the tail information;
s20, when the main node searches the at least one sub node in turn, the sub node sends the message.
Specifically, in this embodiment, when the master node searches for the child nodes under it in turn, each child node searched for in turn must reply to the master node, which is described herein in two cases, one is to reply that the master node has no message to send when the child node searched for in turn has no message to send, and the other is to send the message based on the scheduling of the master node searching for this time when the child node searched for in turn has a message to send.
Specifically, in this embodiment, referring to fig. 3, a first protocol frame diagram of an ethernet bus communication method according to an embodiment of the present invention is provided. Based on the existing Ethernet II (Ethernet protocol II) frame format, the adopted protocol frame of the method is added into the original payload field (Ethernet payload field) of the Ethernet II. Specifically, the protocol frame is divided into Header information (Header field), Payload information (Payload field), and Tail information (Tail field).
In this embodiment, the header information describes that the current message is a broadcast message, or a service message, or an anonymous message, where the broadcast message is a type message of a publish message subscription, and the broadcast message may be broadcast to any one or more nodes under the network through an ethernet network; the service message belongs to a Request (Request) -response (reply) class message; the anonymous message is used for requesting the main node to allocate corresponding ID information under the condition that a newly added node does not allocate an ID.
In this embodiment, taking the sub-node a sending a message broadcast as an example, first, the sub-node a calls a Header field, describes that a current message to be sent is a broadcast type message through the Header field, and describes ID information of the message, then, places the message of the sub-node a in a serialized manner into a Payload field of this embodiment, and at the same time, adds a Tail field after the Payload field, and describes whether the message is described completely through the Tail field, so that the sub-node a integrates the Header field, the Payload field and the Tail field, inserts the integrated message into an original Payload field of Ethernet II, waits for scheduling by a master node, that is, in the sub-node a, packages and integrates the current broadcast message to be sent into the above protocol, and inserts the protocol into a message queue of the sub-node a to be sent. When the main node searches the sub-node a in a time slice manner, the sub-node a sends the message to other nodes in the network according to the message sending sequence in the message queue to be sent, it can be understood that when the message passes through each sub-node along the way, the sub-node B interested in the message can retain the relevant data of the message, and specifically, the sub-node B analyzes the message according to the ID information of the message, so as to obtain the required anti-sequence data structure. Optionally, in this embodiment, when the main node searches the sub-node a in a time slice manner, the sub-node a determines a message to be sent according to the message queue to be sent, if the message queue to be sent of the sub-node a is empty at the current time, a default data frame is sent to the scheduled main node through the sub-node a, where a payload field of the data frame is 0, and the data frame describes that there is no data to be sent by the sub-node at the current round of searching.
In this embodiment, the Header field, Payload field, and Tail field are directly embedded into the existing Ethernet Payload field, so that the Ethernet bus communication method of this embodiment operates on the existing Ethernet communication device without modifying the current operating environment, and with the development of Ethernet technology, the Ethernet bus communication method of this embodiment can be directly applied to new hardware devices, and meanwhile, the method supports data communication with bandwidths of 10M/100M/1000M, etc.
Hereinafter, the Header information (Header field), the Payload information (Payload field), and the Tail information (Tail field) of the present embodiment will be specifically described:
fig. 4 is a schematic diagram of a second protocol frame of the ethernet bus communication method according to the embodiment of the present invention.
In the present embodiment, the broadcast Message is divided into four pieces of sub-information, which are Priority information (Priority field), Message ID information (Message ID field), type indication information (Service not Message field), and Source ID information (Source ID field), wherein,
determining the broadcast sequence of the messages in the current node according to the priority information, arranging the messages with high priority in front, and arranging the messages with low priority in back;
the message type in the payload information is indicated by the message ID information, and optionally, the message ID is used for indicating 65536 message types;
determining that the message is a Service type message or a broadcast type message according to the type indication information, for example, indicating 1 as a Service type message and indicating 0 as a broadcast type message;
and determining the node ID of the message through the source ID information.
Fig. 5 is a schematic diagram of a third protocol frame of an ethernet bus communication method according to an embodiment of the present invention.
In the present embodiment, the Service message is divided into six sub-information, which are Priority information (Priority field), Service type ID information (Service type ID field), Request-response flag information (Request not response field), Destination ID type indication information (Destination ID field), and Source ID information (Source ID field), respectively, wherein,
determining the broadcast sequence of the messages in the current node according to the priority information, arranging the messages with high priority in front, and arranging the messages with low priority in back;
determining the service type of the message through the service type ID information, wherein optionally, the service type ID information is used for representing 256 service messages;
identifying the message as a request message or a response type message through the request-response mark information;
identifying a target node ID corresponding to the message through the target ID information;
identifying the message as a Service type message or a broadcast type message through the type indication information, for example, indicating 1 as a Service type message and indicating 0 as a broadcast type message;
and identifying the node ID for sending the message through the source ID information.
Fig. 6 is a schematic diagram of a fourth protocol frame of an ethernet bus communication method according to an embodiment of the present invention.
In the present embodiment, the anonymous message is divided into five pieces of sub-information, which are Priority information (Priority field), Discriminator information (Discriminator field), anonymous message ID information, type indication information (Service not message field), and Source ID information (Source ID field), respectively, wherein,
determining the broadcast sequence of the messages in the current node according to the priority information, arranging the messages with high priority in front, and arranging the messages with low priority in back;
distinguishing different devices having the same source ID by the discriminator information, the field generating a corresponding identification by a random number generator;
determining the type of the anonymous message according to the anonymous message ID information, optionally, in this embodiment, the anonymous message ID is used to determine four anonymous message types;
identifying the message as a Service type message or a broadcast type message through the type indication information, for example, indicating 1 as a Service type message and indicating 0 as a broadcast type message;
and indicating the ID of the node sending the message by the source ID information.
Fig. 7 is a schematic diagram of a fifth protocol frame of an ethernet bus communication method according to an embodiment of the present invention.
In this embodiment, the tail information is divided into four fields, which are respectively used for indicating start of transmission, indicating end of transmission, indicating inversion, and indicating message accumulation;
when the real-time Ethernet data exceeds a maximum transmission threshold value or adopts the highest efficiency transmission, the real-time Ethernet data is transmitted in a segmentation mode, the tail information indicates the transmission state of the transmission in the segmentation mode, and the transmission Layer of the Ethernet is correspondingly configured in the segmentation mode.
In this embodiment, the Payload information (Payload field) carries the real-time ethernet data included in the message, specifically, the serialized real-time ethernet data is carried by the Payload information at the sending end; and analyzing and acquiring the serialized real-time Ethernet data at a receiving end through the message ID of the header information.
In this embodiment, the polling request frame sent by the master node to its child node includes a Header field, a Payload field, and a Tail field, where the Payload field includes synchronization information of a timestamp, and also includes information such as the maximum data length of a single frame of the bus.
Optionally, in this embodiment, one master node is configured to manage and search each sub-node therebelow in turn, and meanwhile, in order to provide redundancy of the system, in this embodiment, a backup scheme of multiple master nodes is further provided, specifically, one bus includes multiple master nodes, and when one master node fails (for example, other master nodes monitor that no start communication frame is sent after the master node sends an end frame due to timeout), the master node that backs up the next address of the master node automatically turns to a working state;
optionally, in this embodiment, the master node may be a single master node or a dual master node, or the present scheme is also applicable to more than two master nodes. The method comprises the steps that in order to configure the working mechanism of a main node, the ID of the main node is configured to be the priority for executing work, the larger the ID value of the main node is, the lower the workable priority is, meanwhile, when the main node is down (for example, the sub-node scheduling is not performed in the time of twice time slice), the current polling work is performed by the ID of the down main node, the next ID of the down main node hosts, and similarly, when the sub-node scheduling is stopped in the time of three times, the current round searching work is performed by the back backup main node.
Optionally, in this embodiment, the scheduling method for the master node and each of the child nodes thereof may be applicable to networks with multiple topology structures, and specifically, the ethernet bus communication method of the present invention is applicable to four network topology structures, where the four network topology structures are respectively a daisy topology structure, a linear topology structure, a ring topology structure, and a ring dual master station topology structure.
The method has the advantages that the main node sends the polling requests to the sub-nodes in a time slice; then, determining at least one child node which receives the round searching request, and generating a response message corresponding to the round searching request by the at least one child node; finally, the response message is broadcasted to the Ethernet bus through the at least one child node, and in the time slice, the next child node which receives the round seeking request is determined successively, and the response message corresponding to the round seeking request is generated and sent by the next child node. The real-time data transmission scheme is clear and definite in design scheme, low in practical difficulty and high in transmission efficiency.
Example four
Fig. 9 is a block diagram illustrating an ethernet bus communication device according to an embodiment of the present invention. The invention also provides an ethernet bus communication device, which comprises:
a request obtaining module 100, configured to send a round-robin request to each child node by a master node in a time slice;
a message generating module 200, configured to determine at least one child node that receives the round robin request, and generate a response message corresponding to the round robin request by the at least one child node;
a message sending module 300, configured to broadcast the response message to the ethernet bus through the at least one sub-node, and within the time slice, successively determine a next sub-node that receives the round seeking request, and generate and send a response message corresponding to the round seeking request by the next sub-node.
It should be noted that the device embodiment and the method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are correspondingly applicable in the device embodiment, which is not described herein again.
The method has the advantages that the main node sends the polling requests to the sub-nodes in a time slice; then, determining at least one child node which receives the round searching request, and generating a response message corresponding to the round searching request by the at least one child node; finally, the response message is broadcasted to the Ethernet bus through the at least one child node, and in the time slice, the next child node which receives the round seeking request is determined successively, and the response message corresponding to the round seeking request is generated and sent by the next child node. The real-time data transmission scheme is clear and definite in design scheme, low in practical difficulty and high in transmission efficiency.
EXAMPLE five
The invention also provides a robot, which comprises the Ethernet bus communication device.
It should be noted that the robot embodiment and the method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are correspondingly applicable in the device embodiment, which is not described herein again.
The method has the advantages that the main node sends the polling requests to the sub-nodes in a time slice; then, determining at least one child node which receives the round searching request, and generating a response message corresponding to the round searching request by the at least one child node; finally, the response message is broadcasted to the Ethernet bus through the at least one child node, and in the time slice, the next child node which receives the round seeking request is determined successively, and the response message corresponding to the round seeking request is generated and sent by the next child node. The real-time data transmission scheme is clear and definite in design scheme, low in practical difficulty and high in transmission efficiency.
EXAMPLE six
The present invention also provides an ethernet bus communication device, which includes a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein when executed by the processor, the computer program implements:
generating a message to be sent currently at least one child node, the message comprising header information, payload information, and trailer information, wherein,
describing the current message as a broadcast message, a service message or an anonymous message by the header information;
carrying real-time Ethernet data contained in the message by the payload information;
indicating the transmission state of the real-time Ethernet data by the tail information;
sending, by the child node, the message when the master node is in turn seeking the at least one child node.
It should be noted that the device embodiment and the method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are correspondingly applicable in the device embodiment, which is not described herein again.
The method has the advantages that the main node sends the polling requests to the sub-nodes in a time slice; then, determining at least one child node which receives the round searching request, and generating a response message corresponding to the round searching request by the at least one child node; finally, the response message is broadcasted to the Ethernet bus through the at least one child node, and in the time slice, the next child node which receives the round seeking request is determined successively, and the response message corresponding to the round seeking request is generated and sent by the next child node. The real-time data transmission scheme is clear and definite in design scheme, low in practical difficulty and high in transmission efficiency.
EXAMPLE seven
The present invention also provides a computer readable storage medium, which stores an ethernet bus communication program, and when the ethernet bus communication program is executed by a processor, the steps of the ethernet bus communication method are implemented.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (11)

1. An ethernet bus communication method, comprising:
in a time slice, the main node sends polling requests to each sub-node;
determining a child node receiving the polling request, and generating a response message corresponding to the polling request by the child node; broadcasting the response message to the Ethernet bus through the polled child node, and within the time slice, polling and requesting the next child node one by one, and generating and sending the response message corresponding to the polling request by the next child node;
generating, by the child node, a response message corresponding to the polling request, including:
adding a protocol frame consisting of header information, effective load information and tail information into an original effective load field of the Ethernet protocol;
the response message comprises the header information, the payload information and the trailer information, wherein the header information describes that the response message is a broadcast message, a service message or an anonymous message; carrying real-time Ethernet data contained in the response message by the effective load information; and indicating the transmission state of the real-time Ethernet data by the tail information.
2. The ethernet bus communication method of claim 1, wherein the sending of the polling request from the master node to each of the child nodes within a time slice comprises:
determining the number of child nodes connected to the main node, and simultaneously determining the maximum data volume of single transmission of the child nodes at the next time and time synchronization information, wherein the maximum data volume of single transmission is determined by the number of nodes of the current bus and the length of the time slice.
3. The ethernet bus communication method of claim 1, wherein the sending of the polling request from the master node to each of the child nodes within a time slice comprises:
determining a child node device table of the master node;
transmitting, by the master node, the polling request to each child node in the child node device table.
4. The ethernet bus communication method according to claim 1, wherein said broadcasting the response message to the ethernet bus by the polled child node, and within the time slice, polling one by one to request the next child node, and generating and sending the response message corresponding to the polling request by the next child node, comprises:
and in the time slice, after the sub-nodes finish the sending and generating operation of the response message successively, successively determining the next time slice, and simultaneously, starting to send polling requests to the sub-nodes by the main node.
5. The ethernet bus communication method of claim 1, further comprising:
configuring child node information of the main node through an upper computer, and determining each child node to be polled under the main node according to the node information.
6. An ethernet bus communication method, comprising:
configuring a sub-node equipment table of a main node by an upper computer, or determining each sub-node connected with the main node through a CAN bus;
a polling request sent by the master node to a child node within a time slice;
broadcasting a response message to the Ethernet bus through the child node, successively determining a next child node receiving the polling request in the time slice, and generating and sending a response message corresponding to the polling request by the next child node;
the broadcasting the response message to the ethernet bus through the child node includes:
adding a protocol frame consisting of header information, effective load information and tail information into an original effective load field of the Ethernet protocol;
the response message comprises the header information, the payload information and the trailer information, wherein the header information describes that the response message is a broadcast message, a service message or an anonymous message; carrying real-time Ethernet data contained in the response message by the effective load information; and indicating the transmission state of the real-time Ethernet data by the tail information.
7. The ethernet bus communication method of claim 6, wherein the determining each child node connected to the master node through the CAN bus comprises:
and the main node manages hot plug, ID distribution, node health management and node firmware update of the child nodes through the CAN bus.
8. An ethernet bus communication device, comprising:
the request acquisition module is used for sending polling requests to each child node by the main node in a time slice;
the message generation module is used for determining the child node which receives the polling request and generating a response message corresponding to the polling request by the child node;
a message sending module, configured to broadcast the response message to the ethernet bus through the polled child node, and within the time slice, successively request a next child node, and generate and send a response message corresponding to the polling request by the next child node;
the message generating module is also used for adding a protocol frame consisting of the head information, the effective load information and the tail information into an original effective load field of the Ethernet protocol;
the response message comprises the header information, the payload information and the trailer information, wherein the header information describes that the response message is a broadcast message, a service message or an anonymous message; carrying real-time Ethernet data contained in the response message by the effective load information; and indicating the transmission state of the real-time Ethernet data by the tail information.
9. An apparatus, characterized in that the apparatus comprises an ethernet bus communication device according to claim 8.
10. An ethernet bus communication device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing:
in a time slice, the main node sends polling requests to each sub-node;
determining that the polling request child node is received, and generating a response message corresponding to the polling request by the child node;
broadcasting the response message to the Ethernet bus through the polled child node, and within the time slice, polling and requesting the next child node one by one, and generating and sending the response message corresponding to the polling request by the next child node;
generating, by the child node, a response message corresponding to the polling request, including:
adding a protocol frame consisting of header information, effective load information and tail information into an original effective load field of the Ethernet protocol;
the response message comprises the header information, the payload information and the trailer information, wherein the header information describes that the response message is a broadcast message, a service message or an anonymous message; carrying real-time Ethernet data contained in the response message by the effective load information; and indicating the transmission state of the real-time Ethernet data by the tail information.
11. A computer-readable storage medium, having an ethernet bus communication program stored thereon, wherein the ethernet bus communication program, when executed by a processor, implements the steps of the ethernet bus communication method according to any one of claims 1 to 7.
CN201911237127.4A 2019-12-05 2019-12-05 Ethernet bus communication method, device, robot, equipment and computer readable storage medium Active CN111447126B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911237127.4A CN111447126B (en) 2019-12-05 2019-12-05 Ethernet bus communication method, device, robot, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911237127.4A CN111447126B (en) 2019-12-05 2019-12-05 Ethernet bus communication method, device, robot, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111447126A CN111447126A (en) 2020-07-24
CN111447126B true CN111447126B (en) 2022-02-22

Family

ID=71652349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911237127.4A Active CN111447126B (en) 2019-12-05 2019-12-05 Ethernet bus communication method, device, robot, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111447126B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978875A (en) * 2021-02-23 2022-08-30 广州汽车集团股份有限公司 Vehicle-mounted node management method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833168A (en) * 2012-08-31 2012-12-19 北京东土科技股份有限公司 Data transmission method and device based on time triggering mechanism
CN106888141A (en) * 2017-02-28 2017-06-23 北京艾利特科技有限公司 A kind of efficient CAN communication means
CN108055151A (en) * 2017-12-11 2018-05-18 日立楼宇技术(广州)有限公司 Port management method, device, network node and the storage medium of network node
CN109263581A (en) * 2018-11-08 2019-01-25 湖北汽车工业学院 A kind of real-time commitment method for automatic driving vehicle

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102261A (en) * 2006-07-03 2008-01-09 华为技术有限公司 Method and device for Ethernet carrier asynchronization transmission mode

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833168A (en) * 2012-08-31 2012-12-19 北京东土科技股份有限公司 Data transmission method and device based on time triggering mechanism
CN106888141A (en) * 2017-02-28 2017-06-23 北京艾利特科技有限公司 A kind of efficient CAN communication means
CN108055151A (en) * 2017-12-11 2018-05-18 日立楼宇技术(广州)有限公司 Port management method, device, network node and the storage medium of network node
CN109263581A (en) * 2018-11-08 2019-01-25 湖北汽车工业学院 A kind of real-time commitment method for automatic driving vehicle

Also Published As

Publication number Publication date
CN111447126A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN107040284B (en) Multi-address access method for improving reliability and stability of data transmission
CN111580995B (en) Synchronous communication method and system of distributed cloud platform and Internet of things intelligent terminal based on MQTT asynchronous communication scene
CN114024880B (en) Network target range probe acquisition method and system based on proxy IP and flow table
US20130159410A1 (en) System and method for hierarchical message transmission between devices in heterogeneous network environment
WO2015062479A1 (en) Method, device and system for monitoring terminal status
CN102291259B (en) Low-voltage power line communication network layer management method based on multi-master station mode
CN110177097A (en) Data transmission method, apparatus and system
CN111447126B (en) Ethernet bus communication method, device, robot, equipment and computer readable storage medium
CN110213359B (en) Internet of vehicles networking data pushing system and method based on D2D
JP2006235831A (en) Condition management device, method, and program
CN111092952B (en) Data interaction method and related product
US20220231910A1 (en) Relay device, vehicle communication system, vehicle, communication method, and communication program
CN113037798B (en) Multi-gateway communication method, system, electronic device and storage medium
CN106161595B (en) Industrial Internet-based process control real-time communication method, device and system
CN112019440A (en) CAN bus multicast method based on identifier multiplexing
CN109218156B (en) Management method of dynamic connection data
CN108462537B (en) Method for realizing one-master multi-slave communication
CN104639379A (en) Proxy testing method and device
CN112995095B (en) Data processing method, device and computer readable storage medium
CN111092964B (en) Equipment identification method in vehicle-mounted network
CN110138683B (en) QoS-supported Internet of things data transmission method and system
CN107172582B (en) M2M communication equipment and method based on NodeJS
CN110971455B (en) Method for realizing FC node automatic configuration
CN115695585B (en) Method for carrying Ethernet UDP communication by TTP/C bus
CN115150361B (en) Address management method for distributed heterogeneous network equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518000 Room 401, block D, building 7, Shenzhen International Innovation Valley, Dashi 1st Road, Xili community, Xili street, Nanshan District, Shenzhen, Guangdong

Applicant after: Juxing Technology (Shenzhen) Co., Ltd

Address before: 518000 building 101, building R3b, Gaoxin industrial village, No.018, Gaoxin South 7th Road, community, high tech Zone, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Juxing Technology (Shenzhen) Co., Ltd

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant