CN105553722B - A kind of method for interchanging data based on timestamp, apparatus and system - Google Patents

A kind of method for interchanging data based on timestamp, apparatus and system Download PDF

Info

Publication number
CN105553722B
CN105553722B CN201510953589.1A CN201510953589A CN105553722B CN 105553722 B CN105553722 B CN 105553722B CN 201510953589 A CN201510953589 A CN 201510953589A CN 105553722 B CN105553722 B CN 105553722B
Authority
CN
China
Prior art keywords
data
model object
update
timestamp value
flag bit
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
CN201510953589.1A
Other languages
Chinese (zh)
Other versions
CN105553722A (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.)
SHENZHEN DATA FAULT TOLERANCE SYSTEM CO Ltd
Original Assignee
SHENZHEN DATA FAULT TOLERANCE SYSTEM 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 SHENZHEN DATA FAULT TOLERANCE SYSTEM CO Ltd filed Critical SHENZHEN DATA FAULT TOLERANCE SYSTEM CO Ltd
Priority to CN201510953589.1A priority Critical patent/CN105553722B/en
Publication of CN105553722A publication Critical patent/CN105553722A/en
Application granted granted Critical
Publication of CN105553722B publication Critical patent/CN105553722B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • H04L41/064Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis involving time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of method for interchanging data based on timestamp, apparatus and system, this method comprises: when detecting that data update occurs for storage equipment, whether judge to store has model object to be deleted in equipment, according to judging result, the update flag bit that the model object group that data update occurs is set, and the current timestamp value of the model object that data update and its place model object group occurs, according to the data of model object, the current timestamp value, the historical time timestamp value construction response model object data for including in the request of data of the update flag bit and client, and by the response model object data, the current timestamp value and the update flag bit are sent to client.The object of data change has occurred by timestamp record in the present invention, so that removing useless redundancy when carrying out data transmission between server and client, improving efficiency of transmission and reducing maintenance cost.

Description

