Movatterモバイル変換


[0]ホーム

URL:


CN104023056B - The method and relevant device updated the data - Google Patents

The method and relevant device updated the data
Download PDF

Info

Publication number
CN104023056B
CN104023056BCN201410241870.8ACN201410241870ACN104023056BCN 104023056 BCN104023056 BCN 104023056BCN 201410241870 ACN201410241870 ACN 201410241870ACN 104023056 BCN104023056 BCN 104023056B
Authority
CN
China
Prior art keywords
data
keyword
template
update
grid node
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.)
Active
Application number
CN201410241870.8A
Other languages
Chinese (zh)
Other versions
CN104023056A (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.)
Changzhou Hengtang Technology Industry Co ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co LtdfiledCriticalHuawei Technologies Co Ltd
Priority to CN201410241870.8ApriorityCriticalpatent/CN104023056B/en
Publication of CN104023056ApublicationCriticalpatent/CN104023056A/en
Application grantedgrantedCritical
Publication of CN104023056BpublicationCriticalpatent/CN104023056B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

The embodiment of the present invention provides the method updated the data and relevant device, including:Receive the first template identifier ID and the first data parsing template that control node is sent;Receive the first new information that user equipment is sent;According to the first template ID and first data parsing template, it is determined that the data of the first keyword preserved;According to first new information and first data parsing template, updating the data in the data of first keyword is determined;Updating the data in the data of first keyword of preservation and the data of first keyword, updates the data of first keyword.In above-mentioned technical proposal, when the partial data in the data that grid node preserves updates, partial data can be only updated, improves the efficiency of data renewal and redundant synchronization.

Description

Translated fromChinese
更新数据的方法和相关设备Method and related equipment for updating data

技术领域technical field

本发明实施例涉及信息技术领域,并且更具体地,涉及更新数据的方法和相关设备。The embodiments of the present invention relate to the field of information technology, and more specifically, to a method for updating data and related equipment.

背景技术Background technique

分布式内存网络是一种新型的内存计算技术。用户设备可以将所运行的应用的业务运行状态和该应用的数据存放在分布式内存网络中。分布式内存网络能够提供基于关键字值(key-value)的分布式快速内存访问能力,可以通过查找关键字快速确定该关键字所对应的数据(以下可以简称“关键字的数据”)。这样,能够实现大规模实时处理业务能力。Distributed memory network is a new type of memory computing technology. The user equipment can store the service running state of the running application and the data of the application in the distributed memory network. The distributed memory network can provide distributed and fast memory access capabilities based on key-values, and can quickly determine the data corresponding to the key by looking up the key (hereinafter referred to as "key-value data"). In this way, large-scale real-time processing business capabilities can be realized.

基于key-value的数据访问模型要求数据操作必须以关键字(key)为单位进行。当用户设备需要对运行的应用的数据进行更新时,该用户设备必须以完整的key为粒度进行操作。当需要更新的数据较多时,数据的更新性能以及冗余同步的性能就会显著下降。The data access model based on key-value requires that data operations must be performed in units of keywords (keys). When the user equipment needs to update the data of the running application, the user equipment must operate at the granularity of a complete key. When there is a lot of data to be updated, the performance of updating data and the performance of redundant synchronization will decrease significantly.

发明内容Contents of the invention

本发明实施例提供更新数据的方法和相关设备,减少数据的发送量,提高冗余同步的性能。The embodiments of the present invention provide a method for updating data and related equipment, which reduces the amount of data sent and improves the performance of redundancy synchronization.

第一方面,本发明实施例提供一种更新数据的方法,该方法由第一网格节点执行,其中该第一网格节点为分布式内存网络中第一关键字的主用数据所在的网格节点,该方法包括:接收控制节点发送的第一模板标识符ID和第一数据解析模板;接收用户设备发送的第一更新消息,其中该第一更新消息包括第一关键字的数据中的更新数据、该第一关键字和该第一模板ID,该第一关键字对应于该第一模板ID;根据该第一模板ID和该第一数据解析模板,确定该第一网格节点保存的第一关键字的数据;根据该第一更新消息和该第一数据解析模板,确定该第一关键字的数据中的更新数据;根据保存的该第一关键字的数据和该第一关键字的数据中的更新数据,更新该第一关键字的数据。In the first aspect, the embodiment of the present invention provides a method for updating data, the method is executed by the first grid node, where the first grid node is the network where the primary data of the first keyword in the distributed memory network is located. For a grid node, the method includes: receiving a first template identifier ID and a first data parsing template sent by a control node; receiving a first update message sent by a user equipment, wherein the first update message includes the first update message in the data of the first keyword update data, the first keyword and the first template ID, the first keyword corresponds to the first template ID; according to the first template ID and the first data parsing template, determine that the first grid node saves The data of the first keyword; according to the first update message and the first data parsing template, determine the update data in the data of the first keyword; according to the saved data of the first keyword and the first key The updated data in the data of the word updates the data of the first keyword.

结合第一方面,在第一种可能的实现方式中,该方法还包括:确定该第一关键字的备用数据所在的网格节点;向该第一关键字的备用数据所在的网格节点发送该第一更新数据。With reference to the first aspect, in a first possible implementation manner, the method further includes: determining the grid node where the backup data of the first key is located; and sending the grid node where the backup data of the first key is located The first update data.

第二方面,本发明实施例提供一种更新数据的方法,该方法由控制节点执行,该方法包括:接收用户设备发送的同步请求消息,该同步请求消息包括第一关键字模板和第一数据解析模板,其中该第一关键字模板包括第一关键字的属性信息,该第一数据解析模板用于构造和解析该第一关键字的数据;确定对应于该第一关键字模板的第一模板标识符ID;向该用户设备发送该第一模板ID;向分布式内存网络中的所有网格节点发送该第一模板ID和该第一数据解析模板。In a second aspect, an embodiment of the present invention provides a method for updating data, the method is executed by a control node, and the method includes: receiving a synchronization request message sent by a user equipment, where the synchronization request message includes a first keyword template and a first data An analysis template, wherein the first keyword template includes the attribute information of the first keyword, and the first data analysis template is used to construct and analyze the data of the first keyword; determine the first keyword corresponding to the first keyword template template identifier ID; sending the first template ID to the user equipment; sending the first template ID and the first data parsing template to all grid nodes in the distributed memory network.

第三方面,本发明实施例提供一种更新数据的方法,该方法由用户设备执行,该方法包括:在第一关键字的数据更新的情况下,确定第一更新消息,其中该第一更新消息包括该第一关键字的数据中的更新数据、该第一关键字和和对应于该第一关键字的第一模板标识符ID;确定分布式内存网络中该第一关键字的主用数据所在的网格节点;将该第一更新消息发送给该第一关键字的主用数据所在的网格节点,以便于该第一关键字的主用数据所在的网格节点根据该第一更新消息更新该第一关键字的数据。In a third aspect, an embodiment of the present invention provides a method for updating data, the method is executed by a user equipment, and the method includes: when the data of the first keyword is updated, determining a first update message, wherein the first update The message includes update data in the data of the first keyword, the first keyword and a first template identifier ID corresponding to the first keyword; determine the master of the first keyword in the distributed memory network The grid node where the data is located; send the first update message to the grid node where the primary data of the first keyword is located, so that the grid node where the primary data of the first keyword is located according to the first The update message updates the data of the first key.

结合第三方面,在第一种可能的实现方式中,在确定该第一更新消息之前,该方法还包括:向控制节点发送同步请求消息,该同步请求消息包括第一关键字模板和第一数据解析模板,其中该第一关键字模板包括该第一关键字的属性信息,该第一数据解析模板用于构造和解析该第一关键字的数据;接收该控制节点发送的对应于该第一关键字模板的第一模板ID;根据该第一模板ID,确定该第一关键字。With reference to the third aspect, in a first possible implementation manner, before determining the first update message, the method further includes: sending a synchronization request message to the control node, where the synchronization request message includes the first keyword template and the first A data parsing template, wherein the first keyword template includes the attribute information of the first keyword, and the first data parsing template is used to construct and parse the data of the first keyword; receiving the data corresponding to the first keyword sent by the control node A first template ID of a keyword template; determine the first keyword according to the first template ID.

