CN105915657A - Data synchronization method and device, and client - Google Patents

Data synchronization method and device, and client Download PDF

Info

Publication number
CN105915657A
CN105915657A CN201610509375.XA CN201610509375A CN105915657A CN 105915657 A CN105915657 A CN 105915657A CN 201610509375 A CN201610509375 A CN 201610509375A CN 105915657 A CN105915657 A CN 105915657A
Authority
CN
China
Prior art keywords
data
data attribute
server
client
attribute
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.)
Granted
Application number
CN201610509375.XA
Other languages
Chinese (zh)
Other versions
CN105915657B (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.)
Beijing Qihoo Technology Co Ltd
Beijing Qianxin Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Beijing Qianxin Technology 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 Beijing Qihoo Technology Co Ltd, Beijing Qianxin Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201610509375.XA priority Critical patent/CN105915657B/en
Publication of CN105915657A publication Critical patent/CN105915657A/en
Application granted granted Critical
Publication of CN105915657B publication Critical patent/CN105915657B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data synchronization method and device, and a client, relates to the technical field of the internet and mainly aims at solving the problems that in the prior art, when data of a interface of a client is synchronized to a server, a monitoring event is successively set for each strategy configuration item, the more the monitoring events are set, the higher the error rate is, and the maintenance of the monitoring events is relatively complex. The main technical scheme comprises that the client analyzes each HTML element in a current display interface and customizes data attribute of each HTML element, wherein the data attribute is the unique identifier of each HTML element; monitoring the data attributes; determining whether the data attributes are updated or not; synchronizing the data corresponding to the updated data attributes to the server if the data attributes are updated; and storing the data by the server. The embedment of the method, the device and the client are applied to the process of configuring the strategy configuration items in a terminal security management system.

Description

