A kind of method and system of information interaction
Technical field
The present invention relates to conference system technical field, relate in particular to a kind of method and system of information interaction.
Background technology
At present, meeting is any one government, enterprise, educational institution one of work activities the most frequently, and nearly all work conclusion, decision-making, professor pass through in meeting, to explain, demonstrate, analyze, discuss, reach common understanding and finally draw.Therefore, the quality of a meeting will directly affect operating efficiency, target direction, meeting achievement, or even the achievement of management.
Proposed a kind of information interaction system for conference system function, the central control unit in this system is connected by local area network (LAN) with terminal for this reason.This local area network (LAN) can be WIFI network, or other types LAN, between central control unit, connects by cable network, and the kind of terminal can be varied, such as mobile phone, PAD, computer, display screen etc.
In the log-on message of broadcasting in the broadcast module of these two central control unit, increase central control unit identity information field.The central control unit identity information field of the broadcast module broadcast of this central control unit of WEB background module by one of them central control unit is set to main central control unit, and this central control unit is main central control unit.The central control unit identity information field of the broadcast module broadcast of this central control unit of WEB background module by one of them central control unit is set to auxiliary central control unit, and this central control unit is auxiliary central control unit.
After main central control unit and auxiliary central control unit start, main central control unit is monitored the broadcast message of this network segment, obtains the address of auxiliary central control unit, and main central control unit and auxiliary central control unit connect.
Main central control unit is carried out information interaction by local area network (LAN) and terminal, and main central control unit is also synchronized to auxiliary central control unit by information interaction.
When main central control unit breaks down or when terminal breaks down with communicating by letter of main central control unit, terminal and main central control unit disconnect, terminal and auxiliary central control unit connect, carry out information interaction, this information interaction is synchronized to main central control unit by auxiliary central control unit.
In above-mentioned information interaction system, do not mention between main central control unit and auxiliary central control unit and how to realize synchronously, between both synchronous effects, have influence on main central control unit and the service of auxiliary central control unit to terminal, if there is no precise synchronization, can bring huge obstacle to the terminal service of obtaining.
Summary of the invention
The object of the invention is to overcome the shortcoming and defect of prior art, a kind of method and system of information interaction is provided, can be in the time that main central control unit be normally worked or the time of breaking down, can both and auxiliary central control unit between realize and accurately synchronizeing, improved the reliability of system.
One embodiment of the present of invention provide a kind of method of information interaction, are useful in the network segment of a local area network (LAN), comprise the following steps:
Start main central control unit and auxiliary central control unit;
The forwarding module of main central control unit or the forwarding module of auxiliary central control unit and terminal are carried out the mutual of instruction;
The forwarding module of main central control unit adds own and the instruction of terminal interaction the instruction administration module that sends to main central control unit after timestamp and label, or the forwarding module of auxiliary central control unit adds own and the instruction of terminal interaction the instruction administration module that sends to auxiliary central control unit after timestamp and label;
The instruction administration module of main central control unit is by the instruction that adds timestamp and label of receiving, send to the journal file module of main central control unit, the instruction administration module of auxiliary central control unit, by the instruction that adds timestamp and label of receiving, sends to the journal file module of auxiliary central control unit;
The instruction between the forwarding module of main central control unit and the forwarding module of auxiliary central control unit, oneself being forwarded is carried out synchronously mutually.
Preferably, further comprising the steps of:
When main central control unit and auxiliary central control unit re-establish while being connected, the journal file module of main central control unit and the journal file module of auxiliary central control unit connect;
Main central control unit and auxiliary central control unit read respectively timestamp and the label of the last item record in own up-to-date journal file, and compare with timestamp and the label of the last item record in the other side's up-to-date journal file, judge whose instruction disappearance;
The instruction that the central control unit of disappearance instruction is recovered disappearance from the other side's journal file.
Preferably, further comprising the steps of:
The instruction administration module of main central control unit and the instruction administration module of auxiliary central control unit judge that by the mode of heartbeat whether the other side is abnormal, if occurred extremely, main central control unit re-establishes and is connected with auxiliary central control unit.
Preferably, further comprising the steps of:
When the central control unit of disappearance instruction is recovered the instruction of disappearance from the other side's journal file, buffer memory is carried out in the new instruction producing by main central control unit or auxiliary central control unit;
Main central control unit or auxiliary central control unit send to the other side to carry out synchronously the new instruction producing.
The central control unit of described disappearance instruction is recovered the instruction of disappearance from the other side's journal file, further comprising the steps:
The central control unit that does not lack instruction sends to journal file the central control unit of disappearance instruction,
The central control unit of disappearance instruction is received journal file, writes journal file module.
Preferably, between main central control unit and auxiliary central control unit, by NTP school, time service is controlled at system time error between the two within 0.5 second.
Preferably, in journal file module, each instruction arranges a label, and the instruction of every day generates a journal file, and journal file was named with the date.
An alternative embodiment of the invention provides a kind of system of information interaction, comprise main central control unit, auxiliary central control unit and terminal, described main central control unit, auxiliary central control unit and terminal are positioned at the network segment of a local area network (LAN), main central control unit further comprises forwarding module, instruction administration module and journal file module, auxiliary central control unit further comprises forwarding module, instruction administration module and journal file module, wherein
The forwarding module of main central control unit, for carrying out the mutual of instruction with terminal, adds timestamp and label to instruction, and instruction is transmitted to instruction administration module and auxiliary central control unit;
The instruction administration module of main central control unit is used for obtaining from forwarding module the instruction that adds timestamp and label, and sends to journal file module;
The journal file module of main central control unit forwards two journal files of instruction for storing main central control unit and auxiliary central control unit;
The forwarding module of auxiliary central control unit is used in the time that main central control unit breaks down and terminal is carried out the mutual of instruction, adds timestamp and label, and instruction is transmitted to instruction administration module and main central control unit to instruction;
The instruction administration module of auxiliary central control unit is used for obtaining from forwarding module the instruction that adds timestamp and label, and sends to journal file module;
The journal file module of auxiliary central control unit forwards two journal files of instruction for storing auxiliary central control unit and main central control unit.
Preferably, the journal file module of main central control unit is also for connecting with the journal file module of auxiliary central control unit;
Timestamp and label that the journal file module of main central control unit or auxiliary central control unit also records for reading respectively the last item of own up-to-date journal file, and compare with timestamp and the label of the last item record in the other side's up-to-date journal file, judge whose instruction disappearance;
The journal file module of main central control unit or auxiliary central control unit is also recovered the instruction of disappearance for the journal file from the other side.
Preferably, the instruction administration module of main central control unit is also for judging that by the mode of heartbeat whether the other side is abnormal with the instruction administration module of auxiliary central control unit.
Preferably, main central control unit also comprises buffer memory, the new instruction producing for the instruction of recovery of stomge disappearance time;
Auxiliary central control unit also comprises buffer memory, the new instruction producing for the instruction of recovery of stomge disappearance time.
The present invention is owing to having adopted journal file to realizing the synchronous of instruction between main central control unit and auxiliary central control unit, and take the synchronous and journal file of real-time command synchronous, therefore in the time that main central control unit is normally worked or the time of breaking down, can both and auxiliary central control unit between realize and accurately synchronizeing, improved the reliability of system.
Brief description of the drawings
The information interaction flow chart that Fig. 1 provides for the embodiment of the present invention;
The information interaction system structural representation that Fig. 2 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.But embodiments of the present invention are not limited to this.
The information interaction flow chart that Fig. 1 provides for the embodiment of the present invention.As shown in Figure 1, this information interaction flow process comprises the following steps:
Step 101, in the network segment of a local area network (LAN), main central control unit, auxiliary central control unit and multiple terminal are set, this local area network (LAN) can be WIFI network, or other types LAN, between main central control unit and auxiliary central control unit, connects by cable network.
Step 102, start main central control unit and auxiliary central control unit.
The forwarding module of step 103, main central control unit and terminal are carried out the mutual of instruction.
The forwarding module of step 104, main central control unit adds own and the instruction of terminal interaction the instruction administration module that sends to main central control unit after timestamp and label, and synchronized transmission is given auxiliary central control unit.
The forwarding module of main central control unit and the forwarding module of auxiliary central control unit have the label management of oneself, the instruction forwarding through the forwarding module of main central control unit is in writing daily record, above order add M1, M2, M3... label, the instruction meeting forwarding through the forwarding module of auxiliary central control unit is in writing daily record, above order add S1, S2, S3..., for the synchronous of instruction with give for change.
Between main central control unit and auxiliary central control unit, by NTP school, time service is controlled at system time error between the two within 0.5 second.
The instruction administration module of step 105, main central control unit, by the instruction that adds timestamp and label of receiving, sends to the journal file module of main central control unit.
In journal file module, store two journal files, a journal file is stored the forwarding instruction of main central control unit, and a journal file is stored the forwarding instruction of auxiliary central control unit.When synchronous, will all carry out synchronously these two journal files.
In journal file module, each instruction arranges a label, and taking day as unit, the instruction of every day generates a journal file, and journal file was named with the date.
Step 106, after main central control unit breaks down, the forwarding module of auxiliary central control unit is connected with terminal, carry out the mutual of instruction, the forwarding module of auxiliary central control unit adds own and the instruction of terminal interaction the instruction administration module that sends to auxiliary central control unit after timestamp and label, the instruction administration module of auxiliary central control unit, by the instruction that adds timestamp and label of receiving, sends to the journal file module of auxiliary central control unit.
In journal file module, store two journal files, a journal file is stored the forwarding instruction of auxiliary central control unit, and a journal file is stored the forwarding instruction of main central control unit.
The instruction administration module of step 107, main central control unit and the instruction administration module of auxiliary central control unit judge that by the mode of heartbeat whether the other side is abnormal, if occurred extremely, main central control unit re-establishes and is connected with auxiliary central control unit.
Step 108, re-establish while being connected when main central control unit and auxiliary central control unit, the journal file module of main central control unit and the journal file module of auxiliary central control unit connect, main central control unit and auxiliary central control unit read respectively timestamp and the label of the last item record in the up-to-date journal file of oneself storing, and compare with timestamp and the label of the last item record in the up-to-date journal file of the other side storage, can judge the instruction disappearance of main central control unit.
Step 109, main central control unit are recovered the instruction of disappearance from the journal file of auxiliary central control unit.Be that the journal file of oneself is sent to main central control unit by auxiliary central control unit, main central control unit is obtained the instruction that oneself lacks from the journal file of receiving, writes in the journal file of oneself.
Wherein, recover the instruction of disappearance from the other side's journal file in main central control unit in, the journal file module of auxiliary central control unit is read out, cannot carry out write operation, so the new instruction producing can only be carried out to buffer memory, send to main central control unit simultaneously, main central control unit is received instruction, store in buffer memory, after having recovered, instruction is write in journal file.
In order to realize above-mentioned flow process, embodiments of the invention also provide a kind of system of information interaction.The information interaction system structural representation that Fig. 2 provides for the embodiment of the present invention.As shown in Figure 2, this system comprises main central control unit 2, auxiliary central control unit 3 and terminal 4, this main central control unit, auxiliary central control unit and multiple terminal are positioned at the network segment of a local area network (LAN) 5, and main central control unit is connected by cable network with auxiliary central control unit.
Main central control unit further comprises forwarding module 201, instruction administration module 202 and journal file module 203, this instruction administration module further comprises buffer memory 204, auxiliary central control unit further comprises forwarding module 301, instruction administration module 302 and journal file module 303, and this instruction administration module further comprises buffer memory 304.
The forwarding module of main central control unit and terminal are carried out the mutual of instruction, add timestamp and label, and instruction is transmitted to instruction administration module and auxiliary central control unit to instruction.
The instruction administration module of main central control unit obtains the instruction that adds timestamp and label from forwarding module, and sends to journal file module.
The main central control unit of journal file module stores of main central control unit and auxiliary central control unit forward two journal files of instruction.
The forwarding module of auxiliary central control unit in the time that main central control unit breaks down and terminal carry out the mutual of instruction, add timestamp and label to instruction, and instruction be transmitted to instruction administration module and main central control unit.
The instruction administration module of auxiliary central control unit obtains the instruction that adds timestamp and label from forwarding module, and sends to journal file module.
The journal file module of auxiliary central control unit forwards two journal files of instruction for storing auxiliary central control unit and main central control unit.
The journal file module of main central control unit and the journal file module of auxiliary central control unit connect.
The journal file module of main central control unit journal file module or auxiliary central control unit also reads respectively timestamp and the label of the last item record in the up-to-date journal file of oneself storing, and compare with timestamp and the label of the last item record in the up-to-date journal file of the other side storage, judge whose instruction disappearance, the instruction that recovers disappearance from the other side's journal file.
The instruction administration module of main central control unit and the instruction administration module of auxiliary central control unit judge that by the mode of heartbeat whether the other side is abnormal.
The new instruction producing when instruction that the buffer memory of main central control unit is recovered disappearance.
The new instruction producing when instruction that the buffer memory of auxiliary central control unit is recovered disappearance.
Above-described embodiment is owing to having adopted journal file to realizing the synchronous of instruction between main central control unit and auxiliary central control unit, and take the synchronous and journal file of real-time command synchronous, therefore in the time that main central control unit is normally worked or the time of breaking down, can both and auxiliary central control unit between realize and accurately synchronizeing, improved the reliability of system.
Above-described embodiment is preferably execution mode of the present invention; but embodiments of the present invention are not restricted to the described embodiments; other any do not deviate from change, the modification done under Spirit Essence of the present invention and principle, substitutes, combination, simplify; all should be equivalent substitute mode, within being included in protection scope of the present invention.