结合第一种可能的实现方式,在第二种可能的实现方式中,该根据该第一模板ID,确定第一关键字,包括:根据该第一模板ID,创建该第一关键字。With reference to the first possible implementation manner, in a second possible implementation manner, determining the first keyword according to the first template ID includes: creating the first keyword according to the first template ID.

结合第一种可能的实现方式,在第三种可能的实现方式中,该根据该第一模板ID,确定第一关键字,包括:将对应于该第一关键字模板的实例关键字与该第一模板ID绑定;确定与该第一模板ID绑定的实例关键字为该第一关键字。With reference to the first possible implementation manner, in a third possible implementation manner, determining the first keyword according to the first template ID includes: combining the instance keyword corresponding to the first keyword template with the Binding to the first template ID; determining that the instance keyword bound to the first template ID is the first keyword.

第四方面,本发明实施例提供一种网格节点,该网格节点包括:接收单元,用于接收控制节点发送的第一模板标识符ID和第一数据解析模板;该接收单元,还用于接收用户设备发送的第一更新消息,其中该第一更新消息包括第一关键字的数据中的更新数据、该第一关键字和该第一模板ID,该第一关键字对应于该第一模板ID;确定单元,用于根据该接收单元接收的该第一模板ID和该第一数据解析模板,确定该网格节点保存的第一关键字的数据;该确定单元,还用于根据该接收单元接收的该第一更新消息和该第一数据解析模板,确定该第一关键字的数据中的更新数据;更新单元,用于根据保存的该第一关键字的数据和该第一关键字的数据中的更新数据,更新该第一关键字的数据。In a fourth aspect, an embodiment of the present invention provides a grid node, which includes: a receiving unit, configured to receive a first template identifier ID and a first data parsing template sent by a control node; the receiving unit also uses for receiving the first update message sent by the user equipment, wherein the first update message includes the update data in the data of the first keyword, the first keyword and the first template ID, and the first keyword corresponds to the first template ID A template ID; the determining unit is used to determine the data of the first keyword stored in the grid node according to the first template ID received by the receiving unit and the first data parsing template; the determining unit is also used to The first update message and the first data parsing template received by the receiving unit determine the update data in the data of the first keyword; the update unit is configured to, according to the saved data of the first keyword and the first The updated data in the data of the key, updates the data of the first key.

结合第四方面,在第一种可能的实现方式中,该确定单元,还用于确定该第一关键字的备用数据所在的网格节点;该网格节点还包括:发送单元,用于向该第一关键字的备用数据所在的网格节点发送该第一更新数据。With reference to the fourth aspect, in a first possible implementation manner, the determining unit is further configured to determine the grid node where the backup data of the first keyword is located; the grid node further includes: a sending unit configured to send The grid node where the standby data of the first key is located sends the first update data.

第五方面,本发明实施例提供一种控制节点,该控制节点包括:接收单元,用于接收用户设备发送的同步请求消息,该同步请求消息包括第一关键字模板和第一数据解析模板,其中该第一关键字模板包括第一关键字的属性信息,该第一数据解析模板用于构造和解析该第一关键字的数据;确定单元,用于确定对应于该第一关键字模板的第一模板标识符ID;发送单元,用于向该用户设备发送该第一模板ID;该发送单元,还用于向分布式内存网络中的所有网格节点发送该第一模板ID和该第一数据解析模板。In a fifth aspect, an embodiment of the present invention provides a control node, where the control node includes: a receiving unit, configured to receive a synchronization request message sent by a user equipment, where the synchronization request message includes a first keyword template and a first data parsing template, Wherein the first keyword template includes the attribute information of the first keyword, the first data parsing template is used to construct and parse the data of the first keyword; the determining unit is used to determine the data corresponding to the first keyword template The first template identifier ID; the sending unit is used to send the first template ID to the user equipment; the sending unit is also used to send the first template ID and the second template ID to all grid nodes in the distributed memory network A data parsing template.

第六方面,本发明实施例提供一种用户设备,该用户设备包括:确定单元,用于在第一关键字的数据更新的情况下,确定第一更新消息,其中该第一更新消息包括该第一关键字的数据中的更新数据、该第一关键字和对应于该第一关键字的第一模板标识符ID;该确定单元,还用于确定分布式内存网络中该第一关键字的主用数据所在的网格节点;发送单元,还用于将该确定单元确定的第一更新消息发送给该第一关键字的主用数据所在的网格节点。In a sixth aspect, an embodiment of the present invention provides a user equipment, which includes: a determining unit configured to determine a first update message when the data of the first keyword is updated, where the first update message includes the The update data in the data of the first keyword, the first keyword and the first template identifier ID corresponding to the first keyword; the determining unit is also used to determine the first keyword in the distributed memory network The grid node where the primary data of the first keyword is located; the sending unit is further configured to send the first update message determined by the determining unit to the grid node where the primary data of the first keyword is located.

结合第六方面,在第一种可能的实现方式中,该发送单元,还用于向控制节点发送同步请求消息,该同步请求消息包括第一关键字模板和第一数据解析模板,其中该第一关键字模板包括该第一关键字的属性信息,该第一数据解析模板用于构造和解析该第一关键字的数据;该用户设备还包括:接收单元,用于接收该控制节点发送的对应于该第一关键字模板的第一模板ID;该确定单元,还用于根据该第一模板ID,确定该第一关键字。With reference to the sixth aspect, in a first possible implementation manner, the sending unit is further configured to send a synchronization request message to the control node, where the synchronization request message includes a first keyword template and a first data parsing template, where the first A keyword template includes the attribute information of the first keyword, and the first data parsing template is used to construct and parse the data of the first keyword; the user equipment also includes: a receiving unit, configured to receive the data sent by the control node A first template ID corresponding to the first keyword template; the determining unit is further configured to determine the first keyword according to the first template ID.

结合第一种可能的实现方式,在第二种可能的实现方式中,该确定单元,具体用于根据该第一模板ID,创建该第一关键字。With reference to the first possible implementation manner, in a second possible implementation manner, the determining unit is specifically configured to create the first keyword according to the first template ID.

结合第一种可能的实现方式,在第三种可能的实现方式中,该确定单元,具体用于将对应于该第一关键字模板的实例关键字与该第一模板ID绑定,确定与该第一模板ID绑定的实例关键字为该第一关键字。With reference to the first possible implementation manner, in a third possible implementation manner, the determining unit is specifically configured to bind the instance keyword corresponding to the first keyword template to the first template ID, and determine and The instance key bound to the first template ID is the first key.

上述技术方案中,分布式内存网络中的网格节点能够根据更新消息以及数据解析模板将所保存的数据中需要更新的部分数据进行更新,无需将所有数据进行更新。当网格节点保存的数据中的部分数据发生更新时,可以仅传输更新的数据,而没有更新的数据可以不被传输。这样,可以提高数据更新以及冗余同步的效率。In the above technical solution, the grid nodes in the distributed memory network can update part of the stored data that needs to be updated according to the update message and the data parsing template, without updating all the data. When part of the data stored in the grid node is updated, only the updated data may be transmitted, and the non-updated data may not be transmitted. In this way, the efficiency of data update and redundancy synchronization can be improved.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required in the embodiments of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.

图1是根据本发明实施例提供的更新数据的方法的示意性流程图。Fig. 1 is a schematic flowchart of a method for updating data provided according to an embodiment of the present invention.

图2是根据本发明实施例提供的更新数据的方法的示意性流程图。Fig. 2 is a schematic flowchart of a method for updating data provided according to an embodiment of the present invention.

图3是根据本发明实施例提供的更新数据的方法的示意性流程图。Fig. 3 is a schematic flowchart of a method for updating data provided according to an embodiment of the present invention.

图4是根据本发明实施例提供的更新数据的方法的示意图。Fig. 4 is a schematic diagram of a method for updating data provided according to an embodiment of the present invention.

图5是根据本发明实施例提供的网格节点的结构框图。Fig. 5 is a structural block diagram of a grid node provided according to an embodiment of the present invention.

