[go: up one dir, main page]

CN100336343C - Method for keeping multiple data copy consistency in distributed system - Google Patents

Method for keeping multiple data copy consistency in distributed system Download PDF

Info

Publication number
CN100336343C
CN100336343C CNB2004100804697A CN200410080469A CN100336343C CN 100336343 C CN100336343 C CN 100336343C CN B2004100804697 A CNB2004100804697 A CN B2004100804697A CN 200410080469 A CN200410080469 A CN 200410080469A CN 100336343 C CN100336343 C CN 100336343C
Authority
CN
China
Prior art keywords
mouth
succedaneum
manager
agent
data
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
CNB2004100804697A
Other languages
Chinese (zh)
Other versions
CN1758604A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB2004100804697A priority Critical patent/CN100336343C/en
Publication of CN1758604A publication Critical patent/CN1758604A/en
Application granted granted Critical
Publication of CN100336343C publication Critical patent/CN100336343C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种分布式系统中保持多个数据副本一致性的方法,通过扩充定义管理者与代理者之间的Qx接口和规定代理者的运行机制,实现后台管理者和位于设备侧的代理者、微控制单元之间的信息交流、协调,进而保证整个信息交互过程中、尤其在执行过程中有失败存在时的数据副本的一致性。本发明的核心在于代理者先缓存历史数据副本,待执行成功后再删除缓存的副本,如果执行失败,则根据缓存的数据副本进行一致性回滚处理。本发明所述的方法,从原理上完善了现有技术中一对多命令消息应答机制中存在的不足,避免了网管系统与设备侧存在的数据副本不一致问题,从而避免了设备由于分布式系统命令传递机制不完善而造成的网络运行安全隐患,保证了设备稳定可靠运行。

Figure 200410080469

The invention discloses a method for maintaining the consistency of multiple data copies in a distributed system. By expanding and defining the Qx interface between the manager and the agent and specifying the operating mechanism of the agent, the background manager and the device side are realized. The information exchange and coordination between agents and MCUs ensures the consistency of data copies during the entire information exchange process, especially when there is a failure in the execution process. The core of the present invention is that the agent first caches the historical data copy, and then deletes the cached copy after the execution is successful, and performs consistent rollback processing according to the cached data copy if the execution fails. The method described in the present invention improves the deficiencies in the one-to-many command message response mechanism in the prior art in principle, and avoids the problem of data copy inconsistency between the network management system and the device side, thus avoiding the problem of the device due to the distributed system The hidden dangers of network operation security caused by the imperfect command transmission mechanism ensure the stable and reliable operation of the equipment.

Figure 200410080469

Description

分布式系统中保持多个数据副本一致性的方法A method for maintaining the consistency of multiple data copies in a distributed system

技术领域technical field

本发明涉及分布式通讯系统,尤其涉及具有复杂的前后台分工的、前台必须依赖于后台的配置进行工作的分布式通讯系统。The present invention relates to a distributed communication system, in particular to a distributed communication system which has a complicated front-background division of labor and the front-end must depend on the configuration of the back-end to work.

背景技术Background technique

传送网络(包括网管系统)是一个复杂的大型分布式系统,其典型的网络结构模型如图1所示,分为网管侧和设备侧两大部分;网管侧包括GUI(图形用户接口)、MANAGER(管理者)两部分,设备侧包括AGENT(代理者)、MCU(微控制单元)两部分;其中MANAGER同AGENT之间是一对多的关系,AGENT同MCU之间也是一对多的关系。在该分布式系统中,GUI-MANAGER之间通过F口操作传递消息,MANAGER-AGENT之间通过Qx口操作传递消息,而AGENT同各个MCU(微控制单元)在同一背板上通过S口命令进行通讯。The transmission network (including the network management system) is a complex large-scale distributed system. Its typical network structure model is shown in Figure 1, which is divided into two parts: the network management side and the equipment side; the network management side includes GUI (graphical user interface), MANAGER There are two parts (manager) and the device side includes AGENT (agent) and MCU (micro control unit). Among them, the relationship between MANAGER and AGENT is one-to-many, and the relationship between AGENT and MCU is also one-to-many. In this distributed system, the GUI-MANAGER transmits messages through the F port operation, and the MANAGER-AGENT transmits messages through the Qx port operation, and the AGENT and each MCU (micro control unit) are on the same backplane through the S port command to communicate.

传送网络根据网管系统的配置进行工作,同时为了能脱离网管系统而工作,网络在AGENT(代理者)和MCU(微控制单元)都保存有配置数据的副本,这样一来,系统中实际上有三份网络配置数据,分别保存在网管侧的MANAGER(管理者)、AGENT(代理者)和MCU(微控制单元)。保证这三份数据的一致性是整个传送网络稳定可靠工作的基本前提。The transmission network works according to the configuration of the network management system. At the same time, in order to work without the network management system, the network has a copy of the configuration data in both the AGENT (agent) and the MCU (micro control unit). In this way, there are actually three A copy of the network configuration data is stored in the MANAGER (manager), AGENT (agent) and MCU (micro control unit) on the network management side respectively. Ensuring the consistency of these three data is the basic prerequisite for the stable and reliable operation of the entire transmission network.

最初网管和设备侧的工作过程为:图形用户接口将F口操作下发给管理者;管理者进行分析后将对应的一条或者多条Qx口操作下发给代理者并进行配置数据副本的保存;代理者收到Qx操作后进行分析,分别将对应的S口命令下发给微控制单元,并刷新自己的配置数据副本;微控制单元同样根据代理者下发的命令进行执行并刷新数据副本。这种方式我们称之为无应答工作方式。Initially, the working process of the network management and device side is as follows: the graphical user interface sends the F port operation to the manager; the manager sends the corresponding one or more Qx port operations to the agent after analysis and saves a copy of the configuration data ; After the agent receives the Qx operation, it analyzes it, sends the corresponding S port commands to the MCU, and refreshes its own configuration data copy; the MCU also executes and refreshes the data copy according to the command issued by the agent . This way we call the no-response working mode.

无应答工作方式的特点是各个功能实体之间的操作消息传递不需要应答,只要命令发送了便认为是成功。优点是实现简单;最大的缺点是上游不知道下游的执行情况。由于在实际的网络配置过程中,导致的某个环节执行失败的异常情况不可能完全避免,因此往往会造成数据的不一致。为了改进这个缺点,现在网管和设备侧的工作过程一般为应答工作方式。The characteristic of the non-response working mode is that the operation message transfer between various functional entities does not require a response, as long as the command is sent, it is considered successful. The advantage is that it is simple to implement; the biggest disadvantage is that the upstream does not know the execution of the downstream. In the actual network configuration process, it is impossible to completely avoid the abnormal situation caused by the execution failure of a certain link, which often causes data inconsistency. In order to improve this shortcoming, the work process of the network management and equipment side is generally a response work mode.

这种工作方式的特点是应答式的,即上游实体只有在收到正确的应答后才刷新命令对应的配置数据并下发下一条命令,而如果收到的是错误的应答,则停止进一步执行,并认为整个命令是失败的;只有当所有分解的命令都执行成功后才认为整个命令是成功的。应答的工作方式一定程度上保证了上下游信息的一致性。This working method is characterized by response, that is, the upstream entity refreshes the configuration data corresponding to the command and issues the next command only after receiving a correct response, and stops further execution if it receives a wrong response , and consider the entire command to be a failure; the entire command is considered successful only when all decomposed commands are executed successfully. The working mode of the response guarantees the consistency of upstream and downstream information to a certain extent.

仔细分析应答的工作方式,还是存在着设计上的先天不足:当图形用户接口下发给管理者的一个F口操作同时对应管理者下发给代理者的多个Qx口操作时,如果代理者执行过程中其中的一条Qx操作失败,管理者则认为整个F口操作失败;但是我们可以发现失败前代理者执行的Qx操作和对应的微控制单元执行的S口命令实际上已经成功了,那么对应的数据副本也得到了刷新;而管理者由于认为F口操作失败所以未进行任何的数据副本更新,所以导致了管理者、代理者、微控制单元的数据副本之间产生了部分不一致的现象。这种部分成功部分失败而导致的数据不一致情况在工程实际中是一个很大的安全隐患,可能会造成严重的不良影响。After careful analysis of the working mode of the response, there is still a congenital deficiency in the design: when one F port operation issued by the GUI to the manager corresponds to multiple Qx port operations issued by the manager to the agent at the same time, if the agent executes One of the Qx operations in the process fails, and the manager thinks that the entire F port operation fails; but we can find that the Qx operation executed by the agent before the failure and the S port command executed by the corresponding MCU have actually succeeded, then the corresponding The data copy of the device has also been refreshed; and the manager did not perform any data copy update because he believed that the F port operation failed, which resulted in some inconsistencies among the data copies of the manager, agent, and MCU. This data inconsistency caused by partial success and partial failure is a great safety hazard in engineering practice, and may cause serious adverse effects.

发明内容Contents of the invention

本发明的所要解决的问题就是现有技术中分布式系统命令执行过程中部分成功部分失败而导致的各个数据副本数据不一致的问题,提出一种分布式系统中保持多个数据副本一致性的方法。The problem to be solved by the present invention is the data inconsistency of each data copy caused by partial success and partial failure in the execution process of distributed system commands in the prior art, and a method for maintaining the consistency of multiple data copies in a distributed system is proposed .