A kind of method for interchanging data based on timestamp, apparatus and system
Technical field
The invention belongs to technical field of memory more particularly to a kind of method for interchanging data based on timestamp, device and it is System.
Background technique
With being constantly progressive for information technology, demand of the people to dedicated storage equipment is more more and more intense.In actual work Journey deployment in, administrative staff to easily access and operate many multiple storage devices be unable to do without storage management system software association It helps.Storage management software is divided into single device management and multiple equipment management, and single device management system is relatively simple, generally by disposing Web on storage array realizes that multiple equipment management system architecture is relative complex, needs individual server (server) layer Carry out tissue and manage many multiple storage devices, operator is interacted with server by client (client) to complete practical operation.
Change when system is run whenever client refreshes or floor array equipment state, server require to Client sends new data.It in the prior art, is all to receive all related datas when each refresh data of storage management system Collection comes up, and is all sent to client, but this technical efficiency is relatively low, even if data only have the change of very little, also to transmit Total data, since data volume is very big, transmission and analyzing efficiency can relatively low, be in addition also unfavorable for developer pass through log into Row debugging efforts.
Summary of the invention
The present invention provides a kind of method for interchanging data and device based on timestamp, can be recorded by timestamp and number has occurred According to the object of change, so that removing useless redundancy when carrying out data transmission between sever and client, transmission effect is improved Rate simultaneously reduces maintenance cost.
Method for interchanging data provided by the invention based on timestamp, comprising:
When detecting that data update occurs for storage equipment, judge whether there is model object to be deleted in the storage equipment It removes;According to judging result, the update flag bit of the model object group where the model object that data update occurs for setting, and, The current timestamp value that the model object that data update and its place model object group occurs is set;The data for receiving client are asked It asks, includes the historical time timestamp value of each model object group in the request of data;When according to the data of model object, the history Between timestamp value, the current timestamp value and the update flag bit construct response model object data, and by the response mould Type object data, the current timestamp value and the update flag bit are sent to the client.
Method for interchanging data provided by the invention based on timestamp, comprising:
Request of data is sent to server;It receives the response model object data of the server transmission, data occurs more Where the current timestamp value of new model object and its place model object group, and the model object of generation data update The update flag bit of model object group;Model object data are analyzed the response to according to the update flag bit, and carry out data It updates, and saves the current timestamp value.
DEU data exchange unit provided by the invention based on timestamp, comprising:
Judgment module, for judging whether have in the storage equipment when detecting that data update occurs for storage equipment Model object is deleted;Setup module, for according to judging result, the model where the model object that data update to occur for setting The update flag bit of object group, and, setting occur data update model object and its place model object group it is current when Between timestamp value;Receiving module includes the history of each model object group for receiving the request of data of client, in the request of data Timestamp value;Constructing module, for according to the data, the historical time timestamp value, the current timestamp value of model object with And the update flag bit constructs response model object data;Sending module, for by the response model object data, described Current timestamp value and the update flag bit are sent to the client.
DEU data exchange unit provided by the invention based on timestamp, comprising:
Sending module, for sending request of data to server;Receiving module, the sound sent for receiving the server Model object data are answered, the current timestamp value of the model object that data update and its place model object group, Yi Jifa occurs The update flag bit of model object group where the model object that raw data update;Parsing module, for being marked according to the update Will position analyzes the response to model object data;Update module, for carrying out data update;Preserving module, it is described for saving Current timestamp value.
Data exchange system provided by the invention based on timestamp, comprising:
Server, client and storage equipment;Wherein, the server detects the storage equipment hair for working as When raw data update, judge whether there is model object to be deleted in the storage equipment;According to judging result, data occur for setting The update flag bit of model object group where the model object of update, and, setting occur data update model object and The current timestamp value of model object group where it;The request of data of the client is received, includes each in the request of data The historical time timestamp value of model object group;According to the data of model object, the historical time timestamp value, the current timestamp value And the update flag bit constructs response model object data, and by the response model object data, the current time Timestamp value and the update flag bit are sent to the client;The client, for sending request of data to server;It connects Receive the response model object data of the server transmission, the model object that generation data update and its place model object group Current timestamp value, and the update flag bit of the model object group where the model object that data update occurs;According to described Flag bit is updated, analyzes the response to model object data, and carry out data update, and saves the current timestamp value.
From the embodiments of the present invention it is found that the present invention passes through, compared to the prior art, the present invention can be by according to data Whether there is model object to be deleted when update, the update flag bit for the model object group that data update occurs for difference setting, and The current timestamp value of the model object that data update and its place model object group occurs for difference setting, which mould determined with this The data of type object need to send to client and are updated, to reduce the transmission of hash, improve speed, reduce network It occupies.And due to having filtered out most of useless redundant data, transmission is all critical data, increases exploitation and engineering people The convenience that member is debugged.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is the structural schematic diagram for the data exchange system based on timestamp that first embodiment of the invention provides;
Fig. 2 is the implementation process schematic diagram for the method for interchanging data based on timestamp that second embodiment of the invention provides;
Fig. 3 is the implementation process schematic diagram for the method for interchanging data based on timestamp that third embodiment of the invention provides;
Fig. 4 is the implementation process schematic diagram for the method for interchanging data based on timestamp that fourth embodiment of the invention provides;
Fig. 5 is the knot for the DEU data exchange unit based on timestamp that fifth embodiment of the invention and sixth embodiment provide Structure schematic diagram;
Fig. 6 is the structural schematic diagram for the DEU data exchange unit based on timestamp that seventh embodiment of the invention provides;
Fig. 7 is the structural schematic diagram for the DEU data exchange unit based on timestamp that eighth embodiment of the invention provides.
Specific embodiment
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described reality Applying example is only a part of the embodiment of the present invention, and not all embodiments.Based on the embodiments of the present invention, the common skill in this field Art personnel every other embodiment obtained without making creative work belongs to the model that the present invention protects It encloses.
Referring to Fig. 1, Fig. 1 is the data transmission system structural representation based on timestamp that first embodiment of the invention provides Figure.The system includes: server 10 (server), client 20 (client) and storage equipment 30.
Specifically, which can be divided into three layers by structure: mechanical floor, server layer, client tier, wherein mechanical floor packet Multiple storage equipment 30 are included, client tier includes multiple client 20.Communication between mechanical floor and server 10 uses order Row interface (cli, command-line interface) mode, the communication between server layer and client tier use expansible Markup language (XML, Extensible Markup Language) mode, network communication protocol use transmission control protocol (TCP, Transmission Control Protocol) and Simple Network Management Protocol (SNMP, Simple Network Management Protocol), server and each client possess object model data, 20 meeting of client in memory Periodically updated to 10 request data of server.
Wherein, server 10 are for judging to store in equipment 30 when detecting that data update occurs for storage equipment 30 No to have model object to be deleted, according to judging result, the model object group where the model object that data update occurs for setting Update flag bit, and, setting occur data update model object and its place model object group current time stamp (TS, Time Stamp) value, receive the request of data that client 20 is sent, each model recorded in the request of data comprising client 20 The historical time timestamp value of object group, and according to the data of model object, the historical time timestamp value, the current timestamp value and be somebody's turn to do Update flag bit construct response model object data, and by the response model object data, the current timestamp value and this more New flag bit is sent to client 20.
It should be noted that the model object refers to that inhomogeneous storage unit in storage equipment, the model object group are Refer to the set of similar model object.For example, have VDisk, POOL and RAID in storage array, each VDisk, POOL and RAID Be referred to a model object, all model objects of every one kind are denoted as VDiskList respectively altogether, POOLList and RAIDList is referred to as VDisk model object group, POOL model object group and RAID model object group.
Timestamp is an integer value, uniquely identifies the time at certain a moment.Server 10 is managing multiple storage equipment When 30, need to save the model data of multiple storage equipment 30 in memory, each model object adds a timestamp category Property, each similar model object group also has a timestamp attribute.For example, for the logical volume model object on storage array (VDisk), each logical volume model object has a timestamp attribute, (is denoted as similar all logical volume model object groups VDiskList) also there is a timestamp attribute.In system operation, server 10 and client 30 are by timestamp come really The data of which fixed model object need to update.
The historical time timestamp value is the last timestamp value save after data exchange in client 20, with upper one The timestamp value that server 10 saves after secondary data exchange is identical, which is that server 10 is sent to client 20 's.
Further, according to judging result, the model object group where the model object of setting generation data update is more New flag bit, and, the timestamp value of the model object that data update and its place model object group occurs for setting, specifically, If judging result be have model object be deleted, be arranged occur data update model object where model object group more New flag bit (refresh) is 1, the model pair for indicating to need to refresh the data of all model objects, and data update occurring As and its place model object group timestamp value be disposed as 0 be used as the current timestamp value.For example, model object group A model object VDisk in VDiskList is deleted, then the refresh mark of model object group VDiskList is arranged Position be 1, and by the TS value of model object group VDiskList and all model object VDisk be set as 0 and it is current as this when Between timestamp value.If judging result is deleted for no model object, the model occurred where the model object that data update is set The update flag bit of object group is 0, and the timestamp value of the model object group where the model object that data update occurs is increased 1 is added to be used as the current timestamp value, and, the current time is set by the timestamp value that the model object that data update occurs The timestamp value of the model object group of model object and its place that timestamp value, i.e. generation data update is used as after all increasing by 1 deserves Preceding timestamp.Such as data update has occurred in a model object VDisk, by the model object where model object VDisk The TS value of group VDiskList adds 1 to be used as current TS value, and TS is arrangedVDisk=TSVDiskList, that is, model object VDisk and model The current TS value of object group VDiskList is all the TS value after increasing.
Further, in order to using timestamp by the server 10 newest data of transmission, when client 20 is to server When the 10 newest data of request, going through for each model object group of client 20 itself preservation is added in client 20 in request of data History timestamp value is sent to server 10.Data, the historical time timestamp value, the current time of server 10 according to model object Timestamp value and the update flag bit construct response model object data, and specifically, if the update flag bit is 0, selection is current The data configuration that timestamp value is greater than the model object of the historical time timestamp value is the XML text of response model object data, example Such as, the timestamp value of model object group VDiskList is 5 in the request of data of client 20, and model object in server 10 The timestamp value of group VDiskList is 9, then all the adding greater than 5 by all timestamp value in the model object VDisk of server 10 Enter into response model object data, and the timestamp value 9 of model object group VDiskList is sent to client 20.
If the update flag bit is 1, indicate that model object is deleted, then needs to send the data of all model objects It is the XML text of response model object data by the data configuration of all model objects therefore to client 20.And more by this New flag bit 1, and the model object of generation data update and its timestamp value 0 of place model object group are all sent to client End 20.
Data exchange opposite equip. client 20 corresponding with server 10 is asked for sending data to server 10 It asks, the historical time timestamp value of each model object group in the request of data comprising 20 self record of client, and receives server The current time stamp of 10 response model object data, the generation data model object updated and its place model object groups sent Value, and, the update flag bit of the model object group where the model object that data update occurs, according to the update flag bit solution The response model object data is analysed, and carries out data update, and saves the current timestamp value.
Further, according to the update flag bit, the response model object data is parsed, and carries out data update and includes:
If the update flag bit is 0, XML of the response model object data to obtain response model object data is parsed Text, and corresponding data update is carried out according to the XML text, that is, model object data are updated by correspondence.For example, mould Type object VDisk occurs data and updates, then the corresponding data for updating VDisk.At this point, the current timestamp value ratio saved The previously stored historical time timestamp value is big by 1.
If the update flag bit is 1, all model objects in memory model in corresponding model object group are removed Data parse the response model object data to obtain the XML text of response model object data, and, according to the XML text The data that the model object that data update occurs are added in the corresponding model object group.At this point, the current time saved Timestamp value is 0.
Whether there is model object to be deleted in the embodiment of the present invention, when by being updated according to data, number occurs for difference setting Model object and its place model that data update occurs according to the update flag bit of the model object group of update, and difference setting The current timestamp value of object group determines that the data of which model object need to send to client and are updated with this, thus The transmission of hash is reduced, speed is improved, network is reduced and occupies.And due to having filtered out most of useless redundant data, Transmission is all critical data, increases exploitation and convenience that engineering staff is debugged.
Referring to Fig. 2, Fig. 2 is the realization stream for the method for interchanging data based on timestamp that second embodiment of the invention provides Journey schematic diagram mainly includes the following steps that S201 to step S204:
S201, when detect storage equipment occur data update when, judge whether there is model object quilt in the storage equipment It deletes;
The model object refers to that inhomogeneous storage unit in storage equipment, the model object group refer to similar model pair The set of elephant.For example, having VDisk, POOL and RAID in storage array, each VDisk, POOL and RAID are referred to a model All model objects of object, every one kind are denoted as VDiskList, POOLList and RAIDList respectively altogether, are referred to as VDisk model object group, POOL model object group and RAID model object group.
When detecting that data update occurs for storage equipment, judge whether there is model object to be deleted in the storage equipment, I.e., if having whether the model objects such as VDisk, POOL, RAID are deleted.
S202, according to judging result, the update mark of the model object group where the model object that data update occurs for setting Will position, and, the current timestamp value of the model object that data update and its place model object group occurs for setting;
Different judging results corresponds to different settings.The model where the model object that data update occurs by setting The update flag bit of object group, and, setting occur data update model object and its place model object group it is current when Between timestamp value, it may be determined which model object have occurred data update.
S203, the request of data for receiving client include the historical time timestamp value of each model object group in the request of data;
The request of data is for the latest data on request server.The historical time timestamp value is last progress data The timestamp value saved after exchange in client, identical as the timestamp value that server after last data exchange saves, this is gone through History timestamp value is that server is sent to client.
S204, according to the data of model object, the historical time timestamp value, the current timestamp value and the update flag bit Response model object data is constructed, and the response model object data, the current timestamp value and the update flag bit are sent out Give the client.
The data of model object refer to the data of updated model object.Response model object data refers to customer in response The requirement at end is sent to the data of the model object relevant to more new data of client.The response model object that will be configured to Data, the current timestamp value and the update flag bit are sent to the client, so that client is according to the current time stamp Value and the update flag bit parse the response model object data, and complete to update according to it, and save the current time stamp Value, then the current timestamp value be next time user end to server request data when historical time timestamp value.
Whether the embodiment of the present invention has model object to be deleted when by being updated according to data, data occur for difference setting Model object and its place model pair that data update occur for the update flag bit of the model object group of update, and difference setting As the current timestamp value of group, determine that the data of which model object need to send to client and are updated with this, to subtract The transmission of few hash, improves speed, reduces network and occupies.And it due to having filtered out most of useless redundant data, passes Defeated is all critical data, increases exploitation and convenience that engineering staff is debugged.
Referring to Fig. 3, Fig. 3 is the realization stream for the method for interchanging data based on timestamp that third embodiment of the invention provides Journey schematic diagram mainly includes the following steps that S301 to step S304:
S301, when detect storage equipment occur data update when, judge whether there is model object quilt in the storage equipment It deletes;
When detecting that data update occurs for storage equipment, judge whether there is model object to be deleted in the storage equipment, I.e., if having whether the model objects such as VDisk, POOL, RAID are deleted.
S302, according to judging result, the update mark of the model object group where the model object that data update occurs for setting Will position, and, the current timestamp value of the model object that data update and its place model object group occurs for setting;
Specifically, there is model object to be deleted if judging result is, be arranged where the model object that data update occurs The update flag bit (refresh) of model object group be 1, indicate to need to refresh the data of all model objects, and will occur The timestamp value of model object and its place model object group that data update is disposed as 0 and is used as the current timestamp value.
If judging result is deleted for no model object, the model occurred where the model object that data update is set The update flag bit of object group is 0, and the timestamp value of the model object group where the model object that data update occurs is increased 1 is added to be used as the current timestamp value, and, the current time is set by the timestamp value that the model object that data update occurs Timestamp value.Deserve that is, the timestamp value that the model object group of model object and its place that data update occurs is used as after all increasing by 1 Preceding timestamp.
S303, the request of data for receiving client include the historical time timestamp value of each model object group in the request of data;
In order to only transmit newest data by server using timestamp, when user end to server requests newest data When, the historical time timestamp value that each model object group of client itself preservation is added in client in request of data is sent to service Device.
If S304, the update flag bit are 0, current timestamp value is selected to be greater than the model object of the historical time timestamp value Data configuration be response model object data extensible markup language text, if the update flag bit be 1, by all moulds The data configuration of type object is the extensible markup language text of response model object data, and by the response model number of objects The client is sent to according to, the current timestamp value and the update flag bit.
Server is according to the data of model object, the historical time timestamp value, the current timestamp value and the update mark Position construction response model object data specifically if the update flag bit is 0, selects current timestamp value to be greater than the history The data configuration of the model object of timestamp value is the XML text of response model object data, and by the response model number of objects The client is sent to according to, the current timestamp value and the update flag bit.
If the update flag bit is 1, indicate that model object is deleted, then needs to send the data of all model objects It is the XML text of response model object data by the data configuration of all model objects therefore to client.And by the update Flag bit 1, and the model object of generation data update and its timestamp value 0 of place model object group are all sent to client End.
Whether the embodiment of the present invention has model object to be deleted when by being updated according to data, data occur for difference setting Model object and its place model pair that data update occur for the update flag bit of the model object group of update, and difference setting As the current timestamp value of group, determine that the data of which model object need to send to client and are updated with this, to subtract The transmission of few hash, improves speed, reduces network and occupies.And it due to having filtered out most of useless redundant data, passes Defeated is all critical data, increases exploitation and convenience that engineering staff is debugged.
Referring to Fig. 4, Fig. 4 is the realization stream for the method for interchanging data based on timestamp that fourth embodiment of the invention provides Journey schematic diagram mainly includes the following steps that S401 to step S403:
S401, request of data is sent to server;
User end to server sends request of data, which is used to request latest data to the server.The number According to the historical time timestamp value for each model object group in request including client self record.
The historical time timestamp value is the last timestamp value save after data exchange in client, with the last time The timestamp value that server saves after data exchange is identical, which is that server is sent to client.
S402, the response model object data for receiving server transmission, model object and its institute that data update occurs In the current timestamp value of model object group, and the update mark of the model object group where the model object that data update occurs Will position;
The response model object data includes updated data.
S403, the response model object data is parsed according to the update flag bit, and carries out data update, and saving should Current timestamp value.
Specifically, if the update flag bit is 0, the response model object data is parsed to obtain response model number of objects According to XML text, and corresponding data update is carried out according to the XML text of the response model object data.For example, model object VDisk occurs data and updates, then the corresponding data for updating VDisk.At this point, being protected before the current timestamp value ratio saved The historical time timestamp value deposited is big by 1.
If the update flag bit is 1, all model objects in memory model in corresponding model object group are removed Data, and the response model object data is parsed to obtain the XML text of response model object data, and, according to the response The data that the model object that data update occurs are added in corresponding model object group the XML text of model object data.This When, the current timestamp value of preservation is 0.
Whether the embodiment of the present invention has model object to be deleted when by being updated according to data, data occur for difference setting Model object and its place model pair that data update occur for the update flag bit of the model object group of update, and difference setting As the current timestamp value of group, determine that the data of which model object need to send to client and are updated with this, to subtract The transmission of few hash, improves speed, reduces network and occupies.And it due to having filtered out most of useless redundant data, passes Defeated is all critical data, increases exploitation and convenience that engineering staff is debugged.
Referring to Fig. 5, the structure that Fig. 5 is the DEU data exchange unit based on timestamp that fifth embodiment of the invention provides is shown It is intended to, for ease of description, only parts related to embodiments of the present invention are shown.Before the exemplary switch of Fig. 5 can be The executing subject of the method for interchanging data based on timestamp of embodiment illustrated in fig. 2 offer is provided.Fig. 5 is exemplary based on timestamp DEU data exchange unit specifically includes that
Judgment module 501, setup module 502, receiving module 503, constructing module 504 and sending module 505.
Detailed description are as follows for above each functional module:
Wherein, judgment module 501, for judging in the storage equipment when detecting that data update occurs for storage equipment Whether there is model object to be deleted;
Setup module 502, for the judging result according to judgment module 501, the model object that data update occurs for setting The update flag bit of the model object group at place, and, the model object and its place model object that data update occur for setting The current timestamp value of group;
Receiving module 503, for receiving the request of data of client, going through comprising each model object group in the request of data History timestamp value;
Constructing module 504, for according to the data of model object, the historical time timestamp value, the current timestamp value and The update flag bit constructs response model object data;
Sending module 505, for sending out the response model object data, the current timestamp value and the update flag bit Give the client.
The details of the present embodiment not to the greatest extent, please refers to the description of earlier figures 1 to embodiment illustrated in fig. 4, details are not described herein again.
It should be noted that in the embodiment of the exemplary DEU data exchange unit based on timestamp of figure 5 above, each function The division of module is merely illustrative of, and can according to need in practical application, such as the configuration requirement or software of corresponding hardware The convenient of realization consider, and above-mentioned function distribution is completed by different functional modules, i.e., handed over the data based on timestamp The internal structure of changing device is divided into different functional modules, to complete all or part of the functions described above.Moreover, real In the application of border, the corresponding functional module in the present embodiment be can be by corresponding hardware realization, can also be by corresponding hardware Corresponding software is executed to complete;Each embodiment that this specification provides can all apply foregoing description principle.
Whether the embodiment of the present invention has model object to be deleted when by being updated according to data, data occur for difference setting Model object and its place model pair that data update occur for the update flag bit of the model object group of update, and difference setting As the current timestamp value of group, determine that the data of which model object need to send to client and are updated with this, to subtract The transmission of few hash, improves speed, reduces network and occupies.And it due to having filtered out most of useless redundant data, passes Defeated is all critical data, increases exploitation and convenience that engineering staff is debugged.
Referring still to the DEU data exchange unit based on timestamp that Fig. 5, sixth embodiment of the invention are provided, specifically include that
Judgment module 501, setup module 502, receiving module 503, constructing module 504 and sending module 505.
Detailed description are as follows for above each functional module:
Wherein, judgment module 501, for judging in the storage equipment when detecting that data update occurs for storage equipment Whether there is model object to be deleted;
Setup module 502, for the judging result according to judgment module 501, the model object that data update occurs for setting The update flag bit of the model object group at place, and, the model object and its place model object that data update occur for setting The current timestamp value of group;
Receiving module 503, for receiving the request of data of client, going through comprising each model object group in the request of data History timestamp value;
Constructing module 504, for according to the data of model object, the historical time timestamp value, the current timestamp value and The update flag bit constructs response model object data;
Sending module 505, for sending out the response model object data, the current timestamp value and the update flag bit Give the client.
Further, the generation is arranged if being also used to judging result is to have model object to be deleted in setup module 502 The update flag bit of model object group where the model object that data update is 1, and the model pair that the generation data are updated As and its place model object group timestamp value be disposed as 0 be used as the current timestamp value.
Setup module 502 is deleted if being also used to judging result for no model object, and generation data update is arranged Model object where model object group update flag bit be 0, and will the generation data update model object where The timestamp value of model object group increases by 1 and is used as the current timestamp value, and, the model object which is updated Timestamp value is set as the current timestamp value.
Further, constructing module 504, if being also used to the update flag bit is 0, selecting current timestamp value to be greater than should The data configuration of the model object of historical time timestamp value is the extensible markup language text of response model object data, if this is more New flag bit is 1, then is the extensible markup language text of response model object data by the data configuration of all model objects.
Sending module 505 is also used to the extensible markup language text of the response model object data, the current time Timestamp value and the update flag bit are sent to the client.
The details of the present embodiment not to the greatest extent, please refers to the description of earlier figures 1 to embodiment illustrated in fig. 5, details are not described herein again.
Whether the embodiment of the present invention has model object to be deleted when by being updated according to data, data occur for difference setting Model object and its place model pair that data update occur for the update flag bit of the model object group of update, and difference setting As the current timestamp value of group, determine that the data of which model object need to send to client and are updated with this, to subtract The transmission of few hash, improves speed, reduces network and occupies.And it due to having filtered out most of useless redundant data, passes Defeated is all critical data, increases exploitation and convenience that engineering staff is debugged.
Referring to Fig. 6, the structure that Fig. 6 is the DEU data exchange unit based on timestamp that seventh embodiment of the invention provides is shown It is intended to, for ease of description, only parts related to embodiments of the present invention are shown.Before the exemplary switch of Fig. 6 can be The executing subject of the method for interchanging data based on timestamp of embodiment illustrated in fig. 4 offer is provided.Fig. 6 is exemplary based on timestamp DEU data exchange unit specifically includes that
Sending module 601, receiving module 602, parsing module 603, update module 604 and preserving module 605.
Detailed description are as follows for above each functional module:
Wherein, sending module 601, for sending request of data to server;
For receiving the response model object data of the server transmission model that data update occurs for receiving module 602 The current timestamp value of object and its place model object group, and the model object where the model object that data update occurs The update flag bit of group;
Parsing module 603, for parsing the response model object data according to the update flag bit;
Update module 604, for carrying out data update;
Preserving module 605, for saving the current timestamp value.
The details of the present embodiment not to the greatest extent, please refers to the description of earlier figures 1 to embodiment illustrated in fig. 5, details are not described herein again.
Whether the embodiment of the present invention has model object to be deleted when by being updated according to data, data occur for difference setting Model object and its place model pair that data update occur for the update flag bit of the model object group of update, and difference setting As the current timestamp value of group, determine that the data of which model object need to send to client and are updated with this, to subtract The transmission of few hash, improves speed, reduces network and occupies.And it due to having filtered out most of useless redundant data, passes Defeated is all critical data, increases exploitation and convenience that engineering staff is debugged.
Referring to Fig. 7, the structure that Fig. 7 is the DEU data exchange unit based on timestamp that eighth embodiment of the invention provides is shown It is intended to, for ease of description, only parts related to embodiments of the present invention are shown.Before the exemplary switch of Fig. 6 can be The executing subject of the method for interchanging data based on timestamp of embodiment illustrated in fig. 7 offer is provided.Fig. 7 is exemplary based on timestamp DEU data exchange unit specifically includes that
Sending module 701, receiving module 702, parsing module 703, update module 704, preserving module 705 and removing mould Block 706.
Detailed description are as follows for above each functional module:
Wherein, sending module 701, for sending request of data to server;
For receiving the response model object data of the server transmission model that data update occurs for receiving module 702 The current timestamp value of object and its place model object group, and the model object where the model object that data update occurs The update flag bit of group;
Parsing module 703, for parsing the response model object data according to the update flag bit;
Update module 704, for carrying out data update;
Preserving module 705, for saving the current timestamp value.
Further, parsing module 703 parse the response model object data if being also used to the update flag bit is 0 To obtain the extensible markup language text of response model object data.
Update module 704 is also used to be corresponded to according to the extensible markup language text of the response model object data Data update.
The device can further include:
Module 706 is removed, if being 1 for the update flag bit, is removed in memory model in corresponding model object group All model objects data.
Further, update module 704 are also used to the extensible markup language text according to the response model object data The data that the model object that data update occurs are added in corresponding model object group.
The details of the present embodiment not to the greatest extent, please refers to the description of earlier figures 1 to embodiment illustrated in fig. 6, details are not described herein again.
Whether the embodiment of the present invention has model object to be deleted when by being updated according to data, data occur for difference setting Model object and its place model pair that data update occur for the update flag bit of the model object group of update, and difference setting As the current timestamp value of group, determine that the data of which model object need to send to client and are updated with this, to subtract The transmission of few hash, improves speed, reduces network and occupies.And it due to having filtered out most of useless redundant data, passes Defeated is all critical data, increases exploitation and convenience that engineering staff is debugged.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the module, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple module or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or module Letter connection can be electrical property, mechanical or other forms.
The module as illustrated by the separation member may or may not be physically separated, aobvious as module The component shown may or may not be physical module, it can and it is in one place, or may be distributed over multiple On network module.Some or all of the modules therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in a processing module It is that modules physically exist alone, can also be integrated in two or more modules in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.
If the integrated module is realized in the form of software function module and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this hair Necessary to bright.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
The above are to a kind of description of the method for interchanging data based on timestamp, apparatus and system provided by the present invention, For those of ordinary skill in the art, thought according to an embodiment of the present invention, in specific embodiments and applications It will change, to sum up, the contents of this specification are not to be construed as limiting the invention.