图6是根据本发明实施例确定的控制节点的结构框图。Fig. 6 is a structural block diagram of a control node determined according to an embodiment of the present invention.

图7是根据本发明实施例提供的用户设备的结构框图。Fig. 7 is a structural block diagram of user equipment provided according to an embodiment of the present invention.

图8是根据本发明实施例提供的分布式内存网络的结构示意图。Fig. 8 is a schematic structural diagram of a distributed memory network provided according to an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

图1是根据本发明实施例提供的更新数据的方法的示意性流程图。图1所示的方法由第一网格节点执行,其中该第一网格节点为分布式内存网络中第一关键字的主用数据所在的网格节点。Fig. 1 is a schematic flowchart of a method for updating data provided according to an embodiment of the present invention. The method shown in FIG. 1 is executed by the first grid node, where the first grid node is the grid node where the primary data of the first key is located in the distributed memory network.

101,接收控制节点发送的第一模板标识符(Identifier,ID)和第一数据解析模板。101. Receive a first template identifier (Identifier, ID) and a first data parsing template sent by a control node.

102,接收用户设备发送的第一更新消息,其中该第一更新消息包括第一关键字的数据中的更新数据、该第一关键字和该第一模板ID,该第一关键字对应于该第一模板ID。102. Receive a first update message sent by a user equipment, where the first update message includes update data in data of a first keyword, the first keyword, and the first template ID, where the first keyword corresponds to the ID of the first template.

103,根据该第一模板ID和该第一数据解析模板,确定该第一网格节点保存的第一关键字的数据。103. According to the first template ID and the first data parsing template, determine the data of the first keyword stored in the first grid node.

104,根据该第一更新消息和该第一数据解析模板,确定该第一关键字的数据中的更新数据。104. Determine update data in the data of the first keyword according to the first update message and the first data parsing template.

105,根据保存的该第一关键字的数据和该第一关键字的数据中的更新数据,更新该第一关键字的数据。105. Update the data of the first keyword according to the stored data of the first keyword and update data in the data of the first keyword.

根据图1所示的方法,分布式内存网络中的第一关键字的主用数据的网格节点能够根据对应于第一关键字的更新消息以及对应于第一关键字的数据解析模板将所保存的对应于第一关键字的数据中需要更新的部分数据进行更新,无需将对应于第一关键字的所有数据进行更新。当第一关键字的数据中的部分数据发生更新时,可以仅传输更新的数据,而没有更新的数据可以不被传输。这样,可以提高数据更新的效率。According to the method shown in Figure 1, the grid node of the master data of the first keyword in the distributed memory network can convert all Part of the stored data corresponding to the first keyword that needs to be updated is updated without updating all the data corresponding to the first keyword. When part of the data of the first key is updated, only the updated data may be transmitted, and the non-updated data may not be transmitted. In this way, the efficiency of data update can be improved.

进一步,图1所示的方法还可以包括:确定该第一关键字的备用数据所在的网格节点,向该第一关键字的备用数据所在的网格节点发送该第一更新数据,以便该第一关键字的备用数据所在的网格节点将保存的第一关键字的数据进行更新。这样,当进行针对第一关键字的冗余同步时,可以仅将该第一关键字的数据中更新的数据发送给该第一关键字的备用数据所在的节点。冗余同步的性能可以得到提升。Further, the method shown in FIG. 1 may further include: determining the grid node where the backup data of the first key is located, and sending the first update data to the grid node where the backup data of the first key is located, so that the The grid node where the spare data of the first key is located updates the saved data of the first key. In this way, when performing redundant synchronization for the first key, only the updated data of the data of the first key may be sent to the node where the backup data of the first key is located. The performance of redundant synchronization can be improved.

图2是根据本发明实施例提供的更新数据的方法的示意性流程图。图2所示的方法由控制节点执行。Fig. 2 is a schematic flowchart of a method for updating data provided according to an embodiment of the present invention. The method shown in Fig. 2 is executed by the control node.

201,接收用户设备发送的同步请求消息,其中该同步请求消息包括第一关键字模板和第一数据解析模板,其中该第一关键字模板包括第一关键字的属性信息,该第一数据解析模板用于构造和解析该第一关键字的数据。201. Receive a synchronization request message sent by a user equipment, where the synchronization request message includes a first keyword template and a first data parsing template, where the first keyword template includes attribute information of a first keyword, and the first data parsing template The template is used to construct and parse the data of the first key.

202,确定对应于该第一关键字模板的第一模板ID。202. Determine a first template ID corresponding to the first keyword template.

203,向该用户设备发送该第一模板ID。203. Send the first template ID to the user equipment.

204,向分布式内存网络中的所有网格节点发送该第一模板ID和该第一数据解析模板。204. Send the first template ID and the first data parsing template to all grid nodes in the distributed memory network.

根据图2所示的方法,控制节点能够将接收到的关键字模板和数据解析模板发送给分布式内存网络中的所有网格节点。此外,该控制节点还能够确定模板ID并将该模板ID发送给用户设备。用户设备能够根据该模板ID确定相应的关键字。该分布式内存网格中的网格节点能够根据该关键字模板和该数据解析模板确定该关键字对应的数据。According to the method shown in Fig. 2, the control node can send the received keyword template and data parsing template to all grid nodes in the distributed memory network. In addition, the control node can also determine the template ID and send the template ID to the user equipment. The user equipment can determine the corresponding keyword according to the template ID. The grid nodes in the distributed memory grid can determine the data corresponding to the keyword according to the keyword template and the data parsing template.

图3是根据本发明实施例提供的更新数据的方法的示意性流程图。图3所示的方法由用户设备执行。Fig. 3 is a schematic flowchart of a method for updating data provided according to an embodiment of the present invention. The method shown in Fig. 3 is executed by the user equipment.

301,在该第一关键字的数据更新的情况下,确定第一更新消息,其中该第一更新消息包括该第一关键字的数据中的更新数据、该第一关键字和对应于该第一关键字的第一模板ID。301. When the data of the first keyword is updated, determine a first update message, where the first update message includes update data in the data of the first keyword, the first keyword and the The first template ID of a keyword.

302,确定分布式内存网络中该第一关键字的主用数据所在的网格节点。302. Determine the grid node where the primary data of the first keyword is located in the distributed memory network.

303,将该第一更新消息发送给该第一关键字的主用数据所在的网格节点。303. Send the first update message to the grid node where the primary data of the first keyword is located.

根据图3所示的方法,当用户设备需要更改分布式内存网络中保存的数据时,该用户设备只需要将更新的数据发送给主用数据所在的网格节点,而不需要将该更新数据对应的关键字的所有数据发送给该关键字的主用数据所在的网格节点。换句话说,图3所示的方法可以仅对关键字的数据中的部分数据发送给该关键字的主用数据所在的网格节点,而不需要将该关键字的所有数据重新发送给该关键字的主用数据所在的网格节点。这样,不需要以完整的关键字为粒度进行更新操作,可以减少数据的发送量,提高冗余同步的性能。According to the method shown in Figure 3, when the user equipment needs to change the data stored in the distributed memory network, the user equipment only needs to send the updated data to the grid node where the main data is located, without the need to update the updated data All data of the corresponding keyword is sent to the grid node where the primary data of the keyword is located. In other words, the method shown in FIG. 3 can only send part of the data of a keyword to the grid node where the primary data of the keyword is located, without resending all the data of the keyword to the grid node. The grid node where the key's primary data resides. In this way, the update operation does not need to be performed at the granularity of complete keywords, which can reduce the amount of data sent and improve the performance of redundant synchronization.

进一步,在执行步骤301之前,用户设备还可以向控制节点发送同步请求消息,接收该控制节点发送的对应于该第一关键字模板的第一模板标识符(Identifier,ID),根据该第一模板ID,确定第一关键字,其中该同步请求消息包括第一关键字模板和第一数据解析模板,其中该第一关键字模板包括第一关键字的属性信息,该第一数据解析模板用于构造和解析该第一关键字的数据。Further, before performing step 301, the user equipment may also send a synchronization request message to the control node, receive a first template identifier (Identifier, ID) corresponding to the first keyword template sent by the control node, and according to the first Template ID, to determine the first keyword, wherein the synchronization request message includes a first keyword template and a first data parsing template, wherein the first keyword template includes attribute information of the first keyword, and the first data parsing template uses Data for constructing and parsing the first key.