分布式系统中保持多个数据副本一致性的方法,包括下列处理过程:A method for maintaining the consistency of multiple data copies in a distributed system includes the following processes:

管理者的处理过程:Manager's process:

步骤一、图形用户接口下发F口操作给管理者;Step 1, the graphical user interface sends the F port operation to the manager;

步骤二、管理者接收后进行分析,将该操作分拆成一条或多条到代理者的Qx口操作;Step 2, the manager analyzes after receiving it, and splits the operation into one or more Qx port operations to the agent;

步骤三、管理者将带有序列号的Qx口操作依次下发给代理者;Step 3. The manager sends the Qx port operations with serial numbers to the agent in turn;

步骤四、代理者依次接收并执行Qx口操作,每执行完毕一条Qx口操作后均向管理者反馈操作应答信息;Step 4: The agent receives and executes the Qx port operations in turn, and feeds back the operation response information to the manager after each Qx port operation is executed;

步骤五、如果管理者接收到代理者的操作失败应答,则返回错误的报文给图形用户接口,并结束本次F口操作;Step 5, if the manager receives the agent's operation failure response, then return an error message to the graphical user interface, and end this F port operation;

步骤六、否则在收到本次F口操作的全部操作成功应答后更新本次F口操作在管理者处对应的数据副本,并返回执行成功的应答给图形用户接口,结束本次F口操作;Step 6. Otherwise, update the corresponding data copy of this F port operation at the manager after receiving all the successful responses of this F port operation, and return a successful execution response to the graphical user interface, and end this F port operation ;

代理者的处理过程:Proxy process:

步骤A、代理者接收管理者下发的Qx口操作;Step A, the agent receives the Qx port operation issued by the manager;

步骤B、代理者执行该Qx口操作之前,缓存本次Qx口操作会更改的数据的副本;Step B, before the agent executes the Qx port operation, it caches a copy of the data that will be changed by this Qx port operation;

步骤C、代理者分析该Qx口操作,并拆分成相应的一条或者多条S口命令;Step C, the agent analyzes the Qx port operation, and splits it into one or more corresponding S port commands;

步骤D、代理者将S口命令依次下发给微控制单元;Step D, the agent sends the S port commands to the micro control unit in sequence;

步骤E、微控制单元依次接收并执行S口命令,每执行完毕一条S口命令后均向代理者反馈执行应答信息;Step E, the micro control unit receives and executes the S port commands in sequence, and feeds back the execution response information to the agent after each S port command is executed;

步骤F、如果代理者接收到本次Qx口操作所第对应的全部S口命令执行成功应答,则更新本次Qx口操作在代理者处对应的数据副本,向管理者返回本次Qx口操作成功应答;Step F. If the agent receives the successful response of all S port commands corresponding to this Qx port operation, update the data copy corresponding to this Qx port operation at the agent, and return this Qx port operation to the manager successful response;

步骤G、如果本次F口操作所对应的全部Qx口操作均在代理者处操作成功,则删除代理者缓存的数据副本;Step G, if all Qx port operations corresponding to this F port operation are successfully operated at the agent, delete the data copy cached by the agent;

步骤H、如果代理者接收到微控制单元的执行失败应答,则Step H, if the agent receives the execution failure response from the microcontroller unit, then

H1:代理者向管理者返回本次Qx口操作失败应答;H1: The agent returns a response to the failure of this Qx port operation to the manager;

H2:根据本次Qx口操作的序列号,确定本次F口操作在代理者所对应的所有Qx口操作,并确定代理者在本次F口操作过程中所缓存的所有数据副本;H2: According to the serial number of this Qx port operation, determine all Qx port operations corresponding to this F port operation on the agent, and determine all data copies cached by the agent during this F port operation;

H3:代理者恢复缓存的所有Qx口操作数据副本为实际的数据副本;H3: The agent restores all Qx port operation data copies cached as actual data copies;

H4:代理者根据缓存的数据副本,构造对应的S口命令,并下发给微控制单元,恢复微控制单元的数据副本为本次F口操作之前的状态;H4: The agent constructs the corresponding S port command according to the cached data copy, and sends it to the micro control unit, and restores the data copy of the micro control unit to the state before the F port operation;

H5:代理者删除缓存的数据副本;H5: The agent deletes the cached data copy;

微控制单元的处理过程:The processing of the microcontroller unit:

步骤I:微控制单元接收代理者下发的S口命令;Step 1: the micro control unit receives the S port command issued by the agent;

步骤II:微控制单元对接收到的S口命令进行分析,根据分析结果对设备执行相应的操作;Step II: The micro-control unit analyzes the received S port command, and performs corresponding operations on the device according to the analysis result;

