CN105915657B - Data synchronization method and device and client - Google Patents

Data synchronization method and device and client Download PDF

Info

Publication number
CN105915657B
CN105915657B CN201610509375.XA CN201610509375A CN105915657B CN 105915657 B CN105915657 B CN 105915657B CN 201610509375 A CN201610509375 A CN 201610509375A CN 105915657 B CN105915657 B CN 105915657B
Authority
CN
China
Prior art keywords
data
htm
unit
attribute
data 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.)
Active
Application number
CN201610509375.XA
Other languages
Chinese (zh)
Other versions
CN105915657A (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
Original Assignee
Beijing Qihoo 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 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

Images

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, a device and a client, relates to the technical field of internet, and mainly aims to solve the problems that monitoring events need to be sequentially set for each policy configuration item when a client interface synchronizes data to a server in the prior art, the error rate is higher when the monitoring events are more set, and the maintenance of the monitoring events is more complicated.

Description

Data synchronization method and device and client
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a data synchronization method, apparatus, and client.
Background
Along with the rapid development of internet technology and terminal equipment, more and more enterprises and public institutions pay attention to the safety control of internal terminal equipment. At present, terminal asset management, vulnerability patch management, security operation and maintenance management and control, network security admission, mobile storage management and other security management and control are often performed on terminal equipment in an enterprise through a terminal security management system.
Because there are many terminal devices in an enterprise, when the terminal devices are managed and controlled, the terminal security management system manages and controls each terminal device through policy configuration items configured in a client interface (front-end display interface) of the terminal security management system. Since the cardinality of the policy configuration item is large and it has an increasing property, it is necessary to ensure synchronicity between the policy configuration item displayed in the client interface of the terminal security management system and the policy configuration item data stored in the server.
The data synchronization between the client interface and the server is realized through an MVC (model View controller) framework, and the specific operation process is as follows: and the Controller monitors each strategy configuration item configured by the user in the client interface View through monitoring the event, and synchronizes data corresponding to the updated strategy configuration item to the server Model when the Controller determines that the strategy configuration item in the client interface View is updated through monitoring the event, so as to realize the synchronization from the client interface operation to the server data. When the client requests the display interface of the strategy configuration items from the server, the Controller acquires the server data, synchronizes the strategy configuration items corresponding to the server data in the client interface View, and realizes the synchronization of the server data to the client interface.
When the inventor realizes data synchronization in the above way, the following problems are found: because the cardinality of the strategy configuration items in the client interface is large, monitoring events need to be set for each strategy configuration item in sequence, the more monitoring events are set, the higher the error rate is, and the more maintenance of the monitoring events is complicated; particularly, when linkage of parent and child levels in a policy configuration item is involved, a plurality of cycles need to be executed for a monitoring event corresponding to the child level, so that maintenance of the monitoring event is more complicated.
Disclosure of Invention
In view of this, the present invention provides a data synchronization method, an apparatus and a client, and mainly aims to solve the problems that in the prior art, when a client interface is executed to synchronize data to a server, monitoring events need to be sequentially set for each policy configuration item, the more monitoring events are set, the higher the error rate is, and the maintenance of the monitoring events is complicated.
In a first aspect, the present invention provides a method for synchronizing data, including:
the method comprises the steps that a client analyzes each HTM L element in a current display interface and customizes the data attribute of each HTM L element, wherein the data attribute is the unique identifier of the HTM L element;
monitoring the data attribute and determining whether the data attribute is updated;
and if the data attribute is determined to be updated, synchronizing the data corresponding to the updated data attribute to a server so that the server can store the data.
In a second aspect, the present invention provides an apparatus for synchronizing data, the apparatus comprising:
the analysis unit is used for analyzing each HTM L element in the current display interface;
the self-defining unit is used for self-defining the data attribute of each HTM L element after the analyzing unit analyzes each HTM L element in the current display interface, wherein the data attribute is the unique identifier of the HTM L element;
the first monitoring unit is used for monitoring the data attribute customized by the customization unit;
the determining unit is used for determining whether the data attribute is updated or not in the process of monitoring the data attribute by the first monitoring unit;
and the synchronization unit is used for synchronizing the updated data corresponding to the data attribute to the server so that the server can store the updated data when the determination unit determines that the data attribute is updated.
In a third aspect, an embodiment of the present invention further provides a client, where the client includes the above-mentioned data synchronization apparatus.
By means of the technical scheme, the data synchronization method, the data synchronization device and the data synchronization client provided by the invention have the advantages that firstly, the client analyzes each HTM L element in a current display interface, customizes each HTM L element into a data attribute capable of uniquely identifying the HTM L element, secondly, monitors the data attribute, determines whether the data attribute is updated, and finally, if the data attribute is determined to be updated, the data synchronization server corresponding to the updated data attribute is compared with the prior art that a monitoring event is set for each HTM L element in the current display interface.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a method for synchronizing data according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating policy configuration items in a current display interface of a client;
fig. 3 is a schematic diagram illustrating dependency relationship of HTM L elements according to an embodiment of the present invention;
FIG. 4 is a block diagram illustrating a data synchronization apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating another data synchronization apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides a data synchronization method, which is applied to a client, and as shown in fig. 1, the method includes:
101. the client analyzes each HTM L element in the current display interface and customizes the data attribute of each HTM L element.
In order to perform unified management on terminal devices in a local area network, the terminal devices are managed through a terminal security management system, wherein the terminal security management system comprises a client for an administrator to control and a server for storing data corresponding to the client, the administrator can configure a policy configuration item in the client, store the configured policy configuration item to the server, and then send the policy configuration item to each terminal device in the local area network through the server, so as to achieve unified control and management on the terminal devices.
Illustratively, as shown in fig. 2, fig. 2 is a schematic diagram illustrating policy configuration items in a current display interface of a client, and each input box, check box, and the like in fig. 2 is each an HTM L element in the current display interface, where fig. 2 is merely an exemplary example, and the embodiment of the present invention does not limit the specific content (the category of the HTM L element, the policy configuration item) illustrated in fig. 2.
After the association relationship between the HTM L elements in the current display interface is analyzed, each HTM L element is customized to be a corresponding data attribute through a Model-View Model (MVVM), and the data attribute is a unique identifier of the HTM L element, and when the data attribute is customized to each HTM L element, an avalon frame, an angularjs frame, an Vue frame and the like can be used for realizing the implementation mode of customizing each HTM L element, such as the above-mentioned MVVM frame, avalon frame and the like, which is referred to the detailed description in the prior art.
It should be noted that the data synchronization according to the embodiment of the present invention includes synchronizing data corresponding to the client interface to the server database, and synchronizing data corresponding to each data attribute in the server to the client interface. Although the client and the server both contain data synchronization between each other, the purpose of the data synchronization is different, firstly, the data corresponding to the policy configuration item in the client interface is synchronized to the server database, the purpose is to synchronize the policy configuration item configured by the administrator to the server, and the server issues the policy corresponding to the configuration policy item to the terminal equipment in the local area network according to the policy configuration items, so as to realize unified management of the terminal equipment in the local area network; secondly, if the server does not synchronize the data attributes to the client interface, under the default condition, when the client requests the server to acquire the policy configuration items, only the policy configuration items without any configuration are displayed, but the policy configuration items generally comprise thousands of items, and an administrator needs to manually configure the thousands of policy configuration items to add unnecessary work input to the administrator.
102. And the client monitors the data attribute and determines whether the data attribute is updated.
Generally, each data attribute in a current display interface of a client is monitored, the data attributes correspond to two different HTM L custom attributes, the HTM L custom attribute is in a written or selected state, and the data attribute is in an unwritten or unselected state, the HTM L custom attribute is different, and data corresponding to the data attribute is also different.
103. And if the data attribute is determined to be updated, the client synchronizes the data corresponding to the updated data attribute to the server.
And synchronizing the data corresponding to the updated data attributes to the server so as to configure the current display interface of the client based on the data corresponding to the data attributes stored in the server when the client requests the policy configuration item next time.
According to the data synchronization method provided by the embodiment of the invention, firstly, a client analyzes each HTM L element in a current display interface, each HTM L element is customized into a data attribute capable of uniquely identifying the HTM L element, secondly, the data attribute is monitored, whether the data attribute is updated or not is determined, and finally, if the data attribute is determined to be updated, a data synchronization server corresponding to the updated data attribute is used, compared with the prior art that monitoring events are set for each HTM L element in the current display interface, the embodiment of the invention determines whether the update exists in the client interface by monitoring the data attribute, the customized data attribute is used as a 'bridge' for binding data corresponding to the HTM L element in the client display interface and the server storage HTM L element in a bidirectional mode, and the client determines whether the update exists in the client interface or not by monitoring the data attribute, the focus is on the change of data corresponding to data attribute information, and the monitoring event for the HTM L element is not involved, so that the problems of complicated maintenance and high error rate of the monitoring event are avoided.
Further, as a refinement and an extension of the above embodiment, when step 101 is executed to analyze each HTM L element in the current display interface, based on the MVVM framework, sequentially traversing each HTM L element in the current display interface and determining whether a dependency relationship exists between each HTM L element, for example, as shown in fig. 3, fig. 3 illustrates that one HTM L element provided by the embodiment of the present invention has a dependency relationship, which is an association relationship between a parent level and a child level, and the association relationship between the parent level and the child level is represented in the current display interface of the client, but when the vm mvframework determines that data attributes in the code are the same, it indicates that a dependency relationship exists between the two HTM L elements, in the service of the current display interface of the client, only when an HTM L element (data attribute) of the parent level is selected, the HTM L element of the child level can be selected, as shown in fig. 3, when the parent level is selected, the parent level can be selected by the parent level, and the child level is not selected, i.e., the child level is selected by the parent level is not selected by the parent level.
The method further comprises the specific process of monitoring data attributes at a client according to an MVVM (multifunction vehicle virtual machine) framework, wherein the specific process comprises the steps of determining HTM L custom attributes corresponding to the data attributes, wherein the HTM L custom attributes are used for identifying the written or unwritten state of the data attributes, wherein the data attributes corresponding to the HTM L custom attributes with the dependency association relation are the same, and monitoring the written or unwritten state of the HTM L custom attributes.
Further, after it is determined that the data attribute is updated, data corresponding to the updated data attribute is obtained, the data corresponding to the updated data attribute is stored in a temporary storage space in the client, and whether a preset data storage instruction is received or not is monitored, wherein the preset data storage instruction is used for instructing to synchronize the data corresponding to the updated data attribute in the temporary storage space of the client to the server, and after the preset data storage instruction is received, the data corresponding to the updated data attribute is obtained from the temporary storage space in the client and is synchronized to the server. In practical application, please refer to fig. 2, the preset save data command is triggered by the administrator through the save button shown in fig. 2, when the administrator clicks the save button, it indicates that the administrator has completed the configuration for the policy configuration item, and clicks the save button, so as to synchronize the interface data with the server data.
In the prior art, when client interface data is synchronized to a server database, if linkage operation between a parent level and a child level is involved, multiple if loop statements need to be executed repeatedly, and errors are prone to occur.
Figure GDA0002410857890000071
Figure GDA0002410857890000081
The data attribute in the code is close _ protected.enable, the HTM L custom attribute corresponding to the data attribute is ms-duplex-enabled and ms-attr-disabled, for ms-duplex-enabled, when the MVVM framework determines that the administrator selects the ms-duplex-enabled, the MVVM framework will represent close _ protected.enable as a selected state, and the HTM L custom attribute corresponds to true, when the MVVM framework determines that the administrator does not select the ms-duplex-enabled, the MVVM framework will represent close _ protected.enable as an unselected state, and the HTM L custom attribute corresponds to close _ protected.enable as a false, and at this time, the HTM L custom attribute is interpreted as ms-att-enabled, and if the html L custom attribute corresponds to open _ protected.enable, the HTM is interpreted as an example, the HTM L custom attribute is not capable of specifying the operation of the html-protected.4656, and the application is not capable of specifying the special case of implementing the application of the invention.
Further, the foregoing embodiment has described in detail the implementation process of synchronizing the client interface data to the server, and the following describes the server data synchronization to the client interface in detail. In the embodiment of the invention, in order to realize bidirectional synchronization of interface data and server data, before the client receives response information of the server to the request information, an MVVM (multifunction vehicle virtual machine) frame analyzes the response information and acquires data corresponding to data attributes, and because the current display interface acquired from the server by the client is acquired for the first time, the response information of the request information returned by the server is a default configuration mode of a system; the administrator sets the policy configuration items according to the actual requirements for terminal device management, and implements synchronization from the client interface to the server according to the method shown in fig. 1.
If the client sends request information for acquiring the current display interface to the server for the non-first time, the data corresponding to the data attribute stored in the server is possibly changed by an administrator, therefore, before the client receives response information of the server to the request information, the MVVM framework analyzes the response information, acquires the data corresponding to the data attribute, configures the corresponding data attribute in the current display interface according to the data corresponding to the data attribute, and displays the strategy configuration item of the client after all the data attributes are synchronized.
Further, as an implementation of the method shown in fig. 1, another embodiment of the present invention further provides a data synchronization apparatus. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method.
An embodiment of the present invention provides a data synchronization apparatus, which is applied to a client, and as shown in fig. 4, the apparatus includes:
the analysis unit 41 is used for analyzing each HTM L element in the current display interface;
the customizing unit 42 is configured to customize a data attribute of each HTM L element after the analyzing unit 41 analyzes each HTM L element in the current display interface, where the data attribute is a unique identifier of the HTM L element;
the first monitoring unit 43 is configured to monitor the data attribute customized by the customization unit;
a determining unit 44, configured to determine whether there is an update in the data attribute during the monitoring of the data attribute by the first monitoring unit 43;
a synchronizing unit 45, configured to, when the determining unit 44 determines that the data attribute is updated, synchronize data corresponding to the updated data attribute to a server, so that the server stores the data attribute.
Further, as shown in fig. 5, the analysis unit 41 includes:
a traversing module 4101, configured to sequentially traverse each HTM L element in the current display interface;
a second determining module 4102, configured to determine whether a dependency association relationship exists between HTM L elements in a process that the traversing module 4101 traverses each HTM L element in the current display interface in sequence.
Further, as shown in fig. 5, the first monitoring unit 43 includes:
the first determining module 4301 is configured to determine an HTM L custom attribute corresponding to the data attribute, where the HTM L custom attribute is used to identify a written or unwritten state of the data attribute, and the data attributes corresponding to the HTM L custom attribute having the dependency association relationship are the same;
a monitoring module 4302, configured to monitor a write or unwritten state of the HTM L custom attribute determined by the first determining module 4301.
Further, the customizing unit 42 is further configured to customize the data attribute of each HTM L element according to an MVVM framework.
Further, as shown in fig. 5, the apparatus further includes:
a first sending unit 46, configured to send request information for acquiring a current display interface to the server;
an analyzing unit 47, configured to, before receiving response information of the request information sent by the first sending unit 46 from the server, analyze the response information based on the MVVM framework;
a first obtaining unit 48, configured to obtain data corresponding to the data attribute in a process that the analyzing unit 47 analyzes the response information based on the MVVM framework;
a configuration unit 49, configured to configure the corresponding data attribute in the current display interface according to the data corresponding to the data attribute acquired by the first acquisition unit 48;
an output unit 410, configured to output the current display interface configured by the configuration unit 49.
Further, as shown in fig. 5, the apparatus further includes:
a second obtaining unit 411, configured to obtain, after the determining unit 44 determines that the data attribute is updated, data corresponding to the updated data attribute;
a storage unit 412, configured to store the data corresponding to the updated data attribute acquired by the second acquiring unit 411 in a temporary storage space of a data synchronization apparatus;
a second monitoring unit 413, configured to monitor whether a preset save data instruction is received, where the preset save data instruction is used to instruct to synchronize data corresponding to the updated data attribute of the temporary storage space of the data synchronization apparatus to the server;
the synchronizing unit 45 is further configured to, when the second monitoring unit 413 receives the preset data saving instruction, obtain data corresponding to the updated data attribute from the temporary storage space of the data synchronizing apparatus, and synchronize the data to the server.
Further, as shown in fig. 5, the apparatus further includes:
a second sending unit 414, configured to send the data attribute to the server after the customizing unit 42 customizes the data attribute of each HTM L element, so that the server stores the data attribute.
Further, the HTM L element includes an input control corresponding to a policy configuration item.
Further, an embodiment of the present invention further provides a client, where the client includes a data synchronization apparatus as shown in any one of fig. 4 or fig. 5.
According to the data synchronization device and the client, firstly, the client analyzes each HTM L element in a current display interface, customizes each HTM L element into a data attribute capable of uniquely identifying the HTM L element, secondly, monitors the data attribute, determines whether the data attribute is updated, and finally, if the data attribute is determined to be updated, a data synchronization server corresponding to the updated data attribute is used, compared with the prior art that a monitoring event is set for each HTM L element in the current display interface, the embodiment of the invention determines whether the update exists in the client interface by monitoring the data attribute, the custom data attribute is used as a 'bridge' for binding data corresponding to the HTM L element in the client display interface and the server storage HTM L element in a bidirectional mode, and the client determines whether the update exists in the client interface or not by monitoring the data attribute, focuses on the change of data corresponding to data attribute information, and does not relate to the monitoring event of the HTM L element, so that the problems of complicated maintenance and high error rate of the monitoring event are avoided.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in the title of the invention (e.g., means for determining the level of links within a web site) in accordance with embodiments of the invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (13)

1. A method for synchronizing data, comprising:
the client analyzes each HTM L element in the current display interface and customizes the data attribute of each HTM L element, wherein the data attribute is the unique identifier of the HTM L element, and the HTM L element comprises an input control corresponding to a strategy configuration item;
monitoring the data attribute and determining whether the data attribute is updated;
if the data attribute is determined to be updated, synchronizing the data corresponding to the updated data attribute to a server so that the server can store the data and send the data to each terminal device in a local area network;
the monitoring the data attribute comprises:
determining HTM L custom attributes corresponding to the data attributes, wherein the HTM L custom attributes are used for identifying the written or unwritten state of the data attributes, and the data attributes corresponding to the HTM L custom attributes of the HTM L elements with dependency association are the same;
monitoring the written or unwritten status of the HTM L custom attribute.
2. The method of claim 1, wherein the client analyzing each HTM L element in the current display interface comprises:
and sequentially traversing all the HTM L elements in the current display interface, and determining whether the dependency relationship exists between the HTM L elements.
3. The method of claim 1, wherein customizing the data attributes of the individual HTM L elements comprises:
customizing the data attributes of the HTM L elements according to an MVVM framework.
4. The method of claim 3, further comprising:
sending request information for acquiring a current display interface to the server;
before receiving response information of the server to the request information, analyzing the response information based on the MVVM framework, and acquiring data corresponding to the data attribute;
configuring corresponding data attributes in the current display interface according to the data corresponding to the data attributes;
and outputting the configured current display interface.
5. The method according to any one of claims 1-4, further comprising:
after the data attribute is determined to be updated, acquiring data corresponding to the updated data attribute, and storing the data corresponding to the updated data attribute in a temporary storage space of a client;
monitoring whether a preset data storage instruction is received, wherein the preset data storage instruction is used for indicating that data corresponding to the updated data attribute of the temporary storage space of the client side are synchronized to the server;
the step of synchronizing the updated data corresponding to the data attribute to the server specifically includes:
and if the preset data storage instruction is received, acquiring the data corresponding to the updated data attribute from the temporary storage space of the client, and synchronizing the data to the server.
6. The method of claim 5, wherein after customizing the data attributes of the individual HTM L elements, the method further comprises:
and sending the data attribute to the server so that the server can store the data attribute.
7. An apparatus for synchronizing data, comprising:
the system comprises an analysis unit, a display unit and a display unit, wherein the analysis unit is used for analyzing each HTM L element in a current display interface, and the HTM L element comprises an input control corresponding to a strategy configuration item;
the self-defining unit is used for self-defining the data attribute of each HTM L element after the analyzing unit analyzes each HTM L element in the current display interface, wherein the data attribute is the unique identifier of the HTM L element;
the first monitoring unit is used for monitoring the data attribute customized by the customization unit;
the determining unit is used for determining whether the data attribute is updated or not in the process of monitoring the data attribute by the first monitoring unit;
the synchronization unit is used for synchronizing the updated data corresponding to the data attribute to a server when the determination unit determines that the data attribute is updated, so that the server can store the updated data and send the updated data to each terminal device in a local area network;
the first monitoring unit includes:
the data attribute determining module is used for determining the HTM L custom attributes corresponding to the data attributes, wherein the HTM L custom attributes are used for identifying the written or unwritten state of the data attributes, and the data attributes corresponding to the HTM L custom attributes of the HTM L elements with dependency association are the same;
and the monitoring module is used for monitoring the writing or non-writing state of the HTM L custom attribute determined by the first determining module.
8. The apparatus of claim 7, wherein the analysis unit comprises:
the traversing module is used for sequentially traversing all HTM L elements in the current display interface;
and the second determining module is used for determining whether the dependency association relationship exists between the HTM L elements in the process that the traversing module traverses all the HTM L elements in the current display interface in sequence.
9. The apparatus of claim 7, wherein the customization unit is further configured to customize the data attributes of the HTM L elements according to an MVVM framework.
10. The apparatus of claim 9, further comprising:
the first sending unit is used for sending request information for acquiring the current display interface to the server;
the analysis unit is used for analyzing the response information based on the MVVM framework before receiving the response information of the request information sent by the first sending unit from the server;
a first obtaining unit, configured to obtain data corresponding to the data attribute in a process that the analyzing unit analyzes the response information based on the MVVM frame;
the configuration unit is used for configuring the corresponding data attribute in the current display interface according to the data corresponding to the data attribute acquired by the first acquisition unit;
and the output unit is used for outputting the current display interface configured by the configuration unit.
11. The apparatus according to any one of claims 7-10, further comprising:
the second obtaining unit is used for obtaining the data corresponding to the updated data attribute after the determining unit determines that the data attribute is updated;
the storage unit is used for storing the data corresponding to the updated data attribute acquired by the second acquisition unit into a temporary storage space of a data synchronization device;
the second monitoring unit is used for monitoring whether a preset data storage instruction is received or not, wherein the preset data storage instruction is used for indicating that the data corresponding to the updated data attribute of the temporary storage space of the data synchronization device is synchronized to the server;
and the synchronization unit is further configured to, when the second monitoring unit receives the preset data saving instruction, acquire data corresponding to the updated data attribute from a temporary storage space of the data synchronization device, and synchronize the data to the server.
12. The apparatus of claim 11, further comprising:
and the second sending unit is used for sending the data attribute to the server after the data attribute of each HTM L element is customized by the customization unit, so that the server can store the data attribute.
13. A client, characterized in that it comprises a synchronization means of data according to any of claims 7-12.
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 CN105915657A (en) 2016-08-31
CN105915657B true 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)

Families Citing this family (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
CN107679238B (en) * 2017-10-27 2020-10-09 杭州迪普科技股份有限公司 Method and device for creating new object
CN108563481B (en) * 2018-04-09 2021-12-24 阿里巴巴(中国)有限公司 Method, equipment and device for modifying preview of skin in real time
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
CN111106966B (en) * 2019-12-26 2022-09-30 深信服科技股份有限公司 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

Also Published As

Publication number Publication date
CN105915657A (en) 2016-08-31

Similar Documents

Publication Publication Date Title
CN105915657B (en) Data synchronization method and device and client
US8281187B1 (en) Unified and extensible meta-testing framework
US9582254B2 (en) Generating runtime components
US8584087B2 (en) Application configuration deployment monitor
US10013337B2 (en) Feature switches for private cloud and on-premise application components
US9519663B2 (en) Upgrading and migrating a database by a migration tool
US9076072B2 (en) System and method for web page rendering test automation suite
US8832658B2 (en) Verification framework for business objects
US20100057780A1 (en) Action execution management facility for service configuration items
DE202016008133U1 (en) Container application with dynamic subpack loader
US20120311524A1 (en) Gateway Data Distribution Engine
US9143407B2 (en) Granular client inventory management with conflict resolution
US10970052B2 (en) System and method for enhancing component based development models with auto-wiring
CN108196877A (en) The method and apparatus and computing device of component release management
US10901984B2 (en) Enhanced batch updates on records and related records system and method
US9053084B1 (en) Self-service testing
US20200310833A1 (en) Capturing data from a live web application to populate a demo application
US11330053B1 (en) Making eventual consistency cache updates deterministic
US8713152B2 (en) Managing distributed applications using structural diagrams
CN107451056B (en) Method and device for monitoring interface test result
US10599750B2 (en) Capturing an application state in a conversation
US11893383B2 (en) Configuration properties management for software
US20150100888A1 (en) Providing a common interface for accessing and presenting component configuration settings
US8898589B2 (en) Flattening a subset of configuration user interface (UI) panels in a hierarchy of UI panels
US9785543B2 (en) Dual tagging between test and pods

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