Summary of the invention
The embodiment of the present invention provides more method and the relevant device of new data, reduces the traffic volume of data, improves the synchronous performance of redundancy.
First aspect, the embodiment of the present invention provides a kind of method of more new data, the method is carried out by the first grid node, wherein this first grid node is the grid node at the primary data place of the first keyword in distributed memory network, and the method comprises: receive and control the first template identifier ID and the first Data Analysis template that node sends; Receive the first updating message that subscriber equipment sends, wherein this first updating message comprises more new data, this first keyword and this first template ID in the data of the first keyword, and this first keyword is corresponding to this first template ID; According to this first template ID and this first Data Analysis template, determine the data of the first keyword that this first grid node is preserved; According to this first updating message and this first Data Analysis template, determine the more new data in the data of this first keyword; According to the data of this first keyword of preserving and the more new data in the data of this first keyword, upgrade the data of this first keyword.
In conjunction with first aspect, in the possible implementation of the first, the method also comprises: the grid node of determining the preliminary data place of this first keyword; To the grid node at the preliminary data place of this first keyword, send this first new data more.
Second aspect, the embodiment of the present invention provides a kind of method of more new data, the method is carried out by controlling node, the method comprises: receive the synchronization request message that subscriber equipment sends, this synchronization request message comprises the first keyword template and the first Data Analysis template, wherein this first keyword template comprises the attribute information of the first keyword, and this first Data Analysis template is for constructing and resolve the data of this first keyword; Determine the first template identifier ID corresponding to this first keyword template; To this subscriber equipment, send this first template ID; All grid nodes in distributed memory network send this first template ID and this first Data Analysis template.
The third aspect, the embodiment of the present invention provides a kind of method of more new data, the method is carried out by subscriber equipment, the method comprises: in the situation that the Data Update of the first keyword, determine the first updating message, wherein this first updating message comprise more new data in the data of this first keyword, this first keyword and and corresponding to the first template identifier ID of this first keyword; Determine the grid node at the primary data place of this first keyword in distributed memory network; This first updating message is sent to the grid node at the primary data place of this first keyword, so that the grid node at the primary data place of this first keyword upgrades the data of this first keyword according to this first updating message.
In conjunction with the third aspect, in the possible implementation of the first, before determining this first updating message, the method also comprises: to controlling node, send synchronization request message, this synchronization request message comprises the first keyword template and the first Data Analysis template, wherein this first keyword template comprises the attribute information of this first keyword, and this first Data Analysis template is for constructing and resolve the data of this first keyword; Receive the first template ID corresponding to this first keyword template that this control node sends; According to this first template ID, determine this first keyword.
In conjunction with the possible implementation of the first, in the possible implementation of the second, this,, according to this first template ID, determines the first keyword, comprising: according to this first template ID, create this first keyword.
In conjunction with the possible implementation of the first, in the third possible implementation, this,, according to this first template ID, determines the first keyword, comprising: by the example keyword corresponding to this first keyword template and this first template ID binding; Determine that with the example keyword of this first template ID binding be this first keyword.
Fourth aspect, the embodiment of the present invention provides a kind of grid node, and this grid node comprises: receiving element, for receiving, control the first template identifier ID and the first Data Analysis template that node sends; This receiving element, the first updating message also sending for receiving subscriber equipment, wherein this first updating message comprises more new data, this first keyword and this first template ID in the data of the first keyword, this first keyword is corresponding to this first template ID; Determining unit, for this first template ID and this first Data Analysis template receiving according to this receiving element, determines the data of the first keyword that this grid node is preserved; This determining unit, this first updating message and this first Data Analysis template for receiving according to this receiving element also, determines the more new data in the data of this first keyword; Updating block, for according to the data of this first keyword of preserving and the more new data of the data of this first keyword, upgrades the data of this first keyword.
In conjunction with fourth aspect, in the possible implementation of the first, this determining unit, also for determining the grid node at the preliminary data place of this first keyword; This grid node also comprises: transmitting element, sends this first new data more for the grid node at the preliminary data place to this first keyword.
The 5th aspect, the embodiment of the present invention provides a kind of control node, this control node comprises: receiving element, the synchronization request message sending for receiving subscriber equipment, this synchronization request message comprises the first keyword template and the first Data Analysis template, wherein this first keyword template comprises the attribute information of the first keyword, and this first Data Analysis template is for constructing and resolve the data of this first keyword; Determining unit, for determining the first template identifier ID corresponding to this first keyword template; Transmitting element, for sending this first template ID to this subscriber equipment; This transmitting element, also sends this first template ID and this first Data Analysis template for all grid nodes to distributed memory network.
The 6th aspect, the embodiment of the present invention provides a kind of subscriber equipment, this subscriber equipment comprises: determining unit, be used in the situation that the Data Update of the first keyword, determine the first updating message, wherein this first updating message comprises more new data in the data of this first keyword, this first keyword and corresponding to the first template identifier ID of this first keyword; This determining unit, also for determining the grid node at the primary data place of this first keyword of distributed memory network; Transmitting element, also for sending to the first definite updating message of this determining unit the grid node at the primary data place of this first keyword.
In conjunction with the 6th aspect, in the possible implementation of the first, this transmitting element, also for sending synchronization request message to controlling node, this synchronization request message comprises the first keyword template and the first Data Analysis template, wherein this first keyword template comprises the attribute information of this first keyword, and this first Data Analysis template is for constructing and resolve the data of this first keyword; This subscriber equipment also comprises: receiving element, the first template ID corresponding to this first keyword template sending for receiving this control node; This determining unit, also, for according to this first template ID, determines this first keyword.
In conjunction with the possible implementation of the first, in the possible implementation of the second, this determining unit, specifically for according to this first template ID, creates this first keyword.
In conjunction with the possible implementation of the first, in the third possible implementation, this determining unit, specifically for by the example keyword corresponding to this first keyword template and this first template ID binding, determines that with the example keyword of this first template ID binding be this first keyword.
In technique scheme, the grid node in distributed memory network can be according to updating message and Data Analysis template by needing the partial data upgrading to upgrade in preserved data, without all data are upgraded.When the partial data in the data that grid node is preserved occurs to upgrade, can only transmit the data of renewal, and not have the data of upgrading not to be transmitted.Like this, can improve the synchronous efficiency of Data Update and redundancy.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is a part of embodiment of the present invention, rather than whole embodiment.Embodiment based in the present invention, the every other embodiment that those of ordinary skills obtain under the prerequisite of not making creative work, should belong to the scope of protection of the invention.
Fig. 1 is the indicative flowchart of the method for the more new data that provides according to the embodiment of the present invention.Method shown in Fig. 1 is carried out by the first grid node, and wherein this first grid node is the grid node at the primary data place of the first keyword in distributed memory network.
101, receive and control the first template identifier (Identifier, ID) and the first Data Analysis template that node sends.
102, receive the first updating message that subscriber equipment sends, wherein this first updating message comprises more new data, this first keyword and this first template ID in the data of the first keyword, this first keyword is corresponding to this first template ID.
103, according to this first template ID and this first Data Analysis template, determine the data of the first keyword that this first grid node is preserved.
104, according to this first updating message and this first Data Analysis template, determine the more new data in the data of this first keyword.
105, according to the data of this first keyword of preserving and the more new data in the data of this first keyword, upgrade the data of this first keyword.
According to the method shown in Fig. 1, the grid node of the primary data of the first keyword in distributed memory network can according to the updating message corresponding to the first keyword and corresponding to the Data Analysis template of the first keyword by needing the partial data upgrading to upgrade in the preserved data corresponding to the first keyword, without all data corresponding to the first keyword are upgraded.When the partial data in the data of the first keyword occurs to upgrade, can only transmit the data of renewal, and not have the data of upgrading not to be transmitted.Like this, can improve the efficiency of Data Update.
Further, method shown in Fig. 1 can also comprise: the grid node of determining the preliminary data place of this first keyword, to the grid node at the preliminary data place of this first keyword, send this first new data more, so that the grid node at the preliminary data place of this first keyword upgrades the data of the first keyword of preserving.Like this, when carrying out redundancy for the first keyword when synchronous, can only the data of upgrading in the data of this first keyword be sent to the node at the preliminary data place of this first keyword.The synchronous performance of redundancy can get a promotion.
Fig. 2 is the indicative flowchart of the method for the more new data that provides according to the embodiment of the present invention.Method shown in Fig. 2 is carried out by controlling node.
201, receive the synchronization request message that subscriber equipment sends, wherein this synchronization request message comprises the first keyword template and the first Data Analysis template, wherein this first keyword template comprises the attribute information of the first keyword, and this first Data Analysis template is for constructing and resolve the data of this first keyword.
202, determine the first template ID corresponding to this first keyword template.
203, to this subscriber equipment, send this first template ID.
204, all grid nodes in distributed memory network send this first template ID and this first Data Analysis template.
According to the method shown in Fig. 2, control node and the keyword template receiving and Data Analysis template can be sent to all grid nodes in distributed memory network.In addition, this control node can also be determined template ID and this template ID is sent to subscriber equipment.Subscriber equipment can be determined corresponding keyword according to this template ID.Grid node in this distributed memory grid can be determined the data that this keyword is corresponding according to this keyword template and this Data Analysis template.
Fig. 3 is the indicative flowchart of the method for the more new data that provides according to the embodiment of the present invention.Method shown in Fig. 3 is carried out by subscriber equipment.
301, in the situation that the Data Update of this first keyword is determined the first updating message, wherein this first updating message comprises more new data in the data of this first keyword, this first keyword and corresponding to the first template ID of this first keyword.
302, determine the grid node at the primary data place of this first keyword in distributed memory network.
303, this first updating message is sent to the grid node at the primary data place of this first keyword.
According to the method shown in Fig. 3, when subscriber equipment need to be changed the data of preserving in distributed memory network, this subscriber equipment only need to send to the data of renewal the grid node at primary data place, and does not need all data of this keyword that more new data is corresponding to send to the grid node at the primary data place of this keyword.In other words, method shown in Fig. 3 can only send to the grid node at the primary data place of this keyword to the partial data in the data of keyword, and does not need all data of this keyword to resend the grid node to the primary data place of this keyword.Like this, the complete keyword of need to not take upgrades operation as granularity, can reduce the traffic volume of data, improves the synchronous performance of redundancy.
Further, before execution step 301, subscriber equipment can also send synchronization request message to controlling node, receive the first template identifier (Identifier corresponding to this first keyword template that this control node sends, ID), according to this first template ID, determine the first keyword, wherein this synchronization request message comprises the first keyword template and the first Data Analysis template, wherein this first keyword template comprises the attribute information of the first keyword, and this first Data Analysis template is for constructing and resolve the data of this first keyword.
Optionally, as an embodiment, this,, according to this first template ID, determines the first keyword, comprising: according to this first template ID, create this first keyword.Specifically, this subscriber equipment can create keyword application programming interface (Application Programming Interface, API) by invoke memory grid, imports this first template ID into, creates this first keyword.The data of the first keyword just having created can be empty.
Optionally, as another embodiment, this,, according to this first template ID, determines the first keyword, comprise: by the example keyword corresponding to this first keyword template and this first template ID binding, determine that with the example keyword of this first template ID binding be this first keyword.In the case, this first keyword template can be determined according to this example keyword template.This example keyword can be the keyword having created in this subscriber equipment.
Fig. 4 is the schematic diagram of the method for the more new data that provides according to the embodiment of the present invention.Distributed memory network comprises that one is controlled node and a plurality of grid node.
401, subscriber equipment sends synchronization request message to controlling node, this synchronization request message comprises the first keyword template and the first Data Analysis template, wherein this first keyword template comprises the attribute information of the first keyword, and this first Data Analysis template is for constructing and resolve the data of this first keyword.
The attribute information of this first keyword can be that the size of keyword is, the version number of keyword etc.
402, this controls node determination corresponding to the first template ID of this first keyword template.
403, this control node sends to all grid nodes in distributed memory network by this first keyword template and this first Data Analysis template.
404, this control node sends to this subscriber equipment by this first template ID.
405, this subscriber equipment is determined the first keyword according to this first template ID.
Optionally, as an embodiment, this subscriber equipment can, according to this first template ID, create this first keyword.Specifically, this subscriber equipment can create keyword API by invoke memory grid, imports this first template ID into, creates this first keyword.Content in the first keyword just having created can be empty.
Optionally, as another embodiment, this subscriber equipment can, by the example keyword corresponding to this first keyword template and this first template ID binding, determine that with the example keyword of this first template ID binding be this first keyword.In the case, this first keyword template can be determined according to this example keyword template.
406, this subscriber equipment can be determined the first updating message.
Specifically, this subscriber equipment is in the situation that the Data Update of this first keyword is determined this first updating message, and wherein this first updating message comprises more new data, this first keyword and this first template ID in the data of this first keyword.
407, this subscriber equipment can be determined the grid node at the primary data place of this first keyword in this distributed memory network.
Specifically, the data of this first keyword can be kept at a plurality of grid nodes in this distributed memory network.What a grid in the plurality of grid node connect is the grid node at the primary data place of this first keyword, and remaining grid node is the grid node at the preliminary data place of this first keyword.This subscriber equipment can be determined by consistency Hash (hash) algorithm the grid node at primary data place.For convenience of describing, the grid node at the primary data place of this first keyword is designated hereinafter simply as the first grid node, and the grid node at the preliminary data place of this first keyword is designated hereinafter simply as standby grid node.Be understandable that, the standby grid node shown in Fig. 4 can be a plurality of grid nodes.
408, this subscriber equipment sends to this first grid node by this first updating message.
409, this first grid node can be determined according to this first template ID and this first Data Analysis template the data of the first keyword that this first grid node is preserved.
410, this first grid node can also be according to this first updating message and this first Data Analysis template, determines the more new data in the data of this first keyword.
411, this first grid node, according to the data of this first keyword of this first grid node preservation and the more new data in the data of this first keyword, upgrades the data of the first keyword of this first grid node preservation.
412, this first grid node can also be determined the grid node at the preliminary data place of this first keyword.
413, this first grid node sends to this first updating message the grid node at the preliminary data place of this first keyword.
The preliminary data of this first keyword can be stored in one or more grid nodes.Each grid node at the preliminary data place of this first keyword can be according to the data of this first template ID and definite the first keyword preserved of this first Data Analysis template, according to this first updating message and this first Data Analysis template, determine the more new data in the data of this first keyword, according to the more new data in the data of the data of the first keyword of this preservation and this first keyword, upgrade the data of the first keyword of preserving.Like this, in this distributed memory network, the redundant data of the data of this first keyword is also upgraded.
According to the method shown in Fig. 4, subscriber equipment can be constructed keyword template and corresponding to the Data Analysis template of this keyword.Grid node in distributed memory network can be determined according to this keyword template and this Data Analysis template the data of this keyword.When data in subscriber equipment occur to upgrade, this subscriber equipment the data of upgrading in the data of keyword can be sent in distributed memory network this more primary data place of the initial data of new data grid node and without all data of this keyword being sent to the grid node at the primary data place of this keyword.The grid node at this primary data place can be according to keyword and corresponding to the Data Analysis template of this keyword, is determined and in the data of this keyword, need the data upgraded, and by corresponding Data Update.Then, the data that the grid node at this primary data place can upgrade needs send to the grid node at preliminary data place.The grid node at this preliminary data place also can be according to this keyword and corresponding to the Data Analysis template of this keyword, is determined and in the data of this keyword, need the data upgraded, and by corresponding Data Update.Like this, in upgrading this distributed memory network, preserve data time, without the corresponding all data of the keyword of these data are upgraded, and the partial data that only needs need be upgraded upgrades, thereby in the time of can reducing new data more, the transmission quantity of data, improves the more efficiency of new data.
Fig. 5 is the structured flowchart of the grid node that provides according to the embodiment of the present invention.Grid node shown in Fig. 5 each step shown in can execution graph 1.Each step that first grid node of grid node shown in Fig. 5 shown in can also execution graph 4 carried out.Grid node 500 can comprise receiving element 501, determining unit 502 and updating block 503.
Receiving element 501, controls for receiving the first template ID and the first Data Analysis template that node sends.
Receiving element 501, the first updating message also sending for receiving subscriber equipment, wherein this first updating message comprises more new data, this first keyword and the first template ID in the data of the first keyword, this first keyword is corresponding to this first template ID.
Determining unit 502, for this first template ID and this first Data Analysis template receiving according to receiving element 501, determines the data of the first keyword that grid node 500 is preserved.
Determining unit 502, also for this first updating message of receiving according to receiving element 701 and this first Data Analysis template, determines the more new data in the data of this first keyword.
Updating block 503, for according to the data of this first keyword of preserving and the more new data of the data of this first keyword, upgrades the data of this first keyword.
Grid node shown in Fig. 5 is the grid node of the primary data of the first keyword in distributed memory network, this grid node can be according to updating message by needing the partial data upgrading to upgrade in the preserved data corresponding to the first keyword, without all data corresponding to the first keyword are upgraded.When the partial data in the data of the first keyword occurs to upgrade, can only transmit the data of renewal, and not have the data of upgrading not to be transmitted.Like this, can improve the efficiency of Data Update.
Further, determining unit 502, also for determining the grid node at the preliminary data place of this first keyword.In the case, grid node 500 can also comprise transmitting element 504.Transmitting element 504, sends this first new data more for the grid node at the preliminary data place to this first keyword.
Fig. 6 is according to the structured flowchart of the definite control node of the embodiment of the present invention.Control node shown in Fig. 6 each step shown in can execution graph 2.Control node shown in Fig. 6 can also execution graph 4 shown in control each step that node is carried out.Controlling node 600 can comprise: receiving element 601, determining unit 602 and transmitting element 603.
Receiving element 601, the synchronization request message sending for receiving subscriber equipment, this synchronization request message comprises the first keyword template and the first Data Analysis template, wherein this first keyword template comprises the attribute information of the first keyword, and this first Data Analysis template is for constructing and resolve the data of this first keyword.
Determining unit 602, for determining the first template ID corresponding to this first keyword template.
Transmitting element 603, for sending this first template ID to this subscriber equipment.
Transmitting element 603, also sends this first template ID and this first Data Analysis template for all grid nodes to distributed memory network.
Control node 600 shown in Fig. 6 can send to all grid nodes in distributed memory network by the keyword template receiving and Data Analysis template.In addition, controlling node 600 can also determine template ID and this template ID is sent to subscriber equipment.Subscriber equipment can be determined corresponding keyword according to this template ID.Grid node in this distributed memory network can be determined the data that this keyword is corresponding according to this keyword template and this Data Analysis template.
Fig. 7 is the structured flowchart of the subscriber equipment that provides according to the embodiment of the present invention.Subscriber equipment shown in Fig. 7 can execution graph 3 shown in each step of method.Each step that in all right execution graph 4 of subscriber equipment shown in Fig. 7, subscriber equipment is carried out.Subscriber equipment 700 can comprise determining unit 701 and transmitting element 702.
Determining unit 701, also in the situation that the Data Update of this first keyword, determine the first updating message, wherein this first updating message comprises more new data in the data of this first keyword, this first keyword and corresponding to the first template ID of this first keyword.
Determining unit 701, also for determining the grid node at the primary data place of this first keyword of distributed memory network.
Transmitting element 702, also for sending to determining unit 701 the first definite updating message the grid node at the primary data place of this first keyword.
When subscriber equipment 700 need to be changed the data of preserving in distributed memory network, 700 of subscriber equipmenies need to send to the data of renewal the grid node at primary data place, and do not need all data of this keyword that more new data is corresponding to send to the grid node at the primary data place of this keyword.In other words, subscriber equipment 700 shown in Fig. 7 can only send to the grid node at the primary data place of this keyword to the partial data in the data of keyword, and does not need all data of this keyword to resend the grid node to the primary data place of this keyword.Like this, the complete keyword of need to not take upgrades operation as granularity, can reduce the traffic volume of data, improves the synchronous performance of redundancy.
Further, transmitting element 702, also for sending synchronization request message to controlling node, this synchronization request message comprises the first keyword template and the first Data Analysis template, wherein this first keyword template comprises the attribute information of the first keyword, and this first Data Analysis template is for constructing and resolve the data of this first keyword.Subscriber equipment 700 can also comprise receiving element 703.Receiving element 703, the first template ID corresponding to this first keyword template sending for receiving this control node.Determining unit 701, this first template ID for receiving according to receiving element 703, determines this first keyword.
Optionally, as an embodiment, determining unit 701, specifically for according to this first template ID, creates this first keyword.Specifically, determining unit 701, can create light sword from API by invoke memory grid, imports this first template ID into, creates this first keyword.The data of the first keyword just having created can be empty.
Optionally, as another embodiment, determining unit 701, specifically for by the example keyword corresponding to this first keyword template and this first template ID binding, determines with the example keyword of this first template ID binding as this first keyword.In the case, this first keyword template can be determined according to this example keyword template.This example keyword can be the keyword having created in this subscriber equipment.
Fig. 8 is the structural representation of the distributed memory network that provides according to the embodiment of the present invention.In distributed memory network 800 shown in Fig. 8, can comprise a control node 600 as shown in Figure 6 and a plurality of grid node 500 as shown in Figure 5.
Those of ordinary skills can recognize, unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with the combination of electronic hardware or computer software and electronic hardware.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can specifically should be used for realizing described function with distinct methods to each, but this realization should not thought and exceeds scope of the present invention.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the specific works process of the system of foregoing description, device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that disclosed system, apparatus and method can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, during actual realization, can have other dividing mode, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.
If described function usings that the form of SFU software functional unit realizes and during as production marketing independently or use, can be stored in a computer read/write memory medium.Understanding based on such, the part that technical scheme of the present invention contributes to prior art in essence in other words or the part of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) carry out all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), the various media that can be program code stored such as random access memory (RAM, Random Access Memory), magnetic disc or CD.
The above; it is only the specific embodiment of the present invention; but protection scope of the present invention is not limited to this; anyly be familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement; within all should being encompassed in protection scope of the present invention, so protection scope of the present invention should be as the criterion with the protection range of claim.