CN105991744B - Method and apparatus for synchronizing user application data - Google Patents

Method and apparatus for synchronizing user application data Download PDF

Info

Publication number
CN105991744B
CN105991744B CN201510095073.8A CN201510095073A CN105991744B CN 105991744 B CN105991744 B CN 105991744B CN 201510095073 A CN201510095073 A CN 201510095073A CN 105991744 B CN105991744 B CN 105991744B
Authority
CN
China
Prior art keywords
user
application data
information
state information
data
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
CN201510095073.8A
Other languages
Chinese (zh)
Other versions
CN105991744A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510095073.8A priority Critical patent/CN105991744B/en
Publication of CN105991744A publication Critical patent/CN105991744A/en
Application granted granted Critical
Publication of CN105991744B publication Critical patent/CN105991744B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The purpose of the application is to provide a method and equipment for synchronizing user application data; detecting whether a trigger condition for synchronizing user application data is met; when the triggering condition is met, acquiring first state information of the corresponding user application data in the corresponding user equipment; and executing synchronous relevant operation on the user application data according to the first state information and second state information of the user application data in the network equipment. Compared with the prior art, the method and the device start the synchronous operation of the data by setting the trigger condition at the network equipment end. Here, according to the determination of the trigger condition, on one hand, when the data at the network device side is changed, the corresponding data update at the user device side can be realized in time, and on the other hand, scenes which do not need data synchronization can be filtered through the trigger condition, so that the communication flow is reduced, unnecessary resource waste is avoided, and the efficiency of actual data synchronization is improved.

Description