Claims (5)

1. a kind of method for interchanging data based on timestamp, which is characterized in that the described method includes:
When detecting that data update occurs for storage equipment, judge whether there is model object to be deleted in the storage equipment;
According to judging result, the update flag bit of the model object group where the model object that data update occurs for setting, and, The current timestamp value that the model object that data update and its place model object group occurs is set;
The request of data of client is received, includes the historical time timestamp value of each model object group in the request of data;
According to the data of model object, the historical time timestamp value, the current timestamp value and the update flag bit structure Response model object data is made, and the response model object data, the current timestamp value and the update are indicated Position is sent to the client;
It is described that according to judging result, the update flag bit of the model object group where the model object that data update occurs for setting, And the model object that data update occurs for setting and its current timestamp value of place model object group includes:
If judging result is to have model object to be deleted, the model pair where the model object that the generation data update is set As group update flag bit be 1, and by it is described generation data update model object and its place model object group timestamp Value is disposed as 0 and is used as the current timestamp value;
If judging result is deleted for no model object, the model where the model object that the generation data update is set The update flag bit of object group is 0, and the timestamp of the model object group where the model object that the generation data are updated Value increases by 1 and is used as the current timestamp value, and, it sets the timestamp value for the model object that the generation data update to The current timestamp value;
It is described to be indicated according to the data of model object, the historical time timestamp value, the current timestamp value and the update Position construction response model object data, and by the response model object data, the current timestamp value and the update Flag bit is sent to the client
If the update flag bit is 0, current timestamp value is selected to be greater than the number of the model object of the historical time timestamp value According to the extensible markup language text for being configured to response model object data;If the update flag bit is 1, by all models The data configuration of object is the extensible markup language text of response model object data, and by the response model object data Extensible markup language text, the current timestamp value and the update flag bit be sent to the client.
2. a kind of method for interchanging data based on timestamp, which is characterized in that the described method includes:
Request of data is sent to server;
It receives the response model object data of the server transmission, model object and its place model pair that data update occurs As the current timestamp value of group, and the update flag bit of the model object group where the model object that data update occurs;
Model object data are analyzed the response to according to the update flag bit, and carry out data update, and are worked as described in preservation Preceding timestamp value;
It is described that model object data are analyzed the response to according to the update flag bit, and carry out data update and include:
If the update flag bit is 0, analyzing the response to model object data can with obtain response model object data Extending mark language text, and corresponding data are carried out according to the extensible markup language text of the response model object data It updates;
If the update flag bit is 1, the number of all model objects in memory model in corresponding model object group is removed According to, and model object data are analyzed the response to obtain the extensible markup language text of response model object data, and, The data that the model object that data update occurs are added according to the extensible markup language text of the response model object data Enter in corresponding model object group.
3. a kind of DEU data exchange unit based on timestamp, which is characterized in that described device includes:
Judgment module, for judging whether there is model in the storage equipment when detecting that data update occurs for storage equipment Object is deleted;
The model pair that the generation data update is arranged if being to have model object to be deleted for judging result in setup module As place model object group update flag bit be 1, and by it is described generation data update model object and its place model The timestamp value of object group is disposed as 0 as current timestamp value;
The setup module is deleted if being also used to judging result for no model object, and the generation data are arranged and update Model object where model object group update flag bit be 0, and will it is described occur data update model object where Model object group timestamp value increase by 1 be used as the current timestamp value, and, by it is described generation data update model The timestamp value of object is set as the current timestamp value;
Receiving module, for receiving the request of data of client, when including the history of each model object group in the request of data Between timestamp value;
Constructing module selects current timestamp value to be greater than the historical time timestamp value if being 0 for the update flag bit The data configuration of model object is the extensible markup language text of response model object data;If the update flag bit is 1, It is then the extensible markup language text of response model object data by the data configuration of all model objects;
Sending module, for by the extensible markup language text of the response model object data, the current timestamp value And the update flag bit is sent to the client.
4. a kind of DEU data exchange unit based on timestamp, which is characterized in that described device includes:
Sending module, for sending request of data to server;
The model object that data update occurs for receiving module, the response model object data sent for receiving the server And its model object group where the current timestamp value of place model object group, and the model object of generation data update Update flag bit;
Parsing module analyzes the response to model object data if being 0 for the update flag bit to obtain response model The extensible markup language text of object data;
Update module, for carrying out corresponding data more according to the extensible markup language text of the response model object data Newly;And
The model object of data update will occur for the extensible markup language text according to the response model object data Data be added in corresponding model object group;
Preserving module, for saving the current timestamp value;
Module is removed, if being 1 for the update flag bit, is removed all in corresponding model object group in memory model The data of model object.
5. a kind of data exchange system based on timestamp, which is characterized in that the system comprises:
Server, client and storage equipment;
Wherein, the server, for judging in the storage equipment when detecting that data update occurs for the storage equipment Whether there is model object to be deleted;According to judging result, the model object group where the model object that data update occurs for setting Update flag bit, and, setting occur data update model object and its place model object group current timestamp value; The request of data of the client is received, includes the historical time timestamp value of each model object group in the request of data;According to mould The data of type object, the historical time timestamp value, the current timestamp value and the update flag bit construct response model Object data, and the response model object data, the current timestamp value and the update flag bit are sent to institute State client;
It is described that according to judging result, the update flag bit of the model object group where the model object that data update occurs for setting, And the model object that data update occurs for setting and its current timestamp value of place model object group includes:
If judging result is to have model object to be deleted, the model pair where the model object that the generation data update is set As group update flag bit be 1, and by it is described generation data update model object and its place model object group timestamp Value is disposed as 0 and is used as the current timestamp value;
If judging result is deleted for no model object, the model where the model object that the generation data update is set The update flag bit of object group is 0, and the timestamp of the model object group where the model object that the generation data are updated Value increases by 1 and is used as the current timestamp value, and, it sets the timestamp value for the model object that the generation data update to The current timestamp value;
It is described to be indicated according to the data of model object, the historical time timestamp value, the current timestamp value and the update Position construction response model object data, and by the response model object data, the current timestamp value and the update Flag bit is sent to the client
If the update flag bit is 0, current timestamp value is selected to be greater than the number of the model object of the historical time timestamp value According to the extensible markup language text for being configured to response model object data;If the update flag bit is 1, by all models The data configuration of object is the extensible markup language text of response model object data, and by the response model object data Extensible markup language text, the current timestamp value and the update flag bit be sent to the client;
The client, for sending request of data to server;Receive response model object data that the server sends, The current timestamp value of the model object that data update and its place model object group occurs, and the model that data update occurs The update flag bit of model object group where object;According to the update flag bit, model object data are analyzed the response to, And data update is carried out, and save the current timestamp value;
It is described that model object data are analyzed the response to according to the update flag bit, and carry out data update and include:
If the update flag bit is 0, analyzing the response to model object data can with obtain response model object data Extending mark language text, and corresponding data are carried out according to the extensible markup language text of the response model object data It updates;
If the update flag bit is 1, the number of all model objects in memory model in corresponding model object group is removed According to, and model object data are analyzed the response to obtain the extensible markup language text of response model object data, and, The data that the model object that data update occurs are added according to the extensible markup language text of the response model object data Enter in corresponding model object group.
CN201510953589.1A 2015-12-16 2015-12-16 A kind of method for interchanging data based on timestamp, apparatus and system Active CN105553722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510953589.1A CN105553722B (en) 2015-12-16 2015-12-16 A kind of method for interchanging data based on timestamp, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510953589.1A CN105553722B (en) 2015-12-16 2015-12-16 A kind of method for interchanging data based on timestamp, apparatus and system

Publications (2)

Publication Number Publication Date
CN105553722A CN105553722A (en) 2016-05-04
CN105553722B true CN105553722B (en) 2019-01-08

Family

ID=55832662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510953589.1A Active CN105553722B (en) 2015-12-16 2015-12-16 A kind of method for interchanging data based on timestamp, apparatus and system

Country Status (1)

Country Link
CN (1) CN105553722B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106198362A (en) * 2016-08-31 2016-12-07 南京理工大学 Remote multi-point laser dust particle counter system
CN107154957A (en) * 2016-12-29 2017-09-12 贵州电网有限责任公司铜仁供电局 Distributed storage control method based on virtual ring load-balancing algorithm

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364163A (en) * 2007-08-07 2009-02-11 英业达股份有限公司 System for establishing logical volume and method thereof
CN101853217A (en) * 2009-03-30 2010-10-06 富士通株式会社 Buffer control device, signal conditioning package and computer readable recording medium storing program for performing
CN102314322A (en) * 2011-07-01 2012-01-11 杭州华三通信技术有限公司 Data processing method and device based on RAID (redundant array of independent disks)
CN103885718A (en) * 2012-12-21 2014-06-25 刘庆国 Mirror disk increment synchronizing method based on lvm
CN104657089A (en) * 2015-03-13 2015-05-27 浪潮集团有限公司 Unified management method of placement groups on object storage device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090319525A1 (en) * 2008-06-23 2009-12-24 Microsoft Corporation Lost write protection via stream-based replication

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364163A (en) * 2007-08-07 2009-02-11 英业达股份有限公司 System for establishing logical volume and method thereof
CN101853217A (en) * 2009-03-30 2010-10-06 富士通株式会社 Buffer control device, signal conditioning package and computer readable recording medium storing program for performing
CN102314322A (en) * 2011-07-01 2012-01-11 杭州华三通信技术有限公司 Data processing method and device based on RAID (redundant array of independent disks)
CN103885718A (en) * 2012-12-21 2014-06-25 刘庆国 Mirror disk increment synchronizing method based on lvm
CN104657089A (en) * 2015-03-13 2015-05-27 浪潮集团有限公司 Unified management method of placement groups on object storage device

