WO2011131081A1 - Method and apparatus for implementing redundancy serial bus - Google Patents

Method and apparatus for implementing redundancy serial bus Download PDF

Info

Publication number
WO2011131081A1
WO2011131081A1 PCT/CN2011/072355 CN2011072355W WO2011131081A1 WO 2011131081 A1 WO2011131081 A1 WO 2011131081A1 CN 2011072355 W CN2011072355 W CN 2011072355W WO 2011131081 A1 WO2011131081 A1 WO 2011131081A1
Authority
WO
WIPO (PCT)
Prior art keywords
link
data
current link
serial bus
implementing
Prior art date
Application number
PCT/CN2011/072355
Other languages
French (fr)
Chinese (zh)
Inventor
王常力
史洪源
温宜明
虞日跃
Original Assignee
杭州和利时自动化有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州和利时自动化有限公司 filed Critical 杭州和利时自动化有限公司
Publication of WO2011131081A1 publication Critical patent/WO2011131081A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • H04L12/40176Flexible bus arrangements involving redundancy
    • H04L12/40182Flexible bus arrangements involving redundancy by using a plurality of communication lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L2001/0092Error control systems characterised by the topology of the transmission link
    • H04L2001/0094Bus

Definitions

  • the present invention claims to be submitted to the Chinese Patent Office on April 20, 2010, and the application number is 201010153090.X, the invention name is "a redundant serial bus implementation method and device" The priority of the Chinese Patent Application, the entire contents of which is incorporated herein by reference.
  • TECHNICAL FIELD The present invention relates to the field of industrial automation technology, and more particularly to a method and apparatus for implementing a redundant serial bus.
  • BACKGROUND In a distributed control system (DCS), a controller exchanges data with each slave station through a certain communication link. If the current communication link fails, such as data interference, disconnected wiring, etc., communication will be directly affected. Short-term interference can cause packet loss, affecting the reliability of the entire system. Long-term faults (such as broken wires) may cause the entire system to malfunction and may cause huge economic losses.
  • FIG. 2(a) is a schematic diagram of the slave station transmitting data to the system controller
  • FIG. 2(b) is the slave station receiving system control.
  • the slaves mainly include: a drive unit, a data selection unit, a switching switch, and a processing unit.
  • the data selection unit and the switch are at the same logic level, and the two operate in parallel.
  • the slave module When the slave module transmits data, the data is allocated to two independent drive units, and the drive unit respectively transmits the same data to the independent link A and link B;
  • the slave module receives data, the data on the two independent communication links A and B is sent to the data selection logic through the drive unit, and one of the two channels of data is selected and sent to the processing unit, and the data selection logic is based on two Whether the link is faulty, select a normal link to input data into the processing unit.
  • the processing unit receives the data
  • the data of which link is selected is determined by the data selection logic, and the data selection logic determines whether to switch to another link according to whether there is a fault on the link.
  • the data selection logic and the data switch are at the same level, which brings a problem: when the data selection logic determines that there is a problem with the current link, and needs to control the switch to another link, the other link Normal data has been missed, which will inevitably result in data loss when the link is switched. Lost data interrupts the periodic data exchange between the slave module and the controller, introducing instability.
  • an embodiment of the present invention provides a method and an apparatus for implementing a redundant serial bus, so as to implement a bumpless handover, that is, when one link fails, when another link is switched, another one is guaranteed. Normal data on the link is not lost.
  • An embodiment of the present invention provides a method for implementing a redundant serial bus.
  • the method includes: collecting data through a link in a primary link and a backup link, and real-time buffering data transmitted by the primary link and the backup link. Simultaneously monitoring the transmission status of the current link receiving data while performing data buffering;
  • the method further includes:
  • the current link reception data is maintained, and the failure notification information is output to the outside world.
  • the method further includes:
  • the determining whether the current link is faulty includes:
  • the method further includes:
  • a device for implementing a redundant serial bus comprising:
  • a receiving buffer module configured to receive data through one link in the primary link and the backup link, and cache data transmitted by the primary link and the backup link in real time;
  • a monitoring module configured to monitor, in real time, the transmission status of the current link of the received data while the data is buffered by the receiving buffer module;
  • a fault judging module configured to determine whether the current link is faulty
  • a switching module configured to: if the fault judging module determines that the current link is faulty, switch to the non-failed backup link to receive data.
  • the fault judging module is further configured to:
  • the fault judging module determines that the current link has not failed, the current link is maintained.
  • the fault judging module is further configured to: if all the links fail, keep the current link receiving data, and output the fault notification information to the outside world.
  • the fault determination module determines, according to the check bit indication information, whether the current link is faulty, if the check bit indication information is preset When the information is determined, it is determined that the current link has not failed; if not, it is determined that the current link is faulty.
  • the device further includes:
  • the receiving determining module is configured to determine whether the recipient of the data is a local slave, and if so, cache the data; if not, discard the data.
  • the technical solution provided by the present invention collects data transmitted on the primary link and the backup link in real time through a link in the primary link and the backup link, and monitors the data in real time.
  • the defect that the packet loss does not occur after the link switching can be ensured, so that the number According to the transmission, it is more reliable and stable.
  • FIG. 1 is a schematic diagram of a communication link of a distributed controller system in the prior art
  • FIG. 3 is a schematic diagram of a method for implementing a redundant serial bus according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a slave module in a distributed control system according to an embodiment of the present invention
  • Figure 6 is a schematic diagram showing the time difference between two links in data output
  • FIG. 7 is a schematic diagram of redundancy switching of two links in FIG. 6;
  • FIG. 8 is a schematic structural diagram of an apparatus for implementing a redundant serial bus according to an embodiment of the present invention. detailed description
  • the data selection logic and the data switching switch are at the same logic level, which determines that the method is not timely enough for link switching, when the link fault is diagnosed.
  • the distance processing unit has received the erroneous data for some time.
  • the fault information indicates which link is faulty, even if the link is switched, the packet loss data cannot be avoided. It can be seen that if the fault information can be obtained immediately when the fault occurs, and the bumpless handover is performed at the same time, those skilled in the art need to solve the problem.
  • the present invention provides a method for implementing a non-disturbing redundant serial bus. The following describes the implementation of the redundant serial bus provided by the present invention. Referring to FIG. 3, the specific implementation process of the method may include the following steps:
  • Step 301 Receive data through one link in the primary link and the backup link, and cache data transmitted by the primary link and the backup link in real time, and simultaneously monitor the transmission status of the current link of the received data while performing data buffering. ;
  • Step 302 Determine whether the current link is faulty. If yes, switch to the backup link that does not fail to receive data.
  • the technical solution provided by the present invention collects data transmitted on the primary link and the backup link in real time through a link in the primary link and the backup link, and monitors the data in real time.
  • the defect of packet loss does not occur after the link is switched, and the data transmission is more reliable and stable.
  • the embodiment of the present invention provides a preferred implementation manner for quickly verifying whether a link is faulty, and the specific implementation is: determining whether the current link is faulty according to the check digit indication information carried in the transmitted data, if the school When the location indication information is preset information, it is determined that the current link has not failed; if not, it is determined that the current link is faulty.
  • the check bit is judged to be closely related to the check type. For example, even parity in parity is used, the byte to be transmitted is 11000001, and in the normal transmission state, the check bit should be 0. If the data is interfered by the link failure during transmission, the actual transmitted data becomes 11100001, and the parity bit is 1. The receiver calculates that the check digit should be 0 according to the received data, and the actually received check digit is 1, so that the data error can be judged. In order to facilitate a further understanding of the present invention, the invention will be described in detail below with reference to the specific embodiments of the invention.
  • the distributed control system is taken as an example to describe the implementation method of the redundant serial bus provided by the present invention.
  • the slave modules in the distributed control system mainly include: a drive unit, a redundant switching logic, and a processing unit.
  • the driving unit is used to realize the conversion of the signal standard and increase the driving capability.
  • the redundant switching logic outputs the CMOS level signal and the link transmits the RS485 signal, then the driving unit functions to adjust the CMOS level on one hand. Converting to a differential 485 signal, on the other hand, increases the load capacity of the link to enable as many slave modules as possible to be attached to the bus.
  • the implementation of the redundant serial bus of the present invention primarily involves redundant switching logic.
  • the processing unit when the slave module sends data, as shown in FIG. 5, the processing unit writes data into the redundancy switching logic through the bus interface, and the redundancy switching logic first caches the current sending data. Then, the mode conversion of parallel data into serial data is performed, and the serial data after the switching is simultaneously sent to two independent driving units, and each driving unit corresponds to one communication link, for example, link A in FIG. 5 and Link B.
  • the redundancy switching logic first synchronizes the data packets on the two links and B respectively output by the driving unit. This is because the transmission start time of data on the two links may be different. The output transmission time of the two communication links may not be exactly the same. The time difference between the two links in data output is as shown in Figure 6 for t delay. Said. For example, when the minimum unit of data transmission is byte, since the minimum unit of data transmission is byte, the maximum value allowed by t delay is 1 byte of data transmission time, if another time during this time If no data arrives on one link, it is considered that the synchronization of the two links fails.
  • the link that the data stream first arrives is the currently selected link, it is determined whether the check bit of each byte received in the current link is correct, and if it is correct, the link data is kept received. Invariant; if not correct, determine if the check digit on the other link is correct, if another link If the check bit is normal, switch to another link to receive data. If the check bit on the other link is also incorrect, the current two links are faulty, keep the current receiving link unchanged, and go to the outside world. The output fault informs the information to wait for the fault recovery.
  • the so-called synchronization in the embodiment of the present invention refers to: detecting whether the time interval in which the two links receive the same byte is within a predetermined time interval, and if so, the two links are considered to be successfully synchronized. Depending on the time application scenario, those skilled in the art will be able to calculate specific values for the synchronization time.
  • the mode conversion of the serial data to the parallel data is continuously performed on the transmission data on each link.
  • the redundancy switching logic caches the data on each link in real time. While performing data buffering, each byte is received for comparison of corresponding check digits, and according to the comparison between the indication information of the current check digit and the indication information of the preset check digit, it is judged whether the corresponding link is faulty: If the check bit indication information of both links is correct, the currently selected link is kept unchanged; if the check bit indication information of one link of the two links is correct, and the check bit of the other link is correct If the indication information is incorrect or there is no data, the correct link reception data is selected; if the check digit indication information of both links is wrong, the current selected link is also kept unchanged, and the recovery of the failure is waited for.
  • the "Processing Unit” reads the data received in the "Redundant Switching Logic" via the bus interface.
  • the redundant switching logic internally buffers data of two links, and when detecting the current receiving data link failure, can immediately switch to another link and enable real-time buffering on another link. The data so that the process data is switched is not affected at all.
  • FIG. 7 the serial data of link A and link B is converted into parallel data and then temporarily stored in the buffer according to the byte.
  • the two links are determined according to the check bit indication information. Is this byte data correct? If the data of the link A is found to be erroneous, the control switches to the buffer read data of the link B, and the data of the real-time transmission remains in the link B buffer area, so the data is not lost after the link switching. Lost.
  • the minimum unit of data transmission is byte is taken as an example.
  • the transmission time of t delay not exceeding 1 byte needs to be met. If t delay is too long, more than 1 byte is exceeded. The transmission time, the next byte of data on the faster link has arrived, will overwrite the previous data, resulting in the data stored in the slower link and the faster link cache are not the same byte, therefore, can not Ensure data synchronization between the two links.
  • the link switching scheme in the embodiment of the present invention is also applicable to the following link failure scenarios: Taking the transmission link as two as an example, for the convenience of description, the two links are the first link and the second link. Make a distinction.
  • the data is transmitted along the two links of the first link and the second link.
  • the first link receives the data first
  • the second link does not receive the data within the synchronization time
  • the synchronization time is also considered.
  • whether the recipient of the current data is the current slave can be obtained by the destination address byte carried in the received normal data. Data that does not belong to the current slave can be discarded directly to save cache space; data belonging to the current slave can be temporarily stored in the buffer area, waiting for reading and subsequent processing of the data.
  • the implementation method of the redundant serial bus provided by the present invention can detect the transmission state of the two links in real time, and therefore, the real-time performance of the link fault diagnosis is stronger.
  • the present invention is highly versatile and has a weak correlation with communication protocols, regardless of the protocol, as long as the byte transmission contains a parity bit.
  • the present invention also provides a device for implementing a redundant serial bus. As shown in FIG. 8, the device may include:
  • the receiving buffer module 801 is configured to receive data through one link in the primary link and the backup link, and cache data transmitted by the primary link and the backup link in real time;
  • the monitoring module 802 is configured to monitor the transmission status of the current link of the received data in real time while the receiving buffer module 801 performs data caching;
  • the fault judging module 803 is configured to determine whether the current link is faulty.
  • the switching module 804 is configured to: if the fault determining module 803 determines that the current link is faulty, switch to the backup link that does not fail to receive data.
  • the implementation device of the redundant serial bus provided by the present invention receives data in a main link and a backup link, and simultaneously caches data transmitted on the primary link and the backup link through the receiving buffer module. And the real-time monitoring of the transmission status of the current link receiving data; once the current link fails, it automatically switches to other non-faulty links to continue receiving data. In this way, since the data being transmitted is stored in real time in the link after the handover, the defect of packet loss does not occur after the link is switched, and the data transmission is more reliable and stable.
  • the fault judging module is further configured to:
  • the fault judging module determines that the current link has not failed, the current link is received and the fault notification information is output to the outside world.
  • the fault judging module is further configured to: if all links fail, keep the current link receiving data.
  • the fault determination module determines, according to the check bit indication information, whether the current link is faulty, if the check bit indication information is preset When the information is determined, it is determined that the current link has not failed; if not, it is determined that the current link is faulty.
  • the device further includes:
  • the receiving determining module is configured to determine whether the recipient of the data is a local slave, and if so, cache the data; if not, discard the data.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located One place, or it can be distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A method and apparatus for implementing a redundancy serial bus are disclosed in the present invention. The method includes: receiving data on one of a main link and a stand-by link, buffering data transmitted on the main link and the stand-by link in real time, monitoring the transmission state of the current link receiving the data in real time while buffering the data (301); judging whether the current link fails, if yes, switching to the stand-by link without failure for receiving the data (302). The implementation scheme of the present invention can realize a non-interference switch, namely when one link fails and the link is switched to the other link, it is ensured that normal data on the other link are not lost.

