CN102843265B - One of the protocols are not reset without perturbation hot spare connection method bis - Google Patents

One of the protocols are not reset without perturbation hot spare connection method bis Download PDF

Info

Publication number
CN102843265B
CN102843265B CN 201210372609 CN201210372609A CN102843265B CN 102843265 B CN102843265 B CN 102843265B CN 201210372609 CN201210372609 CN 201210372609 CN 201210372609 A CN201210372609 A CN 201210372609A CN 102843265 B CN102843265 B CN 102843265B
Authority
CN
Grant status
Grant
Patent type
Application number
CN 201210372609
Other languages
Chinese (zh)
Other versions
CN102843265A (en )
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
Grant date

Links

Abstract

本发明公开了一种适用于轨道交通现代复杂监控系统通讯规约的不复位无微扰的热备双连接方法,通过两条独立的通讯通道各建立一条有效的通讯连接,两条通讯连接通过状态转换来实现只有一条通讯连接用于传输数据,另一条通讯连接通过发送心跳报文方式来维持连接的有效,互为热备;在系统通讯设备故障时,进行连接切换。 The present invention discloses a dual HotStandBy not reset the connection method without perturbation of the communication protocol complexity of modern rail traffic monitoring system, to establish an effective communication of each connected by two independent communication channels, via two communication state conversion is achieved only one communication connection for transmission of data, another communication connection to maintain an effective connection by sending a heartbeat packet mode, hot standby each other; when the system communication equipment failure, the connection switch. 通过将通讯数据和非通讯数据的操作隔离,设定合理的事务类型和操作流程,并通过在通讯中携带数据状态标识,使得连接切换后仅重传切换前未能成功传输的数据,从而实现在不复位的情况下仍有效保障无微扰,提高通讯效率。 By isolating the communication data and the operation of the non-traffic data, set a reasonable transaction type and operating procedures, and data by carrying the identifier in the communication state, so that only the weight of the data transfer connection before the handover handover failed transmission, in order to achieve without reset is still no effective protection perturbation, improve communications efficiency. 保证数据的及时传送,并且适用于网络不稳定的状况。 Ensure timely delivery of data, and for network unstable state.

Description

一种通讯规约的不复位无微扰的热备双连接方法 One of the protocols are not reset without perturbation hot spare connection method bis

技术领域 FIELD

[0001 ]本技术发明涉及轨道交通自动化领域,尤其涉及分布式监控系统领域,本技术发明可广泛适用于电气化铁路和城市轨道交通各专业监控系统以及综合监控系统等应用。 [0001] The present invention relates to the technical field of rail transportation automation, and more particularly to the field of distributed monitoring systems, the technology can be widely applied to applications electrified railway and urban rail transport various professional monitoring systems and integrated monitoring systems.

背景技术 Background technique

[0002]随着计算机科学和自动化技术的迅速发展,在轨道交通的各个领域,例如电气化铁路和城市地铁等领域,监控系统已经从传统的小型桌面系统向现代的分布式复杂系统发展,其控制的地域范围,流程规模等都迅速增加。 [0002] With the rapid development of computer science and automation technology in all areas of rail transportation, such as electric railway and urban metro and other areas, the monitoring system has been distributed to the modern complex system from the traditional small desktop system control geographical scope, scale and so the process is increasing rapidly. 而且由于传统采用的分立监控系统模式,即存在信号、PSCADA(电力监控)、BAS(环控)等多个独立的监控系统并各有专员进行操作,具有运营成本高,多个系统的信息难以共享等问题,集各子系统功能于一身的综合监控系统逐渐成为新的发展趋势。 And because the discrete monitoring mode, the system conventionally used, i.e. there is a signal, PSCADA (power monitor), the BAS (loop control), and other independent monitoring system and operates each commissioner, has high operating costs, a plurality of information systems difficult sharing and other issues, set each subsystem functions in an integrated monitoring system has gradually become a new trend. 在综合监控系统中,各个子系统通过集成或互联,实现由同一个上位系统进行监控,从而使得信息可以有效共享,并且减少工作量,降低运营成本。 In the integrated monitoring system, or integration of various subsystems interconnected by, implemented by the same higher-level monitoring system, so that the information can be shared effectively, and reduce the workload and reduce operating costs. 不管是专业监控系统还是综合监控系统,现代监控系统的控制规模、流程结构,工程构架都远为复杂。 Whether or professional monitoring system integrated monitoring system, control the size of a modern monitoring system, process structure, engineering framework are far more complex. 这就对系统之间以及系统内部的数据通讯提出了更高的要求,要求现代监控系统的数据通讯应当兼具实时、高效、稳定、健壮等特点。 That's right between systems and data communication within the system put forward higher requirements, data communications requirements of modern surveillance systems should be both real-time, efficient, stable, robust and so on.

[0003]为此,在现代监控系统硬件配置上,数据的发送设备和接收设备间往往通过设立两台独立的交换机等方法同时提供两条独立可用的通讯通道,从而实现硬件通讯设备的热备双冗余,以保障系统通讯硬件的可用性。 [0003] For this purpose, the monitoring system on modern hardware configuration, between the transmitting and receiving devices often provide two independent data communication channels are available simultaneously through the establishment of two separate switches or the like, in order to achieve hardware communication device Hot Standby dual redundant, in order to protect the system communication hardware availability.

[0004]但是,另一方面,目前监控系统中的数据通讯软件,通常又被称为通讯规约,大多还采用冷备的连接框架。 [0004] However, on the other hand, the current data communication monitoring system software, also commonly referred to as communication protocol, most of the connecting frame also uses cold standby. 也就是正常运行时仅基于一条通讯通道建立一条通讯连接用于传输数据。 I.e. a normal operation based on only one communication channel establishing communication connection for transferring data. 如果由于故障导致通讯连接失效,那么再尝试基于另一条通讯通道重新建立一条新的通讯连接代替原来的连接传输数据。 If for failure resulting in communication connection fails, try again on another communication channel to re-establish a new communication link instead of the original connection to transfer data. 由于故障后需要重新建立连接,而建立连接是一个时间开销比较大的操作,因此这个过程存在较长的时延,往往导致这一过程中的监控数据丢失,这一般称为微扰,此时,接收设备和发送设备之间出现了失步的状况。 Due to the need to re-establish the connection after a failure, but to establish a connection time overhead is a relatively large operation, there is a longer delay this process, this process often leads to monitoring data is lost, which is generally known as perturbation, at this time the status of the desynchronization occurs between the transmitting device and the receiving device. 为此,当重新建立了有效连接之后,必须重新传输全部数据从而重新实现接收设备和发送设备的数据同步,这一般称为复位。 For this reason, when the active connection is re-established, all data must be retransmitted thereby re-synchronize data transmitting apparatus and receiving apparatus, which is generally called a reset. 当数据量比较大的时候,例如在综合监控系统应用中,这意味着很大的通讯开销,同时也可能延误新产生监控数据的传输。 When a large amount of data when, for example, integrated monitoring system applications, which means that a large communication overhead, but also may delay the transmission of the newly generated monitoring data. 而且由于轨道交通的现场环境复杂,有些地方干扰严重,往往网络状况不稳定,容易出现频繁切换通讯通道的情况,这种情况下,由于每次切换都需要重新建立连接并进行复位,就可能严重延误重要信号数据的正常传送,造成隐患。 And because of the complexity of the scene rail transit environment, serious disturbance in some places, often unstable network condition, the situation is frequently prone to switch the communication channel, in this case, since each switch needs to be reset and re-establish a connection, it may be serious an important signal of normal delays in data transmission, cause problems. 在极端情况下,有可能因为过于频繁的通讯通道切换并重传所有数据,而出现通讯软件卡死,造成整个监控系统瘫痪。 In extreme cases, it may be because too often the communication channel switching and retransmits all the data, and communications software appears stuck, resulting in paralysis of the entire monitoring system.

[0005]如果监控系统的所有软、硬件都是采用主机和网络都完全同构的系统架构,这个问题可以通过采用聚集IP或者虚拟IP等底层硬件技术加以解决。 [0005] If all of the hardware and software monitoring systems are based on the host and the network are fully homogeneous system architecture, this problem can be solved by using IP or virtual IP aggregation and other underlying hardware technology. 但是现代监控系统由于应用功能复杂,特别是综合监控系统还涉及众多子系统,其扩展性和开放性决定了它一定是一个异构系统。 But modern surveillance systems due to the application of complex functions, in particular the integrated monitoring system also involves many subsystems, scalability and openness of its decision that it must be a heterogeneous system.

发明内容 SUMMARY

[0006] 鉴于此,本申请提出一种适用于轨道交通现代复杂监控系统通讯规约的不复位无微扰的热备双连接方法。 [0006] In view of this, the present application provides a suitable complex modern rail traffic monitoring system does not reset the communication protocol of the double connector hot standby without perturbation method. 通过同时在两个可用的通讯通道上建立两条互为热备的通讯连接,有效利用了冗余的硬件资源,并通过设定合理的连接切换规则,从而显著降低通讯故障时连接切换时的时延;同时通过引入数据库领域中事务的概念,将通讯数据和非通讯数据的操作完全隔离,设定合理的事务类型和操作流程,并通过在通讯中携带数据状态标识,使得连接切换后仅重传切换前未能成功传输的数据,从而实现在不复位的情况下仍有效保障无微扰,提高通讯效率。 By simultaneously establish connections to each other two hot standby switched communication connection, the effective use of redundant hardware resources, and the switching rules by setting a reasonable connection, thereby significantly reducing the communication failure on the two available communication channel delay; simultaneously by introducing the concept of a database transaction in the art, the operation data and communication data is completely isolated from the non-communication, a reasonable set of transaction type and operating procedures, and data by carrying the identifier in the communication state, such that only after the connection switching retransmission of data transmitted before switching failed to achieve without effective protection reset is still no perturbation, improve communications efficiency. 保证数据的及时传送,并且适用于网络不稳定的状况。 Ensure timely delivery of data, and for network unstable state.

附图说明 BRIEF DESCRIPTION

[0007]图1是容忍微扰的冷备连接框架下通讯连接的控制流程图。 [0007] FIG. 1 is a control flowchart cold standby communication connections connecting frame perturbation tolerance.

[0008]图2是带复位的冷备连接框架下通讯连接的工作流程图。 [0008] FIG 2 is a flowchart of the frame device is connected with a cold reset of the communication connection.

[0009]图3是本发明的热备双连接框架下一条通讯连接的工作流程图。 [0009] FIG. 3 is a flowchart Hot Standby bis connecting frame of the invention a communication connection.

[0010]图4是本发明的热备双连接框架下两条连接状态转换的示意图。 [0010] FIG. 4 is a schematic view of the hot standby framework of the invention the double connector connecting two state transitions.

[0011 ]图5是本发明的通讯事务流程示意图。 [0011] FIG. 5 is a transaction flow according to the present invention correspond in FIG.

[0012]图6是本发明的不复位无微扰的热备双连接框架的控制流流程的示意图。 [0012] FIG. 6 is a flow diagram of the control according to the present invention without a flow of hot standby double perturbation connecting frame is not reset.

具体实施方式 detailed description

[0013]以下结合附图和具体实施例对本发明作进一步详细阐述。 [0013] The following embodiments in conjunction with accompanying drawings and specific embodiments for the present invention is explained in further detail.

[0014]当前监控系统中的通讯软件,通常又称为通讯归约或通讯规约,大多采用冷备连接框架。 [0014] The current monitoring system communication software, usually referred to as reduction or communication protocol communication, use a cold standby connection frame. 也就是:正常运行时仅基于一个可用的通讯通道建立一条连接用于传输通讯数据;如果连接因发生通讯故障而失效,则关闭原有连接,切换到另一个通讯通道,建立一个新的连接,代替原有连接传输数据。 That is: based on the establishment of a communication channel is available only when the normal operation of a communication connection for the transmission of data; if the connection due to communication failure and failure, the original connection is closed, switches to another communication channel, establish a new connection, instead of the original data transfer connection.

[0015]由于建立新连接的操作的时间开销比较大,这个过程存在较长的时延,因此往往会导致监控数据的丢失,这种情况一般称为微扰。 [0015] Since the operation of establishing a new connection time overhead is relatively large, there is a longer delay this process and therefore often lead to loss of monitoring data, a situation commonly referred to as perturbation. 这时,有两种应对的策略。 At this time, there are two strategies to deal with.

[0016]第一种,在不是很重要的应用环境中,可以无视丢失的监控数据,即容忍微扰,继续通讯过程,传输新的监控数据。 [0016] The first, in not very important application environment, you can ignore the missing monitoring data that tolerate perturbation, continue the process of communication, new monitoring data transmission. 如图1所示,是容忍微扰的冷备连接框架下,通讯连接的控制流程图。 1, the connecting frame is prepared to tolerate cold perturbation, the control flowchart of the communication connection.

[0017]这种策略简单直接,但是会导致短期的监控数据的丢失,对于电力监控或者轨道交通等关键的应用环境,可能会导致拉闸,停运等,甚至是更为严重的事故,所以微扰是不能容忍的。 [0017] This strategy is simple and direct, but will result in the loss of short-term monitoring data for power monitoring or rail transportation and other critical application environment, it may lead to wind up, shutdown, and even a more serious accident, so perturbation can not be tolerated.

[0018]因此,另一种策略是:在建立新连接后重新传输全部的数据从而重新实现接收设备和发送设备的数据同步,这一过程一般称为复位。 [0018] Thus, another strategy is to: resend all the data in the thus re-establishing a new connection for data transmission device and the reception device synchronization, this process is generally referred to as reset.

[0019]图2是带复位的冷备连接框架下,通讯连接的工作流程图。 [0019] FIG. 2 is a frame with a cold reset device is connected, a flowchart of communication connection.

[0020]如果采用这一策略,在现代大型监控系统例如综合监控系统应用中,由于数据量比较大,复位意味着很大的通讯开销,同时也可能延误新产生监控数据的传输。 [0020] If this strategy, integrated monitoring system in the application of modern large-scale monitoring systems such as, due to the larger amount of data, the reset means that a large communication overhead, but also may delay transmission of the newly generated monitoring data. 特别是在网络状况不稳定的环境中,如果出现网络时断时续的情况,有可能使得连接频繁切换,以至于需要不断的建立新连接并进行复位,这就可能严重延误重要信号数据的正常传送,甚至出现通讯软件卡死,造成整个监控系统瘫痪。 Especially in the unstable state of the environment in the network, if the network appears intermittent, it is possible to make connections frequently switched, so that the need to constantly be reset and a new connection, which could seriously delay the normal important signal data transmission, communications software and even stuck, resulting in paralysis of the entire monitoring system.

[0021]为了避免这种情况,本申请提出一种不复位无微扰的热备双连接方法。 [0021] In order to avoid this situation, the present application proposes a method for connecting a double hot standby is not reset without perturbation.

[0022]首先看一下热备双连接框架: [0022] First, look at the hot standby double connection frame:

[0023] 0在系统通讯设备正常,也就是两条通讯通道都可用时,分别通过两条独立的通讯通道各建立一条有效的通讯连接。 [0023] 0 In the normal system communication equipment, i.e. when the two communication channels are available, each using two separate communication channels each connected to establish an effective communication. 这两条通讯连接是同质的,都可以用于传输通讯数据。 These two communication connections are homogeneous, may be used to transmit traffic data. 但使用其中一条连接传输数据,而另一条留作备用。 However, using which a data transfer connection, while the other is held in reserve.

[0024] 0当原先的连接由于通讯故障等原因失效后,另一条连接迅速接替原有连接用于传输数据,这就使得数据可以立即通过另一条通讯通道传输,而不需要即时重新建立连接。 [0024] 0 When the original connection due to the communication failure after failure and other reasons, the other connected quickly to replace the original connection used to transmit data, making the data instantly through another communication channel transmission, without the need for immediate re-establish the connection. 由于在传输数据的过程中,重要数据一般是优先传输的,这就保证了重要数据的及时传送不会被延误。 Since the process of transferring data, the data is generally important priority transmission, which ensures the timely delivery of critical data will not be delayed.

[0025] 0原先因为通讯故障而断开的连接会被关闭,继而在原有通道上定时尝试重新建立连接,直至连接建立成功为止。 [0025] 0 because communication failure originally broken connection will be closed, and then attempt to reconnect timer in the original channel, until the connection establishment succeeds. 这个过程与正在传输数据的有效连接无关,而建立连接的过程与数据传输并行进行,不会对同时进行的数据传输造成延迟。 This process is independent of an active connection is transmitting data, and establish a connection with the data transfer process in parallel, simultaneous data transmission will not cause a delay. 这就是热备双连接。 This is the hot standby bis connector.

[0026] 需要注意的是,当系统正常时,两条通讯通道同时都可用,这时会基于两条通道建立两条有效的连接。 [0026] Note that, when the system is normal, while the two communication channels are available, then the two will create a valid connection based on two channels. 但是如果两条连接同时用于传输数据,那么由于网络的异构特性,就有可能造成数据重传、丢失或者乱序,为了避免这个问题,必须保证在任意时刻,最多只有一条通讯连接用于传输数据,而另一条连接如果有效,那么不允许同时传送数据,但是必须通过发送心跳报文等方式来维持连接的有效,以时刻备用。 But if the two are connected at the same time for the transmission of data, due to the heterogeneous nature of the network, it may result in data retransmission of lost or out of order, in order to avoid this problem, we must ensure that at any time, at most only one connection for communication data transfer, and if another connection is valid, then allowed transmit simultaneously, but must be maintained through a linked send heartbeat messages, etc., to the standby time. 因此两条连接的状态转换必须遵从合理设定的规则。 Thus two connected state transition rules must follow a reasonable set. 为了明确的描述连接的状态转换的规则,将通讯连接分为三种状态: In order to clarify the description of the conversion rules state of the connection, the communication connection is divided into three states:

[0027]运行态,这个状态下通讯连接正常,用于传输通讯数据。 [0027] Running state, this state of normal communication connection, for transmitting traffic data.

[0028]空闲态,这个状态下通讯连接正常,但仅传输心跳报文维持连接。 [0028] the idle state, this state communications connection is normal, but only the transmission of heartbeat messages to maintain the connection.

[0029]无效态,这个状态下连接尚未建立或者由于故障而失效,通讯连接无效,不能传输数据。 [0029] Invalid state, this state already connected due to a malfunction or failure, communication connection is invalid, the data can not be transmitted.

[0030]图3是热备双连接框架下,一条通讯连接的工作流程图。 [0030] FIG. 3 is a double connecting frame lower hot standby, a flow chart of the communication connection.

[0031]为了保证在任何时刻最多只有一条连接用于传输通讯数据,对通讯连接状态的转换机制确定如下。 [0031] In order to ensure that at most one connection for transmitting communication data at any time, the communication connection state of the switching mechanism is determined as follows.

[0032] 0两条通讯连接都正常时,一条连接处于运行态,另一条连接处于空闲态。 [0032] When the two communication connections are normal 0, is connected to an operating mode, the other connection is in an idle state.

[0033] 0两条连接如果同时处于空闲态,随机选择一条连接将其状态转换为运行态。 [0033] 0 if two simultaneous connections in the idle state, is connected to a random selection to convert its state operating mode.

[0034] 0如果一条连接处于空闲态,另一条连接处于无效态,该连接将转换为运行态。 [0034] 0 if a connection is in an idle state, the other is connected in the inactive state, the connection is converted to the operating mode.

[0035] 0对于任意一条连接,如果在正常态或者空闲动态下发生通讯故障,连接失效,那么将转为无效态,并关闭原先的连接,尝试重新建立连接。 [0035] 0 for any a connection, if the communication failure occurs in the normal state or idle dynamic connection fails, will be converted to an invalid state, and closes the original connection, try to re-establish the connection.

[0036] 0对于任意一条连接,一旦在无效态下通过重新建立连接成功的建立了新的有效连接,那么首先转换为空闲态。 [0036] 0 for any one connection, once the invalid state by re-establishing the connection successfully established a new active connection, is first converted to an idle state.

[0037]如果热备双连接框架下的两条连接的状态转换完全遵循上述机制,就可以保证在任意时刻,最多只有一条连接处于运行态。 [0037] If the state transition connecting two hot standby dual connection frame in full compliance with the above-described mechanism, it is possible to ensure that at any time, at most one operating mode is connected. 图4是热备双连接框架下两条连接状态转换的示意图,其中实线表示稳定状态,虚线表示暂时状态。 FIG 4 is a schematic view of the two hot standby dual connection frame connected state, wherein a solid line represents the steady state, the broken line indicates a temporary state. “点一折”线表示随机选择一条连接,需要注意的是: "A break-point" connection line indicates a random selection, it is noted that:

[0038]虽然两条连接都处于空闲态的情况有可能出现,但是会迅速被发现并将其中一条连接的状态转换为运行态,因此这种状态只是一种持续时间极短的暂态; [0038] Although the two connections are in an idle state, a situation may arise, but will quickly be discovered and a state of the connection is converted to the operating mode, thus this state is only a very short duration transient wherein;

[0039] 一条连接从无效态恢复,只要另一条连接仍然处于有效态,恢复的连接将维持空闲态。 [0039] connected to a recovery from the inactive state, as long as the other connection is still open state, the restored connection will remain idle state. 采用这种惰性的转换方式,主要为了尽可能避免网络不稳定造成频繁切换的问题。 In this way conversion inert, mainly in order to try to avoid network problems caused by instability frequent switching.

[0040]采用热备双连接框架,当传输数据的连接失效后,将立刻切换到备用连接来传输数据,不需要即时重新建立连接,从而避免了新建连接过程的长时延。 [0040] The hot standby double connecting frame, when transmitting data connection failure, will immediately switch to the backup data transmission connection, no immediate connection is reestablished, so as to avoid long delays new connection process. 但这并不足以保证无微扰,这主要是因为网络通讯故障的情况非常复杂,难以有效确定在故障发生时,已经成功传输的数据和尚未传输的数据,如果继续传输新数据,那么就可能丢失数据,但是如果再次传输已经传输过的数据,则可能导致数据的重复处理,特别是当通讯操作和数据处理操作交杂进行时,这种状况更是难以避免,唯一的方法就是重新传输全部数据,从而使得复位和由此带来的问题无法避免。 But not enough to ensure that no perturbation, mainly because the network communication failure is very complex, difficult to effectively determine if a failure occurs, the data transmission of data and have not yet been transmitted successfully, if it continues to transmit new data, then it may loss of data, but if the transmission has been re-transmission of data, it may result in duplicate processing of data, especially when communication operations and data processing operations were mingled, it is difficult to avoid this situation, the only way is to re-transmit all data, so that the issue is reset and the resulting unavoidable.