Method and apparatus for synchronizing user application data
Technical Field
the present application relates to the field of computers, and more particularly, to techniques for synchronizing user application data.
Background
in the prior art, data synchronization usually includes sending a data synchronization request to a data update device, such as a server, by a device with synchronization requirements, such as a client, and performing data synchronization if a data version of the server is updated compared with a data version of the client, otherwise, not performing data synchronization. In this case, the data synchronization starts from the synchronization request of the client, the change of the data of the server cannot be updated to the client in time and seamlessly, and if the server does not have the updated data, the data synchronization request initiated by the client cannot be updated back, thereby wasting resources.
Disclosure of Invention
The application aims to provide a method and equipment for synchronizing user application data.
According to an aspect of the present application, a method for synchronizing user application data at a network device is provided, wherein the method includes:
Detecting whether a trigger condition for synchronizing user application data is met;
When the triggering condition is met, acquiring first state information of the corresponding user application data in the corresponding user equipment;
And executing synchronous relevant operation on the user application data according to the first state information and second state information of the user application data in the network equipment.
according to another aspect of the present application, there is also provided a method for synchronizing user application data at a user equipment, where the method includes:
receiving a state query request which is sent by corresponding network equipment and is about to acquire user application data;
Acquiring first state information of the user application data in the user equipment;
sending the first state information to the network equipment;
And performing a synchronization-related operation on the user application data, wherein the synchronization-related operation is adapted to the first state information and second state information of the user application data in the network device.
According to still another aspect of the present application, there is also provided a network device for synchronizing user application data, wherein the network device includes:
First means for detecting whether a trigger condition for synchronizing user application data is satisfied;
the second device is used for acquiring first state information of the corresponding user application data in the corresponding user equipment when the triggering condition is met;
And a third device, configured to perform synchronization-related operation on the user application data according to the first state information and second state information of the user application data in the network device.
According to yet another aspect of the present application, there is also provided a user equipment for synchronizing user application data, wherein the user equipment comprises:
An eighth means for receiving a status query request for acquiring user application data sent by a corresponding network device;
Ninth means for acquiring first status information of the user application data in the user equipment;
Tenth means for sending the first status information to the network device;
Eleventh means for performing a synchronization-related operation on the user application data, wherein the synchronization-related operation is adapted to the first status information and second status information of the user application data in the network device.
According to yet another aspect of the present application, there is also provided a system for synchronizing user application data, wherein the system comprises:
according to an aspect of the present application, a network device for synchronizing user application data and a user device for synchronizing user application data are provided.
Compared with the prior art, the method and the device have the advantages that the synchronous triggering condition of the user application data is set at the network device end, when the synchronous triggering condition is met, the user device receives the state query request which is sent by the corresponding network device and is about to acquire the user application data, sends the first state information in the user device to the network device, and executes synchronous related operation on the user application data based on the first state information and the second state information of the user application data in the network device. Here, according to the determination of the trigger condition, on one hand, when the data at the network device side is changed, the corresponding data update at the user device side can be realized in time, and on the other hand, scenes which do not need data synchronization can be filtered through the trigger condition, so that the communication flow is reduced, unnecessary resource waste is avoided, and the efficiency of actual data synchronization is improved. Furthermore, the method and the device for updating the user application data are used for combining the version information of the user application data and the content identification information as a judgment standard of data synchronization updating, compared with the single version information using the user application data, the method and the device can judge the state information of the user application data of the user equipment end more accurately, further distinguish different conditions, and flexibly adopt various data synchronization modes such as no updating, full updating, incremental updating or only updating the version information of the user application data of the user equipment end and the like for the user application data of the user equipment end.
Drawings
other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 illustrates an apparatus diagram of a network device for synchronizing user application data in accordance with an aspect of the subject application;
FIG. 2 illustrates a system diagram of a network device and a user device for synchronizing user application data in accordance with a preferred embodiment of the present application;
FIG. 3 illustrates a flow diagram of a method for synchronizing user application data at a network device in accordance with another aspect of the subject application;
fig. 4 shows a flowchart of a method for synchronizing user application data at a network device side and a user device side according to a preferred embodiment of the present application.
the same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present application is described in further detail below with reference to the attached figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
FIG. 1 illustrates an apparatus diagram of a network device for synchronizing user application data in accordance with an aspect of the subject application. Wherein the network device 1 comprises a first means 11, a second means 12 and a third means 13.
Wherein, the first device 11 detects whether a trigger condition for synchronizing the user application data is satisfied; when the triggering condition is met, the second device 12 acquires first state information of the corresponding user application data in the corresponding user equipment; the third means 13 performs synchronization related operations on the user application data according to the first status information and the second status information of the user application data in the network device.
in particular, the first means 11 of the network device 1 detect whether a trigger condition for synchronizing user application data is fulfilled. The synchronization of the user application data comprises a data update mode for pushing up-to-date user application data from one device to another. Here, the synchronized user data may preferably include API (application programming interface) data, and, preferably, the synchronization includes data push of both downlink and uplink performed by the network device 1 and the user device 2 (shown in fig. 2) based on a long connection, where the network device 1 includes but is not limited to a server and the user device 2 includes but is not limited to a client. The present application sets a trigger condition in advance for the synchronization operation of the user application data, and detects whether the user application data to be synchronized satisfies the trigger condition through the first device of the network device 1. If the trigger condition is met, it may be preliminarily determined that there is a need to synchronize user application data between the network device 1 and the user device 2, and further promote data synchronization operations, for example, request the user device 2 to upload current state information of corresponding user application data; if the trigger condition is not satisfied, it may be directly determined that the data synchronization operation between the network device 1 and the user device 2 is not required for the user application data. Here, the detection of the trigger condition may be initiated based on a synchronization period preset in the network device 1, for example, a time point or period value of synchronization is set in a corresponding synchronization configuration, such as once a day, once an hour, and the like, and the trigger condition detection is performed on the synchronized user application data each time a time point requiring synchronization is entered. The trigger condition may also be initiated based on an update of incremental data corresponding to the network device 1, for example, if the network device 1 obtains the incremental data of some corresponding user application data, and if the incremental data is obtained from another application server, the detection of the trigger condition for synchronizing the user application data is initiated at this time. The detection of the trigger condition may also be additionally started in combination with a user request corresponding to the certain ue 2, for example, when a user sends a request for reading corresponding data through the ue 2, and when the network device 1 receives the data request, the detection operation of the trigger condition for synchronizing the user application data is simultaneously started.
it should be understood by those skilled in the art that the above-mentioned manner of detecting whether the trigger condition for synchronizing the user application data is satisfied is merely an example, and other manners of detecting the trigger condition, which may occur now or later, are also applicable to the present invention and are included in the scope of the present invention, and are hereby incorporated by reference.
it will be understood by those skilled in the art that the foregoing descriptions of the user application data are merely exemplary, and that other forms of data information, now or hereafter, that may be present, such as may be suitable for use with the present invention, are also included within the scope of the present invention and are hereby incorporated by reference.
then, when the trigger condition is satisfied, the second device 12 of the network device 1 acquires the first state information of the corresponding user application data in the corresponding user device. When it is detected by the first means 11 that the synchronized user application data meets the trigger condition corresponding to the synchronization operation, further, the second means 12 of the network device 1 may start a synchronization related operation between the network device 1 and the user device 2 based on the detection result, and in particular, the network device 1 obtains the first state information of the user application data in the user device 2. In this case, the information state of the user application data at the user device 2 is resolved by the first state information. The first state information includes, but is not limited to, several kinds of information, such as user information, device information, version information of user application data, content identification information, and the like, corresponding to the user application data at the user equipment side. Taking the preferred API data of the user application data as an example, when the target API data meets the corresponding trigger condition through the detection, the first state information that the second device 12 needs to obtain from the user equipment may include version information of the API data; or content identification information of the API data, such as a hash value of the API data; meanwhile, the first state information may further include user information of a corresponding requesting user, such as account information of a target user corresponding to the user equipment; the first state information may also include device information corresponding to the user device, such as a PC terminal, a mobile phone, a tablet computer, or other devices that can be connected to a network and perform data interaction, where the same user information may correspond to different device information when logging in different devices; the first state information may further include API key information, and preferably, the API key information may include an API name, an API version, and an API query condition, and an API may be uniquely identified by the API key information.
Then, the third means 13 of the network device 1 performs a synchronization related operation on the user application data according to the first state information and the second state information of the user application data in the network device. Here, the first state information is the current information state of the user application data in the user equipment 2, and the second state information of the user application data in the network equipment is the latest state information of the user application data recorded and stored in the network equipment 1. Here, the second status information may be acquired at a certain historical time, for example, the network device 1 acquires the latest status information of the target user application data from a certain application server at time T1, enters the time period or time node requiring synchronization based on a preset synchronization period at time T2, detects that the trigger condition is satisfied, and when comparing the user application data in the third device 13 of the network device 1, one of the second status information is the first status information corresponding to the user device 2 pushed by the user device 2 at that time, and the other is the second status information of the user application data recorded in the network device 1, that is, the network device 1 acquires the latest status information of the target user application data from a certain application server at time T1. Here, the second status information may also be the latest status information of the user application data recorded in the network device 1 acquired in real time, for example, at some time T3, the network device 1 obtains the latest status information of the target user application data from the other application server, and at this time, based on the operation of the network device 1 obtaining incremental data initiating the detection of a trigger condition and obtaining that the user application data meets the trigger condition, then further, when the third means 13 of the network device 1 compares the user application data, one is the first status information corresponding to the user device 2 pushed by the user device 2 at that time, the other is the second status information of the user application data recorded in the network device 1, that is, at the time T3, the network device 1 obtains the latest status information of the target user application data from a certain application server.
Here, the second state information includes, but is not limited to, several kinds of information, such as user information, device information, version information of user application data, and content identification information, corresponding to the user application data at the user equipment side. And, the specific content of the second state information corresponds to the first state information. At this time, the execution of the synchronization-related operation of the user application data needs to be performed based on the result of the comparison between the first state information and the second state information corresponding to the user application data. Taking the preferred API data of the user application data as an example, presetting a first state information and a second state information corresponding to the API data, wherein the first state information and the second state information respectively comprise version information of the API data, API data content identification information, user information, equipment information and API key information. Here, the API key information, the user information, and the device information that may uniquely identify one API may match the corresponding first state information and the second state information, that is, at this time, it is preferable that the user information, the device information, and the API key information in the first state information and the second state information are respectively in one-to-one correspondence, and further, the version information of the API data in the first state information and the second state information, or the API data content identification information, or the version information of the API data and the API data content identification information are respectively and correspondingly compared, and a synchronization related operation is performed on the user application data based on a result of the comparison. Here, the user application data corresponding synchronization related operation includes, but is not limited to, taking one of a plurality of data synchronization manners such as no update, full update, incremental update, or only update of version information of the user application data of the user equipment 2 for the user application data of the user equipment 2. For example, when it is determined that the full-volume update or the incremental update is performed, the network device 1 issues the incremental data or the full-volume data of the corresponding user application data to the corresponding user device 2, so as to synchronously update the user application data corresponding to the user device 2.
in addition, preferably, for the obtained user application data, the network device 1 may further perform a system screening on the second state information and the target user application data corresponding to the second state information in advance based on configuration information of the user application data corresponding to the second state information. Taking the user application data, preferably API data, as an example, the network device 1 corresponds to a configuration center, the configuration center comprises a middleware device, the configuration center records information of all corresponding APIs in the network equipment 1, when the network device 1 obtains the incremental data of a certain API data, it will first judge based on the information of all APIs recorded in the configuration center, whether the API corresponding to the incremental data is one of the APIs included in the network device 1, if yes, then, the subsequent operations are continued, such as updating the incremental data of the API data as the latest status information to the second status information, and performing subsequent synchronization-related operations, if not, it means that the application of the API does not exist in the system formed by the network device 1 and the corresponding user device 2, and an error result is returned at this time.
Here, in the present application, a synchronization trigger condition of user application data is set at a network device 1, when the trigger condition is met, the network device 1 automatically obtains, from the user device 2, first state information corresponding to the current user application data in the user device 2, further compares the first state information with second state information currently recorded in the network device 1, and performs a synchronization related operation of the corresponding user application data based on a result of the comparison. Compared with the prior art, the process that the server can only initiate data synchronization based on the data synchronization request of the client is compared, the method and the system have the advantages that the triggering condition detection is preset in the network equipment 1, on one hand, when the network equipment 1 obtains the latest incremental data, the corresponding data synchronization of the user equipment 2 can be timely realized, on the other hand, the scenes which do not need the data synchronization actually can be filtered through the triggering condition, the communication flow is reduced, the unnecessary resource waste is avoided, and the efficiency of the actual data synchronization is improved.
preferably, in the network device 1, the first state information or the second state information includes version information and content identification information of the user application data.
specifically, the first state information or the second state information of the user application data may include version information and content identification information of the user application data at the same time. The version information of the user application data is used to identify whether the version of the data changes during the data synchronization process, for example, the version information of the API data corresponding to an API is set to Vn at Tn, and if the version information of the API data corresponding to the API is Vm at Tm and Vm is different from Vn, it is described that the version information of the API data corresponding to the API changes. The content identification information of the user application data may include a hash value or a digest value corresponding to the content of the user application data, and the hash value or the digest value serves to uniquely mark content information of a piece of data, and may identify whether the data is changed or not in the data synchronization process. In this application, preferably, the judgment and selection of the user application data synchronization mode are completed by combining the version information and the content identification information of the user application data. Compared with the single version information using the user application data, the method and the device for determining the state information of the user application data of the user equipment side can more accurately determine the state information of the user application data of the user equipment side, for example, for the condition that the version information of the API data is the same, the data synchronization requirement can still be determined based on the difference of the content identification information of the API data. Furthermore, the method and the device can distinguish different situations, and adopt various data synchronization modes such as no update, full update, incremental update or only update of version information of the user application data of the user equipment end and the like for the user application data of the user equipment end.
More preferably, the third device 13 of the network device 1 is configured to synchronize incremental update information corresponding to the trigger condition in the user application data to the user device when version information and content identification information in the first state information are different from version information and content identification information in the second state information.
Specifically, according to first state information of the user application data in the user equipment 2 and second state information of the user application data in the network equipment 1, preferably, the two state information are compared in the network equipment 1, at this time, the user information, the equipment information or the API key information in the first state information and the second state information are in one-to-one correspondence, when version information and content identification information in the first state information are respectively different from version information and content identification information in the second state information, it is described that the user application data in the user equipment 2 corresponding to the first state information is asynchronous with the user application data in the network equipment 1 corresponding to the second state information, at this time, the user application data corresponding to the second state information in the network equipment 1 is used as the latest data information, only the part of the incremental update information that changes may be sent from the network device 1 to the user device 2. Furthermore, the updating of the corresponding user application data is completed at the user equipment 2.
More preferably, the third means 13 of the network device 1 is further configured to, when the version information in the first state information is the same as the version information in the second state information but the content identification information in the first state information is different from the content identification information in the second state information, fully synchronize the user application data to the user device and update the version information in the first state information.
specifically, according to first state information of the user application data in the user equipment 2 and second state information of the user application data in the network equipment 1, preferably, the first state information and the second state information are compared in the network equipment 1, at this time, the user information, the equipment information, or the API key information in the first state information and the second state information are in one-to-one correspondence, when the version information in the first state information is the same as the version information in the second state information, it cannot be immediately determined that the user application data in the user equipment 2 corresponding to the first state information is the same as the user application data in the network equipment 1 corresponding to the second state information, if the content identification information in the first state information is different from the content identification information in the second state information, it indicates that the actual content of the user application data is different, and at this time, it indicates that the version information of the user application data corresponding to the user equipment 2 is in disorder, and at this time, it is necessary to fully push the user application data corresponding to the second state information in the network equipment 1 to the user equipment 2 as the latest data information, and update the version information of the user application data recorded by the user equipment 2.
In addition, according to the first status information of the user application data in the user equipment 2 and the second status information of the user application data in the network equipment 1, other possible specific situations of data synchronization may also be corresponded. For example, if the version information and the content identification information in the first state information are respectively corresponding to the version information and the content identification information in the second state information, it may be determined that the current user application data corresponding to the user equipment 2 is the latest corresponding user application data recorded in the network equipment 1. For another example, if the content identifier information in the first state information is the same as the content identifier information in the second state information, but the version information in the first state information is different from the version information in the second state information, it indicates that the user application data of the user equipment 2 is actually the same as the latest application data recorded in the network equipment 1, and only the corresponding version information recorded on the user equipment 2 is wrong, and at this time, it is only necessary to update the version information on the user equipment 2 to be the same as the corresponding version information in the network equipment 1. In addition, if the user equipment 2 does not have the version information and the content identification information corresponding to the user application data, which indicates that the data synchronization operation is the first time, the entire amount of the corresponding user application data in the network equipment 1 needs to be pushed to the user equipment 2.
Here, the version information and the content identification information of the user application data are combined for use, so that the synchronization mode of the user application data is divided more accurately, wrong judgment possibly caused by single use of the version information of the user application data is avoided, further, when data updating is specifically needed, full updating and incremental updating are distinguished, and compared with monotonous full updating, the method is more flexible, communication flow can be reduced, and cost consumption is reduced.
fig. 2 shows a system diagram of a network device and a user device for synchronizing user application data according to a preferred embodiment of the present application. Wherein the system comprises the network device 1 and the user equipment 2, the network device 1 comprises a first apparatus 21, a second apparatus 22 and a third apparatus 23, wherein the second apparatus 22 comprises a first unit 221 and a second unit 222; the user equipment 2 comprises eighth means 24, ninth means 25, tenth means 26 and eleventh means 27.
wherein the first device 21 detects whether a trigger condition for synchronizing user application data is satisfied; in the second apparatus 22, when the trigger condition is satisfied, the first unit 221 sends a status query request for acquiring corresponding user application data to a corresponding user device, and the second unit 222 receives first status information of the user application data in the user device, which is returned by the user device based on the status query request; the third device 23 performs synchronization related operations on the user application data according to the first state information and the second state information of the user application data in the network device; the eighth means 24 receives a status query request for acquiring user application data sent by a corresponding network device; the ninth means 25 obtains first status information of the user application data in the user equipment; the tenth means 26 sends the first status information to the network device; the eleventh means 27 performs a synchronization related operation on the user application data, wherein the synchronization related operation is adapted to the first status information and the second status information of the user application data in the network device. Here, the contents of the first device 21 and the third device 23 of the network device 1 are the same as or substantially the same as those of the first device 11 and the third device 13 of the network device 1 in fig. 1, and therefore, the description thereof is omitted here and included herein by way of application.
Specifically, in the second device 22 of the network apparatus 1, when the trigger condition is satisfied, the first unit 221 sends a status query request for acquiring application data of the corresponding user to the corresponding user equipment. Taking the preferred API data of the user application data as an example, the status query request of the API data includes the user information, the device information, the API key information, etc. corresponding to the API data to be queried, and the object matching the status query request in the user device 2 is accurately located by using such information. Correspondingly, the eighth means 24 of the user equipment 2 receives the status query request for acquiring user application data sent by the corresponding network device 1. Then, the ninth means 25 of the user equipment 2 obtains the first status information of the user application data in the user equipment. The storage device corresponding to the user equipment 2 stores first state information of user application data corresponding to the state query request. After the user equipment 2 receives a status query request of the user application data sent by the network equipment 1 to the user equipment 2, first status information of the current user application data in the user equipment 2 is read from a storage device corresponding to the user equipment 2 based on information such as the user information, the equipment information, and the API key information corresponding to the status query request. Then, the tenth means 26 of the user equipment 2 sends the obtained first status information to the network device 1. Here, taking the preferred API data as the user application data, based on the first state information, the user device 2 uploads the version information of the API data and the API data content identification information corresponding to the API data to the network device 1, and the synchronization push further includes identification information such as user information, device information, and API key information. At this time, correspondingly, the second unit 222 of the network device 1 receives the first status information pushed by the user equipment 2. Further, in the network device 1, in combination with the obtained first status information and the second status information of the user application data in the network device, a synchronization-related operation is performed on the user application data between the network device 1 and the user device 2, preferably between the third device 23 of the network device 1 and the eleventh device 27 corresponding to the user device 2.
Here, in the present application, the network device 1 and the user device 2 cooperate with each other, for example, a status query request based on the user application data sent by the network device 1 returns to the first status information in the user device 2, and for example, receives the synchronous user application data sent by the user device 2, so that the automatic synchronization operation of the user application data in the system is smoothly completed, the requirement of timely data synchronization is met, the communication traffic in the actual data synchronization is reduced, unnecessary resource waste is avoided, and the efficiency of the actual data synchronization is improved.
Preferably, the user equipment 2 further comprises a twelfth means (not shown), a thirteenth means (not shown) and a fourteenth means (not shown). Wherein the twelfth means sends a data acquisition request for other application data of the user related to the user application data to the network device 1; the thirteenth device receives the other application data of the user returned by the network device 1 based on the data acquisition request; the fourteenth means stores the user other application data for the user to access the corresponding other application offline.
specifically, the user equipment 2 may further send another data request to the corresponding network equipment 1 or any other network equipment terminal including the corresponding target application based on the user application data obtained by the user equipment 2 and stored in the storage device corresponding to the user equipment 2, so as to complete another application operation. Taking the preferred API data of the user application data as an example, after the user equipment 2 updates the API data in the user equipment 2 based on the received synchronization data sent from the network equipment 1, according to actual needs, the twelfth means may send a data request corresponding to other application data of the user related to the API data to the device where the application is located, for example, to the network equipment 1 or any device where other target applications are located, and perform corresponding processing on the API data based on an API data processor provided by the application device.
Further, the thirteenth means receives the processed other application data of the user, for example, based on a request of the user corresponding to the user equipment 2 to access data, such as browsing a certain webpage information, and finally, the obtained webpage information is returned and received by the thirteenth means of the user equipment 2.
Still further, the fourteenth means may preferably store the processed other application data of the user, for example, result data information obtained by accessing relevant applications through the API data, such as the obtained web page information, for example, in a storage device corresponding to the user equipment 2. At this time, even in a no-network or weak-network state, the other application data of the user, which is already stored in the user equipment 2, may be directly accessed and called offline based on the request of the user, so as to smoothly complete the data acquisition request. In the present application, the user may access other corresponding applications offline through the other application data of the user stored in the user equipment 2, which is not limited to the state of no network or weak network, so as to optimize the user experience. More preferably, part of the user application data with high access frequency may also be cached in the user equipment 2, for example, in a storage device corresponding to the user equipment 2, so as to accelerate the data reading speed and further optimize the user experience.
Preferably, the network device 1 further includes a fourth device (not shown) and a fifth device (not shown), wherein the fourth device receives a data acquisition request sent by the user equipment 2 about other application data of the user related to the user application data; the fifth device obtains the other application data of the user based on the data obtaining request, and returns the other application data of the user to the user equipment 2.
In particular, the fourth means and the fifth means cooperate with some means of the user equipment 2 to perform the operation. In the twelfth means of the user equipment 2, the user equipment 2 may further send an application request to other applications in the network device 1 based on the user application data obtained by the user equipment 2 and stored in the corresponding storage device of the user equipment 2, and the network device 1 receives such a data obtaining request of the user other application data related to the user application data through the fourth means. Taking the preferred API data of the user application data as an example, the user equipment 2 sends a request for calling the API interface to access some related data, for example, a request for browsing corresponding web page information, to the network equipment 1 based on the stored corresponding API data, the fourth means is configured to receive the obtained data obtaining request from the user equipment 2, further, by calling an API data processor in the network equipment 1 that is matched with the API data corresponding to the data obtaining request, process the data obtaining request, and obtain a processing result, for example, information of a browsing web page corresponding to the request, where the processing result is corresponding to the other application data of the user, and return the information to the user equipment 2 through the fifth means of the network equipment 1.
preferably, in the network device 1, the triggering condition includes that the mirror information of the first state information at the network device is different from the second state information; wherein the network device 1 further comprises a sixth means (not shown) and a seventh means (not shown); furthermore, the user equipment 2 further comprises a fifteenth means (not shown) and a sixteenth means (not shown). Wherein, the fifteenth device of the user equipment 2 updates the first state information after the synchronization related operation is completed; the sixteenth device of the user equipment 2 sends the updated first state information to the network equipment 1; correspondingly, the sixth device of the network device 1 receives the updated first state information sent by the user equipment; further, the seventh device updates the mirror image information according to the updated first state information.
Specifically, in the present application, if the user application data satisfies the trigger condition, it may be preliminarily determined that there is a need to synchronize the user application data between the network device 1 and the user device 2, and further promote data synchronization operation, and if the trigger condition is not satisfied, it may be directly determined that the data synchronization operation between the network device 1 and the user device 2 is not required for the user application data. Here, the trigger condition includes that the mirror information of the first state information at the network device 1 is different from the second state information. The mirror image information of the network device 1 corresponds to the historical first state information of the user device 2, and meanwhile, when the user device 2 uploads the updated first state information to the network device 1, the corresponding mirror image information in the network device is updated once based on the uploaded first state information. For example, a corresponding mirror information table may be established in the network device 1 to store corresponding mirror information. Taking the preferred API data as an example of the user application data, the mirror information of the network device 1 includes, but is not limited to, version information of the API data, API data content identification information, user information, device information, and API key information. In addition, the time at which each piece of mirror information is created and modified may be included. Preferably, each time the trigger condition is detected, the latest mirror image information of the network device 1 corresponding to the user application data is preferably compared with the second state information, where when the version information of the API data and the API data content identification information corresponding to the two are the same, it indicates that the historical first state information in the user device 2 corresponding to the mirror image information of the network device 1 is already consistent with the second state information of the current user application data of the network device 1, that is, it is inevitable that the current first state information in the user device 2 is consistent with the second state information of the current user application data of the network device 1, and the current first state information and the second state information of the current user application data of the network device 1 can be uniquely corresponding to the user application data based on the state information, so at this time, it can be inferred that the target user application data in the network device 1 and the user device 2 are already consistent, synchronization is not required; otherwise, when the version information or the API data content identification information of the API data corresponding to the two is different, it indicates that the historical first state information in the user equipment 2 corresponding to the mirror image information of the network device 1 is inconsistent with the second state information of the current user application data of the network device 1, and the trigger condition is determined to be satisfied, at this time, the current first state information of the user equipment 2 needs to be further obtained to complete the subsequent data synchronization related operation.
Here, the acquiring and updating of the mirrored data of the network device 1 includes being done based on the interworking between the network device 1 and the user device 2. Specifically, the network device 1 obtains an execution mode of the corresponding synchronization related operation based on a comparison result between the first state information and the second state information corresponding to the user application data. For example, when one of the situations that the user application data needs to be updated in full, incrementally or only the version information of the corresponding user application data in the user equipment 2 needs to be updated occurs, the fifth means of the user equipment 2 updates the first state information corresponding to the user application data after the user equipment 2 completes the corresponding synchronization related operation, for example, after the user application data of the full update and the incremental update is stored in the storage device corresponding to the user equipment 2, wherein the user information, the device information, the API key information and other information generally keep consistent with those before updating, and the version information or the API data content identification information of the API data may obviously change based on the change of the user application data. Further, a sixteenth means of the user equipment 2 pushes the updated first status information from the user equipment 2 to the network device 1. Correspondingly, in the network device 1, the sixth apparatus receives the updated first status information sent by the user equipment; further, the seventh device updates the mirror image information according to the updated first state information. When the trigger condition corresponding to the target user application data is detected at the next moment, the judgment can be performed based on the updated frontal mirror image information and the second state information corresponding to the next moment.
It should be understood by those skilled in the art that the aforementioned triggering conditions including the first state information being different from the second state information in the mirror image information of the network device are only examples, and other existing or future triggering conditions, such as may be applicable to the present invention, are also included in the scope of the present invention and are incorporated herein by reference.
FIG. 3 illustrates a flow diagram of a method for synchronizing user application data in accordance with another aspect of the subject application.
In step S31, detecting whether a trigger condition for synchronizing user application data is satisfied; in step S32, when the trigger condition is satisfied, acquiring first state information of the corresponding user application data in the corresponding user equipment; in step S33, a synchronization-related operation is performed on the user application data according to the first status information and the second status information of the user application data in the network device.
Specifically, in step S31, the network device 1 detects whether a trigger condition for synchronizing user application data is satisfied. The synchronization of the user application data comprises a data update mode for pushing up-to-date user application data from one device to another. Here, the synchronized user data may preferably include API (application programming interface) data, and, preferably, the synchronization includes data push of both downlink and uplink performed by the network device 1 and the user device 2 (shown in fig. 2) based on a long connection, where the network device 1 includes but is not limited to a server and the user device 2 includes but is not limited to a client. The method and the device have the advantages that the triggering condition is preset for the synchronous operation of the user application data, and whether the user application data to be synchronized meet the triggering condition is detected through the network equipment 1. If the trigger condition is met, it may be preliminarily determined that there is a need to synchronize user application data between the network device 1 and the user device 2, and further promote data synchronization operations, for example, request the user device 2 to upload current state information of corresponding user application data; if the trigger condition is not satisfied, it may be directly determined that the data synchronization operation between the network device 1 and the user device 2 is not required for the user application data. Here, the detection of the trigger condition may be initiated based on a synchronization period preset in the network device 1, for example, a time point or period value of synchronization is set in a corresponding synchronization configuration, such as once a day, once an hour, and the like, and the trigger condition detection is performed on the synchronized user application data each time a time point requiring synchronization is entered. The trigger condition may also be initiated based on an update of incremental data corresponding to the network device 1, for example, if the network device 1 obtains the incremental data of some corresponding user application data, and if the incremental data is obtained from another application server, the detection of the trigger condition for synchronizing the user application data is initiated at this time. The detection of the trigger condition may also be additionally started in combination with a user request corresponding to the certain ue 2, for example, when a user sends a request for reading corresponding data through the ue 2, and when the network device 1 receives the data request, the detection operation of the trigger condition for synchronizing the user application data is simultaneously started.
It should be understood by those skilled in the art that the above-mentioned manner of detecting whether the trigger condition for synchronizing the user application data is satisfied is merely an example, and other manners of detecting the trigger condition, which may occur now or later, are also applicable to the present invention and are included in the scope of the present invention, and are hereby incorporated by reference.
it will be understood by those skilled in the art that the foregoing descriptions of the user application data are merely exemplary, and that other forms of data information, now or hereafter, that may be present, such as may be suitable for use with the present invention, are also included within the scope of the present invention and are hereby incorporated by reference.
Next, in step S32, the network device 1 acquires the first status information of the corresponding user application data in the corresponding user device when the trigger condition is satisfied. When it is detected in step S31 that the synchronized user application data satisfies the trigger condition corresponding to the synchronization operation, further, in step S32, the network device 1 may initiate a synchronization-related operation between the network device 1 and the user device 2 based on the detection result, and in particular, the network device 1 obtains the first status information of the user application data in the user device 2. In this case, the information state of the user application data at the user device 2 is resolved by the first state information. The first state information includes, but is not limited to, several kinds of information, such as user information, device information, version information of user application data, content identification information, and the like, corresponding to the user application data at the user equipment side. Taking the preferred API data of the user application data as an example, when the target API data meets the corresponding trigger condition through the detection, in step S32, the first state information that needs to be acquired from the user equipment may include version information of the API data; or content identification information of the API data, such as a hash value of the API data; meanwhile, the first state information may further include user information of a corresponding requesting user, such as account information of a target user corresponding to the user equipment; the first state information may also include device information corresponding to the user device, such as a PC terminal, a mobile phone, a tablet computer, or other devices that can be connected to a network and perform data interaction, where the same user information may correspond to different device information when logging in different devices; the first state information may further include API key information, and preferably, the API key information may include an API name, an API version, and an API query condition, and an API may be uniquely identified by the API key information.
Next, in step S33, the network device 1 performs a synchronization-related operation on the user application data according to the first status information and the second status information of the user application data in the network device. Here, the first state information is the current information state of the user application data in the user equipment 2, and the second state information of the user application data in the network equipment is the latest state information of the user application data recorded and stored in the network equipment 1. Here, the second state information may be acquired at a certain historical time, for example, the network device 1 acquires the latest state information of the target user application data from a certain application server at time T1, enters the time period or time node requiring synchronization based on a preset synchronization period at time T2, detects that the trigger condition is satisfied, and when comparing the user application data in step S33, one of the second state information is the first state information corresponding to the user device 2 pushed by the user device 2 at that time, and the other is the second state information of the user application data recorded in the network device 1, that is, the latest state information of the target user application data acquired by the network device 1 from a certain application server at time T1. Here, the second status information may also be the latest status information of the user application data recorded in the network device 1 acquired in real time, for example, at some time T3, the network device 1 obtains the latest status information of the target user application data from the other application server, and at this time, based on the operation of the network device 1 obtaining incremental data initiating the detection of a trigger condition and obtaining that the user application data meets the trigger condition, then further, when the comparison of the user application data is performed in step S33, one is the first status information corresponding to the user device 2 pushed by the user device 2 at that time, the other is the second status information of the user application data recorded in the network device 1, that is, at the time T3, the network device 1 obtains the latest status information of the target user application data from a certain application server.
here, the second state information includes, but is not limited to, several kinds of information, such as user information, device information, version information of user application data, and content identification information, corresponding to the user application data at the user equipment side. And, the specific content of the second state information corresponds to the first state information. At this time, the execution of the synchronization-related operation of the user application data needs to be performed based on the result of the comparison between the first state information and the second state information corresponding to the user application data. Taking the preferred API data of the user application data as an example, presetting a first state information and a second state information corresponding to the API data, wherein the first state information and the second state information respectively comprise version information of the API data, API data content identification information, user information, equipment information and API key information. Here, the API key information, the user information, and the device information that may uniquely identify one API may match the corresponding first state information and the second state information, that is, at this time, it is preferable that the user information, the device information, and the API key information in the first state information and the second state information are respectively in one-to-one correspondence, and further, the version information of the API data in the first state information and the second state information, or the API data content identification information, or the version information of the API data and the API data content identification information are respectively and correspondingly compared, and a synchronization related operation is performed on the user application data based on a result of the comparison. Here, the user application data corresponding synchronization related operation includes, but is not limited to, taking one of a plurality of data synchronization manners such as no update, full update, incremental update, or only update of version information of the user application data of the user equipment 2 for the user application data of the user equipment 2. For example, when it is determined that the full-volume update or the incremental update is performed, the network device 1 issues the incremental data or the full-volume data of the corresponding user application data to the corresponding user device 2, so as to synchronously update the user application data corresponding to the user device 2.
in addition, preferably, for the obtained user application data, the network device 1 may further perform a system screening on the second state information and the target user application data corresponding to the second state information in advance based on configuration information of the user application data corresponding to the second state information. Taking the user application data, preferably API data, as an example, the network device 1 corresponds to a configuration center, the configuration center comprises a middleware device, the configuration center records information of all corresponding APIs in the network equipment 1, when the network device 1 obtains the incremental data of a certain API data, it will first judge based on the information of all APIs recorded in the configuration center, whether the API corresponding to the incremental data is one of the APIs included in the network device 1, if yes, then, the subsequent operations are continued, such as updating the incremental data of the API data as the latest status information to the second status information, and performing subsequent synchronization-related operations, if not, it means that the application of the API does not exist in the system formed by the network device 1 and the corresponding user device 2, and an error result is returned at this time.
Here, in the present application, a synchronization trigger condition of user application data is set at a network device 1, when the trigger condition is met, the network device 1 automatically obtains, from the user device 2, first state information corresponding to the current user application data in the user device 2, further compares the first state information with second state information currently recorded in the network device 1, and performs a synchronization related operation of the corresponding user application data based on a result of the comparison. Compared with the prior art, the process that the server can only initiate data synchronization based on the data synchronization request of the client is compared, the method and the system have the advantages that the triggering condition detection is preset in the network equipment 1, on one hand, when the network equipment 1 obtains the latest incremental data, the corresponding data synchronization of the user equipment 2 can be timely realized, on the other hand, the scenes which do not need the data synchronization actually can be filtered through the triggering condition, the communication flow is reduced, the unnecessary resource waste is avoided, and the efficiency of the actual data synchronization is improved.
Preferably, in the network device 1, the first state information or the second state information includes version information and content identification information of the user application data.
Specifically, the first state information or the second state information of the user application data may include version information and content identification information of the user application data at the same time. The version information of the user application data is used to identify whether the version of the data changes during the data synchronization process, for example, the version information of the API data corresponding to an API is set to Vn at Tn, and if the version information of the API data corresponding to the API is Vm at Tm and Vm is different from Vn, it is described that the version information of the API data corresponding to the API changes. The content identification information of the user application data may include a hash value or a digest value corresponding to the content of the user application data, and the hash value or the digest value serves to uniquely mark content information of a piece of data, and may identify whether the data is changed or not in the data synchronization process. In this application, preferably, the judgment and selection of the user application data synchronization mode are completed by combining the version information and the content identification information of the user application data. Compared with the single version information using the user application data, the method and the device for determining the state information of the user application data of the user equipment side can more accurately determine the state information of the user application data of the user equipment side, for example, for the condition that the version information of the API data is the same, the data synchronization requirement can still be determined based on the difference of the content identification information of the API data. Furthermore, the method and the device can distinguish different situations, and adopt various data synchronization modes such as no update, full update, incremental update or only update of version information of the user application data of the user equipment end and the like for the user application data of the user equipment end.
More preferably, in step S33, the network device 1 is configured to synchronize incremental update information corresponding to the trigger condition in the user application data to the user device when version information and content identification information in the first state information are not the same as version information and content identification information in the second state information.
specifically, according to first state information of the user application data in the user equipment 2 and second state information of the user application data in the network equipment 1, preferably, the two state information are compared in the network equipment 1, at this time, the user information, the equipment information or the API key information in the first state information and the second state information are in one-to-one correspondence, when version information and content identification information in the first state information are respectively different from version information and content identification information in the second state information, it is described that the user application data in the user equipment 2 corresponding to the first state information is asynchronous with the user application data in the network equipment 1 corresponding to the second state information, at this time, the user application data corresponding to the second state information in the network equipment 1 is used as the latest data information, only the part of the incremental update information that changes may be sent from the network device 1 to the user device 2. Furthermore, the updating of the corresponding user application data is completed at the user equipment 2.
More preferably, in step S33, the network device 1 is further configured to, when the version information in the first state information is the same as the version information in the second state information but the content identification information in the first state information is different from the content identification information in the second state information, fully synchronize the user application data to the user device and update the version information in the first state information.
Specifically, according to first state information of the user application data in the user equipment 2 and second state information of the user application data in the network equipment 1, preferably, the first state information and the second state information are compared in the network equipment 1, at this time, the user information, the equipment information, or the API key information in the first state information and the second state information are in one-to-one correspondence, when the version information in the first state information is the same as the version information in the second state information, it cannot be immediately determined that the user application data in the user equipment 2 corresponding to the first state information is the same as the user application data in the network equipment 1 corresponding to the second state information, if the content identification information in the first state information is different from the content identification information in the second state information, it indicates that the actual content of the user application data is different, and at this time, it indicates that the version information of the user application data corresponding to the user equipment 2 is in disorder, and at this time, it is necessary to fully push the user application data corresponding to the second state information in the network equipment 1 to the user equipment 2 as the latest data information, and update the version information of the user application data recorded by the user equipment 2.
in addition, according to the first status information of the user application data in the user equipment 2 and the second status information of the user application data in the network equipment 1, other possible specific situations of data synchronization may also be corresponded. For example, if the version information and the content identification information in the first state information are respectively corresponding to the version information and the content identification information in the second state information, it may be determined that the current user application data corresponding to the user equipment 2 is the latest corresponding user application data recorded in the network equipment 1. For another example, if the content identifier information in the first state information is the same as the content identifier information in the second state information, but the version information in the first state information is different from the version information in the second state information, it indicates that the user application data of the user equipment 2 is actually the same as the latest application data recorded in the network equipment 1, and only the corresponding version information recorded on the user equipment 2 is wrong, and at this time, it is only necessary to update the version information on the user equipment 2 to be the same as the corresponding version information in the network equipment 1. In addition, if the user equipment 2 does not have the version information and the content identification information corresponding to the user application data, which indicates that the data synchronization operation is the first time, the entire amount of the corresponding user application data in the network equipment 1 needs to be pushed to the user equipment 2.
Here, the version information and the content identification information of the user application data are combined for use, so that the synchronization mode of the user application data is divided more accurately, wrong judgment possibly caused by single use of the version information of the user application data is avoided, further, when data updating is specifically needed, full updating and incremental updating are distinguished, and compared with monotonous full updating, the method is more flexible, communication flow can be reduced, and cost consumption is reduced.
Fig. 4 shows a flowchart of a method for synchronizing user application data at a network device side and a user device side according to a preferred embodiment of the present application.
in step S401, the network device 1 detects whether a trigger condition for synchronizing user application data is satisfied; in step S402, when the trigger condition is satisfied, the network device 1 sends a status query request for acquiring application data of the corresponding user to the corresponding user device 2; in step S403, the user equipment 2 obtains first state information of the user application data in the user equipment 2; in step S404, the user equipment 2 sends the first status information to the network equipment 1; in step S405, a synchronization related operation is performed on the user application data according to the first state information and second state information of the user application data in the network device. Here, the content of the step S401 is the same as or substantially the same as that of the step S31 in fig. 3, and therefore, the description thereof is omitted here and included herein by way of application.
Specifically, in step S402, when the trigger condition is satisfied, the network device 1 sends a status query request for acquiring application data of the corresponding user to the corresponding user device 2. Taking the preferred API data of the user application data as an example, the status query request of the API data includes the user information, the device information, the API key information, etc. corresponding to the API data to be queried, and the object matching the status query request in the user device 2 is accurately located by using such information.
next, in step S403, the user equipment 2 acquires first state information of the user application data in the user equipment 2. The storage device corresponding to the user equipment 2 stores first state information of user application data corresponding to the state query request. After the user equipment 2 receives a status query request of the user application data sent by the network equipment 1 to the user equipment 2, first status information of the current user application data in the user equipment 2 is read from a storage device corresponding to the user equipment 2 based on information such as the user information, the equipment information, and the API key information corresponding to the status query request.
Next, in step S404, the user equipment 2 sends the first status information to the network equipment 1. Here, taking the preferred API data as the user application data, based on the first state information, the user device 2 uploads the version information of the API data and the API data content identification information corresponding to the API data to the network device 1, and the synchronization push further includes identification information such as user information, device information, and API key information.
Next, in step S405, a synchronization related operation is performed on the user application data according to the first state information and second state information of the user application data in the network device. And at the network device 1, simultaneously combining the obtained first state information and the second state information of the user application data in the network device, comparing, selecting a corresponding data synchronization mode based on a comparison result, and further executing synchronization related operation of the user application data in the network device 1 and the user device 2.
Here, in the present application, the network device 1 and the user device 2 cooperate with each other, for example, a status query request based on the user application data sent by the network device 1 returns to the first status information in the user device 2, and for example, receives the synchronous user application data sent by the user device 2, so that the automatic synchronization operation of the user application data in the system is smoothly completed, the requirement of timely data synchronization is met, the communication traffic in the actual data synchronization is reduced, unnecessary resource waste is avoided, and the efficiency of the actual data synchronization is improved.
preferably, the method for synchronizing user application data at the user equipment further includes step S406 (not shown), step S407 (not shown), and step S408 (not shown), where in step S406, the user equipment 2 sends a data acquisition request for other user application data related to the user application data to the network device 1; in step S407, the user equipment 2 receives the other application data of the user returned by the network equipment 1 based on the data obtaining request; in step S407, the user device 2 stores the other application data of the user for the user to access the corresponding other application offline.
Specifically, the user equipment 2 may further send another data request to the corresponding network equipment 1 or another network equipment terminal based on the user application data obtained by the user equipment 2 and stored in the storage device corresponding to the user equipment 2, so as to complete another application operation. Taking the preferred API data of the user application data as an example, after the user equipment 2 updates the API data in the user equipment 2 based on the received synchronization data sent from the network equipment 1, according to actual needs, in step S406, the user equipment 2 may send a data request corresponding to other application data of the user related to the API data to a device where the application is located, such as the network equipment 1 or any device where other target applications are located, and perform corresponding processing on the API data based on an API data processor provided by the application equipment. Further, in step S407, the user equipment 2 receives the processed other application data of the user, for example, based on a user request corresponding to the user equipment 2, a certain API interface is called to access some related data, such as browsing a certain webpage information, and finally obtained webpage information, that is, result data information obtained by accessing the related application through the API data. Still further, in step S408, the user equipment 2 may preferably store the processed other application data of the user, for example, result data information obtained by accessing the relevant application through the API data, in a storage device corresponding to the user equipment 2, for example, in this case, even in a state of no network or a weak network, the other application data of the user already stored in the user equipment 2 may be directly accessed and called offline based on the request of the user, so as to smoothly complete the data acquisition request. In the application, the user may access other corresponding applications offline through the other application data of the user stored in the user equipment 2, which is not limited to the application scenario without a network or with a weak network, so as to optimize user experience. More preferably, part of the user application data with high access frequency may also be cached in the user equipment 2, for example, in a storage device corresponding to the user equipment 2, so as to accelerate the data reading speed and further optimize the user experience.
preferably, the method for synchronizing user application data at the network device further includes step S409 (not shown) and step S410 (not shown), where in step S409, the network device 1 receives a data acquisition request sent by the user device 2 for other user application data related to the user application data; in step S410, the network device 1 obtains the other application data of the user based on the data obtaining request, and returns the other application data of the user to the user device 2.
specifically, in step S406, the user device 2 may further send an application request to another application in the network device 1 based on the user application data obtained by the user device 2 and stored in the storage device corresponding to the user device 2, and the network device 1 receives a data obtaining request of such user other application data related to the user application data. Taking the preferred API data of the user application data as an example, the user equipment 2 sends a request that the API interface needs to be called to access some related data, for example, a request that the corresponding web page information needs to be browsed, to the network equipment 1 based on the stored corresponding API data, in step S409, the network equipment 1 is configured to receive the obtained data obtaining request from the user equipment 2, further, by calling an API data processor in the network equipment 1 that is matched with the API data corresponding to the data obtaining request, process the data obtaining request, and obtain a processing result, for example, information of the browsing web page corresponding to the request, where the processing result corresponds to the other application data of the user, and in step S410, return the other application data of the user to the user equipment 2.
Preferably, based on the method for synchronizing user application data at the network device side, in the network device 1, the triggering condition includes that the mirroring information of the first state information at the network device is different from the second state information; the method for synchronizing user application data at the network device further includes step S411 (not shown) and step S412 (not shown), and further includes step S413 (not shown) and step S414 (not shown). In step S413, after the synchronization related operation is completed, the ue 2 updates the first state information; in step S414, the ue 2 sends the updated first status information to the network device 2; correspondingly, in step S411, the network device 1 receives the updated first status information sent by the ue; further, in step S412, the network device 1 updates the mirror information according to the updated first state information.
Specifically, in the present application, if the user application data satisfies the trigger condition, it may be preliminarily determined that there is a need to synchronize the user application data between the network device 1 and the user device 2, and further promote data synchronization operation, and if the trigger condition is not satisfied, it may be directly determined that the data synchronization operation between the network device 1 and the user device 2 is not required for the user application data. Here, the trigger condition includes that the mirror information of the first state information at the network device 1 is different from the second state information. The mirror image information of the network device 1 corresponds to the historical first state information of the user device 2, and meanwhile, when the user device 2 uploads the updated first state information to the network device 1, the corresponding mirror image information in the network device is updated once based on the uploaded first state information. For example, a corresponding mirror information table may be established in the network device 1 to store corresponding mirror information. Taking the preferred API data as an example of the user application data, the mirror information of the network device 1 includes, but is not limited to, version information of the API data, API data content identification information, user information, device information, and API key information. In addition, the time at which each piece of mirror information is created and modified may be included. Preferably, each time the trigger condition is detected, the latest mirror image information of the network device 1 corresponding to the user application data is preferably compared with the second state information, where when the version information of the API data and the API data content identification information corresponding to the two are the same, it indicates that the historical first state information in the user device 2 corresponding to the mirror image information of the network device 1 is already consistent with the second state information of the current user application data of the network device 1, that is, it is inevitable that the current first state information in the user device 2 is consistent with the second state information of the current user application data of the network device 1, and the current first state information and the second state information of the current user application data of the network device 1 can be uniquely corresponding to the user application data based on the state information, so at this time, it can be inferred that the target user application data in the network device 1 and the user device 2 are already consistent, synchronization is not required; otherwise, when the version information or the API data content identification information of the API data corresponding to the two is different, it indicates that the historical first state information in the user equipment 2 corresponding to the mirror image information of the network device 1 is inconsistent with the second state information of the current user application data of the network device 1, and the trigger condition is determined to be satisfied, at this time, the current first state information of the user equipment 2 needs to be further obtained to complete the subsequent data synchronization related operation.
Further, the acquiring and updating of the mirrored data of the network device 1 includes being done based on the interworking between the network device 1 and the user device 2. Specifically, the network device 1 obtains an execution mode of the corresponding synchronization related operation based on a comparison result between the first state information and the second state information corresponding to the user application data. For example, when one of the situations that the user application data needs to be updated in full, in incremental, or only the version information of the corresponding user application data in the user equipment 2 needs to be updated occurs, after the user equipment 2 completes the corresponding synchronization related operation, for example, after the user application data of the full update and the incremental update is stored in the storage device corresponding to the user equipment 2, the first state information corresponding to the user application data is updated, wherein one kind of information such as the user information, the device information, and the API key information is generally consistent with that before the update, and the version information of the API data or the API data content identification information may obviously change based on the change of the user application data. Further, in step S414, the user equipment 2 pushes the updated first state information from the user equipment 2 to the network equipment 1. Correspondingly, in step S411, the network device 1 receives the updated first status information sent by the ue; further, in step S412, the network device 1 updates the mirror information according to the updated first state information. When the trigger condition corresponding to the target user application data is detected at the next moment, the judgment can be performed based on the updated frontal mirror image information and the second state information corresponding to the next moment.
It should be understood by those skilled in the art that the aforementioned triggering conditions including the first state information being different from the second state information in the mirror image information of the network device are only examples, and other existing or future triggering conditions, such as may be applicable to the present invention, are also included in the scope of the present invention and are incorporated herein by reference.
it will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (16)