Description

一种冗余串行总线的实现方法及装置 本申请要求于 2010 年 4 月 20 日提交中国专利局、 申请号为 201010153090.X, 发明名称为 "一种冗余串行总线的实现方法及装置"的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明涉及工业自动化技术领域, 更具体地说, 涉及一种冗余串行总线的 实现方法及装置。 背景技术 在分布式控制系统(Distributed Control System, DCS ) 中, 控制器通过某 条通讯链路和各个从站进行数据交换。如果当前通讯链路发生故障, 比如数据 受到干扰、接线断开等,通讯就会受到直接影响。短暂的干扰可能会造成丟包, 影响整个系统的可靠性, 长期故障(例如: 断线)可能会造成整个系统运行不 正常, 并可能带来巨大的经济损失。  The present invention claims to be submitted to the Chinese Patent Office on April 20, 2010, and the application number is 201010153090.X, the invention name is "a redundant serial bus implementation method and device" The priority of the Chinese Patent Application, the entire contents of which is incorporated herein by reference. TECHNICAL FIELD The present invention relates to the field of industrial automation technology, and more particularly to a method and apparatus for implementing a redundant serial bus. BACKGROUND In a distributed control system (DCS), a controller exchanges data with each slave station through a certain communication link. If the current communication link fails, such as data interference, disconnected wiring, etc., communication will be directly affected. Short-term interference can cause packet loss, affecting the reliability of the entire system. Long-term faults (such as broken wires) may cause the entire system to malfunction and may cause huge economic losses.
目前, 为了提高分布式控制器系统中控制器和从站模块之间通讯的可靠 性, 通常采用两条相互独立的通讯链路, 如图 1所示。 两条相互独立的通讯链 路互为热备份, 当其中一条链路发生故障时, 可以尽快切换到另一条正常的链 路上, 保持通讯的连续性。  Currently, in order to improve the reliability of communication between controllers and slave modules in a distributed controller system, two separate communication links are usually used, as shown in Figure 1. Two independent communication links are hot backups. When one of the links fails, you can switch to another normal link as soon as possible to maintain communication continuity.
现有的这种串行通讯冗余的实现方式可参照图 2所示, 其中, 图 2 ( a ) 为 从站向系统控制器发送数据的示意图, 图 2 ( b )为从站接收系统控制器下发数 据的示意图。 如图 2所示, 从站主要包括: 驱动单元、 数据选择单元、 切换开 关和处理单元。其中数据选择单元和切换开关处于同一逻辑层级, 两者并行运 行。  The existing implementation of the serial communication redundancy can be referred to FIG. 2, wherein FIG. 2(a) is a schematic diagram of the slave station transmitting data to the system controller, and FIG. 2(b) is the slave station receiving system control. Schematic diagram of the data sent by the device. As shown in Figure 2, the slaves mainly include: a drive unit, a data selection unit, a switching switch, and a processing unit. The data selection unit and the switch are at the same logic level, and the two operate in parallel.
从站模块发送数据时,数据被分配给两个独立的驱动单元,驱动单元分别 将相同的数据发送到独立的链路 A和链路 B上; 从站模块接收数据时, 两路独立的通讯链路 A和 B上的数据通过驱动单元 被送到数据选择逻辑, 同时两路数据中的一路被选择送到处理单元中,数据选 择逻辑根据两条链路是否故障, 选择一条正常链路将数据输入到处理单元中。 When the slave module transmits data, the data is allocated to two independent drive units, and the drive unit respectively transmits the same data to the independent link A and link B; When the slave module receives data, the data on the two independent communication links A and B is sent to the data selection logic through the drive unit, and one of the two channels of data is selected and sent to the processing unit, and the data selection logic is based on two Whether the link is faulty, select a normal link to input data into the processing unit.
通过发明人的研究发现, 现有技术中至少存在以下缺陷:  According to the research of the inventors, at least the following defects exist in the prior art:
处理单元接收数据时,选择哪条链路的数据由数据选择逻辑决定,数据选 择逻辑根据链路上是否存在故障判断是否切换到另一条链路。数据选择逻辑和 数据切换开关处于同一层级, 这样就会带来一个问题, 即: 当数据选择逻辑判 断出当前链路有问题, 需要控制切换到另一条链路上时, 另一条链路上的正常 数据已经错过了, 这样在链路切换的时候必然会造成丟数据。丟数据打断了从 站模块和控制器周期性的数据交换, 引入了不稳定因素。  When the processing unit receives the data, the data of which link is selected is determined by the data selection logic, and the data selection logic determines whether to switch to another link according to whether there is a fault on the link. The data selection logic and the data switch are at the same level, which brings a problem: when the data selection logic determines that there is a problem with the current link, and needs to control the switch to another link, the other link Normal data has been missed, which will inevitably result in data loss when the link is switched. Lost data interrupts the periodic data exchange between the slave module and the controller, introducing instability.
发明内容 Summary of the invention
有鉴于此, 本发明实施例提供一种冗余串行总线的实现方法及装置, 以便 实现无扰切换, 即: 当某条链路发生故障时, 切换到另一条链路时, 保证另一 条链路上的正常数据不会丟失。  In view of this, an embodiment of the present invention provides a method and an apparatus for implementing a redundant serial bus, so as to implement a bumpless handover, that is, when one link fails, when another link is switched, another one is guaranteed. Normal data on the link is not lost.
本发明实施例提供一种冗余串行总线的实现方法, 所述方法包括: 通过主链路及备份链路中的一条链 妻收数据,并实时緩存主链路及备份 链路传输的数据,在进行数据緩存同时, 实时监测接收数据的当前链路的传输 状态;  An embodiment of the present invention provides a method for implementing a redundant serial bus. The method includes: collecting data through a link in a primary link and a backup link, and real-time buffering data transmitted by the primary link and the backup link. Simultaneously monitoring the transmission status of the current link receiving data while performing data buffering;
判断所述当前链路是否发生故障,如果是, 则切换至未发生故障的备份链 妻收数据。  It is judged whether the current link is faulty, and if so, it is switched to the backup link that has not failed to receive data.
优选的, 所述方法还包括:  Preferably, the method further includes:
如果判断所述当前链路未发生故障, 则保持当前链路接收数据, 并向外界 输出故障告知信息。  If it is judged that the current link has not failed, the current link reception data is maintained, and the failure notification information is output to the outside world.
优选的, 所述方法还包括:  Preferably, the method further includes:
如果判断所有链路均发生故障, 则保持当前链路接收数据。  If it is determined that all links have failed, the current link is kept receiving data.
优选的, 所述判断所述当前链路是否发生故障, 包括:  Preferably, the determining whether the current link is faulty includes:
根据传输的数据中携带的校验位指示信息判断所述当前链路是否发生故 障,如果所述校验位指示信息为预置信息时,则确定所述当前链路未发生故障; 如果否, 则确定所述当前链路发生故障。 优选的, 所述方法还包括: Determining whether the current link is faulty according to the check bit indication information carried in the transmitted data. If the check bit indication information is preset information, determining that the current link has not failed; if not, Then determining that the current link is faulty. Preferably, the method further includes:
判断数据的接收者是否是本地从站,如果是,则将所述数据緩存;如果否, 则将所述数据丟弃。  Determining whether the recipient of the data is a local slave, and if so, caching the data; if not, discarding the data.
一种冗余串行总线的实现装置, 所述装置包括:  A device for implementing a redundant serial bus, the device comprising:
接收緩存模块, 用于通过主链路及备份链路中的一条链^妻收数据, 并实 时緩存主链路及备份链路传输的数据;  a receiving buffer module, configured to receive data through one link in the primary link and the backup link, and cache data transmitted by the primary link and the backup link in real time;
监测模块, 用于在所述接收緩存模块进行数据緩存同时, 实时监测接收数 据的当前链路的传输状态;  a monitoring module, configured to monitor, in real time, the transmission status of the current link of the received data while the data is buffered by the receiving buffer module;
故障判断模块, 用于判断所述当前链路是否发生故障;  a fault judging module, configured to determine whether the current link is faulty;
切换模块, 用于如果所述故障判断模块确定所述当前链路发生故障, 则切 换至未发生故障的备份链路接收数据。  And a switching module, configured to: if the fault judging module determines that the current link is faulty, switch to the non-failed backup link to receive data.
优选的, 所述故障判断模块还用于:  Preferably, the fault judging module is further configured to:
如果所述故障判断模块确定所述当前链路未发生故障,则保持当前链^妻 收数据。  If the fault judging module determines that the current link has not failed, the current link is maintained.
优选的, 所述故障判断模块还用于: 如果所有链路均发生故障, 则保持当 前链路接收数据, 并向外界输出故障告知信息。  Preferably, the fault judging module is further configured to: if all the links fail, keep the current link receiving data, and output the fault notification information to the outside world.
优选的, 所述数据中携带的校验位指示信息, 则所述故障判断模块根据所 述校验位指示信息判断所述当前链路是否发生故障,如果所述校验位指示信息 为预置信息时, 则确定所述当前链路未发生故障; 如果否, 则确定所述当前链 路发生故障。  Preferably, the check bit indication information carried in the data, the fault determination module determines, according to the check bit indication information, whether the current link is faulty, if the check bit indication information is preset When the information is determined, it is determined that the current link has not failed; if not, it is determined that the current link is faulty.
优选的, 所述装置还包括:  Preferably, the device further includes:
接收判断模块, 用于判断数据的接收者是否是本地从站, 如果是, 则将所 述数据緩存; 如果否, 则将所述数据丟弃。  The receiving determining module is configured to determine whether the recipient of the data is a local slave, and if so, cache the data; if not, discard the data.
同现有技术相比,本发明提供的技术方案通过主链路及备份链路中的一条 链路接收数据的同时, 实时进行主链路及备份链路上传输的数据的緩存, 并实 时监测接收数据的当前链路的传输状态; 一旦当前链路发生故障,便自动切换 至其他未发生故障的链路继续接收数据。这样, 由于切换后的链路中实时存储 着正在传输的数据, 可以保证链路切换后不会发生数据包丟失的缺陷,使得数 据传输更加可靠、 稳定。 附图说明 为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术 描述中所需要使用的附图作筒单地介绍,显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动 的前提下, 还可以根据这些附图获得其他的附图。 Compared with the prior art, the technical solution provided by the present invention collects data transmitted on the primary link and the backup link in real time through a link in the primary link and the backup link, and monitors the data in real time. The transmission status of the current link receiving the data; once the current link fails, it automatically switches to other unfailed links to continue receiving data. In this way, since the data being transmitted is stored in real time in the link after the handover, the defect that the packet loss does not occur after the link switching can be ensured, so that the number According to the transmission, it is more reliable and stable. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are merely Some embodiments of the present invention may also be used to obtain other drawings based on these drawings without departing from the prior art.
图 1为现有技术中分布式控制器系统的通讯链路示意图;  1 is a schematic diagram of a communication link of a distributed controller system in the prior art;
图 2 ( a )、 ( b ) 为现有技术中串行通讯冗余的实现方式示意图;  2 (a), (b) are schematic diagrams showing the implementation of serial communication redundancy in the prior art;
图 3为本发明实施例提供的一种冗余串行总线的实现方法示意图; 图 4为本发明实施例提供的分布式控制系统中的从站模块示意图; 图 5 为本发明实施例提供的分布式控制系统中的从站模块发送数据的示 意图;  FIG. 3 is a schematic diagram of a method for implementing a redundant serial bus according to an embodiment of the present invention; FIG. 4 is a schematic diagram of a slave module in a distributed control system according to an embodiment of the present invention; FIG. Schematic diagram of data transmitted by a slave module in a distributed control system;
图 6为两条链路在数据输出时的时间差值示意图;  Figure 6 is a schematic diagram showing the time difference between two links in data output;
图 7为图 6中两条链路的冗余切换逻辑示意图;  7 is a schematic diagram of redundancy switching of two links in FIG. 6;
图 8为本发明实施例提供的冗余串行总线的实现装置结构示意图。 具体实施方式  FIG. 8 is a schematic structural diagram of an apparatus for implementing a redundant serial bus according to an embodiment of the present invention. detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  BRIEF DESCRIPTION OF THE DRAWINGS The technical solutions in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without the creative work are all within the scope of the present invention.
通过对现有技术中串行通讯冗余的实现方式分析后, 可以得出: 数据选择 逻辑和数据切换开关处于同一逻辑层级决定了这种方法对链路切换不够及时, 当链路故障被诊断出来的时候, 距离处理单元接收错误数据已经有一段时间 了, 虽然通过故障信息可以得知是哪条链路出了故障,但是即使进行了链路切 换,也无法避免丟包的数据。可见,如果能够在故障发生时立即得到故障信息, 同时进行无扰切换在本领域技术人员亟需解决的问题。 为了避免在链路切换时导致的数据丟包,本发明提供了一种无扰的冗余串 行总线的实现方法。下面首先对本发明提供的冗余串行总线的实现方法进行说 明, 参照图 3所示, 为该方法的具体实现流程, 可以包括以下步骤: After analyzing the implementation of serial communication redundancy in the prior art, it can be concluded that: the data selection logic and the data switching switch are at the same logic level, which determines that the method is not timely enough for link switching, when the link fault is diagnosed. When it comes out, the distance processing unit has received the erroneous data for some time. Although the fault information indicates which link is faulty, even if the link is switched, the packet loss data cannot be avoided. It can be seen that if the fault information can be obtained immediately when the fault occurs, and the bumpless handover is performed at the same time, those skilled in the art need to solve the problem. In order to avoid data packet loss caused by link switching, the present invention provides a method for implementing a non-disturbing redundant serial bus. The following describes the implementation of the redundant serial bus provided by the present invention. Referring to FIG. 3, the specific implementation process of the method may include the following steps:
步骤 301、 通过主链路及备份链路中的一条链路接收数据, 并实时緩存主 链路及备份链路传输的数据,在进行数据緩存同时, 实时监测接收数据的当前 链路的传输状态;  Step 301: Receive data through one link in the primary link and the backup link, and cache data transmitted by the primary link and the backup link in real time, and simultaneously monitor the transmission status of the current link of the received data while performing data buffering. ;
步骤 302、 判断所述当前链路是否发生故障, 如果是, 则切换至未发生故 障的备份链路接收数据。  Step 302: Determine whether the current link is faulty. If yes, switch to the backup link that does not fail to receive data.
同现有技术相比,本发明提供的技术方案通过主链路及备份链路中的一条 链路接收数据的同时, 实时进行主链路及备份链路上传输的数据的緩存, 并实 时监测接收数据的当前链路的传输状态; 一旦当前链路发生故障,便自动切换 至其他未发生故障的链路继续接收数据。这样, 由于切换后的链路中实时存储 着正在传输的数据, 可以保证链路切换后不会发生数据包丟失的缺陷,使得数 据传输更加可靠、 稳定。  Compared with the prior art, the technical solution provided by the present invention collects data transmitted on the primary link and the backup link in real time through a link in the primary link and the backup link, and monitors the data in real time. The transmission status of the current link receiving the data; once the current link fails, it automatically switches to other unfailed links to continue receiving data. In this way, since the data being transmitted is stored in real time in the link after the handover, the defect of packet loss does not occur after the link is switched, and the data transmission is more reliable and stable.
本发明技术方案在具体实施时, 当开始接收数据时,会默认从一条链路中 接收数据, 这时, 如果判断所述当前链路未发生故障, 则保持当前链路接收数 据。  In the specific implementation of the technical solution of the present invention, when data is started to be received, data is received from a link by default. At this time, if it is determined that the current link has not failed, the current link reception data is maintained.
此外, 如果判断所有链路均发生故障, 则保持当前链路接收数据, 并向外 界输出故障告知信息, 等待链路故障恢复。  In addition, if it is judged that all links have failed, the current link reception data is maintained, and the failure notification information is output to the outside, waiting for the link failure recovery.
本发明实施例提供了一种快速检验链路是否发生故障的优选实施方式,具 体实现为:根据传输的数据中携带的校验位指示信息判断所述当前链路是否发 生故障,如果所述校验位指示信息为预置信息时, 则确定所述当前链路未发生 故障; 如果否, 则确定所述当前链路发生故障。  The embodiment of the present invention provides a preferred implementation manner for quickly verifying whether a link is faulty, and the specific implementation is: determining whether the current link is faulty according to the check digit indication information carried in the transmitted data, if the school When the location indication information is preset information, it is determined that the current link has not failed; if not, it is determined that the current link is faulty.
校验位的判断是和校验类型密切相关的, 比如采用奇偶校验中的偶校验, 需要传输的字节为 11000001 , 正常传输状态时, 校验位应该为 0。 如果数据在 传输过程中受到链路故障干扰, 实际传输的数据变为了 11100001 , 此时, 校 验位为 1。 接收方根据接收到的数据计算出校验位应该为 0, 而实际接收到的 校验位是 1 , 从而可以判断数据错误。 为了便于对本发明进一步的理解,下面结合本发明的具体实施方式对本发 明进行详细描述。 The check bit is judged to be closely related to the check type. For example, even parity in parity is used, the byte to be transmitted is 11000001, and in the normal transmission state, the check bit should be 0. If the data is interfered by the link failure during transmission, the actual transmitted data becomes 11100001, and the parity bit is 1. The receiver calculates that the check digit should be 0 according to the received data, and the actually received check digit is 1, so that the data error can be judged. In order to facilitate a further understanding of the present invention, the invention will be described in detail below with reference to the specific embodiments of the invention.
仍以分布式控制系统为例,对本发明提供的冗余串行总线的实现方法进行 说明。  The distributed control system is taken as an example to describe the implementation method of the redundant serial bus provided by the present invention.
需要说明的是,为了描述方便,该实施例中以两条传输链路为例进行说明。 如图 4所示, 分布式控制系统中的从站模块主要包括: 驱动单元、 冗余切换逻 辑和处理单元。 其中, 驱动单元用于实现信号标准的转换并增加驱动能力, 比 如冗余切换逻辑输出的是 CMOS电平信号而链路上传输的是 RS485信号, 那 么驱动单元的作用就是一方面将 CMOS电平转换为差分 485信号, 另一方面 增加链路的带负载能力, 以实现总线上挂接尽可能多的从站模块。本发明的冗 余串行总线的实现方法主要涉及冗余切换逻辑。  It should be noted that, for convenience of description, two transmission links are taken as an example for description in this embodiment. As shown in Figure 4, the slave modules in the distributed control system mainly include: a drive unit, a redundant switching logic, and a processing unit. The driving unit is used to realize the conversion of the signal standard and increase the driving capability. For example, the redundant switching logic outputs the CMOS level signal and the link transmits the RS485 signal, then the driving unit functions to adjust the CMOS level on one hand. Converting to a differential 485 signal, on the other hand, increases the load capacity of the link to enable as many slave modules as possible to be attached to the bus. The implementation of the redundant serial bus of the present invention primarily involves redundant switching logic.
需要说明的是, 本发明实施例中, 从站模块发送数据时, 如图 5所示, 处 理单元通过总线接口将数据写入冗余切换逻辑中,冗余切换逻辑首先緩存当前 的发送数据, 然后进行并行数据转换成串行数据的模式切换, 并将切换之后的 串行数据同时发送给两个独立的驱动单元, 每个驱动单元对应一个通讯链路, 例如图 5中的链路 A和链路 B。  It should be noted that, in the embodiment of the present invention, when the slave module sends data, as shown in FIG. 5, the processing unit writes data into the redundancy switching logic through the bus interface, and the redundancy switching logic first caches the current sending data. Then, the mode conversion of parallel data into serial data is performed, and the serial data after the switching is simultaneously sent to two independent driving units, and each driving unit corresponds to one communication link, for example, link A in FIG. 5 and Link B.
采用本发明提供的冗余串行总线的实现方法,从站模块接收数据时, 冗余 切换逻辑先对驱动单元分别输出的两条链路 、 B上的数据包进行同步。 这是 由于, 两条链路上数据的传输起始时间可能不同, 两条通讯链路输出传输时间 不一定完全一致, 两条链路在数据输出时的时间差值如图 6中的 tdelay表示。 以 数据传输时的最小单位为字节的情形为例, 由于数据传输时的最小单位为字 节, 因此, tdelay允许的最大值为 1个字节数据传输的时间, 如果在这个时间内 另一条链路上仍然没有数据到达, 则认为对两条链路同步失败; 否则, 认为两 条链路上都有数据可供选择, 同步成功。 可见, 当两条链路在数据输出时的时 间差值小于数据传输时的最小单位的传输时间时, 则两条链路同步成功。 With the implementation method of the redundant serial bus provided by the present invention, when the slave module receives data, the redundancy switching logic first synchronizes the data packets on the two links and B respectively output by the driving unit. This is because the transmission start time of data on the two links may be different. The output transmission time of the two communication links may not be exactly the same. The time difference between the two links in data output is as shown in Figure 6 for t delay. Said. For example, when the minimum unit of data transmission is byte, since the minimum unit of data transmission is byte, the maximum value allowed by t delay is 1 byte of data transmission time, if another time during this time If no data arrives on one link, it is considered that the synchronization of the two links fails. Otherwise, it is considered that there is data available for selection on both links, and the synchronization is successful. It can be seen that when the time difference between the two links in the data output is smaller than the transmission time of the minimum unit in the data transmission, the two links are successfully synchronized.
需要说明的是,如果数据流先到达的链路就是当前选择的链路, 则判断当 前链路中接收到的每个字节的校验位是否正确,如果正确, 则保持接收本链路 数据不变; 如果不正确, 则判断另一链路上校验位是否正确, 如果另一条链路 上校验位正常, 则切换到另一条链路接收数据; 如果另一条链路上校验位也错 误, 则说明当前两条链路都故障, 保持当前接收链路不变,, 并向外界输出故 障告知信息等待故障恢复。 It should be noted that if the link that the data stream first arrives is the currently selected link, it is determined whether the check bit of each byte received in the current link is correct, and if it is correct, the link data is kept received. Invariant; if not correct, determine if the check digit on the other link is correct, if another link If the check bit is normal, switch to another link to receive data. If the check bit on the other link is also incorrect, the current two links are faulty, keep the current receiving link unchanged, and go to the outside world. The output fault informs the information to wait for the fault recovery.
如果数据流先到达的链路不是当前选择的链路,则需要同步两条链路的数 据,如果在接收 1个字节的时间间隔内同步成功, 则保持当前选择的链 妻收 数据,如果在接收 1个字节的时间间隔内同步失败, 则切换到另一条链路接收 数据。 同时根据每个字节的校验位进行切换链路的逻辑判断。 需要指出的是, 本发明实施例中的所谓同步是指:检测两条链^妻收到同一字节的时间间隔是 否在规定时间间隔内,如果是,则认为两条链路同步成功。根据时间应用场景, 本领域技术人员能够计算出同步时间的具体值。  If the link that the data stream arrives first is not the currently selected link, the data of the two links needs to be synchronized. If the synchronization succeeds within the time interval of receiving 1 byte, the current selected link is received. When the synchronization fails within the time interval of receiving 1 byte, it switches to another link to receive data. At the same time, the logical judgment of the switching link is performed according to the parity bit of each byte. It should be noted that the so-called synchronization in the embodiment of the present invention refers to: detecting whether the time interval in which the two links receive the same byte is within a predetermined time interval, and if so, the two links are considered to be successfully synchronized. Depending on the time application scenario, those skilled in the art will be able to calculate specific values for the synchronization time.
两条链路上传输的数据完成同步之后,继续分别对每条链路上的传输数据 进行串行数据转换成并行数据的模式切换。  After the data transmitted on the two links is synchronized, the mode conversion of the serial data to the parallel data is continuously performed on the transmission data on each link.
模式切换之后, 冗余切换逻辑对每条链路上的数据进行实时緩存。在进行 数据緩存的同时,每接收一个字节进行相应校验位的对比,根据当前校验位的 指示信息和预置校验位的指示信息之间的对比, 判断相应链路是否发生故障: 如果两条链路的校验位指示信息均正确, 则保持当前选择的链路不变; 如果两 条链路中一条链路的校验位指示信息正确,而另一条链路的校验位指示信息错 误或无数据, 则选择正确的链路接收数据; 如果两条链路的校验位指示信息均 错误, 则同样保持当前选择链路不变, 等待故障的恢复。 "处理单元" 通过总 线接口读取 "冗余切换逻辑" 中接收到的数据。 同现有技术方案相比, 冗余切 换逻辑内部緩存了两条链路的数据, 当检测到当前接收数据链路故障时, 可以 立即切换到另一条链路并启用另一条链路上实时緩存的数据,从而切换过程数 据不会受到任何影响。  After mode switching, the redundancy switching logic caches the data on each link in real time. While performing data buffering, each byte is received for comparison of corresponding check digits, and according to the comparison between the indication information of the current check digit and the indication information of the preset check digit, it is judged whether the corresponding link is faulty: If the check bit indication information of both links is correct, the currently selected link is kept unchanged; if the check bit indication information of one link of the two links is correct, and the check bit of the other link is correct If the indication information is incorrect or there is no data, the correct link reception data is selected; if the check digit indication information of both links is wrong, the current selected link is also kept unchanged, and the recovery of the failure is waited for. The "Processing Unit" reads the data received in the "Redundant Switching Logic" via the bus interface. Compared with the prior art solution, the redundant switching logic internally buffers data of two links, and when detecting the current receiving data link failure, can immediately switch to another link and enable real-time buffering on another link. The data so that the process data is switched is not affected at all.
上述冗余切换逻辑可以通过图 7进行进一步明示。 如图 7所示, 链路 A 和链路 B 的串行数据转换为并行数据后按照字节暂存到緩存区, 在緩存的同 时已经根据校验位指示信息判断出了两个链路接收到的这个字节数据是否正 确。 如果发现链路 A的数据是错误的, 则控制切换到链路 B的緩存区读数据, 链路 B緩存区中保留有实时传输的数据, 所以链路切换之后不会导致数据丟 失。 该过程中, 仍以数据传输时的最小单位为字节的情形为例, 该过程中, 需 要满足 tdelay不超过 1个字节的传输时间, 如果 tdelay太长, 超过了 1个字节的 传输时间,则传输较快链路上的下一个字节数据已经到了,会覆盖之前的数据, 导致较慢链路和较快链路緩存中存储的数据不是同一个字节, 因此, 不能保证 两条链路的数据同步。 The above redundant switching logic can be further illustrated by FIG. As shown in Figure 7, the serial data of link A and link B is converted into parallel data and then temporarily stored in the buffer according to the byte. At the same time of buffering, the two links are determined according to the check bit indication information. Is this byte data correct? If the data of the link A is found to be erroneous, the control switches to the buffer read data of the link B, and the data of the real-time transmission remains in the link B buffer area, so the data is not lost after the link switching. Lost. In this process, the case where the minimum unit of data transmission is byte is taken as an example. In this process, the transmission time of t delay not exceeding 1 byte needs to be met. If t delay is too long, more than 1 byte is exceeded. The transmission time, the next byte of data on the faster link has arrived, will overwrite the previous data, resulting in the data stored in the slower link and the faster link cache are not the same byte, therefore, can not Ensure data synchronization between the two links.
当然, 本发明实施例中的链路切换方案也适用于以下链路故障情形: 以传 输链路为两条为例, 为了表述方便,将两条链路以第一链路和第二链路进行区 分。数据沿第一链路和第二链路两条链路进行传输, 当第一链路首先接收到数 据, 而第二链路在同步时间内没有收到数据, 这时, 也认为在同步时间内没有 收到数据的第二链路发生故障。如果默认的是采用第二链路进行数据接收, 则 需要进行链路切换, 改由第一链路进行数据接收。  Of course, the link switching scheme in the embodiment of the present invention is also applicable to the following link failure scenarios: Taking the transmission link as two as an example, for the convenience of description, the two links are the first link and the second link. Make a distinction. The data is transmitted along the two links of the first link and the second link. When the first link receives the data first, and the second link does not receive the data within the synchronization time, then the synchronization time is also considered. The second link that did not receive the data failed. If the default is to use the second link for data reception, link switching is required, and data reception is performed by the first link.
在本发明的另一个优选实施方案中,可以通过接收到的正常数据中携带的 目的地址字节, 获得当前数据的接收者是否为当前从站。对于不属于当前从站 的数据可以直接抛弃, 以节省緩存空间; 对于属于当前从站的数据可以暂存到 緩存区内, 等待对该数据的读取及后续处理。  In another preferred embodiment of the present invention, whether the recipient of the current data is the current slave can be obtained by the destination address byte carried in the received normal data. Data that does not belong to the current slave can be discarded directly to save cache space; data belonging to the current slave can be temporarily stored in the buffer area, waiting for reading and subsequent processing of the data.
可见, 本发明提供的冗余串行总线的实现方法, 能够实时检测两条链路的 传输状态, 因此, 对于链路故障诊断的实时性更强。 本发明的通用性很强, 与 通讯协议相关性很弱,无论协议如何只要字节传输包含校验位即可采用此冗余 方案。 相应上述冗余串行总线的实现方法,本发明还提供了一种冗余串行总线的 实现装置, 如图 8所示, 所述装置可以包括:  It can be seen that the implementation method of the redundant serial bus provided by the present invention can detect the transmission state of the two links in real time, and therefore, the real-time performance of the link fault diagnosis is stronger. The present invention is highly versatile and has a weak correlation with communication protocols, regardless of the protocol, as long as the byte transmission contains a parity bit. The present invention also provides a device for implementing a redundant serial bus. As shown in FIG. 8, the device may include:
接收緩存模块 801 , 用于通过主链路及备份链路中的一条链路接收数据, 并实时緩存主链路及备份链路传输的数据;  The receiving buffer module 801 is configured to receive data through one link in the primary link and the backup link, and cache data transmitted by the primary link and the backup link in real time;
监测模块 802, 用于在所述接收緩存模块 801进行数据緩存同时, 实时监 测接收数据的当前链路的传输状态;  The monitoring module 802 is configured to monitor the transmission status of the current link of the received data in real time while the receiving buffer module 801 performs data caching;
故障判断模块 803 , 用于判断所述当前链路是否发生故障;  The fault judging module 803 is configured to determine whether the current link is faulty.
切换模块 804, 用于如果所述故障判断模块 803确定所述当前链路发生故 障, 则切换至未发生故障的备份链路接收数据。 本发明提供的冗余串行总线的实现装置通过主链路及备份链路中的一条 链路接收数据的同时,通过接收緩存模块实时进行主链路及备份链路上传输的 数据的緩存, 并实时监测接收数据的当前链路的传输状态; 一旦当前链路发生 故障, 便自动切换至其他未发生故障的链路继续接收数据。 这样, 由于切换后 的链路中实时存储着正在传输的数据,可以保证链路切换后不会发生数据包丟 失的缺陷, 使得数据传输更加可靠、 稳定。 The switching module 804 is configured to: if the fault determining module 803 determines that the current link is faulty, switch to the backup link that does not fail to receive data. The implementation device of the redundant serial bus provided by the present invention receives data in a main link and a backup link, and simultaneously caches data transmitted on the primary link and the backup link through the receiving buffer module. And the real-time monitoring of the transmission status of the current link receiving data; once the current link fails, it automatically switches to other non-faulty links to continue receiving data. In this way, since the data being transmitted is stored in real time in the link after the handover, the defect of packet loss does not occur after the link is switched, and the data transmission is more reliable and stable.
优选的, 所述故障判断模块还用于:  Preferably, the fault judging module is further configured to:
如果所述故障判断模块确定所述当前链路未发生故障,则保持当前链^妻 收数据, 并向外界输出故障告知信息。  If the fault judging module determines that the current link has not failed, the current link is received and the fault notification information is output to the outside world.
优选的, 所述故障判断模块还用于: 如果所有链路均发生故障, 则保持当 前链路接收数据。  Preferably, the fault judging module is further configured to: if all links fail, keep the current link receiving data.
优选的, 所述数据中携带的校验位指示信息, 则所述故障判断模块根据所 述校验位指示信息判断所述当前链路是否发生故障,如果所述校验位指示信息 为预置信息时, 则确定所述当前链路未发生故障; 如果否, 则确定所述当前链 路发生故障。  Preferably, the check bit indication information carried in the data, the fault determination module determines, according to the check bit indication information, whether the current link is faulty, if the check bit indication information is preset When the information is determined, it is determined that the current link has not failed; if not, it is determined that the current link is faulty.
在本发明另一个优选实施例中, 所述装置还包括:  In another preferred embodiment of the present invention, the device further includes:
接收判断模块, 用于判断数据的接收者是否是本地从站, 如果是, 则将所 述数据緩存; 如果否, 则将所述数据丟弃。 对于装置实施例而言, 由于其基本相应于方法实施例, 所以描述得比较筒 单,相关之处参见方法实施例的部分说明即可。 以上所描述的装置实施例仅仅 是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上 分开的,作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一 个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的 部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出 创造性劳动的情况下, 即可以理解并实施。  The receiving determining module is configured to determine whether the recipient of the data is a local slave, and if so, cache the data; if not, discard the data. For the device embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located One place, or it can be distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机 可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体(Random Access Memory, RAM )等。 A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本 发明。 对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见 的,本文中所定义的一般原理可以在不脱离本发明实施例的精神或范围的情况 下, 在其它实施例中实现。 因此, 本发明实施例将不会被限制于本文所示的这 些实施例, 而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。  The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the embodiments of the invention. . Therefore, the present embodiments of the invention are not to be limited to the embodiments shown herein, but are to be accorded to the broadest scope of the principles and novel features disclosed herein.

Claims

权 利 要 求 Rights request
1、 一种冗余串行总线的实现方法, 其特征在于, 所述方法包括: 通过主链路及备份链路中的一条链 妻收数据,并实时緩存主链路及备份 链路传输的数据,在进行数据緩存同时, 实时监测接收数据的当前链路的传输 状态;  A method for implementing a redundant serial bus, the method comprising: collecting data through a link in a primary link and a backup link, and real-time buffering transmission of the primary link and the backup link Data, while performing data buffering, monitoring the transmission status of the current link of the received data in real time;
判断所述当前链路是否发生故障,如果是, 则切换至未发生故障的备份链 妻收数据。  It is judged whether the current link is faulty, and if so, it is switched to the backup link that has not failed to receive data.
2、 根据权利要求 1所述的冗余串行总线的实现方法, 其特征在于, 所述 方法还包括:  2. The method of implementing a redundant serial bus according to claim 1, wherein the method further comprises:
如果判断所述当前链路未发生故障, 则保持当前链路接收数据。  If it is determined that the current link has not failed, the current link reception data is maintained.
3、 根据权利要求 1所述的冗余串行总线的实现方法, 其特征在于, 所述 方法还包括:  The method for implementing a redundant serial bus according to claim 1, wherein the method further comprises:
如果判断所有链路均发生故障, 则保持当前链 妻收数据, 并向外界输出 故障告知信息。  If it is determined that all links have failed, the current link is kept and the fault notification information is output to the outside world.
4、 根据权利要求 1所述的冗余串行总线的实现方法, 其特征在于, 所述 判断所述当前链路是否发生故障, 包括:  The method for implementing the redundant serial bus according to claim 1, wherein the determining whether the current link is faulty comprises:
根据传输的数据中携带的校验位指示信息判断所述当前链路是否发生故 障,如果所述校验位指示信息为预置信息时,则确定所述当前链路未发生故障; 如果否, 则确定所述当前链路发生故障。  Determining whether the current link is faulty according to the check bit indication information carried in the transmitted data. If the check bit indication information is preset information, determining that the current link has not failed; if not, Then determining that the current link is faulty.
5、 根据权利要求 1-4中任一项所述的冗余串行总线的实现方法, 其特征 在于, 所述方法还包括:  The method for implementing a redundant serial bus according to any one of claims 1 to 4, wherein the method further comprises:
判断数据的接收者是否是本地从站,如果是,则将所述数据緩存;如果否, 则将所述数据丟弃。  Determining whether the recipient of the data is a local slave, and if so, caching the data; if not, discarding the data.
6、 一种冗余串行总线的实现装置, 其特征在于, 所述装置包括: 接收緩存模块, 用于通过主链路及备份链路中的一条链^妻收数据, 并实 时緩存主链路及备份链路传输的数据;  A device for implementing a redundant serial bus, the device comprising: a receiving buffer module, configured to receive data through a link in a primary link and a backup link, and cache the main chain in real time. Data transmitted by the road and backup link;
监测模块, 用于在所述接收緩存模块进行数据緩存同时, 实时监测接收数 据的当前链路的传输状态; 故障判断模块, 用于判断所述当前链路是否发生故障; a monitoring module, configured to monitor, in real time, the transmission state of the current link of the received data while the data is buffered by the receiving buffer module; a fault judging module, configured to determine whether the current link is faulty;
切换模块, 用于如果所述故障判断模块确定所述当前链路发生故障, 则切 换至未发生故障的备份链路接收数据。  And a switching module, configured to: if the fault judging module determines that the current link is faulty, switch to the non-failed backup link to receive data.
7、 根据权利要求 6所述的冗余串行总线的实现装置, 其特征在于, 所述 故障判断模块还用于:  The apparatus for implementing a redundant serial bus according to claim 6, wherein the fault judging module is further configured to:
如果所述故障判断模块确定所述当前链路未发生故障,则保持当前链^妻 收数据。  If the fault judging module determines that the current link has not failed, the current link is maintained.
8、 根据权利要求 6所述的冗余串行总线的实现装置, 其特征在于, 所述 故障判断模块还用于: 如果所有链路均发生故障, 则保持当前链路接收数据, 并向外界输出故障告知信息。  The apparatus for implementing a redundant serial bus according to claim 6, wherein the fault judging module is further configured to: if all links fail, keep the current link receiving data, and send the data to the outside world. Output fault notification information.
9、 根据权利要求 6所述的冗余串行总线的实现装置, 其特征在于, 所述 数据中携带的校验位指示信息,则所述故障判断模块根据所述校验位指示信息 判断所述当前链路是否发生故障,如果所述校验位指示信息为预置信息时, 则 确定所述当前链路未发生故障; 如果否, 则确定所述当前链路发生故障。  The apparatus for implementing a redundant serial bus according to claim 6, wherein the check bit indication information carried in the data, the fault determination module determines the location according to the check bit indication information Whether the current link is faulty, if the check digit indication information is preset information, determining that the current link has not failed; if not, determining that the current link is faulty.
10、 根据权利要求 6-9中任一项所述的冗余串行总线的实现装置, 其特征 在于, 所述装置还包括:  The apparatus for implementing a redundant serial bus according to any one of claims 6-9, wherein the apparatus further comprises:
接收判断模块, 用于判断数据的接收者是否是本地从站, 如果是, 则将所 述数据緩存; 如果否, 则将所述数据丟弃。  The receiving determining module is configured to determine whether the recipient of the data is a local slave, and if so, cache the data; if not, discard the data.
PCT/CN2011/072355 2010-04-20 2011-03-31 Method and apparatus for implementing redundancy serial bus WO2011131081A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 201010153090 CN101807986A (en) 2010-04-20 2010-04-20 Realization method and device of redundant serial bus
CN201010153090.X 2010-04-20