The synchronous method of data, device and client
Technical field
The present invention relates to Internet technical field, particularly relate to the synchronous method of a kind of data, device And client.
Background technology
Along with Internet technology and the fast development of terminal unit, increasing enterprises and institutions weight Depending on the security management and control to inner terminal equipment.At present, usually through Terminal Security Management system to enterprises and institutions Interior terminal unit carries out terminal wealth management, leak patch management, safe O&M management and control, network peace Security management and control such as full access, mobile storage management etc..
Owing to the terminal unit in enterprises and institutions is more, when terminal unit is carried out management and control, by end The client end interface (front end display interface) of end safety management system is configured to management terminal device Tactful configuration item, Terminal Security Management system by those strategy configuration items each terminal unit is entered Line pipe control.Owing to the radix of strategy configuration item is big, and it has growth property, it is desirable, therefore, to assure that eventually In the client end interface of end safety management system, the tactful configuration item of display is joined with the strategy that server stores Put the synchronicity between item data.
Client end interface is Tong Bu with server data by MVC (Model View Controller) framework Realizing, specific operation process is as follows: controller Controller is by monitoring event to client end interface In View, each strategy configuration item user configured is monitored, when controller Controller is by prison Strategy configuration when listening event to determine in client end interface View to have tactful configuration item to update, after updating Corresponding data syn-chronization is in server Model, it is achieved client end interface operates server data Synchronization.When the display interface of user end to server request strategy configuration item, controller Controller Obtain server data, and in client end interface View, synchronize the strategy that those server datas are corresponding Configuration item, it is achieved server data is to the synchronization of client end interface.
Inventor is when realizing data syn-chronization by the way, and there are the following problems to find it: due to In client end interface, the radix of strategy configuration item is relatively big, accordingly, it would be desirable to each strategy configuration item successively Arranging monitoring event, it is the most that event of monitoring is arranged, and its error rate is the highest, and the maintenance of the event of monitoring The most relatively complicated;When especially relating to the parent level linkage in strategy configuration item, sub-level is corresponding Monitoring event needs to perform multiple circulation so that the maintenance monitoring event is more complicated.
Summary of the invention
In view of this, the synchronous method of a kind of data, device and the client that the present invention provides, mainly Purpose is to solve in prior art when performing client end interface to server sync data, and it is right to need Each strategy configuration item sets gradually monitoring event, and it is the most that event of monitoring is arranged, and its error rate is the highest, And the most relatively complicated problem of maintenance of the event of monitoring.
First aspect, the invention provides the synchronous method of a kind of data, including:
Each HTML element in current display interface is analyzed by client, and self-defined described The data attribute of each HTML element, described data attribute is unique mark of HTML element;
Described data attribute is monitored, and determines whether described data attribute exists renewal;
Update if it is determined that described data attribute exists, then the data that after updating, described data attribute is corresponding It is synchronized to server, in order to it is stored by described server.
Second aspect, the invention provides the synchronizer of a kind of data, and this device includes:
Analytic unit, for being analyzed each HTML element in current display interface;
Self-defined unit, is used at described analytic unit each html element in current display interface After element is analyzed, the data attribute of self-defined each HTML element described, described data attribute Unique mark for HTML element;
First monitoring unit, for carrying out the described self-defined unit described data attribute after self-defined Monitoring;
Determine unit, be used for during described data attribute is monitored by described first monitoring unit, Determine whether described data attribute exists renewal;
Lock unit, for when described determine unit determine described data attribute exist update time, will more The data syn-chronization that after new, described data attribute is corresponding is to server, in order to it is deposited by described server Storage.
The third aspect, the embodiment of the present invention also provides for a kind of client, and described client includes as above institute The synchronizer of the data stated.
By technique scheme, the synchronous method of data, device and the client that the present invention provides, First, each HTML element in current display interface is analyzed by client, and each to those Individual HTML element is customized for uniquely identifying the data attribute of HTML element, secondly, and logarithm It is monitored according to attribute, and determines whether data attribute exists renewal, finally, however, it is determined that these data belong to Property exist and update, then data synchronization server corresponding to data attribute after updating, with prior art In each HTML element in current display interface arranged monitor event compare, the embodiment of the present invention Self-defining data attribute is stored as HTML element in client display interface with server The data that HTML element is corresponding perform " bridge " of two-way binding, and client is by data attribute Monitoring determines whether there is renewal in client end interface, and emphasis point is data attribute information correspondence number According to change, be not related to the monitoring event to HTML element, thus avoid and monitoring event is safeguarded The problem that loaded down with trivial details, error rate is high.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the present invention's Technological means, and can being practiced according to the content of description, and in order to allow the above-mentioned of the present invention and Other objects, features and advantages can become apparent, below especially exemplified by the detailed description of the invention of the present invention.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit for Those of ordinary skill in the art will be clear from understanding.Accompanying drawing is only used for illustrating the mesh of preferred implementation , and it is not considered as limitation of the present invention.And in whole accompanying drawing, with identical reference symbol Number represent identical parts.In the accompanying drawings:
Fig. 1 shows the flow chart of the synchronous method of a kind of data that the embodiment of the present invention provides;
Fig. 2 shows the schematic diagram of strategy configuration item in a kind of client current display interface;
Fig. 3 shows that a kind of HTML element that the embodiment of the present invention provides exists and relies on incidence relation Schematic diagram;
Fig. 4 shows the composition frame chart of the synchronizer of a kind of data that the embodiment of the present invention provides;
Fig. 5 shows the composition frame chart of the synchronizer of the another kind of data that the embodiment of the present invention provides.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although it is aobvious in accompanying drawing Show the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure And should not limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to more Thoroughly understand the disclosure, and can be by the technology conveying to this area complete for the scope of the present disclosure Personnel.
The embodiment of the present invention provides the synchronous method of a kind of data, and the method is applied to client, such as Fig. 1 Shown in, described method includes:
101, each HTML element in current display interface is analyzed by client, and self-defined The data attribute of each HTML element described.
In order to the terminal unit in local area network is managed collectively, by Terminal Security Management system pair Terminal unit is managed, and wherein, this Terminal Security Management system comprises the client for manager's manipulation Hold and for storing the server of client corresponding data, manager can be by configuring in client Strategy configuration item, and the tactful configuration item after configuration is preserved to server, then by server by strategy Configuration item sends each terminal unit to LAN, to realize terminal unit is uniformly controlled pipe Reason.
Exemplary, as in figure 2 it is shown, Fig. 2 shows strategy configuration in client current display interface Schematic diagram, it is each that each input frame in Fig. 2, tick boxes etc. are in current display interface Individual HTML element, wherein, the exemplary only citing of Fig. 2, the embodiment of the present invention is to shown in Fig. 2 Particular content (kind of HTML element, strategy configuration item) be not defined.
In client, each HTML element in current display interface is analyzed, it is intended that Analyzing and whether there is dependence incidence relation between each HTML element, described dependence incidence relation is i.e. Parent between HTML element and the relation of sub-level.In analyzing current display interface each After incidence relation between HTML element, will by Model-View-ViewModel (MVVM) Each HTML element is customized for the data attribute of correspondence, it is intended that by data attribute Monitoring, it is achieved the two-way binding between client end interface data and server data, described data belong to Property be unique mark of HTML element.When to each HTML element self-defining data attribute, also Avalon framework, angular js framework, Vue framework etc. can be used to realize;Wherein, relevant above-mentioned MVVM framework, avalon framework etc. carry out self-defining implementation to each HTML element, please With reference to detailed description of the prior art, the embodiment of the present invention no longer repeats at this.
It should be noted that the data syn-chronization related in the embodiment of the present invention includes that client end interface is corresponding The data that data carry out synchronizing to server database, each data attribute is corresponding in server to visitor End interface, family synchronizes.Although client all comprises the synchronization of data each other with server, but The purpose being its synchrodata is different, first, the data that in client end interface, strategy configuration item is corresponding to Server database synchronizes, it is intended that be synchronized to by the tactful configuration item of administrator configurations Server, server issues configuration strategy according to the terminal unit in those strategy configuration item local area networks The strategy that item is corresponding, it is achieved the unified management of terminal unit in local area network;Second, if not performing clothes Business device is to client end interface synchrodata attribute, under default situations, when user end to server request obtains When taking strategy configuration item, only can be displayed without the tactful configuration item of any configuration, and strategy configuration item one As comprise thousands of item, manager needs manually to configure the tactful configuration item of thousands of, gives management Member increases unnecessary Job engagement, therefore, the number that in server database, each data attribute is corresponding Synchronize according to client end interface, it is intended that manager's last time is preserved to server Data syn-chronization corresponding to tactful configuration item to client current display interface, manager is without to each Strategy configuration item all configures, and alleviates the part work load of manager.
102, described data attribute is monitored by client, and determines whether described data attribute exists Update.
Under normal circumstances, each data attribute in client current display interface is monitored, data The corresponding two kinds of different HTML Custom Attributes of attribute, this HTML Custom Attributes for write or Selected state, data attribute be not for write or unselected state.HTML Custom Attributes is different, The data that its data attribute is corresponding are the most different.Such as, if the HTML Custom Attributes of tick boxes is choosing Middle state, then what data attribute was corresponding may be 1, it is also possible to for true etc., if the HTML of tick boxes Custom Attributes is unselected state, then the data that data attribute is corresponding may be 0, it is also possible to for false Etc., concrete, the embodiment of the present invention is to the number corresponding to the different conditions of HTML Custom Attributes According to not being defined.
103 if it is determined that there is renewal, then described data attribute after client will update in described data attribute Corresponding data syn-chronization is to server.
Data syn-chronization corresponding to the data attribute updated will be there is to server, in order to when client is next During request strategy configuration item, data corresponding to data attribute based on storage in server are to client Current display interface configures.
The synchronous method of the data that the embodiment of the present invention provides, first, client is to current display interface In each HTML element be analyzed, and be customized for those each HTML element can be only The data attribute of one mark HTML element, secondly, is monitored data attribute, and determines data Whether attribute exists renewal, finally, however, it is determined that this data attribute exists renewal, the then number after updating According in the data synchronization server that attribute is corresponding, with prior art to each in current display interface HTML element arranges monitor event and compares, the embodiment of the present invention using self-defining data attribute as visitor The data that in the end display interface of family, HTML element is corresponding with server storage HTML element perform two-way " bridge " of binding, client is by determining in client end interface whether exist to the monitoring of data attribute Updating, emphasis point is the change to data attribute information corresponding data, is not related to HTML element Monitoring event, thus avoid and monitoring event safeguarded loaded down with trivial details, problem that error rate is high.
Further, as to the refinement of above-described embodiment and extension, step 101 is being performed to currently When each HTML element in display interface is analyzed, travels through successively based on MVVM framework and work as Each HTML element in front display interface, and determine whether exist between each HTML element Dependence, exemplary, as it is shown on figure 3, Fig. 3 shows the one that the embodiment of the present invention provides There is the schematic diagram relying on incidence relation in HTML element, described dependence incidence relation is parent and sub-level Between incidence relation, the incidence relation of this kind of parent and sub-level shows the currently displaying boundary of client In face, but, when the data attribute that MVVM framework is determined in code is identical, show these two Exist between HTML element and rely on incidence relation.In the business of client current display interface, only When having the HTML element (data attribute) when parent selected, can the html element of antithetical phrase level Element is chosen, and such as Fig. 3, when parent checkbox is selected, sub-level checkbox just can be managed Reason person operates;When parent checkbox is the most selected, sub-level checkbox for put ash state, I.e. manager can not antithetical phrase level checkbox operate.
Further, data attribute is monitored according to MVVM framework in client, its concrete mistake Journey comprises determining that the HTML Custom Attributes that described data attribute is corresponding;Wherein, described HTML Custom Attributes is for identifying write or the unwritten state of described data attribute;Wherein, described in existing The data attribute that the described HTML Custom Attributes of dependence incidence relation is corresponding is identical;To described Write or the unwritten state of HTML Custom Attributes are monitored.
Further, determining that data attribute is deposited in the updated, obtaining data attribute after updating corresponding Data, and data corresponding to data attribute after updating are stored in the temporarily providing room in client, Monitoring whether to receive preset preservation data command, wherein, this preset preservation data command is used for indicating By data syn-chronization corresponding for the data attribute after the renewal in client temporarily providing room to server, when connecing After receiving preset preservation data command, obtain the data after updating in the temporarily providing room from client and belong to The data that property is corresponding, and it is synchronized to server.In actual applications, please continue to refer to 2, preset Preserve data command to be triggered by preservation button as shown in Figure 2 by manager, when manager clicks on this When preserving button, illustrate that manager completes configuration to strategy configuration item, click on and preserve button, Realize the interface data synchronization to server data.
In prior art, when client end interface data synchronize to server database, if relating to During to the combined operation of parent and sub-level, need to repeat multiple if Do statement, mistake easily occurs. And in the embodiment of the present invention, the HTML element of parent and sub-level all can be carried out certainly by MVVM framework Definition, the data attribute that parent is corresponding with sub-level is identical, but the HTML Custom Attributes of its correspondence Different.Exemplary, following code showing, parent changes with the linkage of sub-level:
Wherein, in above-mentioned code, data attribute is close_protect.enable, and this data attribute is corresponding HTML Custom Attributes be respectively as follows: ms-duplex-checked and ms-attr-disabled, for Ms-duplex-checked, when MVVM framework determines that this ms-duplex-checked is chosen by manager After, then can be selected state by representing close_protect.enable, HTML Custom Attributes is corresponding Data are true;After MVVM framework determines that this ms-duplex-checked is not chosen by manager, Can be then unselected state by representing close_protect.enable, the number that HTML Custom Attributes is corresponding According to for close_protect.enable=false.And now, for HTML Custom Attributes From the point of view of ms-attr-disabled, if!Close_protect.enable=true, then explanation manager can not be to this HTML element corresponding for close_protect.enable operates.It should be noted that above code Exemplary only citing, the embodiment of the present invention is to the MVVM self-defined title to HTML element And the content such as HTML Custom Attributes the most specifically limits.
Further, above-described embodiment has been described in detail client end interface data syn-chronization to server Realize process, below server data will be synchronized to client end interface and elaborate.Client End is first when server request strategy configuration item, and user end to server sends and obtains currently displaying boundary The solicited message in face, after server receives this solicited message, server can return one to client The individual display interface that strategy configuration item is not carried out any configuration, in embodiments of the present invention, in order to It is capable of the bi-directional synchronization of interface data and server data, receives server to request in client Before the response message of information, this response message is resolved by MVVM framework, and obtains data attribute Corresponding data, owing to this current display interface obtained to server of client is for obtain first, Therefore, server returns the configuration mode that response message is system default of solicited message;Manager's root According to the actual demand to terminal unit management, carry out the setting of strategy configuration item, and according to shown in Fig. 1 Method implement the client end interface synchronization to server.
If client is non-sends the solicited message obtaining current display interface first to server, clothes are described The data that in business device, the data attribute of storage is corresponding may the person of being managed be changed, and therefore, terminates client Before receipts server is to the response message of solicited message, this response message is resolved by MVVM framework, Obtain data corresponding to data attribute, and according to data corresponding to data attribute, configure currently displaying boundary Data attribute corresponding in face, after having synchronized all of data attribute, the strategy of display client is joined Put item.
Further, as to the realization of method shown in above-mentioned Fig. 1, another embodiment of the present invention also carries Supply the synchronizer of a kind of data.This device embodiment is corresponding with preceding method embodiment, for ease of Reading, the detail content in preceding method embodiment is no longer repeated by this device embodiment one by one, It should be understood that device in the present embodiment can corresponding realize in preceding method embodiment whole interior Hold.
The synchronizer of a kind of data that the embodiment of the present invention provides, this device is applied in client, As shown in Figure 4, described device includes:
Analytic unit 41, for being analyzed each HTML element in current display interface;
Self-defined unit 42, at described analytic unit 41 to each in current display interface After HTML element is analyzed, the data attribute of self-defined each HTML element described, described Data attribute is unique mark of HTML element;
First monitoring unit 43, for entering the described self-defined unit described data attribute after self-defined Row monitoring;
Determine unit 44, for described data attribute being monitored at described first monitoring unit 43 Cheng Zhong, determines whether described data attribute exists renewal;
Lock unit 45, for when described determine unit 44 determine described data attribute exist update time, The data syn-chronization that after updating, described data attribute is corresponding is to server, in order to it is entered by described server Row storage.
Further, as it is shown in figure 5, described analytic unit 41 includes:
Spider module 4101, for traveling through each HTML element in described current display interface successively;
Determine module 4102, for traveling through described current display interface successively in described spider module 4101 In each HTML element during, determine whether exist between HTML element dependence association close System.
Further, as it is shown in figure 5, described first monitoring unit 43 includes:
Determine module 431, for determining the HTML Custom Attributes that described data attribute is corresponding;Its In, described HTML Custom Attributes is for identifying write or the unwritten state of described data attribute; Wherein, there is the data attribute phase that the described HTML Custom Attributes of described dependence incidence relation is corresponding With;
Monitoring module 432, for the described self-defined genus of described HTML determining that module 431 determines Write or the unwritten state of property are monitored.
Further, described self-defined unit 42, it is additionally operable to according to MVVM framework self-defined described The described data attribute of each HTML element.
Further, as it is shown in figure 5, described device also includes:
First transmitting element 46, for sending the request letter obtaining current display interface to described server Breath;
Resolution unit 47, for receiving the institute that described first transmitting element 46 is sent by described server Before stating the response message of solicited message, based on described MVVM framework, described response message is solved Analysis;
First acquiring unit 48, in described resolution unit 47 based on described MVVM framework to institute State response message to carry out, in resolving, obtaining the data that described data attribute is corresponding;
Dispensing unit 49 is corresponding for the described data attribute obtained according to described first acquiring unit 48 Data, configure in described current display interface corresponding data attribute;
Output unit 410, the current display interface after exporting the configuration of described dispensing unit 49.
Further, as it is shown in figure 5, described device also includes:
Described, second acquisition unit 411, for determining that unit 44 determines that described data attribute exists more After Xin, obtain the data that after updating, described data attribute is corresponding;
Memory element 412, after the described renewal obtained by described second acquisition unit 411, data belong to In the temporarily providing room of the synchronizer that data corresponding to property are stored in data;
Second monitoring unit 413, is used for monitoring whether to receive preset preservation data command, wherein, institute State preset preservation data command for instruction by after the renewal of the temporarily providing room of the synchronizer of described data The data syn-chronization extremely described server that data attribute is corresponding;
Described lock unit 45, is additionally operable to when described second monitoring unit 413 receives described preset guarantor During deposit data instruction, in the temporarily providing room of the synchronizer of described data, obtain data after described renewal The data that attribute is corresponding, and it is synchronized to described server.
Further, as it is shown in figure 5, described device also includes:
Second transmitting element 414, at self-defined each HTML described of described self-defined unit 42 After the data attribute of element, described data attribute is sent to described server, in order to described service Described data attribute is stored by device.
Further, described HTML element includes the input control that strategy configuration item is corresponding.
Further, the embodiment of the present invention also provides for a kind of client, and described client includes such as Fig. 4 Or the synchronizer of the data shown in the arbitrary width of Fig. 5.
The synchronizer of the data that the present invention provides and client, first, client is to currently displaying boundary Each HTML element in face is analyzed, and be customized for those each HTML element can Unique data attribute identifying HTML element, secondly, is monitored data attribute, and determines number Whether renewal is there is, finally, however, it is determined that this data attribute exists renewal, then after updating according to attribute To each in current display interface in the data synchronization server that data attribute is corresponding, with prior art HTML element arranges monitor event and compares, the embodiment of the present invention using self-defining data attribute as visitor The data that in the end display interface of family, HTML element is corresponding with server storage HTML element perform two-way " bridge " of binding, client is by determining in client end interface whether exist to the monitoring of data attribute Updating, emphasis point is the change to data attribute information corresponding data, is not related to HTML element Monitoring event, thus avoid and monitoring event safeguarded loaded down with trivial details, problem that error rate is high.
The present invention is 16 to additionally provide following technical scheme:
A1, the synchronous method of a kind of data, including:
Each HTML element in current display interface is analyzed by client, and self-defined described The data attribute of each HTML element, described data attribute is unique mark of HTML element;
Described data attribute is monitored, and determines whether described data attribute exists renewal;
Update if it is determined that described data attribute exists, then the data that after updating, described data attribute is corresponding It is synchronized to server, in order to it is stored by described server.
A2, according to the method described in A1, client is to each html element in current display interface Element is analyzed including:
Travel through each HTML element in described current display interface successively, and determine html element Dependence incidence relation whether is there is between element.
A3, according to the method described in A2, be monitored including to described data attribute:
Determine the HTML Custom Attributes that described data attribute is corresponding;Wherein, described HTML makes by oneself Justice attribute is for identifying write or the unwritten state of described data attribute;Wherein, there is described dependence The data attribute that the described HTML Custom Attributes of incidence relation is corresponding is identical;
Write or unwritten state to described HTML Custom Attributes are monitored.
A4, according to the method described in A3, the data attribute bag of self-defined each HTML element described Include:
Described data attribute according to self-defined each HTML element described of MVVM framework.
A5, according to the method described in A4, described method also includes:
The solicited message obtaining current display interface is sent to described server;
Before receiving the described server response message to described solicited message, based on described MVVM frame Described response message is resolved by frame, and obtains the data that described data attribute is corresponding;
According to the data that described data attribute is corresponding, configure data corresponding in described current display interface Attribute;
Current display interface after output configuration.
A6, according to the method according to any one of A1-A5, described method also includes:
Determining that described data attribute is deposited in the updated, obtaining the number that after updating, described data attribute is corresponding According to, and data corresponding for data attribute after described renewal are stored in the temporarily providing room of client;
Monitoring whether to receive preset preservation data command, wherein, described preset preservation data command is used The data syn-chronization that data attribute is corresponding after instruction is by the renewal of the temporarily providing room of described client is to described Server;
After updating data syn-chronization corresponding to described data attribute to server particularly as follows:
If receiving described preset preservation data command, then obtain in the temporarily providing room of described client The data that after described renewal, data attribute is corresponding, and it is synchronized to described server.
A7, according to the method described in A6, at the data attribute of self-defined each HTML element described Afterwards, described method also includes:
Described data attribute is sent to described server, in order to described server is to described data attribute Store.
A8, according to the method described in A7, described HTML element includes strategy corresponding defeated of configuration item Enter control.
B9, the synchronizer of a kind of data, including:
Analytic unit, for being analyzed each HTML element in current display interface;
Self-defined unit, is used at described analytic unit each html element in current display interface After element is analyzed, the data attribute of self-defined each HTML element described, described data attribute Unique mark for HTML element;
First monitoring unit, for carrying out the described self-defined unit described data attribute after self-defined Monitoring;
Determine unit, be used for during described data attribute is monitored by described first monitoring unit, Determine whether described data attribute exists renewal;
Lock unit, for when described determine unit determine described data attribute exist update time, will more The data syn-chronization that after new, described data attribute is corresponding is to server, in order to it is deposited by described server Storage.
B10, according to the device described in B9, described analytic unit includes:
Spider module, for traveling through each HTML element in described current display interface successively;
Determine module, for each in described spider module travels through described current display interface successively During HTML element, determine and between HTML element, whether there is dependence incidence relation.
B11, according to the device described in B10, described first monitoring unit includes:
Determine module, for determining the HTML Custom Attributes that described data attribute is corresponding;Wherein, Described HTML Custom Attributes is for identifying write or the unwritten state of described data attribute;Wherein, The data attribute that there is the described HTML Custom Attributes of described dependence incidence relation corresponding is identical;
Monitoring module, for the described write determining described HTML Custom Attributes that module determines Or unwritten state is monitored.
B12, according to the device described in B11, described self-defined unit, be additionally operable to according to MVVM frame The described data attribute of self-defined each HTML element described of frame.
B13, according to the device described in B12, described device also includes:
First transmitting element, for sending the solicited message obtaining current display interface to described server;
Resolution unit, for asking described in described first transmitting element transmission at the described server of reception Before seeking the response message of information, based on described MVVM framework, described response message is resolved;
First acquiring unit, in described resolution unit based on described MVVM framework to described response Information carries out, in resolving, obtaining the data that described data attribute is corresponding;
Dispensing unit, for the number that the described data attribute according to described first acquiring unit acquisition is corresponding According to, configure data attribute corresponding in described current display interface;
Output unit, the current display interface after exporting the configuration of described dispensing unit.
B14, according to the device according to any one of B9-B13, described device also includes:
Second acquisition unit, for determining that unit determines that described data attribute is deposited in the updated described, Obtain the data that after updating, described data attribute is corresponding;
Memory element, after the described renewal obtained by described second acquisition unit, data attribute is corresponding The data synchronizer that is stored in data temporarily providing room in;
Second monitoring unit, is used for monitoring whether to receive preset preservation data command, wherein, described Preset preservation data command counts after the renewal of the temporarily providing room of the synchronizer of described data for instruction According to the data syn-chronization extremely described server that attribute is corresponding;
Described lock unit, is additionally operable to when described second monitoring unit receives described preset preservation data During instruction, in the temporarily providing room of the synchronizer of described data, obtain data attribute pair after described renewal The data answered, and it is synchronized to described server.
B15, according to the device described in B14, described device also includes:
Second transmitting element, at self-defined each HTML element described of described self-defined unit After data attribute, described data attribute is sent to described server, in order to described server is to institute State data attribute to store.
B16, according to the device described in B15, described HTML element include strategy configuration item corresponding Input control.
C17, a kind of client, described client includes the data as according to any one of B9-B16 Synchronizer.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not has in certain embodiment The part being described in detail, may refer to the associated description of other embodiments.
It is understood that the correlated characteristic in said method and device can mutually reference.It addition, " first ", " second " in above-described embodiment etc. are for distinguishing each embodiment, and do not represent each enforcement The quality of example.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, above-mentioned The system described, the specific works process of device and unit, it is referred in preceding method embodiment Corresponding process, does not repeats them here.
Provided herein algorithm and display not with any certain computer, virtual system or miscellaneous equipment Intrinsic relevant.Various general-purpose systems can also be used together with based on teaching in this.According to above Describe, construct the structure required by this kind of system and be apparent from.Additionally, the present invention is also not for Any certain programmed language.It is understood that, it is possible to use various programming languages realize described here The content of invention, and the description above done language-specific is to disclose the optimal real of the present invention Execute mode.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that Embodiments of the invention can be put into practice in the case of not having these details.In some instances, It is not shown specifically known method, structure and technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand in each inventive aspect Individual or multiple, above in the description of the exemplary embodiment of the present invention, each feature of the present invention Sometimes it is grouped together in single embodiment, figure or descriptions thereof.But, should be by The method of the disclosure is construed to reflect an intention that i.e. the present invention for required protection requires that ratio is each The more feature of feature being expressly recited in claim.More precisely, as following right is wanted As asking book to be reflected, inventive aspect is all spies less than single embodiment disclosed above Levy.Therefore, it then follows claims of detailed description of the invention are thus expressly incorporated in this specific embodiment party Formula, the most each claim itself is as the independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment Adaptively change and they are arranged in one or more equipment different from this embodiment. Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and In addition multiple submodule or subelement or sub-component can be put them into.Except such feature and/or Outside at least some in process or unit excludes each other, any combination can be used this explanation All features disclosed in book (including adjoint claim, summary and accompanying drawing) and the openest Any method or all processes of equipment or unit be combined.Unless expressly stated otherwise, originally Each feature disclosed in description (including adjoint claim, summary and accompanying drawing) can be by carrying Alternative features for identical, equivalent or similar purpose replaces.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include Some feature included in other embodiments rather than further feature, but the feature of different embodiment Combination mean to be within the scope of the present invention and formed different embodiments.Such as, under In the claims in face, embodiment required for protection one of arbitrarily can be in any combination Mode uses.
The all parts embodiment of the present invention can realize with hardware, or with at one or more The software module run on reason device realizes, or realizes with combinations thereof.Those skilled in the art Should be appreciated that and microprocessor or digital signal processor (DSP) can be used in practice to realize Some in denomination of invention (as determined the device of website internal chaining grade) according to embodiments of the present invention Or all some or all functions of parts.The present invention is also implemented as performing institute here Part or all the equipment of method described or device program (such as, computer program and Computer program).The program of such present invention of realization can be stored in computer-readable medium On, or can be to have the form of one or more signal.Such signal can be from the Internet net Upper download of standing obtains, or provides on carrier signal, or provides with any other form.
The present invention will be described rather than limits the present invention to it should be noted above-described embodiment Make, and those skilled in the art can design without departing from the scope of the appended claims Alternative embodiment.In the claims, any reference marks that should not will be located between bracket is configured to Limitations on claims.Word " comprises " and does not excludes the presence of the element or step not arranged in the claims Suddenly.Word "a" or "an" before being positioned at element does not excludes the presence of multiple such element.The present invention And can come real by means of properly programmed computer by means of including the hardware of some different elements Existing.If in the unit claim listing equipment for drying, several in these devices can be logical Cross same hardware branch specifically to embody.Word first, second and third use do not indicate that Any order.Can be title by these word explanations.