[0041]为了在不复位的情况下避免微扰,就需要能够确定哪些数据正常传输而哪些数据没有,要做到这一点,必须能够对当前的状态进行表征,因此,这里通过引入数据库的相关概念,对通讯程序的框架进行规范和限制。 [0041] In order to avoid perturbations without reset, which needs to be able to normal transmission of data and therefore, by introducing a database where relevant and which data is not determined, to do this, must be able to characterize the current state, concept of communication program framework to regulate and restrict.

[0042]首先,将一条连接的操作过程称为一条控制流,并将控制流访问的数据按作用分为三类: [0042] First, an operation will be referred to as a connection control flow, data flow and control access by action into three categories:

[0043]本地数据,也就是控制流根据通讯收发的讯息和应用需求而进行处理的当前应用数据的集合。 [0043] The local data, i.e. the current set of control flow and data processing application in accordance with application requirements and communication messages transmitted and received. 这类数据的处理不涉及数据传输过程。 Processing such data does not relate to data transmission.

[0044]连接状态数据,用于表征控制流的当前连接状态。 [0044] connection state data for characterizing the flow of control current connection status. 一旦当前连接的状态发生变化,将更新连接状态数据。 Once the current state of the connection changes, the updated connection state data.

[0045]通讯数据,这包括控制流依据本地数据状态生成的符合一定格式的待发送数据、接收到的待分析数据以及收发过程使用的一些暂存数据等,主要用于保障数据传输的正确和高效。 [0045] communication data, including control data to be transmitted in line with the formatted stream generated based on the state of local data, some of the temporary data to be analyzed and the received data transceiver during use, mainly used for data transmission and proper security efficient.

[0046]如果控制流对这三类数据的访问操作的顺序没有任何限制,访问过程相互交错并且掺杂在一块,那么一旦发生通讯故障,就没有办法清楚地区分哪些数据已经被访问过,哪些还没有,切换连接后是也无法确定哪些数据已经成功传输,哪些数据还没有而需要重新传输。 [0046] If the sequential access operation control these three types of data flow without any restriction, and access to each interleave process in a doped, then once the communication failure, there is no way to know what data has been accessed by region, which not yet, after the handover connection is also unable to determine which data has been successfully transmitted, what data has not and it needs to be retransmitted. 为了解决这个问题,这里引入数据库领域的事务的概念。 To solve this problem, here to introduce the concept of transaction database field.

[0047]事务是由一组操作组成的一个不成分割的原子过程,即该过程中的所有操作要么全部完成,要么一个都不发生。 [0047] The atomic transaction process is not divided by a set of operations consisting of, i.e., all operations of the process either completed or none occurs. 通过使用事务这个概念,可以对操作进行划分,并定义相应的状态。 , May be divided by using the concept of a transaction operation, and define appropriate state. 这里定义两种事物类型, Here defines two types of things,

[0048]数据事务。 [0048] data transaction. 数据事务完全由一组对本地数据的操作组成,其中不涉及任何通讯操作,也就是在一个数据事务中不允许访问任何通讯数据以及连接状态数据。 Complete a transaction data from the set of operations on local data, where the communication does not involve any operation, which is not allowed access to any data communication and the connection state data in a data transaction.

[0049]通讯事务。 [0049] Communications. 通讯事务由数据准备并发送一一数据接受并分析一一连接状态更新这几个步骤组成,图5是通讯事务的流程示意图。 Communications and transmits the data received and analyzed eleven eleven connection state update this data preparation consists of several steps, FIG. 5 is a schematic flow communication transaction. 其中前两个步骤涉及一系列通讯数据操作,而第三个步骤存在连接状态数据的更新,同样,在一个通讯事务过程中不允许访问任何本地数据。 Wherein the first two steps involve a series of data communications operations, and a third step of updating the presence status data connection, similarly, does not allow any access to a local data communication transaction in process.

[0050]规定控制流的每一个轮次均由两个事务组成,首先是一个通讯事务,然后是一个数据事务。 [0050] each of a predetermined control flow by two round transactions composed of a first communication transaction, and a transaction data. 而控制流即为这种轮次的不断循环。 And this is the control flow continues to cycle round. 如果一个轮次的通讯是正常的,那么当这一轮次全部完成,也就是通讯事务和数据事务依次正确完成时,控制流在通讯事务中成功的完成了上一个状态的数据的发送,而连接状态数据保持不变,并且通过完成数据事务而将本地数据更新到下一个状态。 If a round of communication is normal, then when all at once this round is completed, that is, Communications and Data Services in order to complete correctly, the control flow in Communications successfully completed sending data on a state, and data connection state remains unchanged, and updates the local data to the next state by performing a data transaction. 如果在通讯事务中出现了问题而无法有效传输数据,例如通讯故障导致连接失效,进而切换到备用连接,那么连接状态数据将随之做相应的更新,但在同一个轮次接下来的数据事务中不允许修改任何本地数据,本地数据将保持为前一个状态不变。 If there is a problem in the communication transaction can not effectively transmit data, such as communication failure resulting in failure of the connection, and then switch to the standby connection, then the connection state data will subsequently be updated accordingly, in the next round of the same transaction data We are not allowed to modify any local data, local data to remain unchanged at the previous state. 这样,通过把通讯数据和非通讯数据隔离,并以事务为单位进行操作。 Thus, the communication data and by the non-isolated data communications, and operate as a unit in the transaction. 保证了不管连接状态是否发生变化,本地数据要么处于上一个状态,要么更新为下一个状态,而不会处于更新中的一个中间状态。 To ensure that regardless of whether the connection state changes, either in the local data on a state, or a state for the next update, and will not be in an intermediate state update.

[0051 ]基于事务的数据操作具有原子性,要么处于处理前状态,要么处于处理完状态,不会处于中间状态,这就使得可以对数据的状态进行标识,最简单的方式可以采用循环递增计数,当然也可以采用其它方式,只要保证每一轮次本地数据处理前和处理完的状态标识不同就可以了。 [0051] having atomic transaction based on the operation data, either in pre-treatment state, or in a processed state, not in an intermediate state, which allows for identification of the state data, the easiest way to cycle counts may be employed , of course, can also be used in other ways, as long as a state before each of the different local data processing and a secondary processing can be a finished identification. 每一轮次传输数据的同时将数据的状态标识携带传输,而收发双方只要比较各次传输来的数据携带的状态标识就可以确定是否有数据丢失或者数据重复。 In addition, each round of data transmissions will carry a state identification data transmission, and sending and receiving sides only to compare the various secondary data transmission to carry state identification can determine whether there is data loss or duplication of data.

[0052]在发送端适量保存刚发送的数据,在每次发送数据时可以将发送端数据状态同时附送,并在接收端记录,当通讯故障并切换到备用连接后,只要比较两端记录的状态,就可以知道哪些数据未传输成功,此时只要重新传输未传输成功的数据;或者发送端传输所有保存的数据,再由接收端丢弃切换前已成功传输的数据以避免重复处理。 [0052] The transmitting side storage data amount just sent, each time data transmission end may transmit data simultaneously supplied state, and the recording at the receiving end, when a communication failure and switch to the standby connection, as long as both ends of the recording Comparative state, can not know which data transfer is successful, then just re-transmission data is not transmitted successfully; or transmitting end of the transmission of all the data stored, then the receiving side discards the data successfully transmitted before the handover to avoid duplication process. 无论采用哪种方式都可以保证数据既不丢失,也不重复处理,有效避免微扰。 Either way can ensure that the data is neither lost nor repeated handling, avoid perturbation. 由于通讯故障后不需要重新建立连接,仅是切换到备用连接,这是一个时间开销非常小的过程。 Since no re-establish the connection after the communication failure, only switched to the standby connection, which is a very small time overhead process. 因此,无论是发送端保存的刚发送的数据,还是切换连接后重新传输的数据,都非常有限,相比于复位过程,几乎可以忽略不计,因此不会造成不必要的巨大额外通讯开销,也不会阻碍切换后数据的传输。 Therefore, whether the data is saved just sent the sender, or data retransmission after switching connections, are very limited compared to the reset process, almost negligible, it will not cause an unnecessarily large additional communication overhead, also It does not hinder the transmission of data after the handover. 特别是在网络不稳定的情况下,会出现频繁切换通讯连接的状况,如果每次切换后都需要复位,那么频繁复位带了的通讯开销几乎是不可接受的,并且可能造成重要信息传输的严重延误,甚至导致系统瘫痪。 Especially in the case of network instability, there will be frequent switching communication connection status, if every time they switch needs to be reset, then reset frequently brought the communication overhead is almost unacceptable, and can cause serious transmission of important information delays, and even lead to system collapse. 本申请提出的这种不复位无微扰的热备双连接框架可以有效帮助避免这一状况,从而非常适用于网络状况不良的环境。 Such an application of this perturbation is not reset without hot standby dual connecting frame can effectively help to avoid this situation, the network making it ideal for adverse environmental conditions. 图6是不复位无微扰的热备双连接框架的控制流流程的示意图。 FIG 6 is a control flow of a flow of hot standby without Perturbation double connecting frame is not reset.

[0053]本申请提出一种适用于轨道交通现代监控系统通讯软件的不复位无微扰的热备双连接框架。 [0053] The present application provides a suitable modern rail traffic monitoring system does not reset the communication software without perturbation hot standby dual connection frame. 该框架同时在两个可用的通讯通道上建立两条互为热备的通讯连接,有效利用了冗余的硬件资源,并通过设定合理的连接切换规则,从而显著降低通讯故障时连接切换时的时延;同时,在该框架中通过引入数据库领域中事务的概念,将通讯数据和非通讯数据的操作完全隔离,并且设定合理的事务类型和操作流程,再通过在通讯中携带数据状态标识,使得连接切换后仅重传切换前未能成功传输的数据,从而实现在不复位的情况下仍有效保障无微扰,提高通讯效率。 When the frame simultaneously based on two communication channels available two hot standby each communication connection, the effective use of redundant hardware resources, and by setting a reasonable connection switching rules, thereby significantly reducing the communication connection handoff failure delay; Meanwhile, in the frame by introducing the concept of a database transaction in the art, the operation data and communication data is completely isolated from the non-communication, and set a reasonable transaction type and operating procedures, and then by carrying the data in the communication state identity, so that only the weight of the pre-switching data transmission the connection switching transmission failed to achieve without resetting still no effective protection perturbation communication efficiency. 保证数据的及时传送,并且尤其适用于网络不稳定的环境。 Ensure timely delivery of data, and especially for the network unstable environment.

[0054]以上实施例只是对于本发明的部分功能进行描述,但实施例和附图并不是用来限定本发明的。 [0054] For the above embodiments are merely some of the features of the present invention will be described, but the embodiments and drawings are not intended to limit the present invention. 在不脱离本发明之精神和范围内,所做的任何等效变化或润饰,同样属于本发明之保护范围。 Without departing from the spirit and scope of the present invention, any equivalent variations made or retouching, also within the scope of the present invention. 因此本发明的保护范围应当以本申请的权利要求所界定的内容为标准。 Therefore, the scope of the present invention should be content to claims of this application is defined as a standard.

Claims (1)

  1. 1.一种不复位无微扰的热备双连接方法,在系统通讯设备正常时,分别通过两条独立的通讯通道各建立一条有效的通讯连接,其中一条连接传输数据,而另一条留作备用;当原先的连接由于通讯故障原因失效后,另一条连接迅速接替原有连接用于传输数据,这就使得数据可以立即通过另一条通讯通道传输,而不需要即时重新建立连接,原先因为通讯故障而断开的连接会被关闭,继而在原有通道上定时尝试重新建立连接,直至连接建立成功为止,在系统通讯设备正常时,两条通讯连接通过状态转换来实现只有一条通讯连接用于传输数据,另一条通讯连接通过发送心跳报文方式来维持连接的有效,时刻备用;在系统通讯设备故障时,进行连接切换,所述状态转换是将通讯连接分为三种状态:运行态,这个状态下通讯连接正常,用于传输通讯数据;空闲态, A hot standby double connector without perturbation method is not reset, when the normal system communication equipment, respectively, by two independently established a communication channel for each active communication connection, wherein a data transmission connection, and the other reserved standby; when the original cause of the malfunction due to communication connection fails, another connection to quickly take over the existing connection for the transmission of data, which makes the data can be immediately transmitted via another communication channel, without the need for immediate re-establish the connection, because the original communication failure broken connection will be closed, then the timing of the channel in the original attempts to reestablish the connection until the connection is established successfully date, when the normal system communication apparatus, a communication connection by a two state transitions only one communication connection for transmission data, another communication connection by sending a heartbeat packet to maintain the connection active mode, standby time; communication device failure in the system, the connection switching, the communication connection state transition is divided into three states: running state, the normal state communication connection, for transmitting traffic data; an idle state, 这个状态下通讯连接正常,但仅传输心跳报文维持连接;无效态,这个状态下连接尚未建立或者由于故障而失效,通讯连接无效,不能传输数据,其特征在于: 将通讯数据和非通讯数据的操作隔离,并且设定合理的事务类型和操作流程,再通过在通讯中携带数据状态标识,从而使得连接切换后仅重传切换前未能成功传输的数据; 两条通讯连接都正常时,一条连接处于运行态,另一条连接处于空闲态; 两条连接如果同时处于空闲态,随机选择一条连接将其状态转换为运行态; 如果一条连接处于空闲态,另一条连接处于无效态,所述空闲态连接将转换为运行态;对于任意一条连接,如果在运行态或者空闲态下发生通讯故障,连接失效,那么将转为无效态,并关闭原先的连接,尝试重新建立连接; 对于任意一条连接,一旦在无效态下通过重新建立连接成 In this state communications connection is normal, but only the transmission of heartbeat messages to maintain the connection; invalid state, this state of the connection has not been established, or due to a malfunction and failure, invalid communications connection, can not transmit data, wherein: the communication data and non-communication data when two communication connections are normal,; isolated operation, and the type of transaction and set a reasonable operating procedures, and then by carrying the state flag in the data communication, so that only the weight of the data transfer connection before the handover failed handover transmission an operating mode is connected, the other connection is in an idle state; if two simultaneous connections in the idle state, is connected to a random selection to convert its state operating mode; if a connection is in an idle state, the other is connected in the inactive state, the idle state connection will be converted to run state; for any one connection, if the communication failure occurs in the running state or idle state, the connection fails, it will be converted to an invalid state, and closes the original connection, try to re-establish the connection; for any one connection, once the invalid state by re-establishing the connection to the 功的建立了新的有效连接,那么首先转换为空闲态; 在发送端适量保存刚发送的数据,在每次发送数据时可以将发送端数据状态同时附送,并在接收端记录,当通讯故障并切换到备用连接后,只要比较两端记录的状态,就可以知道哪些数据未传输成功,此时只要重新传输未传输成功的数据;或者发送端传输所有保存的数据,再由接收端丢弃切换前已成功传输的数据以避免重复处理; 一条连接的操作过程为一条控制流,控制流访问的数据有三种, 本地数据:控制流根据通讯收发的讯息和应用需求而进行处理的当前应用数据的集合,这类数据的处理不涉及数据传输过程; 连接状态数据:用于表征控制流的当前连接状态,一旦当前连接的状态发生变化,将更新连接状态数据; 通讯数据:包括控制流依据本地数据状态生成的符合一定格式的待发送数据、接收 Successful establishment of a new active connection, is first converted to an idle state; save data transmitted just the right amount on the transmitting side, the transmitting side may be included while data state each time data is transmitted, and the recording at the receiving end, when the communication failure and switching to the standby connection, as long as both ends of the comparison of the state record, can not know which data transfer is successful, then data is not retransmitted as long as the successful transmission; transmitting end of the transmission or storage of all data is discarded by the receiver and then switches data was successfully transmitted before the treatment to avoid duplication; during operation of a connection to a control flow, data flow control, there are three access local data: current application control data stream processing in accordance with application requirements and message transmission and reception of communication collection, processing such data does not relate to data transmission; connection status data: the current connection status for characterizing flow control, once the current state of the connection changes, the updated connection state data; communication data: a control flow according to the local data meet certain format data to be transmitted to generate a state of receiving 的待分析数据以及收发过程使用的一些暂存数据; 事务是由一组操作组成的一个不能分割的原子过程,所述事务类型分两种: 数据事务:数据事务完全由一组对本地数据的操作组成,其中不涉及任何通讯操作,也就是在一个数据事务中不允许访问任何通讯数据以及连接状态数据; 通讯事务:通讯事务由数据准备并发送一一数据接受并分析一一连接状态更新这几个步骤组成,其中前两个步骤涉及一系列通讯数据操作,而第三个步骤存在连接状态数据的更新,同样,在一个通讯事务过程中不允许访问任何本地数据; 控制流的每一个轮次均由通讯事务和数据事务组成,如果一个轮次的通讯是正常的,控制流在通讯事务中成功的完成了上一个状态的数据的发送,而连接状态数据保持不变,并且通过完成数据事务而将本地数据更新到下一个状态;如果在通讯事 The number of temporary data to be analyzed and a transceiver used in the process; atomic transaction is a process can not be divided by a set of operations consisting of the transaction are two types: transaction data: transaction complete data set by a pair of local data operation, of which the operation does not involve any communication, that is, in a transaction not allow access to any data communication connection data and status data; communications: communications and sent eleven data by the data is ready to accept and update this article analyzes the connection status of several steps, the first two steps wherein the data communication involves a series of operations, and a third step of updating the presence status data connection, similarly, does not allow any access to a local data communication transaction in process; controlling the flow of each wheel and secondary data transaction by transaction communication composition, if a round of communications is normal, the control flow in the communication transaction successfully completed sending data on a state, the connection state data remains unchanged, and by the completion of the data the transaction will update the local data to the next state; if the communication thing 务中出现了问题而无法有效传输数据,进而切换到备用连接,那么连接状态数据将随之做相应的更新,但在同一个轮次接下来的数据事务中不允许修改任何本地数据,本地数据将保持为前一个状态不变; 即通讯数据和非通讯数据隔离; 每一轮次传输数据的同时将数据的状态标识携带传输,而收发双方只要比较各次传输来的数据携带的状态标识就可以确定是否有数据丢失或者数据重复。 Service in there is a problem and can not effectively transmit data, and then switch to the backup connection, then the connection state data will subsequently be updated accordingly, but not modify any local data in the same round the next transaction data, local data will remain the same as the previous state; that is, data communication and non-communication data isolation; at the same time each round of data transmissions will carry a state identification data transmission, and sending and receiving sides only to compare the various secondary data transmission to carry state identification on you can determine whether there is data loss or duplication of data.
CN 201210372609 2012-09-29 2012-09-29 One of the protocols are not reset without perturbation hot spare connection method bis CN102843265B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201210372609 CN102843265B (en) 2012-09-29 2012-09-29 One of the protocols are not reset without perturbation hot spare connection method bis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201210372609 CN102843265B (en) 2012-09-29 2012-09-29 One of the protocols are not reset without perturbation hot spare connection method bis

Publications (2)

Publication Number Publication Date
CN102843265A true CN102843265A (en) 2012-12-26
CN102843265B true CN102843265B (en) 2016-03-30

Family

ID=47370342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201210372609 CN102843265B (en) 2012-09-29 2012-09-29 One of the protocols are not reset without perturbation hot spare connection method bis

Country Status (1)

Country Link
CN (1) CN102843265B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0732654A1 (en) * 1995-03-16 1996-09-18 ABB PATENT GmbH Method for fault-tolerant communication under real-time conditions
CN1988400A (en) * 2005-12-23 2007-06-27 中兴通讯股份有限公司 Master and slave converting method for communication link circuit
CN102407868A (en) * 2011-09-29 2012-04-11 南京国电南自轨道交通工程有限公司 Hot-standby dual-connection method suitable for communication protocol of modern monitoring system of rail transit
CN102508430A (en) * 2011-09-29 2012-06-20 南京国电南自轨道交通工程有限公司 Reconnection method applicable to communication protocols of modern monitoring system for rail transit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0732654A1 (en) * 1995-03-16 1996-09-18 ABB PATENT GmbH Method for fault-tolerant communication under real-time conditions
CN1988400A (en) * 2005-12-23 2007-06-27 中兴通讯股份有限公司 Master and slave converting method for communication link circuit
CN102407868A (en) * 2011-09-29 2012-04-11 南京国电南自轨道交通工程有限公司 Hot-standby dual-connection method suitable for communication protocol of modern monitoring system of rail transit
CN102508430A (en) * 2011-09-29 2012-06-20 南京国电南自轨道交通工程有限公司 Reconnection method applicable to communication protocols of modern monitoring system for rail transit

Also Published As

Publication number Publication date Type
CN102843265A (en) 2012-12-26 application

Similar Documents

Publication Publication Date Title
US6141785A (en) Error control method for multiparty multimedia communications
US20130268590A1 (en) System and method for reducing information loss in an aggregated information handling system
CN1812361A (en) Fast ring network protecting method and system
CN101110663A (en) Method, system and device for implementing periodic line failure processing
CN101030959A (en) Telecommunication for determining realtime Ethernet transmission
CN101026798A (en) Iub interface business transmission method and device based on IP transmission
CN1545268A (en) A method and system for Ethernet interface node backup
CN101136730A (en) Credible synchronization method of distributed network equipment
CN102098201A (en) Method for realizing L2TP user access backup and network system
CN101651960A (en) Protection method and device of link condensation bandwidth based on LACP
US20130244590A1 (en) Apparatus and methods for mitigating protocol-induced back-offs in a communication network
CN1949767A (en) Method for switching master-slave back-up route apparatus based on virtual router redundant protocol
CN101247568A (en) Data fault-tolerance system and method and intermediate equipment
CN1558638A (en) An inter-processor communication method based on message
CN101286940A (en) Dual-redundant CAN bus communication system and communicating method thereof
CN101079759A (en) Distributed bidirectional forwarding detection method and device
CN101355515A (en) Method for restarting link polymerize control protocol with elegance
CN101183984A (en) Network management system, management method and equipment
CN101707495A (en) MIL-STD-1553B bus termination and redundancy backup method thereof
CN1512675A (en) Conversion method for main and spare communication channels
CN101150430A (en) A method for realizing network interface board switching based heartbeat mechanism
CN1992966A (en) Private wireless link reconfigured method with renewable activation time
CN102752093A (en) Distributed file system-based data processing method, device and system
CN101005394A (en) Method and system for protecting multicast repeat path and service router
CN101217353A (en) A control method on multi-point dual redundancy system of call center

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model