1. a method for synchronizing user application data at a network device, wherein the method comprises:
detecting whether a trigger condition for synchronizing user application data is met;
When the triggering condition is met, acquiring first state information of the corresponding user application data in the corresponding user equipment;
And when the version information and the content identification information in the first state information are different from the version information and the content identification information in the second state information of the user application data in the network equipment, synchronizing the incremental updating information corresponding to the triggering condition in the user application data to the user equipment.
2. the method of claim 1, wherein performing synchronization-related operations on the user application data based on the first state information and second state information of the user application data in a network device further comprises:
and when the version information in the first state information is the same as the version information in the second state information but the content identification information in the first state information is different from the content identification information in the second state information, synchronizing the full amount of the user application data to the user equipment and updating the version information in the first state information.
3. The method of claim 1, wherein the obtaining first state information of the corresponding user application data in the corresponding user equipment when the trigger condition is satisfied comprises:
When the trigger condition is met, sending a state query request for acquiring application data of the corresponding user to the corresponding user equipment;
and receiving first state information of the user application data in the user equipment, which is returned by the user equipment based on a state query request.
4. The method of claim 3, wherein the method further comprises:
receiving a data acquisition request which is sent by the user equipment and relates to other user application data related to the user application data;
And acquiring the other application data of the user based on the data acquisition request, and returning the other application data of the user to the user equipment.
5. the method of claim 3 or 4, wherein the trigger condition comprises that the first state information is different from the second state information at a mirrored information of the network device;
Wherein the method further comprises:
Receiving the updated first state information sent by the user equipment;
And updating the mirror image information according to the updated first state information.
6. A method for synchronizing user application data at a user equipment, wherein the method comprises:
receiving a state query request which is sent by corresponding network equipment and is about to acquire user application data;
acquiring first state information of the user application data in the user equipment;
sending the first state information to the network equipment;
and when the version information and the content identification information in the first state information are different from the version information and the content identification information in the second state information of the user application data in the network equipment, acquiring incremental updating information which is sent from the network equipment and corresponds to the triggering condition of the synchronous user application data in the user application data.
7. The method of claim 6, wherein the method further comprises:
Sending a data acquisition request about other application data of the user related to the user application data to the network equipment;
Receiving other application data of the user returned by the network equipment based on the data acquisition request;
and storing the other application data of the user for the user to access the corresponding other application offline.
8. The method of claim 6 or 7, wherein the method further comprises:
After the incremental updating information is obtained, updating the first state information;
and sending the updated first state information to the network equipment.
9. a network device for synchronizing user application data, wherein the network device comprises:
first means for detecting whether a trigger condition for synchronizing user application data is satisfied;
the second device is used for acquiring first state information of the corresponding user application data in the corresponding user equipment when the triggering condition is met;
And a third device, configured to synchronize, to the user equipment, incremental update information corresponding to the trigger condition in the user application data when version information and content identification information in the first state information are different from version information and content identification information in second state information of the user application data in the network equipment.
10. The network device of claim 9, wherein the third means is further for:
And when the version information in the first state information is the same as the version information in the second state information but the content identification information in the first state information is different from the content identification information in the second state information, synchronizing the full amount of the user application data to the user equipment and updating the version information in the first state information.
11. the network device of claim 9, wherein the second means comprises:
A first unit, configured to send a status query request for acquiring application data of a corresponding user to a corresponding user device when the trigger condition is satisfied;
A second unit, configured to receive first status information of the user application data in the user equipment, where the first status information is returned by the user equipment based on a status query request.
12. The network device of claim 11, wherein the network device further comprises:
A fourth device, configured to receive a data acquisition request sent by the user equipment for other user application data related to the user application data;
And a fifth device, configured to obtain the other application data of the user based on the data obtaining request, and return the other application data of the user to the user equipment.
13. the network device of claim 11 or 12, wherein the trigger condition comprises that the first state information is different from the second state information in mirrored information of the network device;
Wherein the network device further comprises:
A sixth device, configured to receive the updated first status information sent by the user equipment;
And a seventh device, configured to update the mirror image information according to the updated first state information.
14. A user equipment for synchronizing user application data, wherein the user equipment comprises:
An eighth means for receiving a status query request for acquiring user application data sent by a corresponding network device;
Ninth means for acquiring first status information of the user application data in the user equipment;
Tenth means for sending the first status information to the network device;
An eleventh means, configured to obtain, when version information and content identification information in the first state information are different from version information and content identification information in second state information of the user application data in a network device, incremental update information corresponding to a trigger condition for synchronizing the user application data in the user application data, where the incremental update information is sent from the network device.
15. the user equipment of claim 14, wherein the user equipment further comprises:
Twelfth means for sending a data acquisition request to the network device regarding user other application data related to the user application data;
thirteenth means for receiving the other application data of the user returned by the network device based on the data acquisition request;
a fourteenth means for storing the other application data of the user for the user to access the corresponding other application offline.
16. The user equipment of claim 14 or 15, wherein the user equipment further comprises:
fifteenth means for updating the first status information after acquiring the incremental update information;
A sixteenth device, configured to send the updated first status information to the network device.
CN201510095073.8A 2015-03-03 2015-03-03 Method and apparatus for synchronizing user application data Active CN105991744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510095073.8A CN105991744B (en) 2015-03-03 2015-03-03 Method and apparatus for synchronizing user application data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510095073.8A CN105991744B (en) 2015-03-03 2015-03-03 Method and apparatus for synchronizing user application data