Claims (10)

1. the synchronous method of data, it is characterised in that including:
Each HTML element in current display interface is analyzed by client, and self-defined described The data attribute of each HTML element, described data attribute is unique mark of HTML element;
Described data attribute is monitored, and determines whether described data attribute exists renewal;
Update if it is determined that described data attribute exists, then the data that after updating, described data attribute is corresponding It is synchronized to server, in order to it is stored by described server.
Method the most according to claim 1, it is characterised in that client is to current display interface In each HTML element be analyzed including:
Travel through each HTML element in described current display interface successively, and determine html element Dependence incidence relation whether is there is between element.
Method the most according to claim 2, it is characterised in that described data attribute is supervised Control includes:
Determine the HTML Custom Attributes that described data attribute is corresponding;Wherein, described HTML makes by oneself Justice attribute is for identifying write or the unwritten state of described data attribute;Wherein, there is described dependence The data attribute that the described HTML Custom Attributes of incidence relation is corresponding is identical;
Write or unwritten state to described HTML Custom Attributes are monitored.
Method the most according to claim 3, it is characterised in that self-defined each HTML described The data attribute of element includes:
Described data attribute according to self-defined each HTML element described of MVVM framework.
Method the most according to claim 4, it is characterised in that described method also includes:
The solicited message obtaining current display interface is sent to described server;
Before receiving the described server response message to described solicited message, based on described MVVM frame Described response message is resolved by frame, and obtains the data that described data attribute is corresponding;
According to the data that described data attribute is corresponding, configure data corresponding in described current display interface Attribute;
Current display interface after output configuration.
6. according to the method according to any one of claim 1-5, it is characterised in that described method is also Including:
Determining that described data attribute is deposited in the updated, obtaining the number that after updating, described data attribute is corresponding According to, and data corresponding for data attribute after described renewal are stored in the temporarily providing room of client;
Monitoring whether to receive preset preservation data command, wherein, described preset preservation data command is used The data syn-chronization that data attribute is corresponding after instruction is by the renewal of the temporarily providing room of described client is to described Server;
After updating data syn-chronization corresponding to described data attribute to server particularly as follows:
If receiving described preset preservation data command, then obtain in the temporarily providing room of described client The data that after described renewal, data attribute is corresponding, and it is synchronized to described server.
Method the most according to claim 6, it is characterised in that at self-defined each HTML described After the data attribute of element, described method also includes:
Described data attribute is sent to described server, in order to described server is to described data attribute Store.
Method the most according to claim 7, it is characterised in that described HTML element includes plan The input control that slightly configuration item is corresponding.
9. the synchronizer of data, it is characterised in that including:
Analytic unit, for being analyzed each HTML element in current display interface;
Self-defined unit, is used at described analytic unit each html element in current display interface After element is analyzed, the data attribute of self-defined each HTML element described, described data attribute Unique mark for HTML element;
First monitoring unit, for carrying out the described self-defined unit described data attribute after self-defined Monitoring;
Determine unit, be used for during described data attribute is monitored by described first monitoring unit, Determine whether described data attribute exists renewal;
Lock unit, for when described determine unit determine described data attribute exist update time, will more The data syn-chronization that after new, described data attribute is corresponding is to server, in order to it is deposited by described server Storage.
10. a client, it is characterised in that described client includes as claimed in claim 9 The synchronizer of data.
CN201610509375.XA 2016-06-30 2016-06-30 Data synchronization method and device and client Active CN105915657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610509375.XA CN105915657B (en) 2016-06-30 2016-06-30 Data synchronization method and device and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610509375.XA CN105915657B (en) 2016-06-30 2016-06-30 Data synchronization method and device and client

Publications (2)

Publication Number Publication Date
CN105915657A true CN105915657A (en) 2016-08-31
CN105915657B CN105915657B (en) 2020-07-24

Family

ID=56753727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610509375.XA Active CN105915657B (en) 2016-06-30 2016-06-30 Data synchronization method and device and client

Country Status (1)

Country Link
CN (1) CN105915657B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960610A (en) * 2016-11-16 2017-07-18 重庆万学创世教育科技有限公司 A kind of data handling system of the intelligent depth study of optimization
CN107679238A (en) * 2017-10-27 2018-02-09 杭州迪普科技股份有限公司 A kind of new Object method and device
CN108563481A (en) * 2018-04-09 2018-09-21 广州阿里巴巴文学信息技术有限公司 Method, equipment and the device of skin real time modifying preview
CN108845856A (en) * 2018-06-11 2018-11-20 腾讯科技(深圳)有限公司 Data Binding Method, device, storage medium and equipment
CN109885793A (en) * 2019-01-18 2019-06-14 中国平安人寿保险股份有限公司 Page data acquisition method and device, electronic equipment, storage medium
CN111106966A (en) * 2019-12-26 2020-05-05 深信服科技股份有限公司 Information processing method and device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488143A (en) * 2008-01-16 2009-07-22 重庆安软信息科技有限公司 Novel web application and local application interaction mode
US20120317488A1 (en) * 2011-06-13 2012-12-13 Microsoft Corporation Techniques for adapting an interpretive run time application to multiple clients
CN102831154A (en) * 2012-06-29 2012-12-19 北京奇虎科技有限公司 Method and device for storing and displaying data in text input box of webpage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488143A (en) * 2008-01-16 2009-07-22 重庆安软信息科技有限公司 Novel web application and local application interaction mode
US20120317488A1 (en) * 2011-06-13 2012-12-13 Microsoft Corporation Techniques for adapting an interpretive run time application to multiple clients
CN102831154A (en) * 2012-06-29 2012-12-19 北京奇虎科技有限公司 Method and device for storing and displaying data in text input box of webpage

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960610A (en) * 2016-11-16 2017-07-18 重庆万学创世教育科技有限公司 A kind of data handling system of the intelligent depth study of optimization
CN107679238A (en) * 2017-10-27 2018-02-09 杭州迪普科技股份有限公司 A kind of new Object method and device
CN107679238B (en) * 2017-10-27 2020-10-09 杭州迪普科技股份有限公司 Method and device for creating new object
CN108563481A (en) * 2018-04-09 2018-09-21 广州阿里巴巴文学信息技术有限公司 Method, equipment and the device of skin real time modifying preview
CN108563481B (en) * 2018-04-09 2021-12-24 阿里巴巴(中国)有限公司 Method, equipment and device for modifying preview of skin in real time
CN108845856A (en) * 2018-06-11 2018-11-20 腾讯科技(深圳)有限公司 Data Binding Method, device, storage medium and equipment
CN108845856B (en) * 2018-06-11 2021-12-14 腾讯科技(深圳)有限公司 Object-based synchronous updating method and device, storage medium and equipment
CN109885793A (en) * 2019-01-18 2019-06-14 中国平安人寿保险股份有限公司 Page data acquisition method and device, electronic equipment, storage medium
CN111106966A (en) * 2019-12-26 2020-05-05 深信服科技股份有限公司 Information processing method and device, equipment and storage medium
CN111106966B (en) * 2019-12-26 2022-09-30 深信服科技股份有限公司 Information processing method and device, equipment and storage medium