Also Published As

Publication number Publication date
CN105553722A (en) 2016-05-04

Similar Documents

Publication Publication Date Title
US10268755B2 (en) Systems and methods for providing dynamic indexer discovery
KR102264615B1 (en) Systems and methods for synchronizing nodes of a robotic system
CN109271412A (en) The real-time streaming data processing method and system of smart city
US10298970B2 (en) Image transmission method and apparatus
CN103036736B (en) A kind of configuration equipment monitoring system based on data source and method
CN109831318A (en) A kind of system, method and server obtaining network topology
CN104199957A (en) Redis universal agent implementation method
CN103324715B (en) Disaster recovery backup system availability detection method and device
CN109213792A (en) Method, server-side, client, device and the readable storage medium storing program for executing of data processing
CN104219298B (en) Group system and its method for data backup
JPWO2008056670A1 (en) RESOURCE INFORMATION PROVIDING SYSTEM, METHOD, RESOURCE INFORMATION PROVIDING DEVICE, AND PROGRAM
CN106713497A (en) Server-side message push device and method and message push system
CN109766242A (en) Monitoring method, device and system based on mobile user side and storage medium
CN101815013A (en) Method for monitoring operation of satellite application system based on Ajax and Web service technology
CN103281356B (en) File distribution method and system
CN104394011A (en) A method for supporting server virtualization operation and maintenance by a warning message
CN107302569A (en) A kind of security monitoring Data acquisition and storage method of facing cloud platform
CN105553722B (en) A kind of method for interchanging data based on timestamp, apparatus and system
CN103973516A (en) Method and device for achieving monitoring function in data processing system
CN102902746A (en) Method, device and system for processing mass data
US8954576B2 (en) Test analysis system of network and analysis method thereof
CN104410657B (en) Data transmission method for uplink and device in Distributed Central monitor system
CN113703917B (en) Multi-cluster resource data processing system and method and non-transient storage medium
CN102075964A (en) Method and equipment for acquiring performance data by using network management system
CN107766003A (en) One kind storage dual-active method, apparatus, system and computer-readable recording medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant