CN106059876B - A kind of mode switch control method, equipment and the system of unidirectional serial bus network - Google Patents
A kind of mode switch control method, equipment and the system of unidirectional serial bus network Download PDFInfo
- Publication number
- CN106059876B CN106059876B CN201610456960.8A CN201610456960A CN106059876B CN 106059876 B CN106059876 B CN 106059876B CN 201610456960 A CN201610456960 A CN 201610456960A CN 106059876 B CN106059876 B CN 106059876B
- Authority
- CN
- China
- Prior art keywords
- node device
- message
- operating mode
- switching command
- mode
- 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.)
- Expired - Fee Related
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
- H04L12/40013—Details regarding a bus controller
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The present invention provides a kind of mode switch control method, mode switching method, the apparatus and system of unidirectional serial bus network, host node device determines the operating mode needed from node device, and passes through the operating mode for being switched to needs described in first mode switching command message or the instruction of second mode switching command message from node device;Two kinds of operating modes are configured from node device:It receives forwarding operating mode and receives transparent transmission operating mode;When operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether that service message is sent by treated;When operating mode is receives transparent transmission operating mode, the service message of reception is handled, while the service message is sent;In this way, the switching of operating mode can be carried out described in the embodiment of the present invention according to the instruction of host node device from node device, so as to adapt to different types of business demand.
Description
Technical field
The present invention relates to field of communication technology, more particularly to a kind of pattern switching controlling party of unidirectional serial bus network
Method, equipment and system.
Background technology
At present, the unidirectional serial bus applications such as RS485 copy the networks such as instrument in remote industrial control, long-distance intelligent;Wherein,
The network usually connects in a manner that unidirectional looped network or unidirectional looped network are socketed unidirectional looped network, specifically includes the following two kinds networking side
Formula:Mode one, concentrator directly form unidirectional looped network by unidirectional universal serial bus and several intelligence instruments;Mode two, concentrator
Backbone network is formed by unidirectional looped network with collector, each collector passes through unidirectional universal serial bus and several intelligence instruments respectively again
Form unidirectional ring net.In above-mentioned networking mode, due to the unidirectional limitation by the unidirectional universal serial bus of RS485, collector and intelligence
Energy instrument only supports reception transparent transmission operating mode, and the data message of reception is handled under the reception transparent transmission operating mode,
The data message is transmitted to sending port simultaneously, and the reception transparent transmission operating mode is only applicable to that data traffic is big and time delay is small
General service message transmission and response, be not particularly suited for that data traffic is small and the control class service message of time delay no requirement (NR)
It sends and responds;Therefore, how to make the different types of business demand of network-adaptive built by above-mentioned networking mode, become one
The technical issues of a urgently to be resolved hurrily.
Invention content
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide a kind of unidirectional serial bus networks
Mode switch control method, mode switching method, apparatus and system, the first mould sent from node device according to host node device
The instruction of formula switching command message or second mode switching command message carries out the switching of operating mode, different types of to adapt to
Business demand.
In order to achieve the above objects and other related objects, the embodiment of the present invention provides a kind of mould of unidirectional serial bus network
Formula method for handover control, the unidirectional serial bus network include host node device, at least one from node device;Wherein, institute
It states host node device and unidirectional looped network is formed from node device at least one by unidirectional universal serial bus, this method includes:
The host node device determines the operating mode needed from node device;
When determining the operating mode needed to receive forwarding operating mode, first mode switching command message is sent, it is described
First mode switching command message is used to indicate described be switched to operating mode from node device and receives forwarding operating mode, together
When, at itself for centre from node device when the first mode switching command message is transmitted to the next-hop of itself from node
Equipment;At itself for final jump from node device when the first mode switching command message returned into the host node set
It is standby;
When determining the operating mode needed to receive transparent transmission operating mode, second mode switching command message is sent, it is described
Second mode switching command message is used to indicate described be switched to operating mode from node device and receives transparent transmission operating mode simultaneously
Judge whether to forward the second mode switching command message;When judging to forward the second mode switching command message,
Itself for it is intermediate from node device when by the next-hop of second mode switching command message forwarding from node device, itself is
Final jump from node device when the first mode switching command message returned into the host node device;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether
By treated, service message is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled,
The service message is sent simultaneously.
Preferably, this method further includes:
The host node device receives the first mode switching command message returned;
The host node device is according to being determined the first mode switching command message of return from the work of node device
Pattern switching is receives forwarding operating mode.
Preferably, this method further includes:
The host node device determines described after the operating mode of node device is switched to reception forwarding operating mode, hair
Topology learning instruction message is sent, the topology learning instruction message is used to indicate described from the node device reading topology learning
From the number of nodes of node device in instruction message, the number of nodes is updated after the number of nodes is added 1, by newer number of nodes,
Self address or equipment of itself ID are added in the topology learning instruction message, and itself for centre from node device when,
Topology learning instruction message after the completion of addition is transmitted to the next-hop of itself from node device;Itself for final jump from
During node device, the topology learning instruction message after the completion of addition is returned into the host node device;
The host node device receives the topology learning instruction message returned, according in the topology learning instruction message of return
Number of nodes, determine from node device address or ID the topological structure of the unidirectional looped network.
Preferably, the host node device sends topology learning instruction message, including:
The host node device sends topology learning instruction message according to setting time interval or command triggers mode.
The embodiment of the present invention also provides a kind of mode switching method of unidirectional serial bus network, the unidirectional universal serial bus
Network includes host node device, at least one from node device;Wherein, the host node device by unidirectional universal serial bus with extremely
Few one forms unidirectional looped network from node device, and this method includes:
It is described from node device receive first mode switching command message when, according to the first mode switching command report
Text instruction by operating mode be switched to reception forwarding operating mode, meanwhile, itself for centre from node device when, will described in
First mode switching command message is transmitted to the next-hop of itself from node device;Itself it is being final jump from node device
When, the first mode switching command message is returned into the host node device;
It is described from node device receive second mode switching command message when, according to the second mode switching command report
Operating mode is switched to and receives transparent transmission operating mode by the instruction of text, and judges whether to forward the second mode switching command
Message;When judging to forward the second mode switching command message, at itself for centre from node device when by described second
The next-hop of pattern switching instruction message forwarding from node device, itself for final jump from node device when by first mould
Formula switching command message returns to the host node device;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether
By treated, service message is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled,
The service message is sent simultaneously.
Preferably, this method further includes:
It is described operating mode is switched to reception forwarding operating mode from node device after, receive host node device hair
The topology learning instruction message sent;
It is described to be read from node device from the number of nodes of node device in the topology learning instruction message, by the node
The number of nodes is updated, and newer number of nodes, Self address or equipment of itself ID are added to the topology learning after number plus 1
In instruction message;
It is described from node device itself for centre from node device when, by the topology learning instruction message after the completion of addition
The next-hop of itself is transmitted to from node device;Itself for final jump from node device when, by the topology after the completion of addition
Study instruction message returns to the host node device.
According to the above method, an embodiment of the present invention provides a kind of master node device, applied to including host node device, extremely
Host node device in a few unidirectional serial bus network from node device;Wherein, the host node device passes through unidirectional
Universal serial bus forms unidirectional looped network at least one from node device, which includes:Determining module, sending module;Wherein,
The determining module, for determining the operating mode needed from node device;
The sending module, for determining the operating mode needed to receive forwarding operating mode in the determining module
When, first mode switching command message is sent, the first mode switching command message is used to indicate described from node device general
Operating mode be switched to reception forwarding operating mode, meanwhile, itself for centre from node device when, the first mode is cut
It changes instruction message and is transmitted to the next-hop of itself from node device;At itself for final jump from node device when, by described the
One pattern switching instruction message returns to the host node device;
And when the determining module determines the operating mode needed to receive transparent transmission operating mode, send second mode and cut
Change instruction message, the second mode switching command message is used to indicate described is switched to reception from node device by operating mode
Transparent transmission operating mode simultaneously judges whether to forward the second mode switching command message;Judging to forward the second mode switching
During instruction message, itself for it is intermediate from node device when by the next-hop of second mode switching command message forwarding from section
Point device, itself for final jump from node device when the first mode switching command message returned into the host node set
It is standby;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether
By treated, service message is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled,
The service message is sent simultaneously.
Preferably, which further includes:
Receiving module, for receiving the first mode switching command message returned;
The determining module is additionally operable to according to being determined the first mode switching command message of return from node device
Operating mode is switched to reception forwarding operating mode.
Preferably, the sending module is additionally operable to determine the operating mode from node device in the determining module
After being switched to reception forwarding operating mode, topology learning instruction message is sent, the topology learning instruction message is used to indicate institute
It states and is read in the topology learning instruction message from the number of nodes of node device from node device, after the number of nodes is added 1 more
The new number of nodes, newer number of nodes, Self address or equipment of itself ID are added in the topology learning instruction message;
And itself for centre from node device when, by the topology learning instruction message after the completion of addition be transmitted to the next-hop of itself from
Node device, itself for final jump from node device when, the topology learning instruction message after the completion of addition is returned into institute
State host node device;
The determining module is additionally operable to when the receiving module receives the topology learning instruction message of return, according to
Number of nodes in the topology learning instruction message of return, the topology knot that the unidirectional looped network is determined from node device address or ID
Structure.
Preferably, the sending module is additionally operable to send topology learning according to setting time interval or command triggers mode
Instruction message.
According to the above method, an embodiment of the present invention provides one kind from node apparatus, applied to including host node device, extremely
Slave node device in a few unidirectional serial bus network from node device;Wherein, the host node device passes through unidirectional
Universal serial bus forms unidirectional looped network at least one from node device, which includes:Receiving module, mode switch module, hair
Send module;Wherein,
The receiving module, for receiving first mode switching command message and second mode switching command message;
The mode switch module, for when the receiving module receives first mode switching command message, according to
Operating mode is switched to reception forwarding operating mode by the instruction of the first mode switching command message, meanwhile, it is at itself
Centre from node device when, indicate that the first mode switching command message is transmitted to the next-hop of itself by the sending module
From node device;Itself for final jump from node device when, indicate the sending module by the first mode switching refer to
Message is enabled to return to the host node device;
The mode switch module is additionally operable to when the receiving module receives second mode switching command message, root
Operating mode is switched to according to the instruction of the second mode switching command message and receives transparent transmission operating mode, and judges whether to turn
Send out second mode switching command message described;Itself it is being centre when judging to forward the second mode switching command message
From node device when, indicate that the sending module sets the next-hop that the second mode switching command message forwards from node
It is standby, itself for final jump from node device when, indicate that the sending module returns the first mode switching command message
Back to the host node device;
The sending module, for the instruction according to the mode switch module by the first mode switching command message
The next-hop of itself is transmitted to from node device or the first mode switching command message is returned into the host node sets
It is standby;And the second mode switching command message is transmitted to by the next of itself according to the instruction of the mode switch module
It jumps from node device or the second mode switching command message is returned into the host node device;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether
By treated, service message is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled,
The service message is sent simultaneously.
Preferably, the receiving module is additionally operable to that operating mode is switched to reception forwarding in the mode switch module
After operating mode, the topology learning instruction message that the host node device is sent is received;
Described device further includes:
Update module, for reading from the number of nodes of node device in the topology learning instruction message, by the node
The number of nodes is updated, and newer number of nodes, Self address or equipment of itself ID are added to the topology learning after number plus 1
In instruction message;And itself for centre from node device when, indicate the sending module by the topology learning after the completion of addition
Instruction message is transmitted to the next-hop of itself from node device, at itself for final jump from node device when, indicate the hair
Send module that the topology learning instruction message after the completion of addition is returned to the host node device.
The sending module is additionally operable to that the topology learning after the completion of addition is instructed report according to the instruction of the update module
Text is transmitted to the next-hop of itself from node device;Alternatively, according to the instruction of the update module by the topology after the completion of addition
Study instruction message returns to the host node device.
According to the above method, the embodiment of the present invention additionally provides a kind of communication system of unidirectional serial bus network, this is
System includes:Concentrator, at least one collector, at least one intelligence instrument;The concentrator includes above-mentioned master node device,
The collector includes above-mentioned master node device and above-mentioned from node apparatus, and the intelligence instrument includes above-mentioned from node
Device;Wherein, the concentrator forms unidirectional looped network by unidirectional universal serial bus and at least one collector, each described
Collector forms unidirectional ring net by unidirectional universal serial bus and at least one intelligence instrument respectively.
According to the above method, the embodiment of the present invention additionally provides a kind of communication system of unidirectional serial bus network, this is
System includes:Concentrator, at least one intelligence instrument, the concentrator include above-mentioned master node device, the intelligence instrument packet
It includes above-mentioned from node apparatus;Wherein, the concentrator is made up of unidirectional universal serial bus and at least one intelligence instrument
Unidirectional looped network.
In the embodiment of the present invention, the unidirectional serial bus network includes host node device, at least one from node device;
Wherein, the host node device forms unidirectional looped network at least one by unidirectional universal serial bus from node device;The main section
Point device determines the operating mode needed from node device, determines the operating mode needed to receive forwarding operating mode
When, first mode switching command message is sent, the first mode switching command message is used to indicate described from node device general
Operating mode is switched to reception forwarding operating mode, meanwhile, at itself for centre from node device when the first mode cut
It changes instruction message and is transmitted to the next-hop of itself from node device;At itself for final jump from node device when by described first
Pattern switching instruction message returns to the host node device;When determining the operating mode needed to receive transparent transmission operating mode,
Send second mode switching command message, the second mode switching command message be used to indicate it is described from node device by work
Pattern switching judges whether to forward the second mode switching command message to receive transparent transmission operating mode;Judging to forward
During the second mode switching command message, at itself for centre from node device when by the second mode switching command message
The next-hop of forwarding from node device, itself for final jump from node device when the first mode switching command message returned
Back to the host node device;Wherein, when operating mode is receives forwarding operating mode, at the service message of reception
Reason, and judge whether that service message is sent by treated;When operating mode is receives transparent transmission operating mode, to the business of reception
Message is handled, while the service message is sent.In this way, host node device described in the embodiment of the present invention determine it is described
The operating mode needed from node device, and pass through the first mode switching command message or second mode switching command message
The operating mode of needs is switched to described in indicating from node device, so that described can adapt to different types of industry from node device
Business demand.
In the embodiment of the present invention, it is described from node device receive second mode switching command message when, according to described
Operating mode is switched to and receives transparent transmission operating mode by the instruction of two modes switching command message, and judges whether to forward described the
Two modes switching command message;When judging to forward the second mode switching command message, jumped at itself to be intermediate from node
By the next-hop of second mode switching command message forwarding from node device during equipment, itself sets for final jump from node
The first mode switching command message is returned into the host node device when standby;Wherein, operating mode is receives forwarding work
During operation mode, the service message of reception is handled, and judges whether that service message is sent by treated;Operating mode is
When receiving transparent transmission operating mode, the service message of reception is handled, while the service message is sent.In this way, this hair
Two kinds of operating modes are configured from node device in bright embodiment, and can operating mode be carried out according to the instruction of host node device
Switching, to adapt to different types of business demand.
Description of the drawings
Fig. 1 is shown as the flow diagram of the mode switch control method of the unidirectional serial bus network of the present invention;
Fig. 2 is shown as the flow diagram of the mode switching method of another unidirectional serial bus network of the present invention;
Fig. 3 is shown as the composition structure diagram of the master node device of the present invention;
Fig. 4 is shown as the composition structure diagram of the slave node apparatus of the present invention;
Fig. 5 is shown as the composition structure diagram of the slave node device of the present invention;
Fig. 6 is shown as the composition structure diagram of the communication system of the unidirectional serial bus network of the present invention;
Fig. 7 is shown as the composition structure diagram of the communication system of another unidirectional serial bus network of the present invention.
Specific embodiment
The embodiment of the present invention is applied to unidirectional serial bus network, and the unidirectional serial bus network is set including host node
It is standby, at least one from node device;Wherein, the host node device by unidirectional universal serial bus with it is at least one from node device
Unidirectional looped network is formed, therefore, the unidirectional serial bus network includes the unidirectional looped network;In practical applications, the main section
The realization of the devices such as concentrator or collector may be used in point device, described that the devices such as intelligence instrument reality may be used from node device
It is existing, for example, the devices such as intelligent electric meter, Intellectual Heat Meter, intellectual water meter, intelligent gas meter.Based on the above-mentioned network architecture, the present invention is implemented
The pattern switching control process for the unidirectional serial bus network that example provides is as follows:
The host node device determines the operating mode needed from node device, determines the operating mode needed to connect
When receiving forwarding operating mode, first mode switching command message is sent from node device to described;
It is described from node device receive first mode switching command message when, according to the first mode switching command report
Text instruction by operating mode be switched to reception forwarding operating mode, meanwhile, itself for centre from node device when will described in
First mode switching command message is transmitted to the next-hop of itself from node device;Itself for final jump from node device when
The first mode switching command message is returned into the host node device;
The host node receives the first mode switching command message returned, according to the first mode switching command report of return
Text determines that described be switched to from the operating mode of node device receives forwarding operating mode;
When the host node device determines the operating mode needed to receive transparent transmission operating mode, to described from node device
Send second mode switching command message;
It is described from node device receive second mode switching command message when, according to the second mode switching command report
Operating mode is switched to and receives transparent transmission operating mode by the instruction of text, and judges whether to forward the second mode switching command report
Text;When judging to forward the second mode switching command message, at itself for centre from node device when by second mould
The next-hop of formula switching command message forwarding from node device, itself for final jump from node device when by the first mode
Switching command message returns to the host node device;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether
By treated, service message is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled,
The service message is sent simultaneously.
Further, the automatic study for realization network topology structure, the host node device is determining described from node
After the operating mode of equipment is switched to reception forwarding operating mode, sends and open up according to setting time interval or command triggers mode
Flutter study instruction message;
It is described from node device receive the topology learning instruction message when, read in the topology learning instruction message
From the number of nodes of node device, the number of nodes is updated after the number of nodes is added 1, and by newer number of nodes, Self address
Or equipment of itself ID is added in the topology learning instruction message;Itself for centre from node device when by addition after the completion of
Topology learning instruction message be transmitted to the next-hop of itself from node device;Itself for final jump from node device when will
Topology learning instruction message after the completion of addition returns to the host node device;
The host node device receives the topology learning instruction message returned, according in the topology learning instruction message of return
Number of nodes, determine from node device address or ID the topological structure of the unidirectional looped network, with realize network topology structure from
Dynamic study.
In the embodiment of the present invention, host node device determines the operating mode needed from node device, as needed
The operating mode instruction switching that operating mode is carried out from node device, so as to make described to can adapt to difference from node device
The business demand of type;Also, the host node device is determining described to be switched to reception from the operating mode of node device and turn
After sending out operating mode, topology learning instruction message is sent from node device to described, is opened up by described from the update of node device hop-by-hop
The number of nodes in study instruction message is flutterred, and Self address or equipment of itself ID are constantly appended to the topology learning and instructed
In message, and the topology learning instruction message after the completion of addition is returned into the host node from node device by final jump and is set
It is standby;The host node device according in the topology learning instruction message of return number of nodes, determine from node device address or ID
The topological structure of the unidirectional looped network, so as to rapidly realize the automatic study of network topology structure, with sensing network topology knot
The variation of structure.
Below in conjunction with the accompanying drawings and specific embodiment the present invention will be further described in detail.
As shown in Figure 1, the pattern switching control flow of unidirectional serial bus network provided in an embodiment of the present invention, is applied to
In host node device, specific implementation step includes:
Step S100:The host node device determines the operating mode needed from node device, determines the work needed
When operation mode is receives forwarding operating mode, it is transferred to step S101;Determine the operating mode needed to receive transparent transmission operating mode
When, it is transferred to step S102;
Step S101:First mode switching command message is sent, the first mode switching command message is used to indicate institute
State from node device by operating mode be switched to reception forwarding operating mode, meanwhile, itself for centre from node device when will
The first mode switching command message is transmitted to the next-hop of itself from node device;It is set at itself for final jump from node
The first mode switching command message is returned into the host node device when standby, terminates this process flow;
Step S102:Second mode switching command message is sent, the second mode switching command message is used to indicate institute
It states to be switched to operating mode from node device and receives transparent transmission operating mode and judge whether that the second mode switching is forwarded to refer to
Enable message;When judging to forward the second mode switching command message, at itself for centre from node device when by described the
The next-hop of two modes switching command message forwarding from node device, itself for final jump from node device when by described the
One pattern switching instruction message returns to the host node device;
Here, when judging to forward the second mode switching command message, judging not needing to forward second mould
During formula switching command message, the second mode switching command message is stopped forwarding.
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether
By treated, service message is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled,
The service message is sent simultaneously.
Specifically, it is described from node device be operated in reception forwarding operating mode when, the service message of reception is solved
Analysis is handled, and judges whether the service message is sent to equipment of itself, if so, handling the service message and stopping forwarding
The data message;Otherwise, at itself for centre from node device when the next-hop that the service message forwards set from node
It is standby, itself for final jump from node device when the service message returned into the host node device;It is described to be set from node
During for being operated in reception transparent transmission operating mode, dissection process is carried out, while the service message is sent out to the service message of reception
It send.
Further, the host node device receives the first mode switching command message returned;
The host node device is according to being determined the first mode switching command message of return from the work of node device
Pattern switching is receives forwarding operating mode.
Here, source address and purpose are carried in the first mode switching command message that the host node device is sent
Address, the source address and destination address are the host node device Self address;Alternatively, the first mode switching command
It is the host node device itself that message, which carries active equipment ID and purpose equipment ID, the source device ID and purpose equipment ID,
Device id;Due to it is described from node device before the first mode switching command message is received, be operated in reception transparent transmission
Operating mode, therefore, it is described from node device when receiving the first mode switching command message, according to first mould
Operating mode is switched to reception forwarding operating mode by the instruction of formula switching command message, meanwhile, it does not need to first mould
Formula switching command message is judged, the first mode switching command message directly is transmitted to the next-hop of itself from node
Equipment, by final jump from node device when the first mode switching command message returned into the host node device;By
This, the host node device will receive the first mode switching command message returned from node device, be returned by described
The first mode switching command message returned determines that all be switched to from the operating mode of node device in the unidirectional looped network connects
Receive forwarding operating mode.
Further, the host node device starts timer timing when sending first mode switching command message, if
Timer does not receive the first mode switching command message of return also when reaching the setting response time, it is determined that pattern switching is rung
It should fail, at this point it is possible to the first mode switching command message be retransmitted, to be carried out again from node device described in instruction
Pattern switching.
Further, the host node device receives the second mode switching command message returned;
The host node device is according to being determined the second mode switching command message of return from the work of node device
Pattern switching is receives transparent transmission operating mode.
Here, source address and purpose are carried in the second mode switching command message that the host node device is sent
Address, the source address and destination address are the host node device Self address;Alternatively, the second mode switching command
It is the host node device itself that message, which carries active equipment ID and purpose equipment ID, the source device ID and purpose equipment ID,
Device id;Due to it is described from node device before the second mode switching command message is received, be operated in reception forwarding
Operating mode, therefore, it is described from node device when receiving the second mode switching command message, according to second mould
Operating mode is switched to and receives transparent transmission operating mode by the instruction of formula switching command message, and to the second mode switching command
Message carries out dissection process, judges whether to forward the second mode switching command message, due to switching from the second mode
The destination address parsed in instruction message is not Self address, therefore, described to cut the first mode from node device
Change instruction message and be transmitted to the next-hop of itself from node device, by final jump from node device when the first mode cut
It changes instruction message and returns to the host node device;The host node device will receive as a result, described returns from node device
The second mode switching command message returned, determines according to the second mode switching command message of the return in the unidirectional looped network
It is all from the operating mode of node device be switched to receive transparent transmission operating mode.
Further, the host node device starts timer timing when sending second mode switching command message, if
Timer does not receive the second mode switching command message of return also when reaching the setting response time, it is determined that pattern switching is rung
It should fail, at this point it is possible to the second mode switching command message be retransmitted, to be carried out again from node device described in instruction
Pattern switching.
Here, described be operated in from node device acquiescence receives transparent transmission operating mode, and to adapt to, data traffic is big and time delay
The transmission and response of small general service message;If in order to reduce forward delay time to improve forward efficiency, then described
Operating mode is cut in the instruction of first mode switching command message that can be sent from node device according to the host node device
Reception forwarding operating mode is changed to, to adapt to that data traffic is small and the transmission of the control class service message of time delay no requirement (NR) and sound
Should, for example, the transmission and response of topology learning instruction message.
Further, in order to learn automatically and the variation of sensing network topological structure, the host node device determines described
After the operating mode of node device is switched to reception forwarding operating mode, topology learning instruction is sent from node device to described
Message, the topology learning instruction message are used to indicate in the topology learning instruction message from node device reading from section
The number of nodes of point device updates the number of nodes after the number of nodes is added 1, by newer number of nodes, Self address or itself
Device id is added in the topology learning instruction message, and itself for centre from node device when, after the completion of addition
Topology learning instruction message is transmitted to the next-hop of itself from node device;Itself for final jump from node device when, will
Topology learning instruction message after the completion of addition returns to the host node device;
The host node device receives the topology learning instruction message returned, according in the topology learning instruction message of return
Number of nodes, determine from node device address or ID the topological structure of the unidirectional looped network.
Here, the topology learning instruction message also belongs to data message.
Specifically, following manner, which may be used, in the host node device sends topology learning instruction message:
(1) it is sent according to setting time interval mode
When the host node device sends topology learning instruction message, start timer timing, set when timer reaches
During the time, next topology learning instruction message is sent, that is to say, that can be according to timer property time-count cycle using this mode
Ground sends topology learning instruction message, to realize the automatic study of network topology structure and update.
(2) it is sent according to command triggers mode
Specific triggering mode can be set in user or the far-end network monitoring management being connect with the host node device
During the automatic learning network topological structure of standby needs, trigger the host node device and send topology learning instruction message.
Specifically, the topology learning instruction message carries source address and destination address, the source address and destination
Location is the host node device Self address;Alternatively, the topology learning instruction message carries active equipment ID and purpose is set
Standby ID, the source device ID and purpose equipment ID are the host node device equipment of itself ID;Due to described at this time from node
Equipment be operated in reception forwarding operating mode, therefore, it is described from node device when receiving the topology learning instruction message
Number of nodes in hop-by-hop update topology learning instruction message, and Self address or equipment of itself ID are constantly appended to described open up
It flutters in study instruction message, and the topology learning instruction message is judged, due in the topology learning instruction message
The destination address of carrying is not Self address, therefore, it is described from node device by the topology learning instruction message after the completion of addition
The next-hop of itself is transmitted to from node device, the topology learning after the completion of addition is instructed into report from node device by final jump
Text returns to the host node device, and the topology learning instruction message is as shown in table 1:
Table 1
Wherein, the number of nodes of the slave node device in the topology learning instruction message that the host node device is sent is zero,
It is read by described from node device from some position in the topology learning instruction message received from the number of nodes of node device,
The number of nodes is added into the number of nodes after 1 at write-back covering origin-location, is then calculated according to updated number of nodes in institute
It states and Self address or the position of equipment of itself ID is added in topology learning instruction message, and itself is written at the position calculated
Address or equipment of itself ID;Source address and destination address are being kept, alternatively, situation constant source device ID and purpose equipment ID
Under, the topology learning instruction message after the completion of addition is transmitted to the next-hop of itself from node device, by final jump from section
Point device, will after updated number of nodes and Self address or equipment of itself ID are added to the topology learning instruction message
Topology learning instruction message after the completion of addition returns to the host node device.
It should be noted that:Above-mentioned table 1 is merely illustrative, is not construed as limiting the invention.
As shown in Fig. 2, the pattern switching flow of unidirectional serial bus network provided in an embodiment of the present invention, applied to from section
In point device, specific implementation step includes:
Step S200:It is described from node device receive first mode switching command message when, be transferred to step S201;It receives
During to second mode switching command message, it is transferred to step S202;
Step S201:It is described to be cut operating mode according to the instruction of the first mode switching command message from node device
Be changed to reception forwarding operating mode, meanwhile, itself for centre from node device when, by the first mode switching command message
The next-hop of itself is transmitted to from node device;Itself for final jump from node device when, the first mode is switched
Instruction message returns to the host node device;
Here, source address and purpose are carried in the first mode switching command message that the host node device is sent
Address, the source address and destination address are the host node device Self address;Alternatively, the first mode switching command
It is the host node device itself that message, which carries active equipment ID and purpose equipment ID, the source device ID and purpose equipment ID,
Device id;Due to it is described from node device before the first mode switching command message is received, be operated in reception transparent transmission
Operating mode, therefore, it is described from node device when receiving the first mode switching command message, according to first mould
Operating mode is switched to reception forwarding operating mode by the instruction of formula switching command message, meanwhile, it does not need to first mould
Formula switching command message is judged, the first mode switching command message directly is transmitted to the next-hop of itself from node
Equipment, by final jump from node device when the first mode switching command message returned into the host node device.
Step S202:It is described from node device receive second mode switching command message when, according to the second mode
Operating mode is switched to and receives transparent transmission operating mode by the instruction of switching command message, and judges whether to forward the second mode
Switching command message;When judging to forward the second mode switching command message, it is transferred to step S203;Judging not needing to turn
When sending out second mode switching command message described, it is transferred to step S204;
Step S203:It is described from node device at itself for centre from node device when by the second mode switching command
Message is transmitted to next-hop from node device, itself for final jump from node device when by the first mode switching command report
Text returns to the host node device, terminates this process flow;
Step S204:The second mode switching command message is stopped forwarding, terminates this process flow;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether
By treated, service message is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled,
The service message is sent simultaneously.
Here, source address and destination address, the source address and mesh are carried in the second mode switching command message
Address be the host node device Self address;Alternatively, the second mode switching command message carries active equipment ID
And purpose equipment ID, the source device ID and purpose equipment ID are the host node device equipment of itself ID;Due to it is described from
Node device is operated in reception forwarding operating mode, therefore, institute before the second mode switching command message is received
It states from node device when receiving the second mode switching command message, according to the second mode switching command message
Operating mode is switched to and receives transparent transmission operating mode by instruction, and the second mode switching command message is carried out at parsing
Reason, judges whether to forward the second mode switching command message, due to parsing from the second mode switching command message
The destination address gone out is not Self address, therefore, described to forward the first mode switching command message from node device
To the next-hop of itself from node device, by final jump from node device when the first mode switching command message returned
To the host node device.
Further, the automatic study for realization network topology structure, described be switched to from node device operating mode connect
After receiving forwarding operating mode, the topology learning instruction message that host node device is sent is received;
It reads in the topology learning instruction message from the number of nodes of node device, institute is updated after the number of nodes is added 1
Number of nodes is stated, and newer number of nodes, Self address or equipment of itself ID are added in the topology learning instruction message;
Itself for centre from node device when, by add complete topology learning instruction message be transmitted to the next of itself
It jumps from node device;Itself for final jump from node device when, by add complete topology learning instruction message return to
The host node device.
To realize the above method, the embodiment of the present invention additionally provides a kind of master node device, from node apparatus, due to the master
Node apparatus, the principle solved the problems, such as from node apparatus are similar to method, therefore, the implementation process and implementation principle of device
With referring to the implementation process of preceding method and implementation principle description, overlaps will not be repeated.
Referring to Fig. 3, an embodiment of the present invention provides a kind of master node device, applied to including host node device, at least one
Host node device in a unidirectional serial bus network from node device;Wherein, the host node device passes through unidirectional serial
Bus forms unidirectional looped network at least one from node device, and described device includes:Determining module 300, sending module 301;Its
In,
The determining module 300, for determining the operating mode needed from node device;
The sending module 301, for determining the operating mode needed to receive forwarding work in the determining module 300
During pattern, first mode switching command message is sent, the first mode switching command message is used to indicate described to be set from node
It is standby that operating mode is switched to reception forwarding operating mode, meanwhile, at itself for centre from node device when, by first mould
Formula switching command message is transmitted to the next-hop of itself from node device;Itself for final jump from node device when, by institute
It states first mode switching command message and returns to the host node device;
And when the determining module 300 determines the operating mode needed to receive transparent transmission operating mode, send the second mould
Formula switching command message, the second mode switching command message is used to indicate described to be switched to from node device by operating mode
It receives transparent transmission operating mode and judges whether to forward the second mode switching command message;Judging to forward the second mode
During switching command message, itself for it is intermediate from node device when the next-hop that forwards the second mode switching command message
From node device, itself for final jump from node device when the first mode switching command message returned into the main section
Point device;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether
By treated, service message is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled,
The service message is sent simultaneously.
In specific implementation, described device further includes:
Receiving module 302, for receiving the first mode switching command message returned;
The determining module 300 is additionally operable to set from node according to being determined the first mode switching command message of return
Standby operating mode is switched to reception forwarding operating mode.
In specific implementation, the sending module 301 is additionally operable to determine in the determining module 300 described from node device
Operating mode be switched to reception forwarding operating mode after, send topology learning instruction message, the topology learning instruction message
It is used to indicate from the number of nodes of node device in the topology learning instruction message from node device reading, by the node
The number of nodes is updated after number plus 1, newer number of nodes, Self address or equipment of itself ID are added to the topology learning refers to
It enables in message;And itself for centre from node device when, the topology learning instruction message after the completion of addition is transmitted to itself
Next-hop from node device, at itself for final jump from node device when, the topology learning after the completion of addition is instructed into report
Text returns to the host node device;
The determining module 300 is additionally operable to receive the topology learning instruction message of return in the receiving module 302
When, number of nodes in the topology learning instruction message of return determines the unidirectional looped network from node device address or ID
Topological structure.
In specific implementation, the sending module 301, specifically for being sent according to setting time interval or command triggers mode
Topology learning instruction message.
The dividing mode of above functions module is only a kind of preferred implementation that the embodiment of the present invention provides, function module
Dividing mode be not construed as limiting the invention.For convenience of description, each section of apparatus described above is divided into function
Various modules or unit describe respectively.Certainly, when implementing the present invention can each module or the function of unit same or
It is realized in multiple softwares or hardware.
Referring to Fig. 4, an embodiment of the present invention provides one kind from node apparatus, applied to including host node device, at least one
Slave node device in a unidirectional serial bus network from node device;Wherein, the host node device passes through unidirectional serial
Bus forms unidirectional looped network at least one from node device, which is characterized in that described device includes:Receiving module 400, pattern
Handover module 401, sending module 402;Wherein,
The receiving module 400, for receiving first mode switching command message and second mode switching command message;
The mode switch module 401, for receiving first mode switching command message in the receiving module 400
When, operating mode is switched to by reception forwarding operating mode according to the instruction of the first mode switching command message, meanwhile,
Itself for it is intermediate from node device when, indicate the sending module 402 by the first mode switching command message be transmitted to from
The next-hop of body is from node device;At itself for final jump from node device when, indicate the sending module 402 by described the
One pattern switching instruction message returns to the host node device;
The mode switch module 401 is additionally operable to receive second mode switching command message in the receiving module 400
When, operating mode is switched to according to the instruction of the second mode switching command message and receives transparent transmission operating mode, and is judged
Whether the second mode switching command message is forwarded;When judging to forward the second mode switching command message, at itself
For centre from node device when, indicate the next-hop that the sending module 402 forwards the second mode switching command message
From node device, at itself for final jump from node device when, indicate that the sending module 402 switches the first mode
Instruction message returns to the host node device;
The sending module 402 refers to first mode switching for the instruction according to the mode switch module 401
Message is enabled to be transmitted to the next-hop of itself and returns to the master from node device or by the first mode switching command message
Node device;And the second mode switching command message is transmitted to certainly according to the instruction of the mode switch module 401
The next-hop of body returns to the host node device from node device or by the second mode switching command message;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judges whether
By treated, service message is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled,
The service message is sent simultaneously.
In specific implementation, the receiving module 400 is additionally operable to switch operating mode in the mode switch module 401
After receiving forwarding operating mode, the topology learning instruction message that the host node device is sent is received;
Described device further includes:
Update module 403, for reading from the number of nodes of node device in the topology learning instruction message, by the section
The number of nodes is updated, and newer number of nodes, Self address or equipment of itself ID are added to the topology after points plus 1
It practises in instruction message;And itself for centre from node device when, indicate the sending module 402 by the topology after the completion of addition
Study instruction message is transmitted to the next-hop of itself from node device, at itself for final jump from node device when, indicate institute
It states sending module 402 and the topology learning instruction message after the completion of addition is returned into the host node device.
The sending module 402 is additionally operable to the topology learning after the completion of addition according to the instruction of the update module 403
Instruction message is transmitted to the next-hop of itself from node device;It is completed alternatively, will be added according to the instruction of the update module 403
Topology learning instruction message afterwards returns to the host node device.
The dividing mode of above functions module is only a kind of preferred implementation that the embodiment of the present invention provides, function module
Dividing mode be not construed as limiting the invention.For convenience of description, each section of apparatus described above is divided into function
Various modules or unit describe respectively.Certainly, when implementing the present invention can each module or the function of unit same or
It is realized in multiple softwares or hardware.
It is described from node device packet an embodiment of the present invention provides one kind from node device based on above-mentioned from node apparatus
It includes above-mentioned from node apparatus, is described in detail with reference to Fig. 5 to described from the concrete composition structure of node device:
As shown in figure 5, it should include from node device:Processor 500, mode controller 501, signal processing controller 502,
Inbound port 503, exit port 504;Wherein, the input terminal of the processor 500 is connect with the inbound port, the processor 500
Signal end connect with the signal end of the mode controller 501;The input terminal of the mode controller 501 and the inbound port
503 connections, the output terminal of the mode controller 501 are connect with the input terminal of the signal processing controller 502, the signal
The output terminal of processing controller 502 is connect with the exit port 504.
Here, two kinds of operating modes of communication device configured of the changeable operating mode:501 basis of mode controller
Itself input terminal is connected to the access of output terminal in the instruction for the control information that the processor 500 is sent out;Operating mode is switched to
When receiving forwarding operating mode, the mode controller 501 is disconnected according to the instruction of control information that the processor 500 is sent out
Itself input terminal is to the access of output terminal, and the output terminal of the processor 500 is connected to the signal processing controller 501
Input terminal.
In the embodiment of the present invention, two kinds of operating modes are configured, when operating mode is receives transparent transmission operating mode, by business report
Text is transmitted in the processor 500 and is handled, while the service message is passed through the mode controller 501 and the letter
Number processing controller 502 is transmitted to exit port 504;When operating mode is receives forwarding operating mode, the service message is passed
It is sent in processor 500 and is handled, then judge whether that service message is transmitted to institute by treated by the processor 500
Signal processing controller 502 is stated, service message is transmitted to the signal processing controller by treated in the processor 500
After 502, by the signal processing controller 502, by treated, service message is transmitted to exit port 504;And it can realize above-mentioned
The switching of two kinds of operating modes, so as to adapt to different types of business demand.
In practical applications, the signal processing controller 502 includes:First resistor, second resistance, the first power supply,
Two power supplys and gate logic device;The mode controller 501 is realized using bus buffer;During the processor 500 may be used
Central processor (Central Processing Unit, CPU), microprocessor (Micro Processor Unit, MPU), number
Signal processor (Digital signal Processor, DSP), field programmable gate array (Field Programmable
Gate Array, FPGA) or the devices such as IC chip realize.
It should be noted that:Due to it is described include from node device it is above-mentioned from node apparatus, the receiving module
400 can be realized by the inbound port 503 from node device, the sending module 402 can be by described from node device
Exit port 504 realizes that the mode switch module 401, the update module 403 can be by the processors from node device
500th, mode controller 501 and signal processing controller 502 are realized.
In conclusion in the embodiment of the present invention, when operating mode is receives transparent transmission operating mode, to the data message of reception
It is handled, while the data message is transmitted to exit port;When operating mode is receives forwarding operating mode, first to receiving
Data message handled, then judge whether that data message is transmitted to exit port by treated;Also, two kinds of work
Pattern can carry out pattern switching according to instruction, to adapt to different types of business demand, for example, and time delay big for adaptation flow
The transmission and response of small general service data message need operating mode being switched to reception transparent transmission mode;To adapt to flow
The transmission and response of small and time delay no requirement (NR) control class business datum message need operating mode being switched to reception forwarding mould
Formula.
The embodiment of the present invention additionally provides a kind of long-distance intelligent and copies instrument system, as shown in fig. 6, the system includes concentrator
600th, at least one collector 601, at least one intelligence instrument 602;The concentrator 600 includes above-mentioned master node device,
The collector 601 includes above-mentioned master node device and from node apparatus, and the intelligence instrument includes above-mentioned from node dress
It puts;Wherein, the concentrator 600 forms unidirectional looped network by unidirectional universal serial bus and at least one collector 601, each
The collector 601 forms unidirectional ring net by unidirectional universal serial bus and at least one intelligence instrument 602 respectively.
In the system, the concentrator 600 is made up of unidirectionally unidirectional universal serial bus and at least one collector 601
Looped network, each collector 601 form unidirectional ring by unidirectional universal serial bus and at least one intelligence instrument 602 respectively
Subnet, host node device of the concentrator 600 as the unidirectional looped network, the collector 601 as the unidirectional looped network from
Node device and as the host node device of unidirectional ring net formed with itself, the intelligence instrument 602 is unidirectional as this
The slave node device of ring net;In the system, the collector 601 and the intelligence instrument 602 are configured and receive transparent transmission work
Pattern and reception forwarding two kinds of operating modes of operating mode, the collector 601 and the acquiescence of the intelligence instrument 602 are operated in and connect
Transparent transmission operating mode is received, to adapt to the transmission and response of the general service message that data traffic is big and time delay is small;If in order to drop
Low forward delay time is to improve forward efficiency, then the first mode that the collector 601 can be sent according to concentrator 600
Operating mode is switched to reception forwarding operating mode by the instruction of switching command message, also, the intelligence instrument 602 can root
Operating mode is equally switched to reception forwarding work by the instruction of the second mode switching command message sent according to the collector 601
Operation mode, data traffic is small and the transmission and response of the control class service message of time delay no requirement (NR) to adapt to, for example, topology learning
The transmission and response of instruction message.
The embodiment of the present invention additionally provides a kind of long-distance intelligent and copies instrument system, as shown in fig. 7, the system includes concentrator
700th, at least one intelligence instrument 701;The concentrator includes above-mentioned master node device, and the intelligence instrument 700 includes upper
The slave node apparatus stated;Wherein, the concentrator 700 passes through unidirectional universal serial bus and at least one 701 structure of intelligence instrument
Into unidirectional looped network.
In the system, the concentrator 700 forms list by unidirectional universal serial bus and at least one intelligence instrument 701
To looped network, host node device of the concentrator 700 as the unidirectional looped network, the intelligence instrument 701 is used as the unidirectional looped network
Slave node device;In the system, the configuration of intelligence instrument 701 receives transparent transmission operating mode and receives forwarding operating mode two
Kind operating mode, and can mutually be switched according to the instruction of the concentrator 700, the intelligence instrument 701 gives tacit consent to work
Transparent transmission operating mode is being received, to adapt to the transmission and response of the general service data message that data traffic is big and time delay is small;Such as
Fruit is in order to reduce forward delay time to improve forward efficiency, then the intelligence instrument 701 can be according to the concentrator
Operating mode is switched to reception forwarding operating mode by the instruction of the 700 first mode switching command messages sent, to adapt to count
The transmission and response of small according to flow and time delay no requirement (NR) control class service message, for example, the transmission of topology learning instruction message
And response.
It is in conclusion provided by the invention.So the present invention effectively overcomes various shortcoming of the prior art and has height
Spend industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause
This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as
Into all equivalent modifications or change, should by the present invention claim be covered.
Claims (14)
1. a kind of mode switch control method of unidirectional serial bus network, the unidirectional serial bus network are set including host node
It is standby and at least one from node device;Wherein, the host node device is set by unidirectional universal serial bus at least one from node
It is standby to form unidirectional looped network, which is characterized in that the method includes:
The host node device determines the operating mode needed from node device;
When the determining operating mode needed is receives forwarding operating mode, transmission first mode switching command message, described first
Pattern switching instruction message is used to indicate described be switched to operating mode from node device and receives forwarding operating mode, meanwhile,
At itself for centre from node device when the first mode switching command message be transmitted to the next-hop of itself set from node
It is standby;At itself for final jump from node device when the first mode switching command message returned into the host node set
It is standby;
When determining the operating mode needed to receive transparent transmission operating mode, transmission second mode switching command message, described second
Pattern switching instruction message is used to indicate described be switched to operating mode from node device and receives transparent transmission operating mode and judge
Whether the second mode switching command message is forwarded;When judging to forward the second mode switching command message, at itself
For centre from node device when the second mode switching command message is transmitted to next-hop from node device, itself be last
One jump from node device when the second mode switching command message returned into the host node device;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judge whether to locate
Service message after reason is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled, simultaneously
The service message is sent.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
The host node device receives the first mode switching command message returned;
The host node device is according to being determined the first mode switching command message of return from the operating mode of node device
It is switched to reception forwarding operating mode.
3. according to the method described in claim 2, it is characterized in that, the method further includes:
The host node device determines described after the operating mode of node device is switched to reception forwarding operating mode, and transmission is opened up
Study instruction message is flutterred, the topology learning instruction message is used to indicate described from the node device reading topology learning instruction
From the number of nodes of node device in message, the number of nodes is updated after the number of nodes is added 1, by newer number of nodes, itself
Address or equipment of itself ID are added in the topology learning instruction message, and itself for centre from node device when, will add
Topology learning instruction message after the completion of adding is transmitted to the next-hop of itself from node device;Itself it is being final jump from node
During equipment, the topology learning instruction message after the completion of addition is returned into the host node device;
The host node device receives the topology learning instruction message returned, according to the section in the topology learning instruction message of return
Points, the topological structure that the unidirectional looped network is determined from node device address or ID.
4. according to the method described in claim 3, it is characterized in that, the host node device send topology learning instruction message,
Including:
The host node device sends topology learning instruction message according to setting time interval or command triggers mode.
5. a kind of mode switching method of unidirectional serial bus network, the unidirectional serial bus network include host node device and
It is at least one from node device;Wherein, the host node device by unidirectional universal serial bus with it is at least one from node device structure
Into unidirectional looped network, which is characterized in that the method includes:
It is described from node device receive first mode switching command message when, according to the first mode switching command message
Instruction by operating mode be switched to reception forwarding operating mode, meanwhile, itself for centre from node device when, by described first
Pattern switching instruction message is transmitted to the next-hop of itself from node device;Itself for final jump from node device when, will
The first mode switching command message returns to the host node device;
It is described from node device receive second mode switching command message when, according to the second mode switching command message
Operating mode is switched to and receives transparent transmission operating mode by instruction, and judges whether to forward the second mode switching command message;
When judging to forward the second mode switching command message, at itself for centre from node device when the second mode cut
Change instruction message and be transmitted to next-hop from node device, itself for final jump from node device when the second mode switched
Instruction message returns to the host node device;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judge whether to locate
Service message after reason is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled, simultaneously
The service message is sent.
6. according to the method described in claim 5, it is characterized in that, the method further includes:
It is described operating mode is switched to reception forwarding operating mode from node device after, receive what the host node device was sent
Topology learning instruction message;
It is described to be read in the topology learning instruction message from the number of nodes of node device from node device, the number of nodes is added
The number of nodes is updated after 1, and newer number of nodes, Self address or equipment of itself ID are added to the topology learning and instructed
In message;
It is described from node device itself for centre from node device when, by after the completion of addition topology learning instruction message forward
To the next-hop of itself from node device;Itself for final jump from node device when, by the topology learning after the completion of addition
Instruction message returns to the host node device.
7. a kind of master node device, applied to including host node device and at least one unidirectional universal serial bus net from node device
Host node device in network;Wherein, the host node device is made up of unidirectional universal serial bus at least one from node device
Unidirectional looped network, which is characterized in that described device includes:Determining module, sending module;Wherein,
The determining module, for determining the operating mode needed from node device;
The sending module, for when the determining module determines the operating mode needed to receive forwarding operating mode, sending out
Send first mode switching command message, the first mode switching command message be used to indicate it is described from node device by Working mould
Formula be switched to reception forwarding operating mode, meanwhile, itself for centre from node device when, by the first mode switching command
Message is transmitted to the next-hop of itself from node device;Itself for final jump from node device when, by the first mode
Switching command message returns to the host node device;
And when the determining module determines the operating mode needed to receive transparent transmission operating mode, send second mode switching and refer to
Enable message, the second mode switching command message is used to indicate described is switched to reception transparent transmission from node device by operating mode
Operating mode simultaneously judges whether to forward the second mode switching command message;Judging to forward the second mode switching command
During message, at itself for centre from node device when the second mode switching command message be transmitted to next-hop set from node
It is standby, itself for final jump from node device when the second mode switching command message returned into the host node device;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judge whether to locate
Service message after reason is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled, simultaneously
The service message is sent.
8. device according to claim 7, which is characterized in that described device further includes:
Receiving module, for receiving the first mode switching command message returned;
The determining module is additionally operable to according to being determined the first mode switching command message of return from the work of node device
Pattern switching is receives forwarding operating mode.
9. device according to claim 8, which is characterized in that the sending module is additionally operable to true in the determining module
Fixed described after the operating mode of node device is switched to reception forwarding operating mode, transmission topology learning instruction message is described
Topology learning instruction message is used to indicate in the topology learning instruction message from node device reading from node device
Number of nodes updates the number of nodes after the number of nodes is added 1, newer number of nodes, Self address or equipment of itself ID are added
It is added in the topology learning instruction message;And itself for centre from node device when, by the topology learning after the completion of addition
Instruction message is transmitted to the next-hop of itself from node device, at itself for final jump from node device when, addition is completed
Topology learning instruction message afterwards returns to the host node device;
The determining module is additionally operable to when the receiving module receives the topology learning instruction message of return, according to return
Topology learning instruction message in number of nodes, determine from node device address or ID the topological structure of the unidirectional looped network.
10. device according to claim 9, which is characterized in that the sending module is additionally operable to according to setting time interval
Or command triggers mode sends topology learning instruction message.
11. one kind is from node apparatus, applied to including host node device and at least one unidirectional universal serial bus from node device
Slave node device in network;Wherein, the host node device by unidirectional universal serial bus with it is at least one from node device structure
Into unidirectional looped network, which is characterized in that described device includes:Receiving module, mode switch module, sending module;Wherein,
The receiving module, for receiving first mode switching command message and second mode switching command message;
The mode switch module, for when the receiving module receives first mode switching command message, according to described
Operating mode is switched to reception forwarding operating mode by the instruction of first mode switching command message, meanwhile, itself it is being centre
From node device when, indicate that the first mode switching command message is transmitted to the next-hop of itself from section by the sending module
Point device;Itself for final jump from node device when, indicate the sending module by the first mode switching command report
Text returns to the host node device;
The mode switch module is additionally operable to when the receiving module receives second mode switching command message, according to institute
Operating mode is switched to reception transparent transmission operating mode by the instruction for stating second mode switching command message, and judges whether to forward institute
State second mode switching command message;When judging to forward the second mode switching command message, at itself to be intermediate from section
During point device, indicate that the second mode switching command message is transmitted to next-hop from node device by the sending module,
Itself for final jump from node device when, indicate that the second mode switching command message is returned to institute by the sending module
State host node device;
The sending module forwards the first mode switching command message for the instruction according to the mode switch module
To the next-hop of itself host node device is returned to from node device or by the first mode switching command message;With
And the second mode switching command message is transmitted to from section by the next-hop of itself according to the instruction of the mode switch module
The second mode switching command message is returned to the host node device by point device;
Wherein, when operating mode is receives forwarding operating mode, the service message of reception is handled, and judge whether to locate
Service message after reason is sent;When operating mode is receives transparent transmission operating mode, the service message of reception is handled, simultaneously
The service message is sent.
12. according to the devices described in claim 11, which is characterized in that the receiving module is additionally operable in the pattern switching
After operating mode is switched to reception forwarding operating mode by module, the topology learning instruction report that the host node device is sent is received
Text;
Described device further includes:
The number of nodes for reading in the topology learning instruction message from the number of nodes of node device, is added 1 by update module
After update the number of nodes, and newer number of nodes, Self address or equipment of itself ID are added to the topology learning and instructed
In message;And itself for centre from node device when, indicate the sending module by after the completion of addition topology learning instruct
Message is transmitted to the next-hop of itself from node device, at itself for final jump from node device when, indicate the transmission mould
Topology learning instruction message after the completion of addition is returned to the host node device by block;
The sending module is additionally operable to be turned the topology learning instruction message after the completion of addition according to the instruction of the update module
The next-hop of itself is issued from node device;Alternatively, according to the instruction of the update module by the topology learning after the completion of addition
Instruction message returns to the host node device.
13. a kind of communication system of unidirectional serial bus network, which is characterized in that the system comprises:It is concentrator, at least one
Collector and at least one intelligence instrument;The concentrator includes such as claim 7 to 10 any one of them master node device,
The collector include such as claim 7 to 10 any one of them master node device and as described in claim 11 or 12 from
Node apparatus, the intelligence instrument include the slave node apparatus as described in claim 11 or 12;Wherein, the concentrator passes through
Unidirectional universal serial bus forms unidirectional looped network at least one collector, and each collector is respectively by unidirectional serial total
Line forms unidirectional ring net at least one intelligence instrument.
14. a kind of communication system of unidirectional serial bus network, which is characterized in that the system comprises:Concentrator and at least one
A intelligence instrument, the concentrator are included such as claim 7 to 10 any one of them master node device, the intelligence instrument packet
Include the slave node apparatus as described in claim 11 or 12;Wherein, the concentrator by unidirectional universal serial bus with it is at least one
The intelligence instrument forms unidirectional looped network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610456960.8A CN106059876B (en) | 2016-06-22 | 2016-06-22 | A kind of mode switch control method, equipment and the system of unidirectional serial bus network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610456960.8A CN106059876B (en) | 2016-06-22 | 2016-06-22 | A kind of mode switch control method, equipment and the system of unidirectional serial bus network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106059876A CN106059876A (en) | 2016-10-26 |
CN106059876B true CN106059876B (en) | 2018-06-26 |
Family
ID=57169336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610456960.8A Expired - Fee Related CN106059876B (en) | 2016-06-22 | 2016-06-22 | A kind of mode switch control method, equipment and the system of unidirectional serial bus network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106059876B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110401732A (en) * | 2019-07-29 | 2019-11-01 | 江西科然科技有限公司 | Battery management system slave addresses distribution method, system, mobile terminal and storage medium |
CN115277056B (en) * | 2022-06-09 | 2024-02-20 | 宁波新胜中压电器有限公司 | Method based on flow self-adaptive working mode and encryption and decryption device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102523310A (en) * | 2012-01-04 | 2012-06-27 | 上海工业自动化仪表研究院 | Multifunctional HART (Highway Addressable Remote Transducer) communication interface |
CN104734780A (en) * | 2014-12-29 | 2015-06-24 | 东莞市启鼎光电科技有限公司 | Passive light-splitting RS-485 optical fiber bus local side system |
CN104753596A (en) * | 2014-12-29 | 2015-07-01 | 东莞市启鼎光电科技有限公司 | Multi-port terminal of passive beam splitting RS-485 optical fiber bus |
CN204480459U (en) * | 2015-01-13 | 2015-07-15 | 烟台智慧云谷云计算有限公司 | A kind of remote automatic meter reading system |
CN104881982A (en) * | 2015-05-06 | 2015-09-02 | 上海应时为节能科技有限公司 | Intelligent meter data acquiring system having self-adaptive meter reading strategy and acquiring method of intelligent meter data acquiring system |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101722925B1 (en) * | 2009-01-20 | 2017-04-04 | 삼성전자주식회사 | Apparatus and method for control packet transmitting in wide area network |
JP5392034B2 (en) * | 2009-12-01 | 2014-01-22 | 富士通株式会社 | Communication apparatus and communication method |
JP5536681B2 (en) * | 2011-01-14 | 2014-07-02 | アラクサラネットワークス株式会社 | Network device, control method therefor, and computer program |
-
2016
- 2016-06-22 CN CN201610456960.8A patent/CN106059876B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102523310A (en) * | 2012-01-04 | 2012-06-27 | 上海工业自动化仪表研究院 | Multifunctional HART (Highway Addressable Remote Transducer) communication interface |
CN104734780A (en) * | 2014-12-29 | 2015-06-24 | 东莞市启鼎光电科技有限公司 | Passive light-splitting RS-485 optical fiber bus local side system |
CN104753596A (en) * | 2014-12-29 | 2015-07-01 | 东莞市启鼎光电科技有限公司 | Multi-port terminal of passive beam splitting RS-485 optical fiber bus |
CN204480459U (en) * | 2015-01-13 | 2015-07-15 | 烟台智慧云谷云计算有限公司 | A kind of remote automatic meter reading system |
CN104881982A (en) * | 2015-05-06 | 2015-09-02 | 上海应时为节能科技有限公司 | Intelligent meter data acquiring system having self-adaptive meter reading strategy and acquiring method of intelligent meter data acquiring system |
Non-Patent Citations (2)
Title |
---|
《Optical packet and circuit integrated ring network with wavelength resources boundary control》;Naoya Wada等;《IEEE 2014 16th International Conference on Transparent Optical Networks (ICTON)》;20140710;正文第1-4页 * |
《基于在EPON的用电信息采集终端设计与实现》;杨正进;《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》;20140515;正文第4-5章 * |
Also Published As
Publication number | Publication date |
---|---|
CN106059876A (en) | 2016-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100596357C (en) | Data translation device and system based on ethernet and serial communication technology | |
CN103338488B (en) | Method for switching network, terminal, controller, gateway and system | |
CN105959216B (en) | A kind of communication means, the apparatus and system of unidirectional serial bus network | |
CN107947994B (en) | Network topology self-discovery method and device, network equipment and computer storage medium | |
CN101710875A (en) | Method and device for realizing rapid re-routing | |
CN107508640A (en) | Dual loop redundancy self-healing fiber optic network construction method based on Fibre Channel technologies | |
CN104243239A (en) | State inspection method and device for controllers in SDN clusters | |
CN106059876B (en) | A kind of mode switch control method, equipment and the system of unidirectional serial bus network | |
CN104125083A (en) | Active/standby switchover method, device, equipment and system for network equipment | |
CN105379201A (en) | Path switching method and device | |
CN106357542A (en) | Method for providing multicast service and software defined network controller | |
CN104980302A (en) | STP-based method for removing redundancy link under SDN framework | |
CN103096387B (en) | Based on the cognitive transmission method of high priority data classification in intelligent grid | |
CN102801622A (en) | Transmitting method and device for data messages | |
CN105991315A (en) | Link protection method applied to SDN (software defined network), switching device and network controller | |
CN105765909A (en) | Link switching method and device | |
CN106255167B (en) | Wireless sensor network based on low-power consumption lossy network routing protocol | |
CN105959227B (en) | A kind of the topology learning method, apparatus and system of unidirectional serial bus network | |
Tong et al. | A novel and efficient link discovery mechanism in SDN | |
CN109495292B (en) | Dual-redundancy hot standby device | |
CN105430116A (en) | Control channel establishment method and device | |
CN104486787A (en) | Method and device for detecting wireless link fault | |
CN104579992A (en) | Method and device for controlling network flow path | |
CN103825767B (en) | The implementation method and bridge of service quality | |
US10003469B2 (en) | Multicast forwarding method and apparatus in transparent interconnection of lots of link network, and routing bridge |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180626 Termination date: 20210622 |