Publications (1)

Publication Number Publication Date
WO2011131081A1 true WO2011131081A1 (en) 2011-10-27

Family

ID=42609611

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/072355 WO2011131081A1 (en) 2010-04-20 2011-03-31 Method and apparatus for implementing redundancy serial bus

Country Status (2)

Country Link
CN (1) CN101807986A (en)
WO (1) WO2011131081A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819252A (en) * 2012-08-13 2012-12-12 国电南京自动化股份有限公司 Method for realizing multi-redundancy of process control station in distributed control system
CN108337113A (en) * 2017-01-17 2018-07-27 阿自倍尔株式会社 Transmission lines switching device and method

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101807986A (en) * 2010-04-20 2010-08-18 杭州和利时自动化有限公司 Realization method and device of redundant serial bus
TWI477961B (en) * 2012-06-26 2015-03-21 Silicon Touch Tech Inc Chip applied to serial transmission system and associated fail safe method
CN104572537B (en) * 2014-12-29 2018-02-23 上海新华控制技术集团科技有限公司 A kind of fault-tolerant master-slave synchronisation serial communication system based on FPGA
CN106603276B (en) * 2016-11-22 2020-08-25 华为技术有限公司 Fault processing method and fault processing device for SERDES link group
CN107331185B (en) * 2017-08-16 2019-12-06 青岛海信网络科技股份有限公司 Abnormal state processing method of traffic signal lamp machine, host and slave
CN108153144A (en) * 2017-11-29 2018-06-12 中核控制系统工程有限公司 A kind of DCS redundant manipulators no-harass switch method
CN111104262A (en) * 2018-10-25 2020-05-05 中车株洲电力机车研究所有限公司 High-reliability chassis backboard communication system and communication method thereof
CN111262765A (en) * 2020-01-15 2020-06-09 浙江中控研究院有限公司 Communication system and method based on redundant BLVDS bus
CN112953803B (en) * 2021-02-10 2022-07-08 西南电子技术研究所(中国电子科技集团公司第十研究所) Airborne redundant network data transmission method
CN113253026A (en) * 2021-05-13 2021-08-13 北京三维天地科技股份有限公司 Monitoring method and device for on-off state of instrument
CN115065858B (en) * 2022-08-18 2022-11-15 广州市保伦电子有限公司 Audio and video transmission method and system based on double optical fibers
CN118075289A (en) * 2024-02-20 2024-05-24 北京冀银科技有限公司 Financial information transmission method and financial information transmission system
CN118101554B (en) * 2024-04-25 2024-08-06 中国第一汽车股份有限公司 Backup method and device for on-board dual-system communication link and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1260930A (en) * 1997-06-20 2000-07-19 哈特曼及布劳恩两合公司 Redundant serial bus and method for operating thereof
US6292013B1 (en) * 1998-09-28 2001-09-18 Cypress Semiconductor Corp. Column redundancy scheme for bus-matching fifos
CN101282301A (en) * 2008-05-12 2008-10-08 北京邮电大学 Double-redundancy CAN bus controller as well as packet processing method thereof
CN101807986A (en) * 2010-04-20 2010-08-18 杭州和利时自动化有限公司 Realization method and device of redundant serial bus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1302647C (en) * 2003-10-17 2007-02-28 中国科学院空间科学与应用研究中心 Method for transmitting data of dissimilar bus cooperative work and equipment thereof
CN1798113A (en) * 2004-12-29 2006-07-05 中国船舶重工集团公司第七一一研究所 Profibus bus - bridge of Ethernet network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1260930A (en) * 1997-06-20 2000-07-19 哈特曼及布劳恩两合公司 Redundant serial bus and method for operating thereof
US6292013B1 (en) * 1998-09-28 2001-09-18 Cypress Semiconductor Corp. Column redundancy scheme for bus-matching fifos
CN101282301A (en) * 2008-05-12 2008-10-08 北京邮电大学 Double-redundancy CAN bus controller as well as packet processing method thereof
CN101807986A (en) * 2010-04-20 2010-08-18 杭州和利时自动化有限公司 Realization method and device of redundant serial bus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819252A (en) * 2012-08-13 2012-12-12 国电南京自动化股份有限公司 Method for realizing multi-redundancy of process control station in distributed control system
CN108337113A (en) * 2017-01-17 2018-07-27 阿自倍尔株式会社 Transmission lines switching device and method

Also Published As

Publication number Publication date
CN101807986A (en) 2010-08-18

Similar Documents

Publication Publication Date Title
WO2011131081A1 (en) Method and apparatus for implementing redundancy serial bus
US7944818B2 (en) High-availability communication system
US10348616B2 (en) Packet transmission method and apparatus, and interconnect interface
CN100461697C (en) Service take-over method based on device disaster tolerance, service switching device and backup machine
US8812759B2 (en) Bus subscriber device for connection to a line-redundant data bus, and method for controlling the communication of a bus subscriber with a line-redundant serial data bus
JP2002368769A (en) Loop network and its operating method
JP3880482B2 (en) Duplex network computer system and computer system network duplication method
JP2007153001A (en) Device and method of changing communication route in on-vehicle electric equipment
EP2372554A2 (en) Information processing device and error processing method
CN114884767B (en) Synchronous dual-redundancy CAN bus communication system, method, equipment and medium
CN109412968A (en) A kind of redundancy communication reception management system and method for time trigger ethernet side node
US20100208581A1 (en) Data transfer system, data transmitting device, data receiving device and data transfer method
JP5761331B2 (en) I / O control device, information processing system, and log collection program
JP6558167B2 (en) Communication device and control method
JP5458863B2 (en) Data transmission apparatus and data transmission method
JP7431034B2 (en) Controller and facility monitoring system
WO2024093636A1 (en) Display method and electronic device
JP5549570B2 (en) Data transmission apparatus and data transmission method
JP5168098B2 (en) Detection apparatus, method, and program
WO2023197972A1 (en) Optical transmission device, service device, and service transmission method and system
JP2005159483A (en) Duplexing communication apparatus
JP2616246B2 (en) Dual processing method for inter-system data in dual operation redundant apparatus and dual operation redundant apparatus
JPH1198058A (en) Radio channel switching device
JP2002140315A (en) Dual multi-protocol switch
JP2000324199A (en) Duplex communication circuit

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11771534

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11771534

Country of ref document: EP

Kind code of ref document: A1