步骤III:如果执行成功,则更新命令所对应数据副本,向代理者返回执行成功的应答,结束本次S口命令执行;Step III: If the execution is successful, update the data copy corresponding to the command, return a successful execution response to the agent, and end the execution of the S port command;

步骤IV:如果执行失败,则向代理者返回执行失败的应答,结束本次S口命令执行。Step IV: If the execution fails, return an execution failure response to the agent, and end the execution of the S interface command.

上述的序列号在Qx口操作的报文头中进行标识。The above sequence number is identified in the message header of the Qx port operation.

本发明所述的方法,从原理上完善了现有技术中一对多命令消息应答机制中存在的不足,避免了网管系统与设备侧存在的数据副本不一致问题,从而避免了设备由于分布式系统命令传递机制不完善而造成的网络运行安全隐患,保证了设备稳定可靠运行。显然本发明也不局限于传送网络领域,本发明所述的方法还可应用于具有类似性质的其他分布式系统中。The method described in the present invention improves the deficiencies in the one-to-many command message response mechanism in the prior art in principle, and avoids the problem of data copy inconsistency between the network management system and the device side, thus avoiding the problem of the device due to the distributed system The hidden dangers of network operation security caused by the imperfect command transmission mechanism ensure the stable and reliable operation of the equipment. Obviously, the present invention is not limited to the transmission network field, and the method described in the present invention can also be applied to other distributed systems with similar properties.

附图说明Description of drawings

图1是分布式传送网络的系统结构示意图;FIG. 1 is a schematic diagram of a system structure of a distributed transmission network;

图2是本发明提出方法中管理者的处理流程图;Fig. 2 is the processing flowchart of the administrator in the proposed method of the present invention;

图3是本发明提出方法中代理者的处理流程图;Fig. 3 is the processing flowchart of agent in the proposed method of the present invention;

图4是本发明中代理者在S口命令执行异常时的工作流程图;Fig. 4 is the working flow chart when agent executes abnormality in S port order among the present invention;

图5是本发明提出方法中微控制单元的处理流程图。Fig. 5 is a processing flowchart of the micro control unit in the method proposed by the present invention.

具体实施方式Detailed ways

下面结合附图和实施例对本发明作进一步的详细说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

图1是分布式传送网络的系统结构示意图。如图1所示,分布式传送网络系统包括图形用户接口、管理者、代理者、微控制单元四部分;其中管理者同代理者之间是一对多关系,代理者同微控制单元之间也是一对多的关系。一般地,称图形用户接口、管理者两部分为后台网管系统,代理者、微控制单元两部分则是通讯设备的主体,数据副本分别保存在管理者、代理者和微控制单元三个部分。FIG. 1 is a schematic diagram of a system structure of a distributed transmission network. As shown in Figure 1, the distributed transmission network system includes four parts: graphical user interface, manager, agent, and micro-control unit; the relationship between the manager and the agent is one-to-many, and the relationship between the agent and the micro-control unit It is also a one-to-many relationship. Generally speaking, the graphic user interface and the manager are called the background network management system, and the agent and the micro-control unit are the main body of the communication equipment. Data copies are stored in the manager, the agent and the micro-control unit respectively.

图2是本发明提出方法中管理者的处理流程图。如图2所示,管理者的处理过程包括:1、图形用户接口下发一F口操作给管理者;2、管理者进行分析,将该命令分拆成一条或者多条到代理者的Qx口操作;3、管理者将Qx口操作依次下发给代理者,并在Qx操作报文中标明该操作的序列号,对最后一条命令,序列号为0xfefe;4、首先判断是否所有的Qx口操作都发送结束?5、如果没有结束,则将下一条Qx操作发送给代理者;6、如果全部结束,则更新本F口操作在管理者处对应的数据副本,并返回执行成功的应答给图形用户接口,结束本次F口操作。7、管理者收到代理者的应答;1)如果是成功的应答,则到步骤4;2)如果是失败的应答,则直接返回错误的报文给图形用户接口,并结束本次F口操作。其中,序列号可以在Qx口操作的报文头中进行标识,现有技术中Qx接口命令描述格式为:   命令源地址   命令目的地址   命令代码   命令唯一标识   命令执行结果   命令体长度   命令体 Fig. 2 is a flow chart of the administrator's processing in the method proposed by the present invention. As shown in Figure 2, the manager's processing process includes: 1. The graphical user interface sends an F port operation to the manager; 2. The manager analyzes and splits the command into one or more Qx to the agent 3. The manager sends the Qx port operations to the agent in turn, and indicates the serial number of the operation in the Qx operation message. For the last command, the serial number is 0xfefe; 4. First, judge whether all Qx All operations have been sent? 5. If it is not finished, then send the next Qx operation to the agent; 6. If all of them are finished, then update the corresponding data copy of this F port operation at the manager, and return a successful execution response to the graphical user interface, and end This F port operation. 7. The manager receives the response from the agent; 1) if it is a successful response, then go to step 4; 2) if it is a failed response, then directly return an error message to the graphical user interface, and end this F port operate. Wherein, the sequence number can be identified in the header of the Qx port operation, and the Qx interface command description format in the prior art is: command source address command destination address command code command unique identifier command execution result command body length command body

本发明中标识了序列号后的Qx接口命令描述格式为:   命令源地址   命令目的地址   命令代码   命令唯一标识   操作序列号   命令执行结果   命令体长度   命令体 The Qx interface command description format after identifying the serial number among the present invention is: command source address command destination address command code command unique identifier Operation sequence number command execution result command body length command body

图3是本发明提出方法中代理者的处理流程图。如图3所示,代理者的处理过程包括:1、代理者接收到管理者下发的Qx口操作;2、代理者执行该Qx口操作之前,首先缓存该Qx口操作会更改的数据的副本;3、代理者分析该Qx口操作,并拆分成相应的一条或者多条S口命令;4、代理者将S口命令依次发送给微控制单元;5、首先判断是否所有的S口操作都发送结束?6、如果没有结束,则将下一条S口命令发送给微控制单元;7、如果全部结束,则更新本Qx口操作在代理者处对应的数据副本,然后返回执行成功的应答给管理者;8、如果F口操作对应的全部Qx口操作都结束,则删除代理者缓存的Qx操作对应的数据。9、如果代理者接收到微控制单元的执行失败应答,则执行如图4所示的S口命令执行异常时的工作流程:1、首先返回管理者执行本Qx口操作失败的应答;2、根据Qx操作报文中的操作序列号,确定本次F口操作在代理者所对应的所有Qx操作,并确定代理者在本次F口操作过程中所缓存的所有数据副本;3、代理者恢复缓存的所有Qx口操作数据副本为系统实际的数据副本;4、代理者根据缓存的数据副本,构造对应的S口命令,并下发给微控制单元,以恢复微控制单元的数据副本为本次F口操作之前的状态;5、代理者删除缓存的数据。Fig. 3 is a process flowchart of the agent in the proposed method of the present invention. As shown in Figure 3, the processing process of the agent includes: 1. The agent receives the Qx port operation issued by the manager; 2. Before the agent executes the Qx port operation, it first caches the data that will be changed by the Qx port operation 3. The agent analyzes the operation of the Qx port and splits it into corresponding one or more S port commands; 4. The agent sends the S port commands to the micro control unit in turn; 5. First judge whether all S port commands All operations are sent? 6. If it is not finished, send the next S port command to the micro control unit; 7. If all of them are finished, update the corresponding data copy of this Qx port operation at the agent, and then return a successful execution response to the manager; 8. If all the Qx port operations corresponding to the F port operation are completed, delete the data corresponding to the Qx port cached by the agent. 9. If the agent receives the execution failure response of the micro-control unit, then execute the work flow when the S port command is executed abnormally as shown in Figure 4: 1. At first return the response to the manager's failure to execute the Qx port operation; 2. According to the operation sequence number in the Qx operation message, determine all the Qx operations corresponding to the F port operation on the agent, and determine all data copies cached by the agent during this F port operation; 3. The agent Restore all Qx port operation data copies in the cache as the actual data copies of the system; 4. The agent constructs the corresponding S port command according to the cached data copy, and sends it to the micro control unit to restore the data copy of the micro control unit as The state before this F port operation; 5. The agent deletes the cached data.

图5是本发明提出方法中微控制单元的处理流程图。如图5所示,微控制单元的处理过程包括:1、微控制单元接收到代理者下发的S口命令;2、微控制单元对S口命令进行分析,根据分析结果对设备进行相应的操作;3、如果执行成功,则更新命令对应数据副本,并返回成功的应答给代理者,结束本次S口明执行。4、如果执行失败,则返回失败的应答给代理者,并结束本次S口命令执行。Fig. 5 is a processing flowchart of the micro control unit in the method proposed by the present invention. As shown in Figure 5, the processing process of the micro-control unit includes: 1. The micro-control unit receives the S-port command issued by the agent; 2. The micro-control unit analyzes the S-port command, and performs corresponding actions on the device according to the analysis result. Operation; 3. If the execution is successful, update the data copy corresponding to the command, and return a successful response to the agent, ending the execution of the S-port statement. 4. If the execution fails, return a failure response to the agent, and end the execution of the S port command.

下面结合一个具体的实施例来说明本发明所述方法的详细实现。The detailed implementation of the method of the present invention will be described below in conjunction with a specific embodiment.

结合图1所示的传送网络系统,以一条图形用户接口下发的F口操作对应于三条管理者下发给代理者的Qx口操作,每一Qx口操作又对应于三条S口命令为假设,为了保证在异常发生时前后台数据副本的一致性,本发明的主要工作过程如下:Combined with the transmission network system shown in Figure 1, it is assumed that one F port operation issued by the GUI corresponds to three Qx port operations issued by the manager to the agent, and each Qx port operation corresponds to three S port commands. , in order to ensure the consistency of the front and back data copies when an exception occurs, the main working process of the present invention is as follows:

1、图形用户接口下发一F口配置操作到管理者,管理者进行分析,拆分、转换成三条到代理者的Qx操作;1. The graphical user interface sends an F port configuration operation to the manager, and the manager analyzes, splits and converts it into three Qx operations to the agent;

2、管理者将操作的序列号在报文头中进行标识,并下发第一条Qx操作给代理者;2. The manager identifies the sequence number of the operation in the message header, and sends the first Qx operation to the agent;

3、代理者收到管理者下发的Qx操作,(假设该Qx操作对应的数据副本为A,本次操作执行之前该数据副本为A1),首先缓存A1;3. The agent receives the Qx operation issued by the manager, (assuming that the data copy corresponding to the Qx operation is A, and the data copy is A1 before this operation is executed), and first caches A1;

4、对该Qx操作进行分析,拆分、转换成三条到微控制单元的S口命令;4. Analyze the Qx operation, split and convert it into three S port commands to the MCU;

5、代理者按照顺序将第一条S口命令下发给对应的微控制单元;5. The agent sends the first S port command to the corresponding MCU in sequence;

6、对应的微控制单元收到代理者下发的S口命令进行执行,成功后更改自己的数据副本并返回给代理者成功的应答;6. The corresponding micro-control unit receives the S port command issued by the agent and executes it. After success, it changes its own data copy and returns a successful response to the agent;

7、代理者收到微控制单元返回的成功应答,继续第二条S口命令的下发;7. The agent receives the successful response returned by the micro control unit, and continues to issue the second S port command;

8、微控制单元收到第二条S口命令执行成功更新数据副本并返回成功;8. The MCU receives the second S port command and successfully updates the data copy and returns success;

9、代理者收到微控制单元返回的成功应答,继续第三条S口命令的下发;9. The agent receives the successful response returned by the micro control unit, and continues to issue the third S port command;

10、微控制单元收到第三条S口命令执行成功更新数据副本并返回成功;10. The MCU receives the third S port command and successfully updates the data copy and returns success;

11、代理者收到微控制单元返回的成功应答,判断本次Qx操作对应的三条S口命令都执行成功,刷新自己的数据副本,则数据副本由A1更新为A2;然后上报管理者成功的应答,并结束本次Qx操作;11. The agent receives the successful response returned by the micro control unit, judges that the three S port commands corresponding to this Qx operation have been executed successfully, refreshes its own data copy, and then the data copy is updated from A1 to A2; Answer and end this Qx operation;

12、管理者收到代理者的第一条Qx操作成功应答,则继续下发第二条Qx口操作给代理者;12. After receiving the successful response of the first Qx operation from the agent, the manager will continue to issue the second Qx port operation to the agent;

13、代理者收到管理者下发的第二条Qx操作,(假设该Qx操作对应的代理者处数据副本为B,本次操作执行之前该数据副本为B1),首先缓存B1;13. The agent receives the second Qx operation issued by the manager, (assuming that the data copy at the agent corresponding to the Qx operation is B, and the data copy is B1 before this operation is executed), and first caches B1;

14、第二条Qx操作同样对应三条S口命令;代理者发送第一条S口命令给微控制单元,微控制单元执行成功,更新数据副本并返回成功应答;14. The second Qx operation also corresponds to three S port commands; the agent sends the first S port command to the micro control unit, the micro control unit executes successfully, updates the data copy and returns a successful response;

15、代理者收到成功的应答,发送第二条S口命令给对应的微控制单元;15. The agent receives a successful response and sends the second S port command to the corresponding MCU;

16、微控制单元执行S口命令,由于设备的故障,该命令执行失败,于是返回错误的应答给代理者;16. The micro-control unit executes the S port command. Due to the failure of the device, the command fails to execute, so an error response is returned to the agent;

17、代理者收到微控制单元执行错误的应答,返回第二条Qx操作执行失败的应答给管理者;同时进行保证数据副本一致性的回滚处理:17. The agent receives the reply that the MCU executes an error, and returns the second reply that the execution of the Qx operation fails to the manager; at the same time, it performs rollback processing to ensure the consistency of the data copy:

1)代理者将第一条Qx口操作对应的数据由副本A2回滚为执行之前的A1;1) The agent rolls back the data corresponding to the first Qx port operation from copy A2 to A1 before execution;

2)以数据A1为基础,构造第一条Qx口操作对应的三条S口命令,并全部下发给微控制单元,以便恢复微控制单元上的数据副本为本次F口操作之前的状态;2) Based on the data A1, construct three S port commands corresponding to the first Qx port operation, and send them all to the micro control unit, so as to restore the data copy on the micro control unit to the state before this F port operation;

3)以第二条Qx口对应的数据副本B1为基础,构造对应的S口命令,并将第一条下发给对应的微控制单元,恢复微控制单元上的数据副本;3) Based on the data copy B1 corresponding to the second Qx port, construct the corresponding S port command, and send the first one to the corresponding micro-control unit to restore the data copy on the micro-control unit;

18、管理者收到代理者的执行错误的应答信息,则不做任何数据的更新,直接将F口操作视为执行失败,返回给图形用户接口。18. When the manager receives the agent's execution error response message, he does not update any data, and directly regards the F port operation as execution failure, and returns it to the graphical user interface.

Claims (2)

1, keep the method for a plurality of data copy consistencies in the distributed system, it is characterized in that comprising following processing procedure:
Gerentocratic processing procedure:
Step 1, graphical user interface issue the F mouth and operate to the manager;
Step 2, manager analyze after receiving, and this operation is split into the one or more Qx mouth operation to the succedaneum;
Step 3, manager are handed down to the succedaneum successively with serialized Qx mouth operation;
Step 4, succedaneum receive and carry out Qx mouth operation successively, after the Qx mouth operation that whenever is finished all to manager's feedback operation response message;
If step 5 manager receives succedaneum's operation failure and replys, then return wrong message and give graphical user interface, and finish this F mouth operation;
Step 6 otherwise after whole operation successful respond of receiving the operation of this F mouth, upgrade this F mouth and operate in the manager and locate corresponding data trnascription, and return replying of running succeeded to graphical user interface, finish this F mouth operation;
Succedaneum's processing procedure:
The Qx mouth operation that steps A, succedaneum's receiving management person issue;
Step B, succedaneum carry out before this Qx mouth operation, the copy of the data that this Qx mouth operation of buffer memory can be changed;
Step C, succedaneum analyze this Qx mouth operation, and split into the order of corresponding one or more of S mouth;
Step D, succedaneum are handed down to micro-control unit successively with the order of S mouth;
Step e, micro-control unit receive and carry out the order of S mouth successively, all feed back the execution response message to the succedaneum after the S mouth order that whenever is finished;
If step F succedaneum receives whole S mouth command execution successful respond of this Qx mouth operation institute correspondence, then upgrade this Qx mouth and operate in the succedaneum and locate corresponding data trnascription, return this Qx mouth to the manager and operate successful respond;
If this F mouth of step G is operated pairing whole Qx mouth operation and all located to operate successfully the succedaneum, then delete succedaneum's data in buffer copy;
If step H succedaneum receives the execution failure of micro-control unit and replys, then
H1: the succedaneum returns this Qx mouth operation failure to the manager and replys;
H2: according to the sequence number of this Qx mouth operation, determine that this F mouth operates in pairing all the Qx mouth operations of succedaneum, and all data trnascriptions of definite succedaneum institute's buffer memory in this F mouth operating process;
H3: all Qx mouth operating data copies that the succedaneum recovers buffer memory are actual data trnascription;
H4: the succedaneum constructs corresponding S mouth order, and is handed down to micro-control unit according to the data in buffer copy, and the data trnascription that recovers micro-control unit is the state before this F mouth operation;
H5: the succedaneum deletes the data in buffer copy;
The processing procedure of micro-control unit:
Step I: micro-control unit receives the S mouth order that the succedaneum issues;
Step II: micro-control unit is analyzed the S mouth order that receives, and according to analysis result equipment is carried out corresponding operation;
Step II I: if run succeeded, then update command institute corresponding data copy returns replying of running succeeded to the succedaneum, finishes this S mouth command execution;
Step IV: if carry out failure, then return and carry out replying of failure, finish this S mouth command execution to the succedaneum.
2, method according to claim 1 is characterized in that: described sequence number identifies in the heading of Qx mouth operation.
CNB2004100804697A 2004-10-10 2004-10-10 Method for keeping multiple data copy consistency in distributed system Expired - Fee Related CN100336343C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100804697A CN100336343C (en) 2004-10-10 2004-10-10 Method for keeping multiple data copy consistency in distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100804697A CN100336343C (en) 2004-10-10 2004-10-10 Method for keeping multiple data copy consistency in distributed system

Publications (2)

Publication Number Publication Date
CN1758604A CN1758604A (en) 2006-04-12
CN100336343C true CN100336343C (en) 2007-09-05

Family

ID=36703806

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100804697A Expired - Fee Related CN100336343C (en) 2004-10-10 2004-10-10 Method for keeping multiple data copy consistency in distributed system

Country Status (1)

Country Link
CN (1) CN100336343C (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2248309B1 (en) 2008-02-27 2017-06-21 Nokia Technologies Oy Buffer control for multi-transport architectures
WO2009106930A1 (en) 2008-02-27 2009-09-03 Nokia Corporation Transport independent architecture
CN102033786B (en) * 2010-11-04 2013-02-06 曙光信息产业股份有限公司 Method for repairing consistency of copies in object storage system
CN102055799B (en) * 2010-12-09 2014-02-12 北京世纪互联宽带数据中心有限公司 Content refreshing system
WO2012106923A1 (en) * 2011-07-25 2012-08-16 华为技术有限公司 Object adjusting method, migration control device, node device and storage system
CN102347866A (en) * 2011-11-08 2012-02-08 迈普通信技术股份有限公司 Data configuration system and method in network management
CN102609454B (en) * 2012-01-12 2013-09-18 浪潮(北京)电子信息产业有限公司 Replica management method for distributed file system
CN103294787A (en) * 2013-05-21 2013-09-11 成都市欧冠信息技术有限责任公司 Multi-copy storage method and multi-copy storage system for distributed database system
CN105550230B (en) * 2015-12-07 2019-07-23 北京奇虎科技有限公司 The method for detecting and device of distributed memory system node failure
CN106375416B (en) * 2016-08-30 2019-08-09 北京航空航天大学 Method and device for dynamic adjustment of consistency in distributed data storage system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5970488A (en) * 1997-05-05 1999-10-19 Northrop Grumman Corporation Real-time distributed database system and method
CN1482764A (en) * 2002-09-12 2004-03-17 深圳市中兴通讯股份有限公司 Method for synchronisation of master and standby background net management data
CN1503535A (en) * 2002-11-20 2004-06-09 华为技术有限公司 Method for ensuring reliability of data packet transmission in simple network management protocol
US20040186861A1 (en) * 2003-01-17 2004-09-23 Phatak Shirish Hemant Method and system for use of storage caching with a distributed file system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5970488A (en) * 1997-05-05 1999-10-19 Northrop Grumman Corporation Real-time distributed database system and method
CN1482764A (en) * 2002-09-12 2004-03-17 深圳市中兴通讯股份有限公司 Method for synchronisation of master and standby background net management data
CN1503535A (en) * 2002-11-20 2004-06-09 华为技术有限公司 Method for ensuring reliability of data packet transmission in simple network management protocol
US20040186861A1 (en) * 2003-01-17 2004-09-23 Phatak Shirish Hemant Method and system for use of storage caching with a distributed file system

Also Published As

Publication number Publication date
CN1758604A (en) 2006-04-12

Similar Documents

Publication Publication Date Title
CN100336343C (en) Method for keeping multiple data copy consistency in distributed system
CN1224905C (en) Resource action in clustered computer system incorporating prepare operation
CN109388481B (en) Transaction information transmission method, system, device, computing equipment and medium
CN1960261A (en) Method and system of obtaining physical slot number of single board, and type of slot
CN1527509A (en) a test method
CN105681426A (en) Heterogeneous system
CN1490995A (en) Apparatus for connecting wireless network with at least one other network
CN1302411C (en) Central control method for large machine group system
CN1780237A (en) Logic topological network for protocol test and method for realizing protocol test
CN101060559A (en) A man-machine command queue management system and method
CN103297477B (en) A kind of data acquisition reporting system and data processing method and proxy server
CN1815972A (en) Method for obtaining configuration data of business plate in distribution type management system
CN110740182A (en) dynamic data communication method and device based on DDS technology
CN1859171A (en) Network equipment data managing method
CN106953809A (en) A kind of device resource acquisition method based on 485 tdm communications
CN1863080A (en) Warning managing method and system
CN1260983C (en) A method of disaster recovery for home location register (HLR) with zero-time service take-over
WO2017059599A1 (en) Method and device for upgrading multi-dwelling units
CN101867570A (en) Communication Method in Reliability Testing of Embedded Software Based on CAN
CN1152583C (en) Reset controller and its implementation method
CN1756107A (en) Method for realizing single board switching
CN101175068B (en) Multi-version multicast protocol amalgamation method
CN116506308A (en) A method and system for automatically deploying distributed data services
CN116627996A (en) Local cache update method, device, electronic device and storage medium
CN100337215C (en) Test executer

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070905

Termination date: 20131010