Also Published As

Publication number Publication date
CN105915657B (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN105915657A (en) Data synchronization method and device, and client
US11593400B1 (en) Automatic triage model execution in machine data driven monitoring automation apparatus
US10942960B2 (en) Automatic triage model execution in machine data driven monitoring automation apparatus with visualization
US20210075667A1 (en) Generating actionable alert messages for resolving incidents in an information technology environment
US11366842B1 (en) IT service monitoring by ingested machine data with KPI prediction and impactor determination
US10146609B1 (en) Configuration of continuous anomaly detection service
US10048830B2 (en) System and method for integrating microservices
US9392003B2 (en) Internet security cyber threat reporting system and method
US9727376B1 (en) Mobile tasks
US20180013777A1 (en) Identifying network security risks
US11593074B2 (en) System, method, and apparatus for data-centric networked application development services
CN107251513A (en) System and method for the accurate guarantee of Malicious Code Detection
JP2011070669A (en) Dynamic hyperlink for process control system
EP2990965B1 (en) Versatile data model
US20110209042A1 (en) Information Technology Standard Inventory Utility
US20070222589A1 (en) Identifying security threats
CN112217656B (en) Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system
US11360653B2 (en) Synchronized presentation of data in different representations
US10181984B1 (en) Post incident review
CN107992350A (en) A kind of method and device for generating configuration Overview page
CN107133245A (en) Presence information management system, method and electronic equipment
US9973410B2 (en) Notifying original state listeners of events in a domain model
CN107832403A (en) Catalogue file management method, device, electric terminal and readable storage medium storing program for executing
US9621424B2 (en) Providing a common interface for accessing and presenting component configuration settings
CN105868384A (en) Method, device and system for updating shared data

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