可选的,作为一个实施例,该根据该第一模板ID,确定第一关键字,包括:根据该第一模板ID,创建该第一关键字。具体来说,该用户设备可以调用内存网格创建关键字应用程序编程接口(Application Programming Interface,API),传入该第一模板ID,创建该第一关键字。刚创建的第一关键字的数据可以是空。Optionally, as an embodiment, the determining the first keyword according to the first template ID includes: creating the first keyword according to the first template ID. Specifically, the user equipment may call the memory grid to create a keyword application programming interface (Application Programming Interface, API), pass in the first template ID, and create the first keyword. The data of the first key just created can be empty.

可选的,作为另一个实施例,该根据该第一模板ID,确定第一关键字,包括:将对应于该第一关键字模板的实例关键字与该第一模板ID绑定,确定与该第一模板ID绑定的实例关键字为该第一关键字。在此情况下,该第一关键字模板可以是根据该实例关键字模板确定的。该实例关键字可以是该用户设备中已经创建好的关键字。Optionally, as another embodiment, determining the first keyword according to the first template ID includes: binding an instance keyword corresponding to the first keyword template to the first template ID, and determining the The instance key bound to the first template ID is the first key. In this case, the first keyword template may be determined according to the example keyword template. The instance keyword may be a keyword already created in the user equipment.

图4是根据本发明实施例提供的更新数据的方法的示意图。分布式内存网络包括一个控制节点和多个网格节点。Fig. 4 is a schematic diagram of a method for updating data provided according to an embodiment of the present invention. The distributed memory network includes a control node and multiple grid nodes.

401,用户设备向控制节点发送同步请求消息,该同步请求消息包括第一关键字模板和第一数据解析模板,其中该第一关键字模板包括第一关键字的属性信息,该第一数据解析模板用于构造和解析该第一关键字的数据。401. The user equipment sends a synchronization request message to the control node, where the synchronization request message includes a first keyword template and a first data parsing template, where the first keyword template includes attribute information of the first keyword, and the first data parsing template The template is used to construct and parse the data of the first key.

该第一关键字的属性信息可以是关键字的大小、关键字的版本号等。The attribute information of the first keyword may be the size of the keyword, the version number of the keyword, and the like.

402,该控制节点确定对应于该第一关键字模板的第一模板ID。402. The control node determines a first template ID corresponding to the first keyword template.

403,该控制节点将该第一关键字模板和该第一数据解析模板发送给分布式内存网络中的所有网格节点。403. The control node sends the first keyword template and the first data parsing template to all grid nodes in the distributed memory network.

404,该控制节点将该第一模板ID发送给该用户设备。404. The control node sends the first template ID to the user equipment.

405,该用户设备根据该第一模板ID确定第一关键字。405. The user equipment determines a first keyword according to the first template ID.

可选的,作为一个实施例,该用户设备可以根据该第一模板ID,创建该第一关键字。具体来说,该用户设备可以调用内存网格创建关键字API,传入该第一模板ID,创建该第一关键字。刚创建的第一关键字中的内容可以是空。Optionally, as an embodiment, the user equipment may create the first keyword according to the first template ID. Specifically, the user equipment may call an API for creating a keyword in the memory grid, pass in the first template ID, and create the first keyword. The content in the first keyword just created can be empty.

可选的,作为另一个实施例,该用户设备可以将对应于该第一关键字模板的实例关键字与该第一模板ID绑定,确定与该第一模板ID绑定的实例关键字为该第一关键字。在此情况下,该第一关键字模板可以是根据该实例关键字模板确定的。Optionally, as another embodiment, the user equipment may bind the instance keyword corresponding to the first keyword template to the first template ID, and determine that the instance keyword bound to the first template ID is The first keyword. In this case, the first keyword template may be determined according to the example keyword template.

406,该用户设备可以确定第一更新消息。406. The user equipment may determine the first update message.

具体来说,该用户设备在该第一关键字的数据更新的情况下,确定该第一更新消息,其中该第一更新消息包括该第一关键字的数据中的更新数据、该第一关键字和该第一模板ID。Specifically, when the data of the first key is updated, the user equipment determines the first update message, wherein the first update message includes update data in the data of the first key, the first key word and the first template ID.

407,该用户设备可以确定该分布式内存网络中该第一关键字的主用数据所在的网格节点。407. The user equipment may determine a grid node in the distributed memory network where the primary data of the first keyword is located.

具体来说,该第一关键字的数据可以保存在该分布式内存网络中的多个网格节点。该多个网格节点中的一个网格节点是该第一关键字的主用数据所在的网格节点,其余的网格节点是该第一关键字的备用数据所在的网格节点。该用户设备可以通过一致性哈希(hash)算法确定主用数据所在的网格节点。为方便描述,该第一关键字的主用数据所在的网格节点以下简称为第一网格节点,该第一关键字的备用数据所在的网格节点以下简称为备用网格节点。可以理解的是,图4中所示的备用网格节点可以是多个网格节点。Specifically, the data of the first key can be stored in multiple grid nodes in the distributed memory network. One of the plurality of grid nodes is a grid node where the primary data of the first key is located, and the rest of the grid nodes are grid nodes where the backup data of the first key is located. The user equipment may determine the grid node where the primary data resides through a consistent hash (hash) algorithm. For the convenience of description, the grid node where the primary data of the first key is located is hereinafter referred to as the first grid node, and the grid node where the backup data of the first key is located is hereinafter referred to as the standby grid node. It can be understood that the standby grid nodes shown in FIG. 4 may be multiple grid nodes.

408,该用户设备将该第一更新消息发送给该第一网格节点。408. The user equipment sends the first update message to the first mesh node.

409,该第一网格节点可以根据该第一模板ID和该第一数据解析模板确定该第一网格节点保存的第一关键字的数据。409. The first grid node may determine the data of the first keyword stored by the first grid node according to the first template ID and the first data parsing template.

410,该第一网格节点还可以根据该第一更新消息和该第一数据解析模板,确定该第一关键字的数据中的更新数据。410. The first grid node may also determine update data in the data of the first keyword according to the first update message and the first data parsing template.

411,该第一网格节点根据该第一网格节点保存的该第一关键字的数据和该第一关键字的数据中的更新数据,更新该第一网格节点保存的第一关键字的数据。411. The first grid node updates the first key stored in the first grid node according to the data of the first key stored in the first grid node and update data in the data of the first key The data.

412,该第一网格节点还可以确定该第一关键字的备用数据所在的网格节点。412. The first grid node may further determine the grid node where the spare data of the first key is located.

413,该第一网格节点将该第一更新消息发送给该第一关键字的备用数据所在的网格节点。413. The first grid node sends the first update message to the grid node where the spare data of the first key is located.

该第一关键字的备用数据可以存储在一个或多个网格节点中。该第一关键字的备用数据所在的每一个网格节点可以根据该第一模板ID和该第一数据解析模板确定保存的第一关键字的数据,根据该第一更新消息和该第一数据解析模板,确定该第一关键字的数据中的更新数据,根据该保存的第一关键字的数据和该第一关键字的数据中的更新数据,更新保存的第一关键字的数据。这样,该分布式内存网络中该第一关键字的数据的冗余数据也得到更新。Backup data for the first key may be stored in one or more mesh nodes. Each grid node where the spare data of the first keyword is located can determine the saved data of the first keyword according to the first template ID and the first data parsing template, and according to the first update message and the first data Analyzing the template, determining the updated data in the data of the first keyword, and updating the stored data of the first keyword according to the stored data of the first keyword and the updated data in the data of the first keyword. In this way, the redundant data of the data of the first keyword in the distributed memory network is also updated.

根据图4所示的方法,用户设备可以构造关键字模板和对应于该关键字的数据解析模板。分布式内存网络中的网格节点可以根据该关键字模板和该数据解析模板确定该关键字的数据。当用户设备中的数据发生更新时,该用户设备可以将关键字的数据中更新的数据发送给分布式内存网络中该更新数据的原始数据的主用数据所在的网格节点而无需将该关键字的所有数据发送给该关键字的主用数据所在的网格节点。该主用数据所在的网格节点可以根据关键字以及对应于该关键字的数据解析模板确定该关键字的数据中需要更新的数据,并将相应的数据更新。然后,该主用数据所在的网格节点可以将需要更新的数据发送给备用数据所在的网格节点。该备用数据所在的网格节点也可以根据该关键字以及对应于该关键字的数据解析模板确定该关键字的数据中需要更新的数据,并将相应的数据更新。这样,在更新该分布式内存网络中保存的数据时,无需将该数据的关键字所对应的所有数据进行更新,而只需将需要更新的部分数据更新即可,从而能够减少更新数据时数据的传输量,提高更新数据的效率。According to the method shown in FIG. 4 , the user equipment can construct a keyword template and a data parsing template corresponding to the keyword. The grid nodes in the distributed memory network can determine the data of the keyword according to the keyword template and the data parsing template. When the data in the user equipment is updated, the user equipment can send the updated data in the data of the key to the grid node where the primary data of the original data of the updated data is located in the distributed memory network without the key All data of a word is sent to the grid node where the primary data of this keyword is located. The grid node where the primary data is located can determine the data that needs to be updated in the data of the keyword according to the keyword and the data parsing template corresponding to the keyword, and update the corresponding data. Then, the grid node where the primary data is located can send the data that needs to be updated to the grid node where the standby data is located. The grid node where the standby data is located can also determine the data that needs to be updated in the data of the keyword according to the keyword and the data parsing template corresponding to the keyword, and update the corresponding data. In this way, when updating the data stored in the distributed memory network, it is not necessary to update all the data corresponding to the keyword of the data, but only need to update the part of the data that needs to be updated, thereby reducing the time required for updating the data. The transmission volume improves the efficiency of updating data.

图5是根据本发明实施例提供的网格节点的结构框图。图5所示的网格节点能够执行图1所示的各个步骤。图5所示的网格节点还能够执行图4所示的第一网格节点执行的各个步骤。网格节点500可以包括接收单元501、确定单元502和更新单元503。Fig. 5 is a structural block diagram of a grid node provided according to an embodiment of the present invention. The grid nodes shown in FIG. 5 are capable of performing the various steps shown in FIG. 1 . The mesh node shown in FIG. 5 is also capable of performing various steps performed by the first mesh node shown in FIG. 4 . The mesh node 500 may include a receiving unit 501 , a determining unit 502 and an updating unit 503 .

接收单元501,用于接收控制节点发送的第一模板ID和第一数据解析模板。The receiving unit 501 is configured to receive the first template ID and the first data parsing template sent by the control node.

接收单元501,还用于接收用户设备发送的第一更新消息,其中该第一更新消息包括第一关键字的数据中的更新数据、该第一关键字和第一模板ID,该第一关键字对应于该第一模板ID。The receiving unit 501 is further configured to receive a first update message sent by the user equipment, where the first update message includes update data in the data of the first key, the first key, and a first template ID, and the first key A word corresponds to the first template ID.

确定单元502,用于根据接收单元501接收到的该第一模板ID和该第一数据解析模板,确定网格节点500保存的第一关键字的数据。The determining unit 502 is configured to determine the data of the first keyword stored in the grid node 500 according to the first template ID received by the receiving unit 501 and the first data parsing template.

确定单元502,还用于根据接收单元701接收到的该第一更新消息和该第一数据解析模板,确定该第一关键字的数据中的更新数据。The determining unit 502 is further configured to determine update data in the data of the first keyword according to the first update message received by the receiving unit 701 and the first data parsing template.

更新单元503,用于根据保存的该第一关键字的数据和该第一关键字的数据中的更新数据,更新该第一关键字的数据。The updating unit 503 is configured to update the data of the first keyword according to the stored data of the first keyword and update data of the data of the first keyword.

图5所示的网格节点为分布式内存网络中的第一关键字的主用数据的网格节点,该网格节点能够根据更新消息将所保存的对应于第一关键字的数据中需要更新的部分数据进行更新,无需将对应于第一关键字的所有数据进行更新。当第一关键字的数据中的部分数据发生更新时,可以仅传输更新的数据,而没有更新的数据可以不被传输。这样,可以提高数据更新的效率。The grid node shown in Figure 5 is the grid node of the primary data of the first keyword in the distributed memory network, and the grid node can update the stored data corresponding to the first keyword according to the required The updated part of the data is updated without updating all the data corresponding to the first keyword. When part of the data of the first key is updated, only the updated data may be transmitted, and the non-updated data may not be transmitted. In this way, the efficiency of data update can be improved.

进一步,确定单元502,还用于确定该第一关键字的备用数据所在的网格节点。在此情况下,网格节点500还可以包括发送单元504。发送单元504,用于向该第一关键字的备用数据所在的网格节点发送该第一更新数据。Further, the determining unit 502 is further configured to determine the grid node where the spare data of the first keyword is located. In this case, the mesh node 500 may further include a sending unit 504 . The sending unit 504 is configured to send the first update data to the grid node where the spare data of the first keyword is located.

图6是根据本发明实施例确定的控制节点的结构框图。图6所示的控制节点能够执行图2所示的各个步骤。图6所示的控制节点还能够执行图4所示中控制节点执行的各个步骤。控制节点600可以包括:接收单元601,确定单元602和发送单元603。Fig. 6 is a structural block diagram of a control node determined according to an embodiment of the present invention. The control node shown in FIG. 6 is capable of performing the various steps shown in FIG. 2 . The control node shown in FIG. 6 can also execute various steps performed by the control node shown in FIG. 4 . The control node 600 may include: a receiving unit 601 , a determining unit 602 and a sending unit 603 .

接收单元601,用于接收用户设备发送的同步请求消息,该同步请求消息包括第一关键字模板和第一数据解析模板,其中该第一关键字模板包括第一关键字的属性信息,该第一数据解析模板用于构造和解析该第一关键字的数据。The receiving unit 601 is configured to receive a synchronization request message sent by a user equipment, where the synchronization request message includes a first keyword template and a first data parsing template, where the first keyword template includes attribute information of the first keyword, and the second A data parsing template is used to construct and parse the data of the first keyword.

确定单元602,用于确定对应于该第一关键字模板的第一模板ID。The determining unit 602 is configured to determine a first template ID corresponding to the first keyword template.

发送单元603,用于向该用户设备发送该第一模板ID。A sending unit 603, configured to send the first template ID to the user equipment.

发送单元603,还用于向分布式内存网络中的所有网格节点发送该第一模板ID和该第一数据解析模板。The sending unit 603 is further configured to send the first template ID and the first data parsing template to all grid nodes in the distributed memory network.

图6所示的控制节点600能够将接收到的关键字模板和数据解析模板发送给分布式内存网络中的所有网格节点。此外,控制节点600还能够确定模板ID并将该模板ID发送给用户设备。用户设备能够根据该模板ID确定相应的关键字。该分布式内存网络中的网格节点能够根据该关键字模板和该数据解析模板确定该关键字对应的数据。The control node 600 shown in FIG. 6 can send the received keyword template and data parsing template to all grid nodes in the distributed memory network. In addition, the control node 600 can also determine the template ID and send the template ID to the user equipment. The user equipment can determine the corresponding keyword according to the template ID. The grid nodes in the distributed memory network can determine the data corresponding to the keyword according to the keyword template and the data parsing template.

图7是根据本发明实施例提供的用户设备的结构框图。图7所示的用户设备能够执行图3所示方法的各个步骤。图7所示的用户设备还可以执行图4中用户设备执行的各个步骤。用户设备700可以包括确定单元701和发送单元702。Fig. 7 is a structural block diagram of user equipment provided according to an embodiment of the present invention. The user equipment shown in FIG. 7 can execute various steps of the method shown in FIG. 3 . The user equipment shown in FIG. 7 may also perform various steps performed by the user equipment in FIG. 4 . The user equipment 700 may include a determining unit 701 and a sending unit 702 .

确定单元701,还用于在该第一关键字的数据更新的情况下,确定第一更新消息,其中该第一更新消息包括该第一关键字的数据中的更新数据、该第一关键字和对应于该第一关键字的第一模板ID。The determining unit 701 is further configured to determine a first update message when the data of the first keyword is updated, where the first update message includes update data in the data of the first keyword, the first keyword and the first template ID corresponding to the first keyword.

确定单元701,还用于确定分布式内存网络中该第一关键字的主用数据所在的网格节点。The determining unit 701 is further configured to determine the grid node where the primary data of the first keyword is located in the distributed memory network.

发送单元702,还用于将确定单元701确定的第一更新消息发送给该第一关键字的主用数据所在的网格节点。The sending unit 702 is further configured to send the first update message determined by the determining unit 701 to the grid node where the primary data of the first keyword is located.

当用户设备700需要更改分布式内存网络中保存的数据时,用户设备700只需要将更新的数据发送给主用数据所在的网格节点,而不需要将该更新数据对应的关键字的所有数据发送给该关键字的主用数据所在的网格节点。换句话说,图7所示的用户设备700可以仅对关键字的数据中的部分数据发送给该关键字的主用数据所在的网格节点,而不需要将该关键字的所有数据重新发送给该关键字的主用数据所在的网格节点。这样,不需要以完整的关键字为粒度进行更新操作,可以减少数据的发送量,提高冗余同步的性能。When the user equipment 700 needs to change the data stored in the distributed memory network, the user equipment 700 only needs to send the updated data to the grid node where the main data is located, and does not need to update all the data corresponding to the key The grid node where the primary data sent to this keyword resides. In other words, the user equipment 700 shown in FIG. 7 can only send part of the data of the keyword to the grid node where the primary data of the keyword is located, without resending all the data of the keyword The grid node where the primary data for this keyword resides. In this way, the update operation does not need to be performed at the granularity of complete keywords, which can reduce the amount of data sent and improve the performance of redundant synchronization.

进一步,发送单元702,还用于向控制节点发送同步请求消息,该同步请求消息包括第一关键字模板和第一数据解析模板,其中该第一关键字模板包括第一关键字的属性信息,该第一数据解析模板用于构造和解析该第一关键字的数据。用户设备700还可以包括接收单元703。接收单元703,用于接收该控制节点发送的对应于该第一关键字模板的第一模板ID。确定单元701,用于根据接收单元703接收到的该第一模板ID,确定该第一关键字。Further, the sending unit 702 is further configured to send a synchronization request message to the control node, where the synchronization request message includes a first keyword template and a first data parsing template, where the first keyword template includes attribute information of the first keyword, The first data parsing template is used to construct and parse the data of the first keyword. The user equipment 700 may also include a receiving unit 703 . The receiving unit 703 is configured to receive a first template ID corresponding to the first keyword template sent by the control node. The determining unit 701 is configured to determine the first keyword according to the first template ID received by the receiving unit 703 .

可选的,作为一个实施例,确定单元701,具体用于根据该第一模板ID,创建该第一关键字。具体来说,确定单元701,可以调用内存网格创建关键字API,传入该第一模板ID,创建该第一关键字。刚创建的第一关键字的数据可以是空的。Optionally, as an embodiment, the determining unit 701 is specifically configured to create the first keyword according to the first template ID. Specifically, the determining unit 701 may call the memory grid creation keyword API, pass in the first template ID, and create the first keyword. The data of the first key just created can be empty.

可选的,作为另一个实施例,确定单元701,具体用于将对应于该第一关键字模板的实例关键字与该第一模板ID绑定,确定与该第一模板ID绑定的实例关键字作为该第一关键字。在此情况下,该第一关键字模板可以是根据该实例关键字模板确定的。该实例关键字可以是该用户设备中已经创建好的关键字。Optionally, as another embodiment, the determining unit 701 is specifically configured to bind the instance keyword corresponding to the first keyword template to the first template ID, and determine the instance keyword bound to the first template ID keyword as the first keyword. In this case, the first keyword template may be determined according to the example keyword template. The instance keyword may be a keyword already created in the user equipment.

图8是根据本发明实施例提供的分布式内存网络的结构示意图。图8所示的分布式内存网络800中可以包括一个如图6所示的控制节点600以及多个如图5所示的网格节点500。Fig. 8 is a schematic structural diagram of a distributed memory network provided according to an embodiment of the present invention. The distributed memory network 800 shown in FIG. 8 may include one control node 600 as shown in FIG. 6 and multiple grid nodes 500 as shown in FIG. 5 .

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内,因此本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. All should be covered within the protection scope of the present invention, so the protection scope of the present invention should be based on the protection scope of the claims.

Claims (14)

Translated fromChinese
1.一种更新数据的方法,其特征在于,所述方法由第一网格节点执行,其中所述第一网格节点为分布式内存网络中第一关键字的主用数据所在的网格节点,所述方法包括:1. A method for updating data, characterized in that the method is executed by a first grid node, wherein the first grid node is the grid where the primary data of the first keyword in the distributed memory network is located node, the method comprising:接收控制节点发送的第一模板标识符ID和第一数据解析模板;Receive the first template identifier ID and the first data parsing template sent by the control node;接收用户设备发送的第一更新消息,其中所述第一更新消息包括第一关键字的数据中的更新数据、所述第一关键字以及所述第一模版ID,所述第一关键字对应于所述第一模板ID;receiving a first update message sent by the user equipment, wherein the first update message includes update data in the data of the first keyword, the first keyword, and the first template ID, and the first keyword corresponds to on the first template ID;根据所述第一模板ID和所述第一数据解析模板,确定所述第一网格节点保存的第一关键字的数据;determining the data of the first keyword stored in the first grid node according to the first template ID and the first data parsing template;根据所述第一更新消息和所述第一数据解析模板,确定所述第一关键字的数据中的更新数据;determining update data in the data of the first keyword according to the first update message and the first data parsing template;根据保存的所述第一关键字的数据和所述第一关键字的数据中的更新数据,更新所述第一关键字的数据。The data of the first keyword is updated according to the stored data of the first keyword and update data in the data of the first keyword.2.如权利要求1所述的方法,其特征在于,所述方法还包括:2. The method of claim 1, further comprising:确定所述第一关键字的备用数据所在的网格节点;determining the grid node where the standby data of the first keyword is located;向所述第一关键字的备用数据所在的网格节点发送所述第一更新数据。Sending the first update data to the grid node where the spare data of the first key is located.3.一种更新数据的方法,其特征在于,所述方法由控制节点执行,所述方法包括:3. A method for updating data, characterized in that, the method is performed by a control node, and the method comprises:接收用户设备发送的同步请求消息,所述同步请求消息包括第一关键字模板和第一数据解析模板,其中所述第一关键字模板包括第一关键字的属性信息,所述第一数据解析模板用于构造和解析所述第一关键字的数据;Receive a synchronization request message sent by the user equipment, the synchronization request message includes a first keyword template and a first data parsing template, wherein the first keyword template includes attribute information of the first keyword, and the first data parsing The template is used to construct and parse the data of the first keyword;确定对应于所述第一关键字模板的第一模板标识符ID;determining a first template identifier ID corresponding to the first keyword template;向所述用户设备发送所述第一模板ID;sending the first template ID to the user equipment;向分布式内存网络中的所有网格节点发送所述第一模板ID和所述第一数据解析模板,其中,所述所有网格节点包括第一网格节点,所述第一网格节点为分布式内存网络中第一关键字的主用数据所在的网格节点,所述第一模板ID和所述第一数据解析模板用于所述第一网格节点确定所述第一关键字的数据,并根据所述第一关键字的数据和所述第一关键字的数据中的更新数据更新所述第一关键字的数据,所述更新数据是所述第一网格节点根据所述第一数据解析模板以及从所述用户设备接收的第一更新消息确定,所述第一更新消息包括第一关键字的数据中的更新数据、所述第一关键字以及所述第一模版ID,所述第一关键字对应于所述第一模板ID。sending the first template ID and the first data parsing template to all grid nodes in the distributed memory network, wherein all the grid nodes include the first grid node, and the first grid node is The grid node where the primary data of the first keyword is located in the distributed memory network, the first template ID and the first data parsing template are used by the first grid node to determine the data, and update the data of the first keyword according to the data of the first keyword and the update data in the data of the first keyword, the update data is the data of the first mesh node according to the The first data parsing template and the first update message received from the user equipment determine that the first update message includes update data in the data of the first keyword, the first keyword, and the first template ID. , the first keyword corresponds to the first template ID.4.一种更新数据的方法,其特征在于,所述方法由用户设备执行,所述方法包括:4. A method for updating data, characterized in that the method is executed by user equipment, and the method comprises:在第一关键字的数据更新的情况下,确定第一更新消息,其中所述第一更新消息包括所述第一关键字的数据中的更新数据、所述第一关键字和对应于所述第一关键字的第一模板标识符ID;In the case that the data of the first keyword is updated, a first update message is determined, wherein the first update message includes update data in the data of the first keyword, the first keyword and the the first template identifier ID of the first keyword;确定第一网格节点,所述第一网格节点为分布式内存网络中所述第一关键字的主用数据所在的网格节点;determining a first grid node, where the first grid node is a grid node where the primary data of the first keyword in the distributed memory network is located;将所述第一更新消息发送给所述第一网格节点,以便于所述第一网格节点根据所述第一更新消息更新以及从控制节点接收的第一数据解析模板确定所述第一关键字的数据中的更新数据,并根据保存的所述第一关键字的数据和所述更新数据更新所述第一关键字的数据,其中,所述第一关键字的数据是所述第一网格节点根据所述第一模板ID和所述第一数据解析模板确定的。sending the first update message to the first grid node, so that the first grid node determines the first update data in the data of the keyword, and update the data of the first keyword according to the stored data of the first keyword and the update data, wherein the data of the first keyword is the first keyword A grid node is determined according to the first template ID and the first data parsing template.5.如权利要求4所述的方法,其特征在于,在确定所述第一更新消息之前,所述方法还包括:5. The method according to claim 4, wherein before determining the first update message, the method further comprises:向控制节点发送同步请求消息,所述同步请求消息包括第一关键字模板和第一数据解析模板,其中所述第一关键字模板包括所述第一关键字的属性信息,所述第一数据解析模板用于构造和解析所述第一关键字的数据;Sending a synchronization request message to the control node, the synchronization request message including a first keyword template and a first data parsing template, wherein the first keyword template includes attribute information of the first keyword, and the first data The parsing template is used to construct and parse the data of the first keyword;接收所述控制节点发送的对应于所述第一关键字模板的第一模板ID;receiving a first template ID corresponding to the first keyword template sent by the control node;根据所述第一模板ID,确定所述第一关键字。Determine the first keyword according to the first template ID.6.如权利要求5所述的方法,其特征在于,所述根据所述第一模板ID,确定第一关键字,包括:6. The method according to claim 5, wherein said determining the first keyword according to the first template ID comprises:根据所述第一模板ID,创建所述第一关键字。Create the first keyword according to the first template ID.7.如权利要求5所述的方法,其特征在于,所述根据所述第一模板ID,确定第一关键字,包括:7. The method according to claim 5, wherein said determining the first keyword according to the first template ID comprises:将对应于所述第一关键字模板的实例关键字与所述第一模板ID绑定;binding an instance keyword corresponding to the first keyword template to the first template ID;确定与所述第一模板ID绑定的实例关键字为所述第一关键字。Determining that the instance keyword bound to the first template ID is the first keyword.8.一种网格节点,其特征在于,所述网格节点包括:8. A grid node, characterized in that, the grid node comprises:接收单元,用于接收控制节点发送的第一模板标识符ID和第一数据解析模板;a receiving unit, configured to receive the first template identifier ID and the first data parsing template sent by the control node;所述接收单元,还用于接收用户设备发送的第一更新消息,其中所述第一更新消息包括第一关键字的数据中的更新数据、所述第一关键字和所述第一模板ID,所述第一关键字对应于所述第一模板ID;The receiving unit is further configured to receive a first update message sent by the user equipment, wherein the first update message includes update data in the data of the first keyword, the first keyword, and the first template ID , the first keyword corresponds to the first template ID;确定单元,用于根据所述接收单元接收的所述第一模板ID和所述第一数据解析模板,确定所述网格节点保存的第一关键字的数据;a determining unit, configured to determine the data of the first keyword stored in the grid node according to the first template ID received by the receiving unit and the first data parsing template;所述确定单元,还用于根据所述接收单元接收的所述第一更新消息和所述第一数据解析模板,确定所述第一关键字的数据中的更新数据;The determining unit is further configured to determine update data in the data of the first keyword according to the first update message received by the receiving unit and the first data parsing template;更新单元,用于根据保存的所述第一关键字的数据和所述第一关键字的数据中的更新数据,更新所述第一关键字的数据。An updating unit, configured to update the data of the first keyword according to the stored data of the first keyword and update data of the data of the first keyword.9.如权利要求8所述的网格节点,其特征在于,9. The mesh node of claim 8, wherein所述确定单元,还用于确定所述第一关键字的备用数据所在的网格节点;The determining unit is further configured to determine the grid node where the backup data of the first keyword is located;所述网格节点还包括:The grid node also includes:发送单元,用于向所述第一关键字的备用数据所在的网格节点发送所述第一更新数据。A sending unit, configured to send the first update data to the grid node where the backup data of the first key is located.10.一种控制节点,其特征在于,所述控制节点包括:10. A control node, characterized in that the control node comprises:接收单元,用于接收用户设备发送的同步请求消息,所述同步请求消息包括第一关键字模板和第一数据解析模板,其中所述第一关键字模板包括第一关键字的属性信息,所述第一数据解析模板用于构造和解析所述第一关键字的数据;A receiving unit, configured to receive a synchronization request message sent by a user equipment, where the synchronization request message includes a first keyword template and a first data parsing template, where the first keyword template includes attribute information of the first keyword, so The first data parsing template is used to construct and parse the data of the first keyword;确定单元,用于确定对应于所述第一关键字模板的第一模板标识符ID;a determining unit, configured to determine a first template identifier ID corresponding to the first keyword template;发送单元,用于向所述用户设备发送所述第一模板ID;a sending unit, configured to send the first template ID to the user equipment;所述发送单元,还用于向分布式内存网络中的所有网格节点发送所述第一模板ID和所述第一数据解析模板,其中,所述所有网格节点包括第一网格节点,所述第一网格节点为分布式内存网络中第一关键字的主用数据所在的网格节点,所述第一模板ID和所述第一数据解析模板用于所述第一网格节点确定所述第一关键字的数据,并根据所述第一关键字的数据和所述第一关键字的数据中的更新数据更新所述第一关键字的数据,所述更新数据是所述第一网格节点根据所述第一数据解析模板以及从所述用户设备接收的第一更新消息确定,所述第一更新消息包括第一关键字的数据中的更新数据、所述第一关键字以及所述第一模版ID,所述第一关键字对应于所述第一模板ID。The sending unit is further configured to send the first template ID and the first data parsing template to all grid nodes in the distributed memory network, wherein all the grid nodes include the first grid node, The first grid node is the grid node where the primary data of the first keyword in the distributed memory network is located, and the first template ID and the first data parsing template are used for the first grid node determining the data of the first keyword, and updating the data of the first keyword according to the data of the first keyword and update data in the data of the first keyword, the update data being the The first grid node determines according to the first data parsing template and the first update message received from the user equipment, the first update message includes the update data in the data of the first key, the first key word and the first template ID, the first keyword corresponds to the first template ID.11.一种用户设备,其特征在于,所述用户设备包括:11. A user equipment, characterized in that the user equipment comprises:确定单元,用于在第一关键字的数据更新的情况下,确定第一更新消息,其中所述第一更新消息包括所述第一关键字的数据中的更新数据、所述第一关键字和对应于所述第一关键字的第一模板标识符ID;A determining unit, configured to determine a first update message when the data of the first keyword is updated, wherein the first update message includes update data in the data of the first keyword, the first keyword and a first template identifier ID corresponding to said first keyword;所述确定单元,还用于确定第一网格节点,所述第一网格节点为分布式内存网络中所述第一关键字的主用数据所在的网格节点;The determining unit is further configured to determine a first grid node, where the first grid node is a grid node where the primary data of the first keyword is located in the distributed memory network;发送单元,还用于将所述第一更新消息发送给所述第一网格节点,以便于所述第一网格节点根据所述第一更新消息更新以及从控制节点接收的第一数据解析模板确定所述第一关键字的数据中的更新数据,并根据保存的所述第一关键字的数据和所述更新数据更新所述第一关键字的数据,其中,所述第一关键字的数据是所述第一网格节点根据所述第一模板ID和所述第一数据解析模板确定的。a sending unit, further configured to send the first update message to the first grid node, so that the first grid node can update according to the first update message and analyze the first data received from the control node The template determines update data in the data of the first keyword, and updates the data of the first keyword according to the saved data of the first keyword and the update data, wherein the first keyword The data of is determined by the first grid node according to the first template ID and the first data parsing template.12.如权利要求11所述的用户设备,其特征在于,12. The user equipment according to claim 11, characterized in that,所述发送单元,还用于向控制节点发送同步请求消息,所述同步请求消息包括第一关键字模板和第一数据解析模板,其中所述第一关键字模板包括所述第一关键字的属性信息,所述第一数据解析模板用于构造和解析所述第一关键字的数据;The sending unit is further configured to send a synchronization request message to the control node, where the synchronization request message includes a first keyword template and a first data parsing template, wherein the first keyword template includes the first keyword template Attribute information, the first data parsing template is used to construct and parse the data of the first keyword;所述用户设备还包括:The user equipment also includes:接收单元,用于接收所述控制节点发送的对应于所述第一关键字模板的第一模板ID;a receiving unit, configured to receive a first template ID corresponding to the first keyword template sent by the control node;所述确定单元,还用于根据所述第一模板ID,确定所述第一关键字。The determining unit is further configured to determine the first keyword according to the first template ID.13.如权利要求12所述的用户设备,其特征在于,所述确定单元,具体用于根据所述第一模板ID,创建所述第一关键字。13. The user equipment according to claim 12, wherein the determining unit is specifically configured to create the first keyword according to the first template ID.14.如权利要求13所述的用户设备,其特征在于,所述确定单元,具体用于将对应于所述第一关键字模板的实例关键字与所述第一模板ID绑定,确定与所述第一模板ID绑定的实例关键字为所述第一关键字。14. The user equipment according to claim 13, wherein the determining unit is specifically configured to bind the instance keyword corresponding to the first keyword template with the first template ID, and determine the The instance keyword bound to the first template ID is the first keyword.
CN201410241870.8A2014-05-302014-05-30The method and relevant device updated the dataActiveCN104023056B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201410241870.8ACN104023056B (en)2014-05-302014-05-30The method and relevant device updated the data

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410241870.8ACN104023056B (en)2014-05-302014-05-30The method and relevant device updated the data

Publications (2)

Publication NumberPublication Date
CN104023056A CN104023056A (en)2014-09-03
CN104023056Btrue CN104023056B (en)2017-11-24

Family

ID=51439625

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410241870.8AActiveCN104023056B (en)2014-05-302014-05-30The method and relevant device updated the data

Country Status (1)

CountryLink
CN (1)CN104023056B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106815327A (en)*2016-12-292017-06-09南京欣网互联信息技术有限公司One kind is for moving operation data resource regeneration method
CN108874649B (en)*2017-05-082021-08-17中兴通讯股份有限公司Method and device for generating automatic test script and computer equipment thereof
CN112667495A (en)*2020-12-082021-04-16上海纳恩汽车技术股份有限公司Automatic test case keyword management system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102323947A (en)*2011-09-052012-01-18东北大学 Method for generating pre-connected tables on ring-architecture databases
CN102831223A (en)*2012-08-232012-12-19大唐移动通信设备有限公司Management method and system of distributed databases

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US8738801B2 (en)*2009-07-142014-05-27Qualcomm IncorporatedMethods and apparatus for updating index information while adding and updating documents in a distributed network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102323947A (en)*2011-09-052012-01-18东北大学 Method for generating pre-connected tables on ring-architecture databases
CN102831223A (en)*2012-08-232012-12-19大唐移动通信设备有限公司Management method and system of distributed databases

Also Published As

Publication numberPublication date
CN104023056A (en)2014-09-03

Similar Documents

PublicationPublication DateTitle
US12260102B2 (en)Distributed storage method and device
CN105094707B (en)A kind of data storage, read method and device
CN106599104B (en)Massive data association method based on redis cluster
CN106980625A (en)A kind of method of data synchronization, apparatus and system
CN103475721B (en)A kind of digital asset updates the digital asset update method of system
CN103558998B (en)A kind of method and apparatus of data manipulation
CN107133309B (en)Method and device for storing and querying process example, storage medium and electronic equipment
US10187255B2 (en)Centralized configuration data in a distributed file system
MX2014011988A (en)Telemetry system for a cloud synchronization system.
CN103440204B (en)A kind of method of updating file system and memory device
JP2016508638A (en) Method and system using recursive event listeners in nodes of hierarchical data structures
US10255341B2 (en)Mode switching in high availability disaster recovery (HADR) systems
CN114640503A (en)Application system verification method and device, computer equipment and storage medium
CN103716056B (en)Data compression method, uncompressing data and equipment
CN103368817A (en)Method and device for sending and receiving e-mail
CN104461929B (en)Distributed data cache method based on blocker
US20180276091A1 (en)Application service-level configuration of dataloss failover
CN104023056B (en)The method and relevant device updated the data
CN109088914B (en) Block generation method, blockchain ecosystem, and computer-readable storage medium
CN109302449B (en)Data writing method, data reading device and server
US9286055B1 (en)System, method, and computer program for aggregating fragments of data objects from a plurality of devices
CN103077032A (en)Operation method for application program and application program client-side
CN102523112B (en)Information processing method and equipment
CN106874277A (en)Distributed data processing system and method
KR102031589B1 (en) Methods and systems for processing relationship chains, and storage media

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
TR01Transfer of patent right

Effective date of registration:20201103

Address after:625, room 269, Connaught platinum Plaza, No. 518101, Qianjin Road, Xin'an street, Shenzhen, Guangdong, Baoan District

Patentee after:SHENZHEN SHANGGE INTELLECTUAL PROPERTY SERVICE Co.,Ltd.

Address before:518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before:HUAWEI TECHNOLOGIES Co.,Ltd.

TR01Transfer of patent right
TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20201126

Address after:213000 No. 11 Qingyang North Road, Tianning District, Changzhou, Jiangsu

Patentee after:Changzhou Hong quantity Electronic Technology Co.,Ltd.

Address before:625, room 269, Connaught platinum Plaza, No. 518101, Qianjin Road, Xin'an street, Shenzhen, Guangdong, Baoan District

Patentee before:SHENZHEN SHANGGE INTELLECTUAL PROPERTY SERVICE Co.,Ltd.

TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20220822

Address after:Tianning District Hehai road 213000 Jiangsu city of Changzhou province No. 9

Patentee after:Changzhou Tianning Communication Technology Industrial Park Co.,Ltd.

Address before:213000 No. 11 Qingyang North Road, Tianning District, Changzhou City, Jiangsu Province

Patentee before:Changzhou Hong quantity Electronic Technology Co.,Ltd.

TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20221229

Address after:Tianning District Hehai road 213000 Jiangsu city of Changzhou province No. 9

Patentee after:Changzhou Hengtang Technology Industry Co.,Ltd.

Address before:Tianning District Hehai road 213000 Jiangsu city of Changzhou province No. 9

Patentee before:Changzhou Tianning Communication Technology Industrial Park Co.,Ltd.


[8]ページ先頭

©2009-2025 Movatter.jp