CN106844689B - A kind of paged data synchronous method, apparatus and system - Google Patents
A kind of paged data synchronous method, apparatus and system Download PDFInfo
- Publication number
- CN106844689B CN106844689B CN201710058446.3A CN201710058446A CN106844689B CN 106844689 B CN106844689 B CN 106844689B CN 201710058446 A CN201710058446 A CN 201710058446A CN 106844689 B CN106844689 B CN 106844689B
- Authority
- CN
- China
- Prior art keywords
- data
- timestamp
- network server
- homepage
- time stamp
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of paged data synchronous method, apparatus and system, this method comprises: sending homepage data synchronization request to network server, homepage data synchronization request includes data renewal time stamp;The homepage data that network server returns are received, homepage data are stabbed from data storage device according to data renewal time by network server and obtained;The data synchronized timestamp of first data information in homepage data is assigned to Refresh Data timestamp, the data synchronized timestamp of the last item data information is assigned to data renewal time stamp;In response to the slide instruction of user, lower page of data synchronization request is sent to network server, lower page of data synchronization request includes data renewal time stamp;The lower page of data that network server returns is received, lower page of data is stabbed from data storage device according to data renewal time by network server and obtained;The data synchronized timestamp of the last item data information in lower page of data is assigned to data renewal time stamp.
Description
Technical field
The present invention relates to Internet technical field, in particular to a kind of paged data synchronous method, apparatus and system.
Background technique
With the continuous development of Internet technology and hardware technology, more and more people begin to use such as smart phone, put down
The mobile terminals such as plate computer.Data synchronize be mobile terminal common function, mobile terminal synchrodata from server, to protect
Hold the real-time and integrality of data.
The synchronous implementation method of data is broadly divided into two kinds, and one kind obtaining data based on full dose, and mobile terminal full dose obtains
Data in server, and the data before updating in mobile terminal are covered, strategy is simple, but for the applied field of big data quantity
Scape, when each synchrodata, ratio shared by changed data volume is smaller, and most of data are unchanged, cause to synchronize
Time it is very long, seriously consume the memory of mobile terminal, waste the flow of user.Another method of data synchronization is based on dividing
Page obtains data, by the way that the data volume of every page is arranged, when refreshing every time into the page or drop-down, obtains newest homepage number
According to, page of data bottom is slided, the upper sliding data for loading lower one page can satisfy the requirement that client checks data full dose, with
The method for obtaining data based on full dose is compared, and time when each synchrodata is reduced, and is saved flow, is suitably applied in big number
According to the scene of amount.
However, existing paging synchrodata method when obtaining data, easily occur data it is imperfect, lose or it is duplicate
Problem, it is difficult to guarantee the integrality and consistency of paging request data.Moreover, when producing new data in server, at this time
If issuing request of data to server, the data got are the former data of above-mentioned new data and part, are caused in mobile terminal
Existing data obtain again.Especially in the case where data variation frequency is high and structure is complicated, problem above is become apparent.
Therefore, it is necessary to a kind of new paging synchrodata methods to optimize above-mentioned synchronizing process.
Summary of the invention
For this purpose, the present invention provides a kind of paging synchrodata scheme, it is existing above to try hard to solve or at least alleviate
Problem.
According to an aspect of the present invention, a kind of paged data synchronous method is provided, suitable for executing in the terminal, is moved
Dynamic terminal and network server communicate to connect, and network server and database server communicate to connect, and database server includes
Data storage device, data storage device are stored with a plurality of data information, and every data information includes data synchronized timestamp, should
Method includes the following steps: firstly, sending homepage data synchronization request to network server to obtain homepage data, homepage data
Synchronization request includes data renewal time stamp;The homepage data that network server returns are received, homepage data are by network server
It is obtained according to data renewal time stamp from data storage device;By data synchronization time of the first data information in homepage data
Stamp is assigned to Refresh Data timestamp, and the data synchronized timestamp of the last item data information is assigned to data renewal time stamp;
In response to the slide instruction of user, to the lower page of data synchronization request of network server transmission to obtain lower page of data,
Lower page of data synchronization request includes data renewal time stamp;Receive the lower page of data that network server returns, next number of pages
It is obtained according to being stabbed according to data renewal time from data storage device by network server;By the last item data in lower page of data
The data synchronized timestamp of information is assigned to data renewal time stamp.
It optionally, further include difference initialization data refresh time in paged data synchronous method according to the present invention
Stamp and data renewal time stamp are 0.
It optionally, further include referring in response to the slide of user in paged data synchronous method according to the present invention
It enables, if current page has slid into page top and continued slide downward, synchronizes and ask to network server transmission homepage data
It asks to obtain homepage data, homepage data synchronization request includes data renewal time stamp, and data renewal time stamp is set as 0.
Optionally, in paged data synchronous method according to the present invention, further includes: receive the number that network server is sent
According to PUSH message;If Refresh Data timestamp is greater than 0, propelling data synchronization request is sent to obtain push to network server
Data, propelling data synchronization request include Refresh Data timestamp;Receive the propelling data that network server returns, propelling data
It is obtained from data storage device by network server according to Refresh Data timestamp;By the first data information in propelling data
Data synchronized timestamp be assigned to Refresh Data timestamp.
Optionally, in paged data synchronous method according to the present invention, further includes: if Refresh Data timestamp is not more than
0, then send homepage data synchronization request to network server to obtain homepage data, homepage data synchronization request include data more
New timestamp, data renewal time stamp are set as 0.
According to a further aspect of the invention, a kind of paged data synchronous method is provided, suitable for holding in network server
Row, network server are communicated to connect with multiple mobile terminals and database server respectively, and database server includes that data are deposited
Equipment is stored up, data storage device is stored with a plurality of data information, and every data information includes data synchronized timestamp, this method packet
It includes following steps: the homepage data synchronization request that mobile terminal is sent is received, when homepage data synchronization request includes that data update
Between stab;According to data renewal time stamp and reference data amount, obtained from data storage device it is corresponding with reference data amount, the
The data synchronized timestamp of one data information and the last item data information;Obtain data synchronization time in data storage device
Data synchronized timestamp of the stamp not less than the last item data information and data synchronization time no more than the first data information
The data information of stamp is sent to mobile terminal as homepage data, and by homepage data;It is sliding in response to user to receive mobile terminal
The lower page of data synchronization request moving operational order and sending, lower page of data synchronization request include data renewal time stamp;Root
According to data renewal time stamp and reference data amount, first number corresponding with reference data amount is obtained from data storage device
It is believed that the data synchronized timestamp of breath and the last item data information;It is not small to obtain data synchronized timestamp in data storage device
The number of data synchronized timestamp in the last item data information and the data synchronized timestamp no more than the first data information
It is believed that breath is used as lower page of data, and lower page of data is sent to mobile terminal.
Optionally, in paged data synchronous method according to the present invention, further includes: if having new data information memory extremely
Data storage device then sends data-pushing message to mobile terminal.
Optionally, in paged data synchronous method according to the present invention, further includes: receive the push that mobile terminal is sent
Data synchronization request, propelling data synchronization request include Refresh Data timestamp;According to Refresh Data timestamp, stored from data
The data information that data synchronized timestamp is greater than Refresh Data timestamp is obtained in equipment;It is sent out data information as propelling data
It send to mobile terminal.
According to a further aspect of the invention, a kind of paged data synchronizing device is provided, is suitable for being resident in the terminal,
The paged data synchronizing device includes the first sending module, the first receiving module, the first assignment module, the second sending module, the
Two receiving modules and the second assignment module.Wherein, the first sending module is suitable for sending homepage data to network server synchronizing and ask
It asks to obtain homepage data, homepage data synchronization request includes data renewal time stamp;First receiving module is suitable for receiving network
The homepage data that server returns, homepage data are stabbed from data storage device according to data renewal time by network server and are obtained
It takes;When first assignment module is suitable for the data synchronized timestamp of the first data information in homepage data being assigned to Refresh Data
Between stab, the data synchronized timestamp of the last item data information be assigned to data renewal time stamp;Second sending module is suitable for ringing
It should be instructed in the slide of user, to the lower page of data synchronization request of network server transmission to obtain lower page of data, under
Page of data synchronization request includes data renewal time stamp;Second receiving module is suitable for receiving lower one page that network server returns
Data, lower page of data are stabbed from data storage device according to data renewal time by network server and are obtained;Second assignment module
Suitable for the data synchronized timestamp of the last item data information in lower page of data is assigned to data renewal time stamp.
According to a further aspect of the invention, a kind of mobile terminal is provided, including paged data according to the present invention synchronizes
Device.
According to the another aspect of present aspect, a kind of network server, including the 4th receiving module, the first acquisition mould are provided
Block, the 4th sending module, the 5th receiving module, second obtain module and the 5th sending module.Wherein, the 4th receiving module is suitable for
The homepage data synchronization request that mobile terminal is sent is received, homepage data synchronization request includes data renewal time stamp;First obtains
Modulus block is suitable for being obtained from data storage device corresponding with reference data amount according to data renewal time stamp and reference data amount
, the data synchronized timestamp of the first data information and the last item data information, it is same to obtain data in data storage device
It is not less than the data synchronized timestamp of the last item data information and same no more than the data of the first data information to walk timestamp
The data information of timestamp is walked as homepage data;4th sending module is suitable for homepage data being sent to mobile terminal;5th
Receiving module is suitable for receiving the lower page of data synchronization request that mobile terminal is instructed in response to user's slide and sent, next
Page data synchronization request includes data renewal time stamp;Second, which obtains module, is suitable for according to data renewal time stamp and reference data
Amount obtains, first data information corresponding with reference data amount and the last item data information from data storage device
It is same not less than the data of the last item data information to obtain data synchronized timestamp in data storage device for data synchronized timestamp
Walk timestamp and no more than the data information of the data synchronized timestamp of the first data information as lower page of data;5th
Sending module is suitable for lower page of data being sent to mobile terminal.
According to a further aspect of the invention, a kind of paged data synchronization system is also provided, including it is multiple according to the present invention
Mobile terminal and the network according to the invention server and database server.
The synchronous technical solution of paged data according to the present invention, mobile terminal are same to network server transmission paged data
Step request, network server upon receiving the request, according in the request data renewal time stamp and reference data amount,
Corresponding data is obtained from the data storage device in database server and is sent to mobile terminal, and mobile terminal receives network
After the data that server returns, more new data renewal time is stabbed to send request again.In above-mentioned technical proposal, when network takes
When the request of business device response mobile terminal obtains paged data from data storage device, first according to data renewal time stamp and benchmark
Data volume obtains data synchronization time of, first data information corresponding with reference data amount and the last item data information
Stamp, then by data synchronized timestamp in data storage device not less than the last item data information data synchronized timestamp and
Data information no more than the data synchronized timestamp of the first data information is all obtained as the paged data, the i.e. paging
The item number of data information floats upwards using reference data amount as standard in data, it is ensured that data are not lost or repeat, and guarantee to divide
The integrality and consistency of page request data.Moreover, when there is new data information memory to data storage device, network service
Device can send data-pushing message to mobile terminal, and the mobile terminal data information new according to the message request, network takes at this time
Business device only obtains new data information from data storage device and returns to mobile terminal, without will be new according to reference data amount
Data information and part primary data information (pdi) be sent to mobile terminal, avoid repeat obtain already present data, further
The flow of user is saved, and big, data variation frequency and data structure complexity the application scenarios suitable for data volume.
Detailed description of the invention
To the accomplishment of the foregoing and related purposes, certain illustrative sides are described herein in conjunction with following description and drawings
Face, these aspects indicate the various modes that can practice principles disclosed herein, and all aspects and its equivalent aspect
It is intended to fall in the range of theme claimed.Read following detailed description in conjunction with the accompanying drawings, the disclosure it is above-mentioned
And other purposes, feature and advantage will be apparent.Throughout the disclosure, identical appended drawing reference generally refers to identical
Component or element.
Fig. 1 shows the schematic diagram of paged data synchronization system 100 according to an embodiment of the invention;
Fig. 2 shows the flow charts of paged data synchronous method 200 according to an embodiment of the invention;
Fig. 3 shows the flow chart of the step S220 according to an embodiment of the invention for obtaining homepage data;
Fig. 4 shows the flow chart of the step S260 of page of data under acquisition according to an embodiment of the invention;
Fig. 5 shows the structural block diagram of mobile terminal 300 according to an embodiment of the invention;
Fig. 6 shows the schematic diagram of paged data synchronizing device 600 according to an embodiment of the invention;
Fig. 7 shows the schematic diagram of the paged data synchronizing device 700 of another embodiment according to the present invention;
Fig. 8 shows the schematic diagram of network server 500 according to an embodiment of the invention;And
Fig. 9 shows the schematic diagram of the network server 800 of another embodiment according to the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
Fig. 1 shows the schematic diagram of paged data synchronization system 100 according to an embodiment of the invention.It should be pointed out that
Paged data synchronization system 100 in Fig. 1 is merely exemplary, in specific practice situation, paged data synchronization system 100
In can have the mobile terminal, network server and database server of different number, the present invention is synchronous to paged data to be
The quantity of mobile terminal, network server and database server included by system 100 is with no restrictions.As shown in Figure 1, point
It include 2 mobile terminals 300 and 400, network server 500 and database server 900 in page data synchronization system 100.Its
In, network server 500 is communicated to connect with mobile terminal 300 and 400, database server 900 respectively, 300 He of mobile terminal
400 can be smart phone, tablet computer etc., but not limited to this.Database server 900 includes data storage device (in figure
It is not shown), which is stored with a plurality of data information, and every data information includes data synchronized timestamp.Below
The explanation of the synchronous technical solution of paged data will be carried out by taking mobile terminal 300 as an example.Specifically, mobile terminal 300 is to net
Network server 500 sends homepage data synchronization request, and network server 500 is according to the request from database server 900
Homepage Data Concurrent is obtained in data storage device and gives mobile terminal 300, and mobile terminal 300 has got homepage number at this time
According to.If user carries out slide to current page, mobile terminal 300 responds slide instruction, to network server 500
Lower page of data synchronization request is sent, network server 500 is set according to the request from the data storage in database server 900
It for page of data under middle acquisition and sends to mobile terminal 300, mobile terminal 300 gets lower page of data.
Fig. 2 shows the flow charts of paged data synchronous method 200 according to an embodiment of the invention.As shown in Fig. 2,
In step S210, mobile terminal 300 sends homepage data synchronization request to network server 500 to obtain homepage data, first
Page data synchronization request includes data renewal time stamp.Certainly, homepage number is sent to network server 500 in mobile terminal 300
Before synchronization request, first initialization data refresh time stamp and data renewal time stamp are 0 respectively.
Then, S220 is entered step, network server 500 is synchronized in the homepage data for receiving the transmission of mobile terminal 300 and asked
After asking, homepage data are obtained from the data storage device of database server 900.Fig. 3 shows a reality according to the present invention
Apply the flow chart of the step S220 of the acquisition homepage data of example.As shown in figure 3, in step S221,500 basis of network server
Data renewal time stamp and reference data amount, obtain, first data corresponding with reference data amount from data storage device
The data synchronized timestamp of information and the last item data information.At this time data renewal time stamp be 0, network server 500
It is page data synchronization request headed by can determine whether current request according to data renewal time stamp, then made current time plus 5 minutes
It is stabbed for new data renewal time, to obtain the data of newest one page in data storage device as homepage data.It is updated
Data renewal time stamp is 1481432071005, and the purpose for adding 5 minutes is to solve network server 500 and database and take
Time difference problem between business device 900 avoids losing latest data, so that it is guaranteed that obtaining the integrality of data.Table 1 is shown
The storage example of data information in data storage device, specific as follows shown:
Table 1
As shown in table 1, every data information include Data Identification, data synchronized timestamp, lower single time, forwarding time and
Operating time, data synchronized timestamp are the maximum value in lower single time, forwarding time and action event.It should be noted that
It further include data content in data information, to be not shown in table 1 convenient for statement.As can be seen from Table 1, data information be by
It is sequentially stored according to the sequence of data synchronized timestamp from big to small, i.e., in front, old data arrangement exists new data arrangement
Below, and the data synchronized timestamp of newest data information is 1481432061220, is less than data renewal time stamp,
It ensure that include latest data information in the homepage data got, there is no lose or omit.In this embodiment, benchmark
Data volume is set as 3, and the data synchronized timestamp for obtaining the first data information corresponding with reference data amount is
1481432061220, corresponding data mark 1008, the data synchronized timestamp 1481432061008 of the last item data information,
Corresponding data mark 1006.
Next, entering step S222, obtains data synchronized timestamp in data storage device and be not less than the last item number
It is believed that the data information of the data synchronized timestamp ceased and the data synchronized timestamp for being not more than the first data information is as first
Page data.The last item data information and the data synchronized timestamp of the first data information are respectively 1481432061008 Hes
1481432061220, be not less than 1481432061008 and no more than 1481432061220 data synchronized timestamp
1481432061220,1481432061010 and 1481432061008, the corresponding number of data synchronized timestamp 1481432061220
According to mark 1008,1481432061010 corresponding data of data synchronized timestamp mark 1007, data synchronized timestamp
1481432061008 respectively correspond Data Identification 1006 and 1005, the final data information for obtaining Data Identification 1008~1005
As homepage data.
After network server 500 gets homepage data, start to execute step S230, homepage data are sent to mobile whole
End 300.And mobile terminal 300 receives the homepage data that network server 500 returns, and in step S240, by homepage data
In the data synchronized timestamp of the first data information be assigned to Refresh Data timestamp, the data of the last item data information are same
Step timestamp is assigned to data renewal time stamp.In this embodiment, the value of Refresh Data timestamp is updated to
1481432061220, the data renewal time value of stamp is updated to 1481432061008.It is obvious that mobile terminal 300 is obtaining
To after homepage data, it can be handled to show corresponding page in screen.Since the data generally got are Json
The data of format will carry out dissection process to the data first to judge whether the request returned is correct.Specifically, according to Json
Returncode field in the data of format is judged, if returncode is 0, illustrates that the data returned are correct,
The data in result field are parsed, if returncode is not 0, carry out corresponding mistake according to the value of returncode
Processing.Further, if returncode is -666, illustrate that user right sends variation, first obtain new user right
Then list judges whether also there is the permission for obtaining synchrodata, if there is then obtaining data again, if prompting without if
To user temporarily without the permission for synchronizing the data, while the local data deletion before in mobile terminal 300 no longer being shown.If
Returncode is -200, then illustrates user's different-place login, then jump back out to login interface.If returncode is -1, table
Bright this time request is there are mistake, and mobile terminal 300 is parsed without Json data, the close friend that straight-forward network server 500 returns
Error message is prompted to user.An example of homepage data is shown below, specific as follows:
{"returncode":0,
" message ": " success ",
"result":{"rowcount":0,"pagecount":0,"pageindex":0,"lastupdatetime":
0,
"list":[{"startdatetime":1481432061220,"lastupdatetime":481432061008,
"needbuild":3,"needdeal":12,"unread":0,"isshowcustomersource":1,
" customerlist ": [" cid ": 95607, " sex ": 0, " customername ": " easy vehicle client ",
" customernamealias ": " ", " phone ": " 15210372230 ", " location ": " Putian ",
" specname ": " Black King Kong ", " ordertype ": 0, " handletime ": 1481882802000,
"isforward":0,"isdid":0,"siteid":0,"ishandle":1,"isarchived":0,
" isunread ": 0, " c ustomersourceid ": 5, " customersourcename ": " Sohu " },
……
" cid ": 75901, " sex ": 0, " customername ": " Li Baijie ", " customernamealias ": " ",
" phone ": " 13831230713 ", " location ": " Baoding ", " specname ": " Pagerlo strength is smooth
2013 sections of 2.4L manual two drive comfortable ", " ordertype ": 1, " handletime ": 1481620680000,
"isforward":1,"isdid":0,"siteid":30,"ishandle":1,"isarchived":0,"
isunread":0,
" customersourceid ": 0, " customersourcename ": " family of automobile " }]]
}
As can be seen that the value of returncode is 0 from above-mentioned data, illustrate that the data returned are correct, and then parse
The data are localized processing, and are presented to the content in data using UI thread and work as by the data in result field
In the preceding page.Certainly, if homepage data synchronization request shows the temporary no data page without returned data.Executing localization
During processing, entity conversion first is carried out to the homepage data got, the list of entities data after conversion are stored to movement
In tables of data in the local SQLite database of terminal 300.It is worth noting that, needing when storage homepage data first by data
Table is emptied, then the homepage data that will acquire are placed wherein.
And in list field, there are startdatetime and lastupdatetime parameter, value is respectively
1481432061220 and 1481432061008, the two parameters respectively correspond in homepage data the first data information and last
The data synchronized timestamp of one data information, above-mentioned assignment updates step, actually by startdatetime
It is assigned to Refresh Data timestamp and data renewal time stamp respectively with the value of lastupdatetime.
In step s 250, it is instructed in response to the slide of user, mobile terminal 300 is sent to network server 500
For lower page of data synchronization request to obtain lower page of data, lower page of data synchronization request includes data renewal time stamp.At this point,
Current page has slid into Bottom of Page and has continued to slide up.According to one embodiment of present invention, mobile terminal 300 is being asked
Homepage data are just got before seeking lower page of data, assignment is updated to 1481432061008 to data renewal time stamp.It needs
Bright, the lower page of data synchronization request in the present invention includes that all paged datas in addition to homepage data synchronization request are same
Step request, statement of the lower one page only with respect to current page.
Network server 500 enters step after receiving the lower page of data synchronization request that mobile terminal 300 is sent
S260 obtains lower page of data from the data storage device of database server 900.Fig. 4 shows one according to the present invention
The flow chart of the step S260 of page of data under the acquisition of embodiment.As shown in figure 4, in step S261, network server 500
According to data renewal time stamp and reference data amount, from data storage device obtain it is corresponding with reference data amount, first
The data synchronized timestamp of data information and the last item data information.Data renewal time stamp is 1481432061008 at this time,
Reference data amount is 3, and the data synchronized timestamp for obtaining the first data information corresponding with reference data amount is
1481432061005, corresponding data mark 1004, the data synchronized timestamp 1481432061002 of the last item data information,
Corresponding data mark 1002.
Next, entering step S262, obtains data synchronized timestamp in data storage device and be not less than the last item number
It is believed that under the data information of the data synchronized timestamp ceased and the data synchronized timestamp for being not more than the first data information is used as
Page of data.The last item data information and the data synchronized timestamp of the first data information are respectively 1481432061002 Hes
1481432061005, be not less than 1481432061005 and no more than 1481432061002 data synchronized timestamp
1481432061005,1481432061003 and 1481432061002, the corresponding number of data synchronized timestamp 1481432061005
According to mark 1004,1481432061003 corresponding data of data synchronized timestamp mark 1003, data synchronized timestamp
1481432061002 corresponding datas mark 1002, the final data information for obtaining Data Identification 1004~1002 is as lower one page
Data.
After network server 500 gets lower page of data, starts to execute step S270, lower page of data is sent to shifting
Dynamic terminal 300.And mobile terminal 300 receives the lower page of data that network server 500 returns, and in step S280, will under
The data synchronized timestamp of the last item data information is assigned to data renewal time stamp in page of data.Preferably
In, the data renewal time value of stamp is updated to 1481432061002.Hereafter, mobile terminal 300 parses lower page of data
And localization process, to show corresponding page in screen, the parsing of this process and homepage data and localization process base
This is consistent,
It is not repeated, is only directly placed into tables of data when page of data under storage herein.It should
Illustrate, when page of data synchronization request is without returned data instantly, is displayed without more multidata prompt letter in current page
Breath, the data that can such as show when Bottom of Page continues to slide up load and prompt no more data on item.
According to still another embodiment of the invention, method 200 further includes following steps: being referred in response to the slide of user
It enables, if the current page in mobile terminal 300 has slid into page top and continued slide downward, to network server 500
Homepage data synchronization request is sent to obtain homepage data, homepage data synchronization request includes data renewal time stamp, and data are more
New time stamp setting is 0.And network server 500 is held after the homepage data synchronization request for receiving the transmission of mobile terminal 300
Row step S220 and 230 obtains homepage number according to data storage device of the data renewal time stamp from database server 900
According to, and homepage data are sent to mobile terminal 300, when mobile terminal 300 executes step S240 with assignment update Refresh Data
Between stab and data renewal time stamp.
According to another embodiment of present aspect, method 200 further includes, if there is new data information memory to data to store
Equipment, database server 900 can send the prompting message that a new data is stored in, then network service to network server 500
Device 500 sends data-pushing message to mobile terminal 300.Table 2 shows the data storage device after being stored in new data information
Shown in the storage example of middle data information is specific as follows:
Table 2
By table 2 it can be found that new data information is the corresponding data letter of Data Identification 1011 and 1009 compared with table 1
Breath, data synchronized timestamp is respectively 1481432061235 and 1481432061231.Know have newly when network server 500
Data information memory to data storage device after, call push interface to mobile terminal 300 send data-pushing message.It is mobile
Terminal 300 receives the data-pushing message that network server 500 is sent, and corresponding sending out notice, and root can be shown in screen
According to the value of Refresh Data timestamp, corresponding data synchronization request is sent to network server 500.If Refresh Data timestamp is big
In 0, then propelling data synchronization request is sent to obtain propelling data to network server 500, propelling data synchronization request includes
Refresh Data timestamp.After network server 500 receives the propelling data synchronization request that mobile terminal is sent, according to Refresh Data
Timestamp obtains the data information that data synchronized timestamp is greater than Refresh Data timestamp from data storage device, and will count
It is believed that breath is sent to mobile terminal 300 as propelling data.If Refresh Data timestamp is not more than 0, to network server 500
Homepage data synchronization request is sent to obtain homepage data, homepage data synchronization request includes data renewal time stamp, and data are more
New time stamp setting is 0.In this embodiment, Refresh Data timestamp is 1481432061220, meets the condition greater than 0,
And as can be known from Table 2, the data synchronized timestamp greater than 1481432061220 has 1481432061235 Hes
1481432061232, corresponding Data Identification is respectively 1010 and 1009, the final data for obtaining Data Identification 1010~1009
Information is as propelling data and is sent to mobile terminal 300.Mobile terminal 300 receives the push number that network server 500 returns
According to the data synchronized timestamp of the first data information in propelling data is assigned to Refresh Data timestamp.First data
Information is the data information that Data Identification is 1010, and data synchronized timestamp is 1481432061235, then the Refresh Data time
Stamp is updated to 1481432061235.Later, mobile terminal 300 carries out parsing and localization process to propelling data, to shield
Corresponding page is shown in curtain, parsing and localization process of this process with homepage data are almost the same, it is not repeated herein,
Only directly it is placed into tables of data when storing propelling data.At this point, due to meeting on the screen of mobile terminal 300
Sending out notice is shown to user, and user can jump to the corresponding page of propelling data by clicking the sending out notice.Certainly, such as
Fruit propelling data synchronization request does not execute any processing step without returned data, mobile terminal 300.
Fig. 5 shows the structural block diagram of mobile terminal 300 according to an embodiment of the invention.Mobile terminal 300 can be with
Including memory interface 302, one or more data processors, image processor and/or central processing unit 304, and outside
Enclose interface 306.
Memory interface 302, one or more processors 304 and/or peripheral interface 306 either discrete component,
It can integrate in one or more integrated circuits.In mobile terminal 300, various elements can pass through one or more communication
Bus or signal wire couple.Sensor, equipment and subsystem may be coupled to peripheral interface 306, a variety of to help to realize
Function.
For example, motion sensor 310, light sensor 312 and range sensor 314 may be coupled to peripheral interface 306,
To facilitate the functions such as orientation, illumination and ranging.Other sensors 316 can equally be connected with peripheral interface 306, such as positioning system
System (such as GPS receiver), temperature sensor, biometric sensor or other sensor devices, it is possible thereby to help to implement phase
The function of pass.
Camera sub-system 320 and optical sensor 322 can be used for the camera of convenient such as record photos and video clips
The realization of function, wherein the camera sub-system and optical sensor for example can be charge-coupled device (CCD) or complementary gold
Belong to oxide semiconductor (centimetre OS) optical sensor.Reality can be helped by one or more radio communication subsystems 324
Existing communication function, wherein radio communication subsystem may include that radio-frequency transmitter and transmitter and/or light (such as infrared) receive
Machine and transmitter.The particular design and embodiment of radio communication subsystem 324 can depend on what mobile terminal 300 was supported
One or more communication networks.For example, mobile terminal 300 may include being designed to support LTE, 3G, GSM network, GPRS net
Network, EDGE network, Wi-Fi or WiMax network and BlueboothTMThe communication subsystem 324 of network.
Audio subsystem 326 can be coupled with loudspeaker 328 and microphone 330, to help to implement to enable voice
Function, such as speech recognition, speech reproduction, digital record and telephony feature.I/O subsystem 340 may include touch screen control
Device 342 processed and/or other one or more input controllers 344.Touch screen controller 342 may be coupled to touch screen 346.It lifts
For example, any one of a variety of touch-sensing technologies are can be used to detect in the touch screen 346 and touch screen controller 342
The contact and movement or pause carried out therewith, wherein detection technology includes but is not limited to capacitive character, resistive, infrared and table
Face technology of acoustic wave.Other one or more input controllers 344 may be coupled to other input/control devicess 348, such as one
Or the pointer device of multiple buttons, rocker switch, thumb wheel, infrared port, USB port, and/or stylus etc.It is described
One or more button (not shown)s may include the up/down for controlling 330 volume of loudspeaker 328 and/or microphone
Button.
Memory interface 302 can be coupled with memory 350.The memory 350 may include that high random access is deposited
Reservoir and/or nonvolatile memory, such as one or more disk storage equipments, one or more optical storage apparatus, and/
Or flash memories (such as NAND, NOR).Memory 350 can store an operating system 372, for example, Android, iOS or
The operating system of Windows Phone etc.The operating system 372 may include for handling basic system services and execution
The instruction of task dependent on hardware.Memory 350 can also be stored using 374.It, can be from memory in mobile device operation
Load operating system 372 in 350, and executed by processor 304.At runtime using 374, can also add from memory 350
It carries, and is executed by processor 304.It operates on operating system using 374, is provided using operating system and bottom hardware
Interface realizes the various desired functions of user, such as instant messaging, web page browsing, pictures management.Using 374 can be independently of
What operating system provided, it is also possible to what operating system carried.In addition, when being mounted in mobile terminal 300 using 374,
Drive module can be added to operating system.In above-mentioned various applications 374, one such application is according to the present invention point
Page data synchronizing device 600.
Fig. 6 shows the schematic diagram of paged data synchronizing device 600 according to an embodiment of the invention.As shown in fig. 6,
Paged data synchronizing device 600 resides in mobile terminal 300, and mobile terminal 300 and network server 500 communicate to connect, point
Page data synchronizing device 600 includes the first sending module 610, the first receiving module 620, the transmission of the first assignment module 630, second
Module 640, the second receiving module 650 and the second assignment module 660.
First sending module 610 is suitable for sending homepage data synchronization request to network server 500 to obtain homepage data,
Homepage data synchronization request includes data renewal time stamp.First sending module 610 is further adapted for the slide in response to user
It is same to send homepage data to network server 500 when current page has slid into page top and continued slide downward for instruction
Step request is to obtain homepage data, and homepage data synchronization request includes data renewal time stamp, and data renewal time stamp is set as
0。
First receiving module 620 is suitable for receiving the homepage data that network server 500 returns, and homepage data are by network service
Device 500 is stabbed from data storage device according to data renewal time and is obtained.
First assignment module 630 is connected with the first receiving module 620, suitable for will get from the first receiving module 620
The data synchronized timestamp of the first data information is assigned to Refresh Data timestamp, the last item data information in homepage data
Data synchronized timestamp be assigned to data renewal time stamp.
Second sending module 640 is adapted for the slide instruction of user, sends lower one page to network server 500
For data synchronization request to obtain lower page of data, lower page of data synchronization request includes data renewal time stamp.
Second receiving module 650 is suitable for receiving the lower page of data that network server 500 returns, and lower page of data is by network
Server 500 is stabbed from data storage device according to data renewal time and is obtained.
Second assignment module 660 is connected with the second receiving module 650, suitable for will get from the second receiving module 650
The data synchronized timestamp of the last item data information is assigned to data renewal time stamp in lower page of data.
According to the embodiment, paged data synchronizing device 600 further includes initialization module (not shown), is suitable for dividing
Other initialization data refresh time stamp and data renewal time stamp are 0.
Fig. 7 shows the schematic diagram of the paged data synchronizing device 700 of another embodiment according to the present invention.Such as Fig. 7 institute
Show, paged data synchronizing device 700 resides in mobile terminal 300, and mobile terminal 300 and network server 500 communicate to connect.
First sending module 711 of paged data synchronizing device 700, the first receiving module 712, the first assignment module 713, second are sent
Module 721, the second receiving module 722 and the second assignment module 723, respectively with first of paged data synchronizing device 600 in Fig. 6
Sending module 610, the first receiving module 620, the first assignment module 630, the second sending module 640,650 and of the second receiving module
Second assignment module 660 corresponds, and is consistent, and increased message reception module 731, third sending module 732, third newly
Receiving module 733 and third assignment module 734.
Message reception module 731 is suitable for receiving the data-pushing message that network server 500 is sent.
Third sending module 732 is connected with message reception module 731, is suitable for when Refresh Data timestamp is greater than 0, to net
Network server 500 sends propelling data synchronization request to obtain propelling data, when propelling data synchronization request includes Refresh Data
Between stab.Third sending module 732 is further adapted for sending homepage number to network server 500 when Refresh Data timestamp is no more than 0
According to synchronization request to obtain homepage data, homepage data synchronization request includes data renewal time stamp, and data renewal time stamp is set
It is set to 0.
Third receiving module 733 is suitable for receiving the propelling data that network server 500 returns, and propelling data is by network service
Device 500 is obtained from data storage device according to Refresh Data timestamp.
Third assignment module 734 is suitable for the data synchronized timestamp of the first data information in propelling data being assigned to number
It is stabbed according to refresh time.
Fig. 8 shows the schematic diagram of network server 500 according to an embodiment of the invention.As shown in figure 8, network takes
Device 500 be engaged in respectively with mobile terminal 300 and the communication connection of database server 900, database server 900 includes that data store
Equipment (not shown), data storage device are stored with a plurality of data information, and every data information includes data synchronization time
Stamp.Network server 500 includes that the 4th receiving module 510, first obtains module 520, the 4th sending module the 530, the 5th receives
Module 540, second obtains module 550 and the 5th sending module 560.
4th receiving module 510 is suitable for receiving the homepage data synchronization request that mobile terminal 300 is sent, and homepage data are synchronous
Request includes stabbing data renewal time.
First acquisition module 520 is connected with the 4th receiving module 510, suitable for getting according to from the 4th receiving module 510
Data renewal time stamp and reference data amount, from data storage device obtain, first number corresponding with reference data amount
It is believed that the data synchronized timestamp of breath and the last item data information, it is not small to obtain data synchronized timestamp in data storage device
The number of data synchronized timestamp in the last item data information and the data synchronized timestamp no more than the first data information
It is believed that breath is used as homepage data.
4th sending module 530 is connected with the first acquisition module 520, suitable for will obtain what module 520 was got from first
Homepage data are sent to mobile terminal 300.
5th receiving module 540 is suitable for receiving mobile terminal 300 and instructs and send next in response to user's slide
Page data synchronization request, lower page of data synchronization request include data renewal time stamp.
Second acquisition module 550 is connected with the 5th receiving module 540, suitable for getting according to from the 5th receiving module 540
Data renewal time stamp and reference data amount, obtain, first data corresponding with reference data amount from data storage device
The data synchronized timestamp of information and the last item data information obtains data synchronized timestamp in data storage device and is not less than
The data of the data synchronized timestamp of the last item data information and the data synchronized timestamp no more than the first data information
Information is as lower page of data 0
5th sending module 560 is connected with the second acquisition module 550, suitable for will obtain what module 550 was got from second
Lower page of data is sent to mobile terminal 300.
Fig. 9 shows the schematic diagram of the network server 800 of another embodiment according to the present invention.As shown in figure 9, network
Server 800 is communicated to connect with mobile terminal 300 and database server 900 respectively, and database server 900 is deposited including data
Equipment (not shown) is stored up, data storage device is stored with a plurality of data information, when every data information includes that data are synchronous
Between stab.4th receiving module 811, first of network server 800 obtains module 812, the 4th sending module the 813, the 5th receives
Module 821, second obtains module 822 and the 5th sending module 823, receives mould with the 4th of network server 500 in Fig. 8 the respectively
Block 510, first obtains module 520, the 4th sending module 530, the 5th receiving module 540, second and obtains module 550 and the 5th hair
It send module 560 to correspond, is consistent, and increased message transmission module 831, the 6th receiving module 832, third newly and obtained mould
Block 833 and the 6th sending module 834.
Message transmission module 831 is suitable for when there is new data information memory to data storage device, to mobile terminal 300
Send data-pushing message.
6th receiving module 832 is suitable for receiving the propelling data synchronization request that mobile terminal 300 is sent, and propelling data is synchronous
Request includes Refresh Data timestamp.
Third obtains module 833 and is connected with the 6th receiving module 832, suitable for getting according to from the 6th receiving module 832
Refresh Data timestamp, from data storage device obtain data synchronized timestamp be greater than Refresh Data timestamp data believe
Breath.
6th sending module 834 obtains module 833 with third and is connected, and gets suitable for that will obtain in module 833 from third
Data information be sent to mobile terminal 300 as propelling data.
The specific steps and embodiment synchronous about paged data, it is public in detail in the description based on Fig. 2~3
It opens, details are not described herein again.
Easily there is the problem of data are imperfect, lose or repeat when obtaining data in existing paging synchrodata method,
It is difficult to ensure the integrality and consistency of paging request data, it is especially high in data variation frequency and the case where structure is complicated
Under, problem above becomes apparent.The synchronous technical solution of paged data according to an embodiment of the present invention, mobile terminal take to network
Be engaged in device send paged data synchronization request, network server upon receiving the request, according in the request data update when
Between stab and reference data amount, from the data storage device in database server obtain corresponding data and be sent to it is mobile eventually
End, after mobile terminal receives the data of network server return, more new data renewal time is stabbed to send request again.On
It states in technical solution, when the request of network server response mobile terminal obtains paged data from data storage device, first root
According to data renewal time stamp and reference data amount, first data information corresponding with reference data amount and the last item are obtained
The data synchronized timestamp of data information, then data synchronized timestamp in data storage device is believed not less than the last item data
The data synchronized timestamp of breath and no more than the first data information data synchronized timestamp data information all obtain make
For the paged data, i.e., the item number of data information floats upwards using reference data amount as standard in the paged data, it is ensured that data
It is not lost or repeats, guarantee the integrality and consistency of paging request data.Moreover, when there is new data information memory to number
When according to storage equipment, network server can send data-pushing message to mobile terminal, and mobile terminal is new according to the message request
Data information, network server only obtains new data information from data storage device and returns to mobile terminal at this time, and
New data information and part primary data information (pdi) will not be sent to mobile terminal according to reference data amount, avoid repeating to obtain
Already present data are taken, the flow of user is further saved, and are suitable for big data volume, data variation frequency and data structure
Complicated application scenarios.
B7. the method as described in B6, further includes:
If there is new data information memory to the data storage device, data-pushing is sent to the mobile terminal and is disappeared
Breath.
B8. the method as described in B6 or 7, further includes:
The propelling data synchronization request that mobile terminal is sent is received, when the propelling data synchronization request includes Refresh Data
Between stab;
According to the Refresh Data timestamp, data synchronized timestamp is obtained from the data storage device greater than described
The data information of Refresh Data timestamp;
The mobile terminal is sent to using the data information as propelling data.
C10. the device as described in C9 further includes initialization module, is suitable for:
Initialization data refresh time stamp and data renewal time stamp are 0 respectively.
C11. the device as described in C9 or 10, first sending module are further adapted for:
In response to the slide instruction of user, when current page has slid into page top and has continued slide downward,
Send homepage data synchronization request to network server to obtain homepage data, the homepage data synchronization request include data more
New timestamp, the data renewal time stamp are set as 0.
C12. the device as described in any one of C9-11, further includes:
Message reception module, the data-pushing message sent suitable for receiving network server;
Third sending module is suitable for sending propelling data to network server when the Refresh Data timestamp is greater than 0
For synchronization request to obtain propelling data, the propelling data synchronization request includes the Refresh Data timestamp;
Third receiving module, the propelling data returned suitable for receiving network server, the propelling data is by network service
Device is obtained from the data storage device according to the Refresh Data timestamp;
Third assignment module, suitable for the data synchronized timestamp of the first data information in the propelling data to be assigned to
The Refresh Data timestamp.
C13. the device as described in C12, the third sending module are further adapted for:
When the Refresh Data timestamp is not more than 0, homepage data synchronization request is sent to obtain to network server
Homepage data, the homepage data synchronization request include data renewal time stamp, and the data renewal time stamp is set as 0.
D16. the network server as described in D15 further includes message transmission module, is suitable for:
When there is new data information memory to the data storage device, Xiang Suoshu mobile terminal sends data-pushing and disappears
Breath.
D17. the network server as described in D15 or 16, further includes:
6th receiving module, the propelling data synchronization request sent suitable for receiving mobile terminal, the propelling data are synchronous
Request includes Refresh Data timestamp;
Third obtains module, is suitable for obtaining data from the data storage device according to the Refresh Data timestamp
Synchronized timestamp is greater than the data information of the Refresh Data timestamp;
6th sending module, suitable for being sent to the mobile terminal for the data information as propelling data.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, knot is not been shown in detail
Structure and technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims than feature more features expressly recited in each claim.More precisely, as following
As claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, it abides by
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
As a separate embodiment of the present invention.
Those skilled in the art should understand that the module of the equipment in example disclosed herein or unit or groups
Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example
In different one or more equipment.Module in aforementioned exemplary can be combined into a module or furthermore be segmented into multiple
Submodule.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
In addition, be described as herein can be by the processor of computer system or by executing by some in the embodiment
The combination of method or method element that other devices of the function are implemented.Therefore, have for implementing the method or method
The processor of the necessary instruction of element forms the device for implementing this method or method element.In addition, Installation practice
Element described in this is the example of following device: the device be used for implement as in order to implement the purpose of the invention element performed by
Function.
As used in this, unless specifically stated, come using ordinal number " first ", " second ", " third " etc.
Description plain objects, which are merely representative of, is related to the different instances of similar object, and is not intended to imply that the object being described in this way must
Must have the time it is upper, spatially, sequence aspect or given sequence in any other manner.
Although the embodiment according to limited quantity describes the present invention, above description, the art are benefited from
It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that
Language used in this specification primarily to readable and introduction purpose and select, rather than in order to explain or limit
Determine subject of the present invention and selects.Therefore, without departing from the scope and spirit of the appended claims, for this
Many modifications and changes are obvious for the those of ordinary skill of technical field.For the scope of the present invention, to this
Invent done disclosure be it is illustrative and not restrictive, it is intended that the scope of the present invention be defined by the claims appended hereto.
Claims (18)
1. a kind of paged data synchronous method, suitable for executing in the terminal, the mobile terminal is communicated with network server
Connection, the network server and database server communicate to connect, and the database server includes data storage device, institute
It states data storage device and is stored with a plurality of data information, every data information includes data synchronized timestamp, which comprises
Homepage data synchronization request is sent to network server to obtain homepage data, and the homepage data synchronization request includes number
It is stabbed according to renewal time;
The homepage data that network server returns are received, the homepage data are by network server according to the data renewal time
Stamp is obtained from the data storage device;
The data synchronized timestamp of first data information in the homepage data is assigned to Refresh Data timestamp, last
The data synchronized timestamp of data information is assigned to the data renewal time stamp;
In response to the slide instruction of user, lower page of data synchronization request is sent to obtain next number of pages to network server
According to the lower page of data synchronization request includes the data renewal time stamp;
The lower page of data that network server returns is received, the lower page of data is updated by network server according to the data
Timestamp is obtained from the data storage device;
The data synchronized timestamp of the last item data information in the lower page of data is assigned to the data renewal time
Stamp.
2. the method as described in claim 1, further includes:
Initialization data refresh time stamp and data renewal time stamp are 0 respectively.
3. method according to claim 1 or 2, further includes:
In response to the slide instruction of user, if current page has slid into page top and has continued slide downward, to net
Network server sends homepage data synchronization request to obtain homepage data, when the homepage data synchronization request includes that data update
Between stab, data renewal time stamp is set as 0.
4. method according to claim 1 or 2, further includes:
Receive the data-pushing message that network server is sent;
If the Refresh Data timestamp is greater than 0, propelling data synchronization request is sent to obtain push number to network server
According to the propelling data synchronization request includes the Refresh Data timestamp;
The propelling data that network server returns is received, the propelling data is by network server according to the Refresh Data time
Stamp is obtained from the data storage device;
The data synchronized timestamp of first data information in the propelling data is assigned to the Refresh Data timestamp.
5. method as claimed in claim 4, further includes:
If the Refresh Data timestamp is not more than 0, homepage data synchronization request is sent to obtain homepage to network server
Data, the homepage data synchronization request include data renewal time stamp, and the data renewal time stamp is set as 0.
6. a kind of paged data synchronous method, suitable for being executed in network server, the network server respectively with multiple shiftings
Dynamic terminal and database server communication connection, the database server includes data storage device, and the data storage is set
Standby to be stored with a plurality of data information, every data information includes data synchronized timestamp, which comprises
The homepage data synchronization request that mobile terminal is sent is received, the homepage data synchronization request includes data renewal time
Stamp;
According to data renewal time stamp and reference data amount, obtained and the reference data from the data storage device
Measure the data synchronized timestamp of corresponding first data information and the last item data information;
It is synchronous not less than the data of the last item data information to obtain data synchronized timestamp in the data storage device
Timestamp and no more than the first data information data synchronized timestamp data information be used as homepage data, and general
The homepage data are sent to the mobile terminal;
Receive the lower page of data synchronization request that mobile terminal is instructed in response to user's slide and sent, next number of pages
It include data renewal time stamp according to synchronization request;
According to data renewal time stamp and reference data amount, obtained and the reference data from the data storage device
Measure the data synchronized timestamp of corresponding first data information and the last item data information;
It is synchronous not less than the data of the last item data information to obtain data synchronized timestamp in the data storage device
Timestamp and no more than the first data information data synchronized timestamp data information as lower page of data, and
The lower page of data is sent to the mobile terminal.
7. method as claimed in claim 6, further includes:
If there is new data information memory to the data storage device, data-pushing message is sent to the mobile terminal.
8. method according to claim 6 or 7, further includes:
The propelling data synchronization request that mobile terminal is sent is received, the propelling data synchronization request includes the Refresh Data time
Stamp;
According to the Refresh Data timestamp, data synchronized timestamp is obtained from the data storage device and is greater than the data
The data information of refresh time stamp;
The mobile terminal is sent to using the data information as propelling data.
9. a kind of paged data synchronizing device is suitable for being resident in the terminal, the mobile terminal is communicated with network server
Connection, the network server and database server communicate to connect, and the database server includes data storage device, institute
It states data storage device and is stored with a plurality of data information, every data information includes data synchronized timestamp, and described device includes:
First sending module, suitable for sending homepage data synchronization request to network server to obtain homepage data, the homepage
Data synchronization request includes data renewal time stamp;
First receiving module, the homepage data returned suitable for receiving network server, the homepage data are by network server root
It is obtained according to data renewal time stamp from the data storage device;
First assignment module, suitable for the data synchronized timestamp of the first data information in the homepage data is assigned to data
Refresh time stamp, the data synchronized timestamp of the last item data information are assigned to the data renewal time stamp;
Second sending module is adapted for the slide instruction of user, and it is synchronous to send lower page of data to network server
To obtain lower page of data, the lower page of data synchronization request includes the data renewal time stamp for request;
Second receiving module, the lower page of data returned suitable for receiving network server, the lower page of data is by network service
Device is stabbed from the data storage device according to the data renewal time and is obtained;
Second assignment module, suitable for the data synchronized timestamp of the last item data information in the lower page of data to be assigned to
The data renewal time stamp.
10. device as claimed in claim 9 further includes initialization module, is suitable for:
Initialization data refresh time stamp and data renewal time stamp are 0 respectively.
11. the device as described in claim 9 or 10, first sending module is further adapted for:
In response to the slide instruction of user, when current page has slid into page top and continued slide downward, to net
Network server sends homepage data synchronization request to obtain homepage data, when the homepage data synchronization request includes that data update
Between stab, data renewal time stamp is set as 0.
12. the device as described in claim 9 or 10, further includes:
Message reception module, the data-pushing message sent suitable for receiving network server;
Third sending module, is suitable for when the Refresh Data timestamp is greater than 0, and it is synchronous to send propelling data to network server
To obtain propelling data, the propelling data synchronization request includes the Refresh Data timestamp for request;
Third receiving module, the propelling data returned suitable for receiving network server, the propelling data is by network server root
It is obtained from the data storage device according to the Refresh Data timestamp;
Third assignment module, it is described suitable for the data synchronized timestamp of the first data information in the propelling data to be assigned to
Refresh Data timestamp.
13. device as claimed in claim 12, the third sending module is further adapted for:
When the Refresh Data timestamp is not more than 0, homepage data synchronization request is sent to obtain homepage to network server
Data, the homepage data synchronization request include data renewal time stamp, and the data renewal time stamp is set as 0.
14. a kind of mobile terminal, including the paged data synchronizing device as described in any one of claim 9-13.
15. a kind of network server is communicated to connect with multiple mobile terminals and database server, the database service respectively
Device includes data storage device, and the data storage device is stored with a plurality of data information, and every data information includes that data are same
Timestamp is walked, the network server includes:
4th receiving module, the homepage data synchronization request sent suitable for receiving mobile terminal, the homepage data synchronization request
It is stabbed including data renewal time;
First obtains module, is suitable for according to data renewal time stamp and reference data amount, from the data storage device
Corresponding with the reference data amount, the first data information and the last item data information data synchronized timestamp is obtained,
Obtain the data synchronization time of data synchronized timestamp in the data storage device not less than the last item data information
It stabs and no more than the data information of the data synchronized timestamp of the first data information as homepage data;
4th sending module, suitable for the homepage data are sent to the mobile terminal;
5th receiving module, it is synchronous suitable for receiving the lower page of data that mobile terminal is instructed in response to user's slide and sent
Request, the lower page of data synchronization request include data renewal time stamp;
Second obtains module, is suitable for according to data renewal time stamp and reference data amount, from the data storage device
Corresponding with the reference data amount, the first data information and the last item data information data synchronized timestamp is obtained,
Obtain the data synchronization time of data synchronized timestamp in the data storage device not less than the last item data information
It stabs and no more than the data information of the data synchronized timestamp of the first data information as lower page of data;
5th sending module, suitable for the lower page of data is sent to the mobile terminal.
16. network server as claimed in claim 15 further includes message transmission module, is suitable for:
When there is new data information memory to the data storage device, Xiang Suoshu mobile terminal sends data-pushing message.
17. the network server as described in claim 15 or 16, further includes:
6th receiving module, the propelling data synchronization request sent suitable for receiving mobile terminal, the propelling data synchronization request
Including Refresh Data timestamp;
Third obtains module, is suitable for according to the Refresh Data timestamp, and it is synchronous that data are obtained from the data storage device
Timestamp is greater than the data information of the Refresh Data timestamp;
6th sending module, suitable for being sent to the mobile terminal for the data information as propelling data.
18. a kind of paged data synchronization system, comprising:
Multiple mobile terminals as claimed in claim 14;With
Network server and database server as described in any one of claim 15-17.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710058446.3A CN106844689B (en) | 2017-01-23 | 2017-01-23 | A kind of paged data synchronous method, apparatus and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710058446.3A CN106844689B (en) | 2017-01-23 | 2017-01-23 | A kind of paged data synchronous method, apparatus and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106844689A CN106844689A (en) | 2017-06-13 |
CN106844689B true CN106844689B (en) | 2019-06-04 |
Family
ID=59122606
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710058446.3A Active CN106844689B (en) | 2017-01-23 | 2017-01-23 | A kind of paged data synchronous method, apparatus and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106844689B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107370803B (en) * | 2017-07-11 | 2020-09-08 | 福建省天奕网络科技有限公司 | Data synchronization method and terminal |
CN107741994B (en) * | 2017-11-09 | 2021-09-07 | 校脸科技(北京)有限公司 | Data updating method and device |
EP3786744A4 (en) | 2018-04-25 | 2021-11-24 | Shenzhen Launch Software Co., Ltd. | Method and system for displaying a vehicle data stream and a vehicle diagnosis device |
CN111078171B (en) * | 2019-11-30 | 2021-05-25 | 北京城市网邻信息技术有限公司 | Method, terminal device, device and readable storage medium for synchronous display |
CN111240650B (en) * | 2020-01-22 | 2023-06-30 | 上海钧正网络科技有限公司 | Data paging method and device and mobile terminal |
CN112765275A (en) * | 2021-01-26 | 2021-05-07 | 成都佳发安泰教育科技股份有限公司 | Data synchronous exchange method, equipment and medium based on single time coordinate system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102904887A (en) * | 2012-09-26 | 2013-01-30 | 东软集团股份有限公司 | Method and system for data synchronization of Web client and server |
US8843491B1 (en) * | 2012-01-24 | 2014-09-23 | Google Inc. | Ranking and ordering items in stream |
WO2014176744A1 (en) * | 2013-04-28 | 2014-11-06 | Tencent Technology (Shenzhen) Company Limited | An information collection, storage, and sharing platform |
-
2017
- 2017-01-23 CN CN201710058446.3A patent/CN106844689B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8843491B1 (en) * | 2012-01-24 | 2014-09-23 | Google Inc. | Ranking and ordering items in stream |
CN102904887A (en) * | 2012-09-26 | 2013-01-30 | 东软集团股份有限公司 | Method and system for data synchronization of Web client and server |
WO2014176744A1 (en) * | 2013-04-28 | 2014-11-06 | Tencent Technology (Shenzhen) Company Limited | An information collection, storage, and sharing platform |
Also Published As
Publication number | Publication date |
---|---|
CN106844689A (en) | 2017-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106844689B (en) | A kind of paged data synchronous method, apparatus and system | |
US10123275B2 (en) | Information processing method and electronic device supporting the same | |
KR102309070B1 (en) | Electronic device and method for providing an information related to communication in electronic device | |
CN111800549B (en) | Procedure for real-time data exchange between subscribers in a telephone call | |
KR20170001393A (en) | Method for using external device according to context of electronic device and electronic device thereof | |
US20190340150A1 (en) | System for sharing content between electronic devices, and content sharing method for electronic device | |
CN106228511B (en) | Electronic device and method for generating image file in electronic device | |
KR20150040567A (en) | Apparatus and method for displaying an related contents information related the opponent party in terminal | |
US9948732B2 (en) | Method for providing status messaging service in electronic device and the electronic device thereof | |
US9059747B2 (en) | Method for rapid information synchronization using near field communication | |
CN105657049A (en) | Incremental data synchronization method and device and mobile terminal | |
KR20170082773A (en) | Method for integrating management of message and electronic device for the same | |
CN114237840A (en) | Resource interaction method, device, terminal and storage medium | |
CN103412885A (en) | Contact person photo setting method and device | |
KR20180081231A (en) | Method for sharing data and an electronic device thereof | |
CN102368849A (en) | System and method for carrying out state updating on intelligent mobile phone address list through network | |
CN103401989A (en) | Method, device and terminal for displaying contact information | |
CN101572764B (en) | Method and system for sending pictures between electronic picture frames and electronic picture frame | |
CN110071959B (en) | Method and device for timing synchronization of third-party national standard resources | |
CN103685491A (en) | Application service providing method, system and related equipment | |
US11191439B2 (en) | Electronic device and method for capturing contents | |
US10362036B2 (en) | Electronic device, operation method thereof and recording medium | |
US10397772B2 (en) | Nomination of a primary cell phone from a pool of cell phones | |
US10009421B2 (en) | Contents control in electronic device | |
CN104281364B (en) | A kind of terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |