CN106506306A - A kind of method and apparatus of data-message transmission - Google Patents

A kind of method and apparatus of data-message transmission Download PDF

Info

Publication number
CN106506306A
CN106506306A CN201611133841.5A CN201611133841A CN106506306A CN 106506306 A CN106506306 A CN 106506306A CN 201611133841 A CN201611133841 A CN 201611133841A CN 106506306 A CN106506306 A CN 106506306A
Authority
CN
China
Prior art keywords
transducer
serial ports
broadcasting packet
broadcast domain
data 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.)
Granted
Application number
CN201611133841.5A
Other languages
Chinese (zh)
Other versions
CN106506306B (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201611133841.5A priority Critical patent/CN106506306B/en
Publication of CN106506306A publication Critical patent/CN106506306A/en
Application granted granted Critical
Publication of CN106506306B publication Critical patent/CN106506306B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/4013Management of data rate on the bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the present invention provides a kind of method of data-message transmission, transducer receives the data message for coming from bus network, the broadcasting packet that the data message is encapsulated as Ethernet, the broadcasting packet is sent in the broadcast domain of the Ethernet belonging to the transducer, and other transducers in order to the broadcast domain process the broadcasting packet.Simultaneously, the embodiment of the present invention also provides a kind of device of data-message transmission, the beneficial effect of the embodiment of the present invention is to solve the problems, such as efficient data transparent transmission when data communication in bus network to be switched to Ethernet data communication, and realizes that conventional bus network communicating system is seamlessly transitted to ethernet communication system.

Description

A kind of method and apparatus of data-message transmission
Technical field
A kind of the present invention relates to data communication technology field, more particularly to method and apparatus of data-message transmission.
Background technology
RS485 buses are the conventional networking modes of industrial field control system, be used in industry widely two-way, Balance transmission standard interface, by component low cost, reliability is high, in remote meter reading, intelligent family the features such as distribution is larger The fields such as residence, remote monitoring are used widely, but do not specify unified bus protocol.
RS485 buses support point-to-multipoint delivery pattern, and without data collision detection mechanism, so main by master Machine carries out omnibearing control to whole system.The general communication mode using one master and multiple slaves, during main frame can be to whole network Slave is polled, and recognizes slave by address code, confirms whether run well with the presence or absence of the equipment and equipment in network. Main frame is mainly communicated by acknowledgement mechanism with slave, and sending instructions under main frame is sent with the forms of broadcasting, and each slave receives correlation Instruction, the address code in instruction is corresponding with the address code of oneself, it is the discovery that being handed down to the instruction of oneself is then immediately performed correlation Instruction, and by the result response of execute instruction to main frame, otherwise abandon the instruction, communications of the Fig. 1 for RS485 bus one master and multiple slaves The schematic diagram of topology.
It is a kind of interactive and open network of standard based on the Ethernet of TCP/IP, soon, data transfer can for network speed Lean on, have become the Main way of control field network Development.Compared with serial communication, Ethernet have bandwidth, at a high speed, long distance From the advantages of communication, and connected network communication distance can realize the monitoring in global range with indefinite extension.And RS485 buses On can hold in the mouth the interstitial content of company than relatively limited, also limit the scale of networking.
And in industry control communication equipment, the serial device of more use RS485 at present, if all upgrade to network set Standby, cost is very high, currently how to realize that data conversion becomes urgent problem between Ethernet and serial equipment, by serial ports Data are converted to Ethernet transmission becomes the research and development focus of serial equipment networking process.Therefore by adopting RS485 buses Transmission switchs to the method by Ethernet transparent transmission, it is not necessary to RS485 bus apparatus and software system, upgrade cost before modification Low, it is easy to implement, plug and play.
Existing method is typically all that the data on serial equipment are switched to Ethernet message using manner below to be transferred to Long-range monitoring PC, Fig. 2 turn the schematic diagram of the communication topology of Ethernet for serial ports.
As shown in Fig. 2 monitoring PC first needs to turn with serial ports, and ethernet device sets up point-to-point TCP connection or UDP connects Connect, the configuration (IP address, mode of operation are server end/clients etc.) that setting up connection needs is required for configured in advance good, one As be required for manual configuration.Then serial data frame is converted to by ether network packet, ether report by virtual serial port on monitoring PC Text is sent to serial ports by network transmission and turns ethernet device, and serial ports turns ethernet device and Ethernet message is reduced into serial data It is sent to serial equipment.In the reverse direction, serial ports turns ethernet device and receives the serial data that serial equipment sends, by serial ports number Ether network packet is encapsulated as according to frame, and monitoring PC is transferred to by Ethernet, Ethernet message is reduced into by virtual serial port by PC Serial data.
Such scheme simply considered serial data by being converted into Ethernet message transmissions to the scene of long-range PC, for The transparent transmission scene of the serial data in RS485 bus network can not be applied well, and the increasing with serial equipment quantity Greatly, the Changer Device of needs increases, then the point-to-point connection quantity that sets up also necessarily increases, so above-mentioned scheme meeting Cause in Ethernet, to there is the substantial amounts of point-to-point connection of substantial amounts of redundant message or foundation in idle condition, without pin The characteristics of to RS485 bus network master-slave communications, cause efficiently using Internet resources, to increased the hardware of deployment into This.Secondly, with increasing for number of devices, transducer needs the workload of manual configuration to increase, and also increases configuration error rate, Increase the difficulty of device systems upgrading.
Content of the invention
In order to solve above-mentioned technical problem, the embodiment of the invention discloses a kind of method of data-message transmission, including with Lower step:Transducer receives the data message for coming from bus network, the broadcast that the data message is encapsulated as Ethernet Message, sends the broadcasting packet in the broadcast domain of the Ethernet belonging to the transducer, in order to the broadcast domain Other transducers process the broadcasting packet.
Optionally, for first from transducer, first always passes through the transducer from the serial ports of transducer and the serial ports of slave Line network connection and being connected by the first broadcast domain from transducer of being connected with other slaves, the serial ports of main transducer and main frame Serial ports is connected by bus network and the main transducer is connected with the second broadcast domain of Ethernet,
Optionally, methods described is specifically included:
Described first is set up with second broadcast domain by first broadcast domain from transducer with the main transducer TCP connects, and described first connects the data for receiving that the main frame is sent by the main transducer from transducer by the TCP Message, the broadcasting packet that the data message is encapsulated as Ethernet send the broadcast report in first broadcast domain Text, other in order to first broadcast domain process the broadcasting packet from transducer.
Optionally, for first from transducer, first always passes through the transducer from the serial ports of transducer and the serial ports of slave Line network connection and being connected by the 3rd broadcast domain from transducer of being connected with other slaves, the serial ports of main transducer and main frame Serial ports is connected by bus network and the main transducer is connected with the 3rd broadcast domain, and methods described is specifically included:
The described first described main transducer for coming from bus network from transducer reception receives institute using different serial ports First data message of the serial port for carrying the different serial ports sent after stating the data message that main frame sends, according to default The different serial ports and the one-to-one relationship of different virtual LAN Vlan marks, first data message is encapsulated as The broadcasting packet of the Ethernet of Vlan marks corresponding from the different serial ports is carried, is sent in the 3rd broadcast domain The broadcasting packet, other in order to the 3rd broadcast domain are unsealed from transducer according to Vlan corresponding with serial port marks Fill the broadcasting packet, according to the corresponding relation by the data message in the broadcasting packet be sent to serial port corresponding its He is processed from the serial ports of transducer.
Optionally, methods described is specifically included:Described first is wide by described first with the main transducer from transducer Broadcast domain and TCP is set up with second broadcast domain and be connected, described the main frame is received by TCP connections from transducer pass through institute The second data message that the different port number of main transducer sends is stated, according to the default different port number and different virtual offices Second data message is encapsulated as carrying corresponding with the different port number by the one-to-one relationship of domain net Vlan marks The broadcasting packet of the Ethernet of Vlan marks, sends the broadcasting packet in first broadcast domain, in order to described the Other of one broadcast domain decapsulate the broadcasting packet from transducer according to Vlan corresponding with port numbers marks, according to described right Should be related to that the second data message in the broadcasting packet is sent to corresponding other of port numbers is carried out from the port of transducer Process.
Optionally, methods described is specifically included:Described first is wide by described first with the main transducer from transducer Broadcasting domain and TCP being set up with second broadcast domain and be connected, described first receives the main conversion from transducer by TCP connections The carrying that device is sent by the different port of main transducer after being received the data message that the main frame sends using different serial ports 3rd data message of the port numbers of the serial port of the different serial ports and different port, according to the default different port Number, the one-to-one relationship between different serial port and VLAN Vlan mark threes, will the 3rd data message envelope Fill for carrying the broadcasting packet of the Ethernet of Vlan marks corresponding with the different port number, serial port, described first The broadcasting packet is sent in broadcast domain, and other transducers in order to first broadcast domain are unsealed according to Vlan marks The broadcasting packet is filled, the 3rd data message in the broadcasting packet is sent to by port numbers according to the corresponding relation corresponding Other process from the port of transducer after be then forwarded to corresponding other of serial port and processed from the serial ports of transducer.
Further aspect is that for the embodiment of the present invention provides a kind of device of data-message transmission, including:
Receiver module, for receiving the data message for coming from bus network,
Package module, for the data message to be encapsulated as the broadcasting packet of Ethernet,
Sending module, for sending the broadcasting packet in the broadcast domain of the Ethernet belonging to the transducer, with It is easy to other transducers of the broadcast domain to process the broadcasting packet.
Optionally, described device also includes:
Serial ports, is connected by bus network for the serial ports with slave;
Ethernet interface, is connected by the first broadcast domain for being connected with other slaves from transducer,
Connection establishment module, is connected for setting up TCP by first broadcast domain with the second broadcast domain with main transducer,
The receiver module is specifically for connecting the datagram that Receiving Host is sent by main transducer by the TCP Text, wherein, the serial ports of main transducer is connected by bus network with the serial ports of main frame and the main transducer and Ethernet The second broadcast domain connection of network;
The sending module is specifically for sending the broadcasting packet, in order to described in first broadcast domain Other of one broadcast domain are from the transducer process broadcasting packet.
Optionally, described device also includes:
Serial ports, is connected by bus network for the serial ports with slave;
Ethernet interface, is connected by the 3rd broadcast domain for being connected with other slaves from transducer;
The receiver module is specifically for reception comes from the main transducer of bus network and receives institute using different serial ports First data message of the serial port for carrying the different serial ports sent after stating the data message that main frame sends;Wherein, described The serial ports of main transducer is connected by bus network with the serial ports of main frame and the main transducer is connected with the 3rd broadcast domain;
The package module is specifically for identifying with different virtual LAN Vlan according to the default different serial ports One-to-one relationship, by first data message be encapsulated as carrying Vlan marks corresponding from the different serial ports with The broadcasting packet of too network;
The sending module is specifically for sending the broadcasting packet, in order to described in the 3rd broadcast domain Other of three broadcast domains decapsulate the broadcasting packet from transducer according to Vlan corresponding with serial port marks, according to described right Should be related to that the data message in the broadcasting packet is sent to corresponding other of serial port is processed from the serial ports of transducer.
Optionally, the receiver module is specifically for receiving the main frame by the main conversion by TCP connections The second data message that the different port number of device sends,
The package module is specifically for identifying with different virtual LAN Vlan according to the default different port number One-to-one relationship, by second data message be encapsulated as carrying corresponding with the different port number Vlan mark with The broadcasting packet of too network,
The sending module is specifically for sending the broadcasting packet, in order to described in first broadcast domain Other of one broadcast domain decapsulate the broadcasting packet from transducer according to Vlan corresponding with port numbers marks, according to described right Should be related to that the second data message in the broadcasting packet is sent to corresponding other of port numbers is carried out from the port of transducer Process.
Optionally, the receiver module is specifically for receiving the datagram that the main frame sends by the TCP The serial port for carrying the different serial ports and the port numbers of different port that different port after text by main transducer sends The 3rd data message,
The package module is specifically for according to the default different port number, different serial ports and VLAN Vlan mark three between one-to-one relationship, by the 3rd data message be encapsulated as carry with the different port number, The broadcasting packet of the Ethernet of the corresponding Vlan marks of serial port,
The sending module is specifically for sending the broadcasting packet, in order to described in first broadcast domain Other transducers of one broadcast domain, will be described according to the corresponding relation according to the Vlan mark decapsulations broadcasting packet The 3rd data message in broadcasting packet is sent to after corresponding other of port numbers are processed from the port of transducer and is then forwarded to go here and there Corresponding other of slogan are processed from the serial ports of transducer.
The beneficial effect of the embodiment of the present invention is that transducer receives the data message for coming from bus network, will be described Data message is encapsulated as the broadcasting packet of Ethernet, sends described in the broadcast domain of the Ethernet belonging to the transducer Broadcasting packet, other transducers in order to the broadcast domain process the broadcasting packet.So, solve in bus network Data communication switch to Ethernet data communicate when efficient data transparent transmission problem, and realize conventional bus network communicating system to Ethernet communication system is seamlessly transitted.
Description of the drawings:
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, below will be to embodiment or description of the prior art in The required accompanying drawing for using is briefly described, it should be apparent that, drawings in the following description are only some realities of the present invention Example is applied, for those of ordinary skill in the art, on the premise of not paying creative work, can be with according to these accompanying drawings Obtain other accompanying drawings.
Network topology structure figures of the Fig. 1 for prior art;
Network topology structure figures of the Fig. 2 for prior art;
Fig. 3 is a kind of system structure diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of method flow diagram provided in an embodiment of the present invention;
Fig. 5 is a kind of method flow diagram provided in an embodiment of the present invention;
Fig. 6 is a kind of method flow diagram provided in an embodiment of the present invention;
Fig. 7 is a kind of method flow diagram provided in an embodiment of the present invention;
Fig. 8 is a kind of method flow diagram provided in an embodiment of the present invention;
Fig. 9 is a kind of system structure diagram provided in an embodiment of the present invention;
Figure 10 is a kind of structure drawing of device provided in an embodiment of the present invention;
Figure 11 is a kind of structure drawing of device provided in an embodiment of the present invention.
Specific embodiment:
Accompanying drawing in below in conjunction with the embodiment of the present invention, to the embodiment of the present invention in technical scheme carry out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiment.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
Fig. 3 is the system construction drawing of the embodiment of the present invention.
Wherein, monitoring host computer is connected with the multiple slaves in same broadcast domain by transducer.
The embodiment of the invention discloses a kind of method of data-message transmission, as shown in figure 4, comprising the following steps:
S101, transducer receive the data message for coming from bus network,
S103, the broadcasting packet that the data message is encapsulated as Ethernet,
S105, sends the broadcasting packet, in the broadcast domain of the Ethernet belonging to the transducer in order to described Other transducers of broadcast domain process the broadcasting packet.
According to the characteristics of bus network communication system point-to-multipoint, each slave of the data that main frame is issued in bus network is equal Can receive, therefore for main frame is closer to the distance with each slave, in the case of all being deployed in same broadcast domain, by by main frame or The bus network data message that slave sends is encapsulated as broadcasting packet and transmits in ethernet networks, and the corresponding transducer of each slave is received Carry out decapsulation and be reduced into bus network data message being sent to slave after broadcasting packet.So main frame or slave only need to send A data message, other equipment can be received, the characteristics of meet universal serial bus, can be efficiently using Internet resources described total Gauze network can be with RS485 bus network, and bus network the characteristics of other have point-to-multipoint certainly can also be suitable for.
Optionally,
For first from transducer, first is connected by bus network the transducer from the serial ports of transducer and the serial ports of slave Connect and be connected with other slaves is connected from transducer by the first broadcast domain, and the serial ports of main transducer is passed through with the serial ports of main frame Bus network connects and the main transducer is connected with the second broadcast domain of Ethernet,
As shown in figure 5, methods described also includes:
Step S1011:
Described first is set up with second broadcast domain by first broadcast domain from transducer with the main transducer TCP connects,
Step S101 is specifically included:
Described first connects the data for receiving that the main frame is sent by the main transducer from transducer by the TCP Message,
Step S105 is specifically included:
The broadcasting packet is sent in first broadcast domain, in order to first broadcast domain other from transducer Process the broadcasting packet.
In embodiments of the present invention, when each slave is deployed under same broadcast domain, main frame relative to slave be deployed in across Can select from all slaves in the distal end (host deployments are in another broadcast domain) of the network segment, the main transducer being now connected with main frame Acting on behalf of as slave from transducer for slave connection is taken, and TCP is set up with slave agency be connected, main frame and all slaves Communication data by the TCP linkup transmits give slave agency, then slave agency data message is broadcast to other slaves, So main frame only need to send a data, and other all slaves can be received.When bus network is RS485 bus network, The detailed process of the embodiment of the present invention is as follows:When main frame has data is activation, the RS485 data that its main transducer for connecting is received Message is simultaneously encapsulated into TCP message and is sent to slave agency through Ethernet, and slave agency receive TCP message and solved After encapsulation, portion can be retained and be sent to the slave being directly connected to slave agency, portion is packaged into broadcast report again then Text is sent in Ethernet, under same broadcast domain other from transducer receive broadcasting packet and decapsulate after by datagram Text is sent to the slave of respective connection, thus realizes that a data message of distance host reaches slave, by broadcast mode So that all slaves all receive data.And when slave has reply data to be sent to main frame, what which connected will can go here and there from transducer The RS485 data messages that mouth is received are packaged into broadcasting packet and are sent in Ethernet, and the slave agency under same broadcast domain receives Decapsulate to after the broadcasting packet, data message is Resealed into TCP message again then, main frame is sent to through Ethernet The main transducer (period, other slaves can also receive this data, can abandon as address code is mismatched) of connection, main frame is up The TCP message for receiving decapsulation is reduced to RS485 data messages and is sent to main frame by transducer.This completes main frame with The transparent transmission of all slaves communication data in bus, and accomplish, efficiently using Ethernet resource, to save hardware lower deployment cost.
Optionally, for first from transducer, first always passes through the transducer from the serial ports of transducer and the serial ports of slave Line network connection and being connected by the 3rd broadcast domain from transducer of being connected with other slaves, the serial ports of main transducer and main frame Serial ports is connected by bus network and the main transducer is connected with the 3rd broadcast domain, as shown in fig. 6, step S101 Specifically include:
The described first described main transducer for coming from bus network from transducer reception receives institute using different serial ports First data message of the serial port for carrying the different serial ports sent after stating the data message that main frame sends,
Step S103 is specifically included:
According to the one-to-one relationship that the default different serial ports are identified with different virtual LAN Vlan, will be described First data message is encapsulated as the broadcasting packet of the Ethernet for carrying Vlan marks corresponding from the different serial ports,
Step S105 is specifically included:
The broadcasting packet is sent in the 3rd broadcast domain, in order to the 3rd broadcast domain other from transducer According to Vlan corresponding with the serial port mark decapsulations broadcasting packet, according to the corresponding relation by the broadcasting packet Data message be sent to corresponding other of serial port and processed from the serial ports of transducer.
Optionally, as shown in fig. 7, step S101 is specifically included:
Described first is set up with second broadcast domain by first broadcast domain from transducer with the main transducer TCP connections, the different port number for passing through the main transducer from transducer by the TCP connection receptions main frame The second data message for going out,
Step S103 is specifically included:Identified with different virtual LAN Vlan according to the default different port number One-to-one relationship, by second data message be encapsulated as carrying corresponding with the different port number Vlan mark with The broadcasting packet of too network,
Step S105 is specifically included:The broadcasting packet is sent in first broadcast domain, in order to described Other of one broadcast domain decapsulate the broadcasting packet from transducer according to Vlan corresponding with port numbers marks, according to described right Should be related to that the second data message in the broadcasting packet is sent to corresponding other of port numbers is carried out from the port of transducer Process.
Optionally, as shown in figure 8, step S101 is specifically included:
Described first is set up with second broadcast domain by first broadcast domain from transducer with the main transducer TCP connects, and described first is received described in the main transducer received using different serial ports from transducer by TCP connections The serial port of the carrying different serial ports that the different port after the data message that main frame sends by main transducer sends and 3rd data message of the port numbers of different port,
Step S103 is specifically included:
Identified between three one by one according to the default different port number, different serial ports and VLAN Vlan 3rd data message is encapsulated as carrying Vlan marks corresponding with the different port number, serial port by corresponding relation The broadcasting packet of Ethernet,
Step S105 is specifically included:The broadcasting packet is sent in first broadcast domain, in order to described Other transducers of one broadcast domain, will be described according to the corresponding relation according to the Vlan mark decapsulations broadcasting packet The 3rd data message in broadcasting packet is sent to after corresponding other of port numbers are processed from the port of transducer and is then forwarded to go here and there Corresponding other of slogan are processed from the serial ports of transducer.
In an embodiment of the present invention, bus network can be RS485 bus network, for there is multiple serial ports on transducer Situation, i.e., the transducer of one RS485 transfer Ethernet has multiple serial ports, so descending can connect multiple RS485 buses The network equipment (such as water meter and ammeter etc.).In the case of local area network is same broadcast domain, for different serial ports are received RS485 data messages be encapsulated as taking virtual local area network tags VLAN tag during broadcasting packet, preset difference serial ports with not With the one-to-one relationship that VLAN Vlan is identified, the corresponding broadcasting packet of data message of so difference serial ports can be not Transmit under the broadcast domain of same VLAN, each serial ports can only receive the data in the broadcasting packet of same VLAN, therefore not Well isolation can be accomplished with the data of serial ports, while can very easily isolated serial port data and non-in access switch Serial data.And in the case of cross-network segment (main frame is with slave not in a broadcast domain), the main transducer connection of main frame connection The monitoring host computer of multiple RS485 bus network, the RS485 data messages that different serial ports are received are encapsulated as TCP message, if Different port numbers are put, and the TCP connections of some different ports number are therefore set up according to serial ports quantity, each serial ports Data message is all acted on behalf of by the TCP linkup transmits of respective port numbers to slave, and the data message of so each serial ports has one The isolation transparent transmission of serial data message is realized in the exclusive TCP connections of bar.
In an alternative embodiment of the invention, as shown in figure 9, the RS485 bus network datagrams that send of slave A1, A2, A3 Text, interacts through the broadcasting packet of band VLAN a encapsulation, the RS485 bus network datagrams that slave B1, B2, B3 send Text, interacts through the broadcasting packet of band VLAN b encapsulation.RS485 monitoring host computers A with send under generator terminal VLAN a RS485 bus network data message through tcp port number for A TCP connection interact, RS485 monitoring host computers B with from generator terminal The RS485 bus network data message sent under VLAN b is interacted for the TCP connections of B through tcp port number.Slave is acted on behalf of The data message got from TCP connections, according to default different port number, different serial ports and VLAN Vlan marks Know the one-to-one relationship between three, determine it is to send toward which serial ports and the transmission number in which VLAN according to port numbers According to message, slave agency from the broadcasting packet for receiving then according to VLAN tag determine be send datagram toward which serial ports and To the TCP linkup transmit data messages of which port, and the RS485 data messages received from serial ports then determine according to serial port Transmission and the TCP linkup transmit data messages to which port numbers in which VLAN.
Further aspect is that for the embodiment of the present invention provides a kind of device of data-message transmission, as shown in Figure 10, including:
Receiver module 201, for receiving the data message for coming from bus network,
Package module 203, for the data message to be encapsulated as the broadcasting packet of Ethernet,
Sending module 205, for sending the broadcasting packet in the broadcast domain of the Ethernet belonging to the transducer, Other transducers in order to the broadcast domain process the broadcasting packet.
Optionally, as shown in figure 11, described device also includes:
Serial ports 207, is connected by bus network for the serial ports with slave;
Ethernet interface 209, is connected by the first broadcast domain for being connected with other slaves from transducer,
Connection establishment module 211, for setting up TCP companies with main transducer by first broadcast domain and the second broadcast domain Connect,
The receiver module 201 is specifically for connecting the data that Receiving Host is sent by main transducer by the TCP Message, wherein, the serial ports of main transducer is connected by bus network with the serial ports of main frame and the main transducer and ether The second broadcast domain connection of network;
The sending module 205 is specifically for sending the broadcasting packet, in order to described in first broadcast domain Other of first broadcast domain are from the transducer process broadcasting packet.
Optionally, as shown in figure 11, described device also includes:
Serial ports 207, is connected by bus network for the serial ports with slave;
Ethernet interface 209, is connected by the 3rd broadcast domain for being connected with other slaves from transducer;
The receiver module 201 is specifically for receiving the main transducer for coming from bus network using different serial ports receptions First data message of the serial port for carrying the different serial ports sent after the data message sent to the main frame;Wherein, The serial ports of main transducer is connected by bus network with the serial ports of main frame and the main transducer and the 3rd broadcast domain Connection;
The package module 203 is specifically for according to the default different serial ports and different virtual LAN Vlan First data message is encapsulated as carrying Vlan marks corresponding from the different serial ports by the one-to-one relationship of mark Ethernet broadcasting packet;
The sending module 205 is specifically for sending the broadcasting packet, in order to described in the 3rd broadcast domain Other of 3rd broadcast domain decapsulate the broadcasting packet from transducer according to Vlan corresponding with serial port marks, according to described Corresponding relation is sent to the data message in the broadcasting packet from corresponding other of serial port are carried out from the serial ports of transducer Reason.
Optionally, the receiver module 201 is specifically for receiving the main frame by TCP connections and passing through the master The second data message that the different port number of transducer sends,
The package module 203 is specifically for according to the default different port number and different virtual LAN Vlan Second data message is encapsulated as carrying Vlan marks corresponding with the different port number by the one-to-one relationship of mark Ethernet broadcasting packet,
The sending module 205 is specifically for sending the broadcasting packet, in order to described in first broadcast domain Other of first broadcast domain decapsulate the broadcasting packet from transducer according to Vlan corresponding with port numbers marks, according to described The second data message in the broadcasting packet is sent to corresponding other of port numbers and is entered from the port of transducer by corresponding relation Row is processed.
Optionally, the receiver module 201 is specifically for receiving the number that the main frame sends by the TCP Serial port and the end of different port according to the carrying sent by the different port of main transducer after the message different serial ports 3rd data message of slogan,
The package module 203 is specifically for according to the default different port number, different serial ports and virtual local area 3rd data message is encapsulated as carrying and the different port by the one-to-one relationship between net Vlan mark threes Number, the broadcasting packet of the Ethernet of serial port corresponding Vlan marks,
The sending module 205 is specifically for sending the broadcasting packet, in order to described in first broadcast domain Other transducers of first broadcast domain according to the Vlan mark decapsulation broadcasting packets, according to the corresponding relation by institute State after the 3rd data message in broadcasting packet is sent to port numbers other port process from transducer corresponding and be then forwarded to Corresponding other of serial port are processed from the serial ports of transducer.
Finally it should be noted that:Above example only in order to technical scheme to be described, rather than a limitation;Although With reference to the foregoing embodiments the present invention has been described in detail, it will be understood by those within the art that:Which still may be used To modify to the technical scheme described in foregoing embodiments, or equivalent is carried out to which part technical characteristic; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and Scope.

Claims (10)

1. a kind of method of data-message transmission, it is characterised in that
Transducer receives the data message for coming from bus network, the broadcast report that the data message is encapsulated as Ethernet Text, sends the broadcasting packet in the broadcast domain of the Ethernet belonging to the transducer, its in order to the broadcast domain He processes the broadcasting packet by transducer.
2. the method for claim 1, it is characterised in that the transducer is that first from transducer first from transducer Serial ports be connected by bus network with the serial ports of slave and be connected with other slaves from transducer by the first broadcast domain connect Connect, the serial ports of main transducer is connected by bus network with the serial ports of main frame and the main transducer is wide with the second of Ethernet Domain connection is broadcast,
Methods described is specifically included:
Described first sets up TCP company with the main transducer by first broadcast domain and second broadcast domain from transducer Connect, described first connects the data message for receiving that the main frame is sent by the main transducer from transducer by the TCP, The broadcasting packet that the data message is encapsulated as Ethernet, sends the broadcasting packet in first broadcast domain, with Be easy to first broadcast domain other from the transducer process broadcasting packet.
3. the method for claim 1, it is characterised in that the transducer is that first from transducer first from transducer Serial ports be connected by bus network with the serial ports of slave and be connected with other slaves from transducer by the 3rd broadcast domain connect Connect, the serial ports of main transducer is connected by bus network with the serial ports of main frame and the main transducer is connected with the 3rd broadcast domain Connect, methods described is specifically included:
The described first described main transducer for coming from bus network from transducer reception receives the master using different serial ports First data message of the serial port for carrying the different serial ports sent after the data message that machine sends, according to default described First data message is encapsulated as carrying by different serial ports and the one-to-one relationship of different virtual LAN Vlan marks The broadcasting packet of the Ethernet of Vlan marks corresponding from the different serial ports, sends in the 3rd broadcast domain described Broadcasting packet, other in order to the 3rd broadcast domain decapsulate institute from transducer according to Vlan corresponding with serial port marks State broadcasting packet, according to the corresponding relation by the data message in the broadcasting packet be sent to serial port corresponding other from The serial ports of transducer is processed.
4. method as claimed in claim 2, it is characterised in that
Methods described is specifically included:Described first from transducer and the main transducer by first broadcast domain and described the Two broadcast domains set up TCP connections, described connected from transducer by the TCP receive the main frame by the main transducer The second data message that different port number sends, is identified with different virtual LAN Vlan according to the default different port number One-to-one relationship, by second data message be encapsulated as carrying corresponding with the different port number Vlan mark with The broadcasting packet of too network, sends the broadcasting packet in first broadcast domain, its in order to first broadcast domain He decapsulates the broadcasting packet from transducer according to Vlan corresponding with port numbers marks, will be described according to the corresponding relation The second data message in broadcasting packet is sent to corresponding other of port numbers and is processed from the port of transducer.
5. method as claimed in claim 2, it is characterised in that
Methods described is specifically included:Described first from transducer and the main transducer by first broadcast domain and described the Two broadcast domains set up TCP connections, and described first receives the main transducer from transducer by TCP connections is gone here and there using difference The carrying that sent by the different port of main transducer after mouthful receiving the data message that the main frame the sends different serial ports Serial port and different port port numbers the 3rd data message, according to the default different port number, different serial ports Number and VLAN Vlan mark three between one-to-one relationship, by the 3rd data message be encapsulated as carry and institute The broadcasting packet of the Ethernet of the corresponding Vlan marks of different port number, serial port is stated, is sent in first broadcast domain The broadcasting packet, other transducers in order to first broadcast domain are reported according to the Vlan mark decapsulations broadcast Text, according to the corresponding relation by the 3rd data message in the broadcasting packet be sent to port numbers corresponding other from conversion The port of device is then forwarded to corresponding other of serial port after processing and is processed from the serial ports of transducer.
6. a kind of device of data-message transmission, it is characterised in that include:
Receiver module, for receiving the data message for coming from bus network,
Package module, for the data message to be encapsulated as the broadcasting packet of Ethernet,
Sending module, for sending the broadcasting packet in the broadcast domain of the Ethernet belonging to the transducer, in order to Other transducers of the broadcast domain process the broadcasting packet.
7. device as claimed in claim 6, it is characterised in that described device also includes:
Serial ports, is connected by bus network for the serial ports with slave;
Ethernet interface, is connected by the first broadcast domain for being connected with other slaves from transducer,
Connection establishment module, is connected for setting up TCP by first broadcast domain with the second broadcast domain with main transducer,
The receiver module specifically for, the data message that sent by main transducer of Receiving Host is connected by the TCP, its In, the serial ports of main transducer be connected by bus network with the serial ports of main frame and the main transducer and Ethernet institute State the connection of the second broadcast domain;
The sending module specifically for, send the broadcasting packet in first broadcast domain, wide in order to described first Broadcast domain other from the transducer process broadcasting packet.
8. device as claimed in claim 6, it is characterised in that described device also includes:
Serial ports, is connected by bus network for the serial ports with slave;
Ethernet interface, is connected by the 3rd broadcast domain for being connected with other slaves from transducer;
The receiver module is specifically for reception comes from the main transducer of bus network and receives the master using different serial ports First data message of the serial port for carrying the different serial ports sent after the data message that machine sends;Wherein, the master turns The serial ports of parallel operation is connected by bus network with the serial ports of main frame and the main transducer is connected with the 3rd broadcast domain;
The package module is specifically for according to the default different serial ports and the one of different virtual LAN Vlan marks One corresponding relation, first data message is encapsulated as the Ethernet for carrying Vlan marks corresponding from the different serial ports The broadcasting packet of network;
The sending module specifically for, send the broadcasting packet in the 3rd broadcast domain, wide in order to the described 3rd Broadcast domain other from transducer according to Vlan corresponding with the serial port mark decapsulation broadcasting packets, according to the corresponding pass Data message in the broadcasting packet is sent to corresponding other of serial port and is processed from the serial ports of transducer by system.
9. device as claimed in claim 7, it is characterised in that
The receiver module is specifically for being connected by the TCP and receiving different ends of the main frame by the main transducer The second data message that slogan sends,
The package module is specifically for identified with different virtual LAN Vlan according to the default different port number One corresponding relation, second data message is encapsulated as the Ethernet for carrying Vlan marks corresponding with the different port number The broadcasting packet of network,
The sending module specifically for, send the broadcasting packet in first broadcast domain, wide in order to described first Broadcast domain other from transducer according to Vlan corresponding with the port numbers mark decapsulation broadcasting packets, according to the corresponding pass The second data message in the broadcasting packet is sent to corresponding other of port numbers and is processed from the port of transducer by system.
10. device as claimed in claim 7, it is characterised in that
The receiver module is specifically for by master after the TCP receives the data message that the main frame sends The serial port for carrying the different serial ports and the 3rd data of the port numbers of different port that the different port of transducer sends Message,
The package module is specifically for according to the default different port number, different serial ports and VLAN Vlan 3rd data message is encapsulated as carrying and the different port number, serial ports by the one-to-one relationship between mark three The broadcasting packet of the Ethernet of number corresponding Vlan marks,
The sending module specifically for, send the broadcasting packet in first broadcast domain, wide in order to described first Other transducers in domain are broadcast according to the Vlan mark decapsulations broadcasting packet, according to the corresponding relation by the broadcast The 3rd data message in message is sent to after corresponding other of port numbers are processed from the port of transducer and is then forwarded to serial port Corresponding other are processed from the serial ports of transducer.
CN201611133841.5A 2016-12-10 2016-12-10 Method and device for transmitting data message Active CN106506306B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611133841.5A CN106506306B (en) 2016-12-10 2016-12-10 Method and device for transmitting data message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611133841.5A CN106506306B (en) 2016-12-10 2016-12-10 Method and device for transmitting data message

Publications (2)

Publication Number Publication Date
CN106506306A true CN106506306A (en) 2017-03-15
CN106506306B CN106506306B (en) 2020-11-20

Family

ID=58330786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611133841.5A Active CN106506306B (en) 2016-12-10 2016-12-10 Method and device for transmitting data message

Country Status (1)

Country Link
CN (1) CN106506306B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109471818A (en) * 2018-11-22 2019-03-15 武汉虹识技术有限公司 Bus structures implementation method and device
CN111026064A (en) * 2019-12-26 2020-04-17 成都云尚物联环境科技有限公司 Distributed control system based on GOOSE communication and working method thereof
CN112311641A (en) * 2020-12-30 2021-02-02 深圳市法拉第电驱动有限公司 CAN communication-based communication method and system for upper computer and lower computer
CN113765761A (en) * 2021-09-09 2021-12-07 深圳市信锐网科技术有限公司 Data transmission method, device, equipment, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0853406A2 (en) * 1997-01-06 1998-07-15 Digital Equipment Corporation Management of a computer network switched repeater
CN101741849A (en) * 2009-12-23 2010-06-16 北京格林伟迪科技有限公司 Method, system and device for transmitting serial port service data
CN102325282A (en) * 2011-09-06 2012-01-18 杭州开鼎科技有限公司 PON-based (passive optical network-based) RS485/RS232 data frame and Ethernet data frame uplink method
CN105959288A (en) * 2016-05-27 2016-09-21 姹や寒 Network protocol conversion method for power grid system and intercommunication method of power grid system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0853406A2 (en) * 1997-01-06 1998-07-15 Digital Equipment Corporation Management of a computer network switched repeater
CN101741849A (en) * 2009-12-23 2010-06-16 北京格林伟迪科技有限公司 Method, system and device for transmitting serial port service data
CN102325282A (en) * 2011-09-06 2012-01-18 杭州开鼎科技有限公司 PON-based (passive optical network-based) RS485/RS232 data frame and Ethernet data frame uplink method
CN105959288A (en) * 2016-05-27 2016-09-21 姹や寒 Network protocol conversion method for power grid system and intercommunication method of power grid system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109471818A (en) * 2018-11-22 2019-03-15 武汉虹识技术有限公司 Bus structures implementation method and device
CN111026064A (en) * 2019-12-26 2020-04-17 成都云尚物联环境科技有限公司 Distributed control system based on GOOSE communication and working method thereof
CN112311641A (en) * 2020-12-30 2021-02-02 深圳市法拉第电驱动有限公司 CAN communication-based communication method and system for upper computer and lower computer
CN112311641B (en) * 2020-12-30 2021-04-06 深圳市法拉第电驱动有限公司 CAN communication-based communication method and system for upper computer and lower computer
CN113765761A (en) * 2021-09-09 2021-12-07 深圳市信锐网科技术有限公司 Data transmission method, device, equipment, system and storage medium
CN113765761B (en) * 2021-09-09 2023-03-14 深圳市信锐网科技术有限公司 Data transmission method, device, equipment, system and storage medium

Also Published As

Publication number Publication date
CN106506306B (en) 2020-11-20

Similar Documents

Publication Publication Date Title
US8908704B2 (en) Switch with dual-function management port
WO2018133454A1 (en) Method for controlling remote service access path, and relevant apparatus
CN106506306A (en) A kind of method and apparatus of data-message transmission
CN106789606B (en) Network communication system, management method and communication method thereof
CN101094121B (en) Method, system and device for detecting Ethernet links among not direct connected devices
JP6145216B2 (en) Data transmission method, apparatus, and computer storage medium
CN108123824A (en) A kind of network fault detecting method and device
EP2098011A2 (en) Ethernet/tmpls hybrid network operation administration and maintenance frame creation method
CN108322391B (en) Data transmission method based on flow table
JP2008147882A5 (en)
CN107124393B (en) Remote host management over a network
CN106534178A (en) System and method for realizing RapidIO network universal socket
CN104993979A (en) Network connection monitoring method, terminal equipment and communication system
CN108093041A (en) Single channel VDI proxy servers and implementation method
CN106533934A (en) Border gateway applicable to all interconnected manufacturing networks
CN102469016B (en) Device and method for determining path maximum transmission unit (PMTU) reversely
CN104285413B (en) A kind of packet conversion equipment and method
CN104320322A (en) Message control method and equipment
KR101132736B1 (en) Combo Access Point Between Wi-Fi Terminal And UWB Terminal
RiLi Research and application of TCP/IP protocol in embedded system
CN103825831A (en) Packet transmitting method and switch
CN109802877A (en) A kind of CAN bus based Communication System Design
Cisco IBM Network Protocol Translation Commands
Cisco IBM Network Media Translation Commands
Cisco IBM Network Media Translation Commands

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant