CN103248499B - Information interaction method and system - Google Patents

Information interaction method and system Download PDF

Info

Publication number
CN103248499B
CN103248499B CN201310102655.5A CN201310102655A CN103248499B CN 103248499 B CN103248499 B CN 103248499B CN 201310102655 A CN201310102655 A CN 201310102655A CN 103248499 B CN103248499 B CN 103248499B
Authority
CN
China
Prior art keywords
central control
control device
log file
module
auxiliary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201310102655.5A
Other languages
Chinese (zh)
Other versions
CN103248499A (en
Inventor
张俊丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanxi Skmax Source Media Technology Co ltd
Original Assignee
TVMining Beijing Media Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TVMining Beijing Media Technology Co Ltd filed Critical TVMining Beijing Media Technology Co Ltd
Priority to CN201310102655.5A priority Critical patent/CN103248499B/en
Publication of CN103248499A publication Critical patent/CN103248499A/en
Application granted granted Critical
Publication of CN103248499B publication Critical patent/CN103248499B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种信息交互的方法和系统,该方法包括启动主中央控制装置和辅中央控制装置;主/辅中央控制装置的转发模块与终端进行指令的交互;主/辅中央控制装置的转发模块将自己与终端交互的指令加上时间戳和标号后发送给主/辅中央控制装置的指令管理模块;主/辅中央控制装置的指令管理模块将收到的加上时间戳和标号的指令,发送给主/辅中央控制装置的日志文件模块;主中央控制装置的转发模块和辅中央控制装置的转发模块之间对自己转发的指令相互进行同步。本发明技术方案在主中央控制装置正常工作时或者发生故障时,都能够与辅中央控制装置之间实现精确地同步,提高了系统的可靠性。

The present invention provides a method and system for information interaction. The method includes starting the main central control device and the auxiliary central control device; the forwarding module of the main/auxiliary central control device interacts with the terminal; the forwarding module of the main/auxiliary central control device The module sends time stamp and label to the instruction management module of the main/auxiliary central control device after it interacts with the terminal; the instruction management module of the main/auxiliary central control device will , sent to the log file module of the primary/secondary central control device; the forwarding module of the primary central control device and the forwarding module of the secondary central control device synchronize their forwarded instructions with each other. The technical scheme of the present invention can realize precise synchronization with the auxiliary central control device when the main central control device is working normally or when a failure occurs, thereby improving the reliability of the system.

Description

一种信息交互的方法和系统A method and system for information interaction

技术领域technical field

本发明涉及会议系统技术领域,尤其涉及一种信息交互的方法和系统。The present invention relates to the technical field of conference systems, in particular to an information interaction method and system.

背景技术Background technique

目前,会议是任何一个政府、企业、教育机构最为频繁的工作活动之一,几乎所有的工作结论、决策、教授都是通过在会议中进行讲解、演示、分析、讨论、达成共识而最终得出的。因此,一场会议的质量将直接影响工作效率、目标方向、会议成果,甚至是经营管理的业绩。At present, meetings are one of the most frequent work activities of any government, enterprise, and educational institution. Almost all work conclusions, decisions, and professors are finally reached through explanations, demonstrations, analysis, discussions, and consensus reached in meetings. of. Therefore, the quality of a meeting will directly affect work efficiency, goal direction, meeting results, and even management performance.

为此提出了一种用于会议系统功能的信息交互系统,该系统中的中央控制装置和终端通过局域网连接。该局域网可以是WIFI网络,或者是其他类型局域网络,中央控制装置之间通过有线网络连接,终端的种类可以多种多样,例如手机、PAD、计算机、显示屏等。Therefore, an information interaction system for conference system functions is proposed, in which the central control device and the terminal are connected through a local area network. The local area network can be a WIFI network or other types of local area network. The central control devices are connected through a wired network, and the types of terminals can be various, such as mobile phones, PADs, computers, display screens, etc.

在这两个中央控制装置的广播模块广播的登录信息中增加中央控制装置身份信息字段。通过其中一个中央控制装置的WEB后台模块将该中央控制装置的广播模块广播的中央控制装置身份信息字段设置为主中央控制装置,则这个中央控制装置为主中央控制装置。通过其中一个中央控制装置的WEB后台模块将该中央控制装置的广播模块广播的中央控制装置身份信息字段设置为辅中央控制装置,则这个中央控制装置为辅中央控制装置。The identity information field of the central control device is added to the login information broadcast by the broadcast modules of the two central control devices. If the central control device identity information field broadcast by the broadcast module of one of the central control devices is set as the main central control device through the WEB background module of the central control device, then this central control device is the main central control device. If the WEB background module of one of the central control devices sets the central control device identity information field broadcast by the broadcast module of the central control device as an auxiliary central control device, then this central control device is an auxiliary central control device.

主中央控制装置和辅中央控制装置启动后,主中央控制装置监听本网段的广播信息,获取辅中央控制装置的地址,主中央控制装置与辅中央控制装置建立连接。After the main central control device and the auxiliary central control device are started, the main central control device monitors the broadcast information of the network segment to obtain the address of the auxiliary central control device, and the main central control device establishes a connection with the auxiliary central control device.

主中央控制装置通过局域网与终端进行信息交互,主中央控制装置并将信息交互同步到辅中央控制装置。The main central control device exchanges information with the terminal through the local area network, and the main central control device synchronizes the information interaction to the auxiliary central control device.

当主中央控制装置发生故障或者终端与主中央控制装置的通信发生故障时,终端与主中央控制装置断开连接,终端与辅中央控制装置建立连接,进行信息交互,辅中央控制装置将该信息交互同步到主中央控制装置。When the main central control device fails or the communication between the terminal and the main central control device fails, the terminal is disconnected from the main central control device, and the terminal establishes a connection with the auxiliary central control device for information exchange, and the auxiliary central control device exchanges the information Sync to main central control unit.

上述信息交互系统中并没有提到主中央控制装置和辅中央控制装置之间如何实现同步,两者同步的效果之间影响到主中央控制装置和辅中央控制装置对终端的服务,如果没有精确同步,会给终端获取服务带来巨大的障碍。The information interaction system mentioned above does not mention how to achieve synchronization between the main central control device and the auxiliary central control device. Synchronization will bring huge obstacles for terminals to obtain services.

发明内容Contents of the invention

本发明的目的在于克服现有技术的缺点和不足,提供一种信息交互的方法和系统,能够在主中央控制装置正常工作时或者发生故障时,都能够与辅中央控制装置之间实现精确地同步,提高了系统的可靠性。The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and to provide a method and system for information interaction, which can accurately communicate with the auxiliary central control device when the main central control device is working normally or when a fault occurs. Synchronization improves the reliability of the system.

本发明的一个实施例提供了一种信息交互的方法,适用在一个局域网的网段内,包括以下步骤:An embodiment of the present invention provides a method for information interaction, which is applicable to a network segment of a local area network, comprising the following steps:

启动主中央控制装置和辅中央控制装置;Activate the main central control unit and the auxiliary central control unit;

主中央控制装置的转发模块或者辅中央控制装置的转发模块与终端进行指令的交互;The forwarding module of the main central control device or the forwarding module of the auxiliary central control device interacts with the terminal for instructions;

主中央控制装置的转发模块将自己与终端交互的指令加上时间戳和标号后发送给主中央控制装置的指令管理模块,或者辅中央控制装置的转发模块将自己与终端交互的指令加上时间戳和标号后发送给辅中央控制装置的指令管理模块;The forwarding module of the main central control device adds time stamp and label to the command management module of the main central control device, or the forwarding module of the auxiliary central control device adds time to the command interacting with the terminal After stamping and labeling, it is sent to the command management module of the auxiliary central control device;

主中央控制装置的指令管理模块将收到的加上时间戳和标号的指令,发送给主中央控制装置的日志文件模块,辅中央控制装置的指令管理模块将收到的加上时间戳和标号的指令,发送给辅中央控制装置的日志文件模块;The command management module of the main central control device sends the received commands with time stamps and labels to the log file module of the main central control device, and the command management module of the auxiliary central control device adds time stamps and labels to the received commands. The instruction is sent to the log file module of the auxiliary central control device;

主中央控制装置的转发模块和辅中央控制装置的转发模块之间对自己转发的指令相互进行同步。The forwarding module of the main central control device and the forwarding module of the auxiliary central control device synchronize their forwarded instructions with each other.

优选地,还包括以下步骤:Preferably, the following steps are also included:

当主中央控制装置与辅中央控制装置重新建立连接时,主中央控制装置的日志文件模块与辅中央控制装置的日志文件模块建立连接;When the main central control device re-establishes a connection with the auxiliary central control device, the log file module of the main central control device establishes a connection with the log file module of the auxiliary central control device;

主中央控制装置和辅中央控制装置分别读取自己最新日志文件中的最后一条记录的时间戳和标号,并与对方的最新日志文件中的最后一条记录的时间戳和标号进行比较,判断谁的指令缺失;The main central control device and the auxiliary central control device respectively read the timestamp and label of the last record in their latest log file, and compare it with the timestamp and label of the last record in the latest log file of the other party to determine whose Missing instructions;

缺失指令的中央控制装置从对方的日志文件中恢复缺失的指令。The central control device of the missing command restores the missing command from the log file of the other party.

优选地,还包括以下步骤:Preferably, the following steps are also included:

主中央控制装置的指令管理模块与辅中央控制装置的指令管理模块通过心跳的方式判断对方是否异常,如果发生异常,主中央控制装置与辅中央控制装置重新建立连接。The command management module of the main central control device and the command management module of the auxiliary central control device judge whether the other party is abnormal by means of heartbeats. If abnormality occurs, the main central control device and the auxiliary central control device re-establish a connection.

优选地,还包括以下步骤:Preferably, the following steps are also included:

缺失指令的中央控制装置从对方的日志文件中恢复缺失的指令的时候,主中央控制装置或者辅中央控制装置将产生的新指令进行缓存;When the central control device of the missing command restores the missing command from the log file of the other party, the main central control device or the auxiliary central control device caches the new command generated;

主中央控制装置或者辅中央控制装置将产生的新指令发送给对方进行同步。The main central control device or the auxiliary central control device sends the generated new instructions to the other party for synchronization.

所述缺失指令的中央控制装置从对方的日志文件中恢复缺失的指令,进一步包括以下步骤:The central control device of the missing instruction restores the missing instruction from the log file of the other party, further comprising the following steps:

未缺失指令的中央控制装置将日志文件发送给缺失指令的中央控制装置,The central control device with no missing instructions sends the log file to the central control device with missing instructions,

缺失指令的中央控制装置收到日志文件,写入日志文件模块。The central control device of the missing command receives the log file and writes it into the log file module.

优选地,主中央控制装置与辅中央控制装置之间通过NTP校时服务将两者之间的系统时间误差控制在0.5秒之内。Preferably, the system time error between the main central control device and the auxiliary central control device is controlled within 0.5 seconds through the NTP time calibration service.

优选地,日志文件模块中每个指令都设置一个标号,每日的指令生成一个日志文件,日志文件以日期命名。Preferably, each command in the log file module is provided with a label, and a daily command generates a log file, and the log file is named after a date.

本发明的另一个实施例提供了一种信息交互的系统,包括主中央控制装置、辅中央控制装置和终端,所述主中央控制装置、辅中央控制装置和终端位于一个局域网的网段内,主中央控制装置进一步包括转发模块、指令管理模块和日志文件模块,辅中央控制装置进一步包括转发模块、指令管理模块和日志文件模块,其中,Another embodiment of the present invention provides an information interaction system, including a main central control device, an auxiliary central control device and a terminal, the main central control device, auxiliary central control device and terminal are located in a network segment of a local area network, The main central control device further includes a forwarding module, an instruction management module and a log file module, and the auxiliary central control device further includes a forwarding module, an instruction management module and a log file module, wherein,

主中央控制装置的转发模块用于与终端进行指令的交互,给指令加上时间戳和标号,并将指令转发给指令管理模块和辅中央控制装置;The forwarding module of the main central control device is used to interact with the terminal, add a time stamp and a label to the command, and forward the command to the command management module and the auxiliary central control device;

主中央控制装置的指令管理模块用于从转发模块获取加上时间戳和标号的指令,并发送给日志文件模块;The command management module of the main central control device is used to obtain the time-stamped and labeled commands from the forwarding module and send them to the log file module;

主中央控制装置的日志文件模块用于存储主中央控制装置和辅中央控制装置转发指令的两个日志文件;The log file module of the main central control device is used to store two log files of the forwarding instructions of the main central control device and the auxiliary central control device;

辅中央控制装置的转发模块用于在主中央控制装置发生故障时与终端进行指令的交互,给指令加上时间戳和标号,并将指令转发给指令管理模块和主中央控制装置;The forwarding module of the auxiliary central control device is used to interact with the terminal when the main central control device fails, to add a time stamp and label to the command, and to forward the command to the command management module and the main central control device;

辅中央控制装置的指令管理模块用于从转发模块获取加上时间戳和标号的指令,并发送给日志文件模块;The command management module of the auxiliary central control device is used to obtain the time-stamped and labeled commands from the forwarding module and send them to the log file module;

辅中央控制装置的日志文件模块用于存储辅中央控制装置和主中央控制装置转发指令的两个日志文件。The log file module of the auxiliary central control device is used to store two log files of forwarding instructions of the auxiliary central control device and the main central control device.

优选地,主中央控制装置的日志文件模块还用于与辅中央控制装置的日志文件模块建立连接;Preferably, the log file module of the main central control device is also used to establish a connection with the log file module of the auxiliary central control device;

主中央控制装置或者辅中央控制装置的日志文件模块还用于分别读取自己最新日志文件中的最后一条记录的时间戳和标号,并与对方的最新日志文件中的最后一条记录的时间戳和标号进行比较,判断谁的指令缺失;The log file module of the main central control device or the auxiliary central control device is also used to read the timestamp and label of the last record in its latest log file respectively, and compare it with the timestamp and label of the last record in the latest log file of the other party. Labels are compared to determine whose instruction is missing;

主中央控制装置或者辅中央控制装置的日志文件模块还用于从对方的日志文件中恢复缺失的指令。The log file module of the main central control device or the auxiliary central control device is also used to recover missing instructions from the log file of the other party.

优选地,主中央控制装置的指令管理模块还用于与辅中央控制装置的指令管理模块通过心跳的方式判断对方是否异常。Preferably, the command management module of the main central control device is also used to determine whether the other party is abnormal with the command management module of the auxiliary central control device by way of heartbeat.

优选地,主中央控制装置还包括缓存,用于存储恢复缺失的指令的时候产生的新指令;Preferably, the main central control device also includes a cache for storing new instructions generated when restoring missing instructions;

辅中央控制装置还包括缓存,用于存储恢复缺失的指令的时候产生的新指令。The auxiliary central control device also includes a cache for storing new instructions generated when restoring missing instructions.

本发明由于采用了日志文件来对主中央控制装置和辅中央控制装置之间实现指令的同步,而且采取了实时指令的同步和日志文件同步,因此在主中央控制装置正常工作时或者发生故障时,都能够与辅中央控制装置之间实现精确地同步,提高了系统的可靠性。Since the present invention uses log files to realize the synchronization of instructions between the main central control device and the auxiliary central control device, and adopts the synchronization of real-time instructions and the synchronization of log files, when the main central control device works normally or fails , can be accurately synchronized with the auxiliary central control device, which improves the reliability of the system.

附图说明Description of drawings

图1为本发明实施例提供的信息交互流程图;FIG. 1 is a flow chart of information interaction provided by an embodiment of the present invention;

图2为本发明实施例提供的信息交互系统结构示意图。Fig. 2 is a schematic structural diagram of an information interaction system provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图对本发明的具体实施方式进行详细描述。但本发明的实施方式不限于此。Specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited thereto.

图1为本发明实施例提供的信息交互流程图。如图1所示,该信息交互流程包括以下步骤:FIG. 1 is a flowchart of information interaction provided by an embodiment of the present invention. As shown in Figure 1, the information interaction process includes the following steps:

步骤101、在一个局域网的网段中,设置主中央控制装置、辅中央控制装置和多个终端,该局域网可以是WIFI网络,或者是其他类型局域网络,主中央控制装置和辅中央控制装置之间通过有线网络连接。Step 101, in a network segment of a local area network, set the main central control device, auxiliary central control device and multiple terminals, the local area network can be a WIFI network, or other types of local area networks, between the main central control device and the auxiliary central control device connected via a wired network.

步骤102、启动主中央控制装置和辅中央控制装置。Step 102, start the main central control device and the auxiliary central control device.

步骤103、主中央控制装置的转发模块与终端进行指令的交互。Step 103, the forwarding module of the main central control device interacts with the terminal for instructions.

步骤104、主中央控制装置的转发模块将自己与终端交互的指令加上时间戳和标号后发送给主中央控制装置的指令管理模块,并同步发送给辅中央控制装置。Step 104: The forwarding module of the main central control device adds time stamps and labels to the command management module of the main central control device, and synchronously sends it to the auxiliary central control device.

主中央控制装置的转发模块和辅中央控制装置的转发模块都有自己的标号管理,经过主中央控制装置的转发模块转发的指令在写入日志的时候,前面顺序的加上M1、M2、M3...标号,经过辅中央控制装置的转发模块转发的指令会在写入日志的时候,前面顺序的加上S1、S2、S3...,用于指令的同步和找回。The forwarding module of the main central control device and the forwarding module of the auxiliary central control device have their own label management. When the instructions forwarded by the forwarding module of the main central control device are written into the log, M1, M2, and M3 are added in front of them in order ... labels, when the instructions forwarded by the forwarding module of the auxiliary central control device are written into the log, S1, S2, S3... are sequentially added to the front for synchronization and retrieval of the instructions.

主中央控制装置与辅中央控制装置之间通过NTP校时服务将两者之间的系统时间误差控制在0.5秒之内。The system time error between the main central control device and the auxiliary central control device is controlled within 0.5 seconds through the NTP time calibration service.

步骤105、主中央控制装置的指令管理模块将收到的加上时间戳和标号的指令,发送给主中央控制装置的日志文件模块。Step 105, the command management module of the main central control device sends the received command with time stamp and label to the log file module of the main central control device.

日志文件模块中存储两个日志文件,一个日志文件存储主中央控制装置的转发指令,一个日志文件存储辅中央控制装置的转发指令。同步时,将对这两个日志文件都进行同步。Two log files are stored in the log file module, one log file stores the forwarding instructions of the main central control device, and the other log file stores the forwarding instructions of the auxiliary central control device. When synchronizing, both log files are synchronized.

日志文件模块中每个指令都设置一个标号,以日为单位,每日的指令生成一个日志文件,日志文件以日期命名。Each instruction in the log file module is set with a label, and the daily instruction generates a log file, and the log file is named after the date.

步骤106、当主中央控制装置发生故障后,辅中央控制装置的转发模块与终端连接,进行指令的交互,辅中央控制装置的转发模块将自己与终端交互的指令加上时间戳和标号后发送给辅中央控制装置的指令管理模块,辅中央控制装置的指令管理模块将收到的加上时间戳和标号的指令,发送给辅中央控制装置的日志文件模块。Step 106: When the main central control device fails, the forwarding module of the auxiliary central control device is connected to the terminal to perform instruction interaction, and the forwarding module of the auxiliary central control device adds a time stamp and a label to the instruction for interacting with the terminal and sends it to The instruction management module of the auxiliary central control device sends the received instructions with time stamps and labels to the log file module of the auxiliary central control device.

日志文件模块中存储两个日志文件,一个日志文件存储辅中央控制装置的转发指令,一个日志文件存储主中央控制装置的转发指令。Two log files are stored in the log file module, one log file stores the forwarding instructions of the auxiliary central control device, and the other log file stores the forwarding instructions of the main central control device.

步骤107、主中央控制装置的指令管理模块与辅中央控制装置的指令管理模块通过心跳的方式判断对方是否异常,如果发生异常,主中央控制装置与辅中央控制装置重新建立连接。Step 107, the command management module of the main central control device and the command management module of the auxiliary central control device judge whether the other party is abnormal through heartbeat, and if abnormality occurs, the main central control device and the auxiliary central control device re-establish a connection.

步骤108、当主中央控制装置与辅中央控制装置重新建立连接时,主中央控制装置的日志文件模块与辅中央控制装置的日志文件模块建立连接,主中央控制装置和辅中央控制装置分别读取自己存储的最新日志文件中的最后一条记录的时间戳和标号,并与对方存储的最新日志文件中的最后一条记录的时间戳和标号进行比较,可以判断出主中央控制装置的指令缺失。Step 108, when the main central control device re-establishes a connection with the auxiliary central control device, the log file module of the main central control device establishes a connection with the log file module of the auxiliary central control device, and the main central control device and the auxiliary central control device respectively read their own The timestamp and label of the last record in the latest log file stored and compared with the timestamp and label of the last record in the latest log file stored by the other party can determine that the instruction of the main central control device is missing.

步骤109、主中央控制装置从辅中央控制装置的日志文件中恢复缺失的指令。即辅中央控制装置将自己的日志文件发送给主中央控制装置,主中央控制装置从收到的日志文件中获取自己缺失的指令,写入自己的日志文件中。Step 109, the main central control device restores missing instructions from the log file of the auxiliary central control device. That is, the auxiliary central control device sends its own log file to the main central control device, and the main central control device obtains the missing instructions from the received log file and writes them into its own log file.

其中,在主中央控制装置从对方的日志文件中恢复缺失的指令的时候,辅中央控制装置的日志文件模块正在被读出,无法进行写操作,所以只能将产生的新指令进行缓存,同时发送给主中央控制装置,主中央控制装置收到指令,存储到缓存中,待恢复完成后,将指令写入日志文件中。Wherein, when the main central control device restores the missing command from the log file of the other party, the log file module of the auxiliary central control device is being read out and cannot be written, so the new command generated can only be cached, and at the same time Send to the main central control device, the main central control device receives the instruction, stores it in the cache, and writes the instruction into the log file after the restoration is completed.

为了实现上述流程,本发明的实施例还提供了一种信息交互的系统。图2为本发明实施例提供的信息交互系统结构示意图。如图2所示,该系统包括主中央控制装置2、辅中央控制装置3和终端4,该主中央控制装置、辅中央控制装置和多个终端位于一个局域网5的网段内,主中央控制装置和辅中央控制装置通过有线网络连接。In order to realize the above process, an embodiment of the present invention also provides an information interaction system. Fig. 2 is a schematic structural diagram of an information interaction system provided by an embodiment of the present invention. As shown in Figure 2, the system includes a main central control device 2, an auxiliary central control device 3 and a terminal 4, the main central control device, the auxiliary central control device and a plurality of terminals are located in a network segment of a local area network 5, and the main central control device The device and the auxiliary central control device are connected through a wired network.

主中央控制装置进一步包括转发模块201、指令管理模块202和日志文件模块203,该指令管理模块进一步包括缓存204,辅中央控制装置进一步包括转发模块301、指令管理模块302和日志文件模块303,该指令管理模块进一步包括缓存304。The main central control device further includes a forwarding module 201, an instruction management module 202 and a log file module 203, the instruction management module further includes a cache 204, and the auxiliary central control device further includes a forwarding module 301, an instruction management module 302 and a log file module 303, the The instruction management module further includes a cache 304 .

主中央控制装置的转发模块与终端进行指令的交互,给指令加上时间戳和标号,并将指令转发给指令管理模块和辅中央控制装置。The forwarding module of the main central control device interacts with the terminal, adds time stamp and label to the command, and forwards the command to the command management module and the auxiliary central control device.

主中央控制装置的指令管理模块从转发模块获取加上时间戳和标号的指令,并发送给日志文件模块。The command management module of the main central control device obtains the command with time stamp and label from the forwarding module, and sends it to the log file module.

主中央控制装置的日志文件模块存储主中央控制装置和辅中央控制装置转发指令的两个日志文件。The log file module of the main central control device stores two log files of forwarding instructions of the main central control device and the auxiliary central control device.

辅中央控制装置的转发模块在主中央控制装置发生故障时与终端进行指令的交互,给指令加上时间戳和标号,并将指令转发给指令管理模块和主中央控制装置。The forwarding module of the auxiliary central control device interacts with the terminal when the main central control device fails, adds a time stamp and label to the command, and forwards the command to the command management module and the main central control device.

辅中央控制装置的指令管理模块从转发模块获取加上时间戳和标号的指令,并发送给日志文件模块。The command management module of the auxiliary central control device obtains the command with time stamp and label from the forwarding module, and sends it to the log file module.

辅中央控制装置的日志文件模块用于存储辅中央控制装置和主中央控制装置转发指令的两个日志文件。The log file module of the auxiliary central control device is used to store two log files of forwarding instructions of the auxiliary central control device and the main central control device.

主中央控制装置的日志文件模块与辅中央控制装置的日志文件模块建立连接。The log file module of the main central control device establishes a connection with the log file module of the auxiliary central control device.

主中央控制装置日志文件模块或者辅中央控制装置的日志文件模块还分别读取自己存储的最新日志文件中的最后一条记录的时间戳和标号,并与对方存储的最新日志文件中的最后一条记录的时间戳和标号进行比较,判断谁的指令缺失,从对方的日志文件中恢复缺失的指令。The log file module of the main central control device or the log file module of the auxiliary central control device also reads the timestamp and the label of the last record in the latest log file stored by itself, and compares it with the last record in the latest log file stored by the other party. Compare the time stamp and label of the server to determine whose instruction is missing, and restore the missing instruction from the other party's log file.

主中央控制装置的指令管理模块与辅中央控制装置的指令管理模块通过心跳的方式判断对方是否异常。The command management module of the main central control device and the command management module of the auxiliary central control device determine whether the other party is abnormal by way of heartbeat.

主中央控制装置的缓存存储恢复缺失的指令的时候产生的新指令。The cache memory of the master central control unit stores new instructions generated while restoring missing instructions.

辅中央控制装置的缓存存储恢复缺失的指令的时候产生的新指令。The cache of the secondary central control unit stores new instructions generated when restoring missing instructions.

上述实施例由于采用了日志文件来对主中央控制装置和辅中央控制装置之间实现指令的同步,而且采取了实时指令的同步和日志文件同步,因此在主中央控制装置正常工作时或者发生故障时,都能够与辅中央控制装置之间实现精确地同步,提高了系统的可靠性。The above-described embodiment uses the log file to realize the synchronization of instructions between the main central control device and the auxiliary central control device, and adopts the synchronization of real-time instructions and log file synchronization, so when the main central control device is working normally or fails It can realize accurate synchronization with the auxiliary central control device, which improves the reliability of the system.

上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受上述实施例的限制,其他的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。The above-mentioned embodiment is a preferred embodiment of the present invention, but the embodiment of the present invention is not limited by the above-mentioned embodiment, and any other changes, modifications, substitutions, combinations, Simplifications should be equivalent replacement methods, and all are included in the protection scope of the present invention.

Claims (11)

1.一种信息交互的方法,适用在一个局域网的网段内,其特征在于,包括以下步骤:1. A method for information interaction, which is applicable to a network segment of a local area network, is characterized in that, comprising the following steps: 启动主中央控制装置和辅中央控制装置;Activate the main central control unit and the auxiliary central control unit; 主中央控制装置的转发模块或者辅中央控制装置的转发模块与终端进行指令的交互;The forwarding module of the main central control device or the forwarding module of the auxiliary central control device interacts with the terminal for instructions; 主中央控制装置的转发模块与终端进行指令的交互,给指令加上时间戳和标号,并将指令转发给指令管理模块和辅中央控制装置,或者辅中央控制装置的转发模块在主中央控制装置发生故障时与终端进行指令的交互,给指令加上时间戳和标号,并将指令转发给指令管理模块和主中央控制装置;The forwarding module of the main central control device interacts with the terminal, adds time stamp and label to the command, and forwards the command to the command management module and the auxiliary central control device, or the forwarding module of the auxiliary central control device is in the main central control device When a failure occurs, interact with the terminal command, add a time stamp and label to the command, and forward the command to the command management module and the main central control device; 主中央控制装置的指令管理模块将收到的加上时间戳和标号的指令,发送给主中央控制装置的日志文件模块,辅中央控制装置的指令管理模块将收到的加上时间戳和标号的指令,发送给辅中央控制装置的日志文件模块。The command management module of the main central control device sends the received commands with time stamps and labels to the log file module of the main central control device, and the command management module of the auxiliary central control device adds time stamps and labels to the received commands. The command is sent to the log file module of the auxiliary central control device. 2.根据权利要求1所述的一种信息交互的方法,其特征在于,还包括以下步骤:2. A method for information interaction according to claim 1, further comprising the following steps: 当主中央控制装置与辅中央控制装置重新建立连接时,主中央控制装置的日志文件模块与辅中央控制装置的日志文件模块建立连接;When the main central control device re-establishes a connection with the auxiliary central control device, the log file module of the main central control device establishes a connection with the log file module of the auxiliary central control device; 主中央控制装置和辅中央控制装置分别读取自己最新日志文件中的最后一条记录的时间戳和标号,并与对方的最新日志文件中的最后一条记录的时间戳和标号进行比较,判断谁的指令缺失;The main central control device and the auxiliary central control device respectively read the timestamp and label of the last record in their latest log file, and compare it with the timestamp and label of the last record in the latest log file of the other party to determine whose Missing instructions; 缺失指令的中央控制装置从对方的日志文件中恢复缺失的指令。The central control device of the missing command restores the missing command from the log file of the other party. 3.根据权利要求2所述的一种信息交互的方法,其特征在于,还包括以下步骤:3. A method for information interaction according to claim 2, further comprising the following steps: 主中央控制装置的指令管理模块与辅中央控制装置的指令管理模块通过心跳的方式判断对方是否异常,如果发生异常,主中央控制装置与辅中央控制装置重新建立连接。The command management module of the main central control device and the command management module of the auxiliary central control device judge whether the other party is abnormal by means of heartbeats. If abnormality occurs, the main central control device and the auxiliary central control device re-establish a connection. 4.根据权利要求2所述的一种信息交互的方法,其特征在于,还包括以下步骤:4. A method for information interaction according to claim 2, further comprising the following steps: 缺失指令的中央控制装置从对方的日志文件中恢复缺失的指令的时候,主中央控制装置或者辅中央控制装置将产生的新指令进行缓存;When the central control device of the missing command restores the missing command from the log file of the other party, the main central control device or the auxiliary central control device caches the new command generated; 主中央控制装置或者辅中央控制装置将产生的新指令发送给对方进行同步。The main central control device or the auxiliary central control device sends the generated new instructions to the other party for synchronization. 5.根据权利要求2所述的一种信息交互的方法,其特征在于,所述缺失指令的中央控制装置从对方的日志文件中恢复缺失的指令,进一步包括以下步骤:5. A method for information interaction according to claim 2, wherein the central control device for the missing instruction restores the missing instruction from the other party's log file, further comprising the following steps: 未缺失指令的中央控制装置将日志文件发送给缺失指令的中央控制装置;The central control device with no missing instructions sends the log file to the central control device with missing instructions; 缺失指令的中央控制装置收到日志文件,写入日志文件模块。The central control device of the missing command receives the log file and writes it into the log file module. 6.根据权利要求2所述的一种信息交互的方法,其特征在于,主中央控制装置与辅中央控制装置之间通过NTP校时服务将两者之间的系统时间误差控制在0.5秒之内。6. A method for information interaction according to claim 2, characterized in that, between the main central control device and the auxiliary central control device, the system time error between the two is controlled within 0.5 seconds through the NTP time calibration service Inside. 7.根据权利要求1-6中任一权利要求所述的一种信息交互的方法,其特征在于,日志文件模块中每个指令都设置一个标号,每日的指令生成一个日志文件,日志文件以日期命名。7. A method for information interaction according to any one of claims 1-6, wherein a label is set for each instruction in the log file module, and a daily instruction generates a log file, and the log file named after the date. 8.一种信息交互的系统,包括主中央控制装置、辅中央控制装置和终端,所述主中央控制装置、辅中央控制装置和终端位于一个局域网的网段内,其特征在于,主中央控制装置进一步包括转发模块、指令管理模块和日志文件模块,辅中央控制装置进一步包括转发模块、指令管理模块和日志文件模块,其中,8. A system for information interaction, comprising a main central control device, an auxiliary central control device and a terminal, wherein the main central control device, the auxiliary central control device and the terminal are located in a network segment of a local area network, and it is characterized in that the main central control device The device further includes a forwarding module, an instruction management module and a log file module, and the auxiliary central control device further includes a forwarding module, an instruction management module and a log file module, wherein, 主中央控制装置的转发模块用于与终端进行指令的交互,给指令加上时间戳和标号,并将指令转发给指令管理模块和辅中央控制装置;The forwarding module of the main central control device is used to interact with the terminal, add a time stamp and a label to the command, and forward the command to the command management module and the auxiliary central control device; 主中央控制装置的指令管理模块用于从转发模块获取加上时间戳和标号的指令,并发送给日志文件模块;The command management module of the main central control device is used to obtain the time-stamped and labeled commands from the forwarding module and send them to the log file module; 主中央控制装置的日志文件模块用于存储主中央控制装置和辅中央控制装置转发指令的两个日志文件;The log file module of the main central control device is used to store two log files of the forwarding instructions of the main central control device and the auxiliary central control device; 辅中央控制装置的转发模块用于在主中央控制装置发生故障时与终端进行指令的交互,给指令加上时间戳和标号,并将指令转发给指令管理模块和主中央控制装置;The forwarding module of the auxiliary central control device is used to interact with the terminal when the main central control device fails, add a time stamp and label to the command, and forward the command to the command management module and the main central control device; 辅中央控制装置的指令管理模块用于从转发模块获取加上时间戳和标号的指令,并发送给日志文件模块;The command management module of the auxiliary central control device is used to obtain the time-stamped and labeled commands from the forwarding module and send them to the log file module; 辅中央控制装置的日志文件模块用于存储辅中央控制装置和主中央控制装置转发指令的两个日志文件。The log file module of the auxiliary central control device is used to store two log files of forwarding instructions of the auxiliary central control device and the main central control device. 9.根据权利要求8所述的一种信息交互的系统,其特征在于,主中央控制装置的日志文件模块还用于与辅中央控制装置的日志文件模块建立连接;9. A system of information interaction according to claim 8, wherein the log file module of the main central control device is also used to establish a connection with the log file module of the auxiliary central control device; 主中央控制装置或者辅中央控制装置的日志文件模块还用于分别读取自己最新日志文件中的最后一条记录的时间戳和标号,并与对方的最新日志文件中的最后一条记录的时间戳和标号进行比较,判断谁的指令缺失;The log file module of the main central control device or the auxiliary central control device is also used to read the timestamp and label of the last record in its latest log file respectively, and compare it with the timestamp and label of the last record in the latest log file of the other party. Labels are compared to determine whose instruction is missing; 主中央控制装置或者辅中央控制装置的日志文件模块还用于从对方的日志文件中恢复缺失的指令。The log file module of the main central control device or the auxiliary central control device is also used to recover missing instructions from the log file of the other party. 10.根据权利要求8所述的一种信息交互的系统,其特征在于,主中央控制装置的指令管理模块还用于与辅中央控制装置的指令管理模块通过心跳的方式判断对方是否异常。10. An information exchange system according to claim 8, characterized in that the instruction management module of the main central control device is also used to determine whether the other party is abnormal with the instruction management module of the auxiliary central control device through heartbeat. 11.根据权利要求8所述的一种信息交互的系统,其特征在于,主中央控制装置还包括缓存,用于存储恢复缺失的指令的时候产生的新指令;11. A system for information interaction according to claim 8, characterized in that the main central control device also includes a cache for storing new instructions generated when restoring missing instructions; 辅中央控制装置还包括缓存,用于存储恢复缺失的指令的时候产生的新指令。The auxiliary central control device also includes a cache for storing new instructions generated when restoring missing instructions.
CN201310102655.5A 2013-03-27 2013-03-27 Information interaction method and system Expired - Fee Related CN103248499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310102655.5A CN103248499B (en) 2013-03-27 2013-03-27 Information interaction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310102655.5A CN103248499B (en) 2013-03-27 2013-03-27 Information interaction method and system

Publications (2)

Publication Number Publication Date
CN103248499A CN103248499A (en) 2013-08-14
CN103248499B true CN103248499B (en) 2014-09-17

Family

ID=48927734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310102655.5A Expired - Fee Related CN103248499B (en) 2013-03-27 2013-03-27 Information interaction method and system

Country Status (1)

Country Link
CN (1) CN103248499B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1312922A (en) * 1998-08-11 2001-09-12 艾利森电话股份有限公司 Fault tolerant computer system
CN101115033A (en) * 2007-09-04 2008-01-30 武汉市中光通信公司 Active-standby switching system and method for session initiation protocol gateway
CN101231652A (en) * 2007-01-24 2008-07-30 国际商业机器公司 Method and system for data storage resynchronization
CN101291209A (en) * 2007-04-17 2008-10-22 大唐移动通信设备有限公司 Method and apparatus for data synchronization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1312922A (en) * 1998-08-11 2001-09-12 艾利森电话股份有限公司 Fault tolerant computer system
CN101231652A (en) * 2007-01-24 2008-07-30 国际商业机器公司 Method and system for data storage resynchronization
CN101291209A (en) * 2007-04-17 2008-10-22 大唐移动通信设备有限公司 Method and apparatus for data synchronization
CN101115033A (en) * 2007-09-04 2008-01-30 武汉市中光通信公司 Active-standby switching system and method for session initiation protocol gateway

Also Published As

Publication number Publication date
CN103248499A (en) 2013-08-14

Similar Documents

Publication Publication Date Title
CN101394306B (en) A Seamless Switching Method for Dual Server System
CN103077242B (en) The method of a kind of fulfillment database server two-node cluster hot backup
CN111966467B (en) Method and device for disaster recovery based on kubernetes container platform
WO2018023994A1 (en) Disaster-recovery switching method, node, and system
CN104252500A (en) Method and device for carrying out fault repairing on database management platform
CN104079438B (en) DNS domain name management system and method
CN102098201A (en) Method for realizing L2TP user access backup and network system
CN101621819A (en) Information synchronization detection method for active-standby switching interface module, network element system and link
CN101753339B (en) Method for realizing conference backup function of multi-point control unit and system thereof
CN113114777A (en) Disaster recovery method and device for multi-node high-availability cluster
US20140301183A1 (en) Method, Network Device, and System for Synchronization Between Network Devices
CN117827544A (en) Hot backup system, method, electronic device and storage medium
CN103516734B (en) Data processing method, equipment and system
CN103001787B (en) System and method for data processing centre's disaster-tolerant backup
CN103544081B (en) The management method of double base data server and device
CN102412983A (en) Equipment alarm reporting method
CN103248499B (en) Information interaction method and system
CN102083049A (en) Startup and shutdown system and switching method thereof
CN101510890B (en) Method and communication equipment for holding protocol state
CN100403696C (en) Storage management method and system for realizing data configuration between network elements and network management
CN103684813A (en) ENUM-DNS disaster recovery method and system used in IMS network
CN106792842A (en) A kind of short message channel monitoring method and system
CN101145955A (en) Method for hot backup of network management software, network management and network management system
CN118646758A (en) A system and method for realizing remote data synchronization based on data monitoring
CN101674568A (en) Integrated service management platform and service subscription method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20130814

Assignee: Shanxi skmax source media Technology Co.,Ltd.

Assignor: TVMINING (BEIJING) MEDIA TECHNOLOGY Co.,Ltd.

Contract record no.: 2015990000749

Denomination of invention: Method and system for information interaction

Granted publication date: 20140917

License type: Exclusive License

Record date: 20150826

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
EC01 Cancellation of recordation of patent licensing contract

Assignee: Shanxi skmax source media Technology Co.,Ltd.

Assignor: TVMINING (BEIJING) MEDIA TECHNOLOGY Co.,Ltd.

Contract record no.: 2015990000749

Date of cancellation: 20160808

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20161019

Address after: 030000, A, Shanxi Software Park, South Central Street, Xiaodian District, Shanxi, Taiyuan

Patentee after: Shanxi skmax source media Technology Co.,Ltd.

Address before: 100007 Beijing City, Dongcheng District Andingmen East Street, No. 28, building E, room 808

Patentee before: TVMINING (BEIJING) MEDIA TECHNOLOGY Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140917