Publications (2)

Publication Number Publication Date
CN105991744A CN105991744A (en) 2016-10-05
CN105991744B true CN105991744B (en) 2019-12-17

Family

ID=57039426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510095073.8A Active CN105991744B (en) 2015-03-03 2015-03-03 Method and apparatus for synchronizing user application data

Country Status (1)

Country Link
CN (1) CN105991744B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108093002B (en) * 2016-11-21 2020-09-25 腾讯科技(深圳)有限公司 Synchronization method and device of information to be synchronized based on data state determination
CN109408522A (en) * 2018-09-28 2019-03-01 阿里巴巴集团控股有限公司 A kind of update method and device of user characteristic data
CN112685501A (en) * 2020-12-30 2021-04-20 杭州雾联科技有限公司 Data synchronization method, device and system for center node and edge node
CN113783937A (en) * 2021-08-16 2021-12-10 珠海格力电器股份有限公司 Synchronization method and device of equipment state information and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546779A (en) * 2011-12-27 2012-07-04 Tcl集团股份有限公司 Synchronized method and device of application data across devices
CN103825918A (en) * 2012-11-16 2014-05-28 腾讯科技(深圳)有限公司 Data synchronization method, terminal equipment, server and data synchronization system
CN105592118A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method, system and server for synchronizing user application data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000322431A (en) * 1999-05-13 2000-11-24 Nippon Telegr & Teleph Corp <Ntt> Contents id impartation system
CN101572599B (en) * 2008-09-04 2011-12-21 华为技术有限公司 Method, device and system for timing execution of synchronization
US8015151B2 (en) * 2008-10-13 2011-09-06 Sap Ag Method and system for managing and modifying time dependent data structures
CN103581231B (en) * 2012-07-25 2019-03-12 腾讯科技(北京)有限公司 UGC master/slave data synchronous method and its system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546779A (en) * 2011-12-27 2012-07-04 Tcl集团股份有限公司 Synchronized method and device of application data across devices
CN103825918A (en) * 2012-11-16 2014-05-28 腾讯科技(深圳)有限公司 Data synchronization method, terminal equipment, server and data synchronization system
CN105592118A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method, system and server for synchronizing user application data

Also Published As

Publication number Publication date
CN105991744A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
WO2018219178A1 (en) Data synchronization method and apparatus, server, and storage medium
CN109739810B (en) File synchronization method, server, client and device with storage function
EP3012744B1 (en) Method and device for synchronizing application data
CN105991744B (en) Method and apparatus for synchronizing user application data
CN106503158B (en) Data synchronization method and device
WO2016173436A1 (en) Information presentation method and apparatus
CN109542529B (en) Function name-based point burying method and device, computer equipment and storage medium
WO2017117350A1 (en) Methods and apparatuses for accessing cloud storage service by using traditional file system interface
CN106933550B (en) Global information obtaining, processing and updating method, device and system
EP2429134A1 (en) Method and apparatus for checking and synchronizing data block in distributed file system
TWI535327B (en) Apparatus, server and method of data synchronization between clients of communication account
CN106933548B (en) Global information obtaining, processing and updating method, device and system
CN107181686B (en) Method, device and system for synchronizing routing table
CN107147748B (en) File uploading method and device
CN104503864A (en) Method and device for file backup based on local area network
CN105450682B (en) Method, device and system for synchronously storing data and synchronizing data to client
WO2019057193A1 (en) Data deletion method and distributed storage system
WO2014173122A1 (en) Data synchronization method, apparatus, and system
CN112783848B (en) Data synchronization method and device and electronic equipment
CN111327385A (en) Clock synchronization method, device and equipment of Internet of things equipment
CN113519148A (en) Data synchronization in P2P networks
CN110865985B (en) Data synchronization method, device, electronic equipment and storage medium
CN112181049B (en) Cluster time synchronization method, device, system, equipment and readable storage medium
CN108491457A (en) A kind of method and apparatus for synchronizing public cloud resource
CN111147226B (en) Data storage method, device and storage medium

Legal Events

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