CN103020245A - Method and device for data download - Google Patents

Method and device for data download Download PDF

Info

Publication number
CN103020245A
CN103020245A CN2012105534557A CN201210553455A CN103020245A CN 103020245 A CN103020245 A CN 103020245A CN 2012105534557 A CN2012105534557 A CN 2012105534557A CN 201210553455 A CN201210553455 A CN 201210553455A CN 103020245 A CN103020245 A CN 103020245A
Authority
CN
China
Prior art keywords
data
database
unit
returning
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012105534557A
Other languages
Chinese (zh)
Other versions
CN103020245B (en
Inventor
张炅轩
范国峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210553455.7A priority Critical patent/CN103020245B/en
Publication of CN103020245A publication Critical patent/CN103020245A/en
Application granted granted Critical
Publication of CN103020245B publication Critical patent/CN103020245B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for data download, relating to the technical field of network communication. The device comprises a new data download unit, a database maintenance unit, a database unit, a display unit, and a prompt unit, wherein the new data download unit is suitable for sending a download request and receiving data returned by a server; the database maintenance unit is suitable for judging whether the returned data can be connected with existing data, if so, storing the returned data into the database unit and marking a display label of the returned data as valid, and if not, setting all the display labels to be invalid and then storing the returned data and marking the display label of the returned data as valid; the database unit is suitable for storing data and the display labels; the display unit is suitable for displaying data with valid display labels; and the prompt unit is suitable for prompting a user that the latest data in the database is the latest data in the server when the number of the returned data is 0. According to the technical scheme disclosed by the invention, the problem that a user cannot acquire whether fault data exist in the displayed data is solved.

Description

The method and apparatus that is used for downloading data
Technical field
The present invention relates to network communications technology field, be specifically related to a kind of method and apparatus for downloading data.
Background technology
Along with popularizing of intelligent terminal, read client (following in this application referred to as " client ") and more and more be applied on the intelligent terminal.But the processing of its main functional parts---data storage and layer data, but all be that comparatively core, technical difficulty are optimized greatly inadequate place all the time.And this is to consist of in client user's experience, a very important ingredient.
The read data of client comprises article, picture, video, " microblogging " etc.In the process of using client, have a kind of the most general scene to be: the user first in section sometime (such as the noon lunch break time) by the client downloads read data, generally speaking, client can be asked approximately 20 read data, and it is saved in the database in order to show.After the user has seen a period of time, withdraw from client, continue the thing of oneself.Then in another time period (such as 6 o'clock at dusk), the user enters the new read data of client downloads again, generally speaking, for the consideration to flow, transmission speed and experience, client can be with the data crossed from last downloaded when lunch break (as previously mentioned noon) until present read data all ask, server end might have hundreds of read data during this, so client only is to ask 20 approximately up-to-date read data for the user.So, 20 read data of just having asked and before the centre of 20 readings (such as lunch break time) of user's request, formed some and also be not downloaded to the read data of client.These " hollow " parts that are clipped in the centre of up-to-date read data and existing read data are referred to as " layer data ".
A kind of way of the prior art is after having downloaded new read data, in the middle of not considering whether layer data is not arranged, and directly newly downloaded read data is inserted into before the existing read data, and all shows when showing.This is so that the user can't know whether layer data is arranged between the shown data.
Summary of the invention
In view of the above problems, the present invention has been proposed in order to a kind of a kind of method and apparatus for downloading data that overcomes the problems referred to above or address the above problem at least in part is provided.
According to one aspect of the present invention, a kind of device for downloading data is provided, this device comprises: Database Unit, display unit, new data download unit, database maintenance unit and Tip element;
Described new data download unit is suitable for sending the request of downloading new data, the data that reception server returns to server;
Described database maintenance unit, be suitable for judging whether the described data of returning can be connected with the data with existing in the Database Unit, if be connected, the described data of returning are saved in the Database Unit, and the show tags of the described data of returning is set to effectively, if divergence, existing show tags in the Database Unit is that the show tags of active data all is set to invalid, then the described data of returning are saved in the Database Unit, and the show tags of the described data of returning is set to effectively;
Described Database Unit is suitable for the show tags of save data and data;
Described display unit is suitable for showing that the show tags in the described Database Unit is active data;
Described Tip element, the number that is suitable for the data returned at server is 0, the latest data in user's reminder-data storehouse is the latest data on the server.
Alternatively, comprise in the request of the described download new data that sends to described server of described new data download unit: the data number that request is downloaded and downloaded to the sign of the up-to-date data in the Database Unit;
Described database maintenance unit, be judged as linking when being further adapted for the number of the data of downloading less than described request in the number of the described data of returning, be judged as divergence during the number of the data of downloading more than or equal to described request in the number of the described data of returning.
Alternatively, this device further comprises maintenance unit between the fault zone;
Maintenance unit between described fault zone is suitable for when the described data of returning and the data with existing divergence in the Database Unit, is kept between will the fault zone corresponding with the layer data of divergence between the fault zone of safeguarding in the Database Unit in the set.
Alternatively, maintenance unit between described fault zone, be further adapted for the sign of the oldest data in the described data of returning and the described sign that has downloaded to the up-to-date data in the Database Unit and form an array that represents between the fault zone, and this array is saved in the array set of gathering between expression fault zone in the Database Unit.
Alternatively, set is to be realized by the array list in the JAVA class libraries between the described fault zone in the described Database Unit.
According to a further aspect in the invention, provide a kind of method for downloading data, the method comprises:
Send the request of downloading new data, the data that reception server returns to server;
Judge whether the described data of returning can be connected with the data with existing in the database;
If be connected, the described data of returning be saved in the database, and the show tags of the described data of returning is set to effectively;
If divergence is with existing show tags in the database that the show tags of active data all is set to invalid, then the described data of returning is saved in the database, and the show tags of the described data of returning is set to effectively;
Wherein, only having show tags is that active data can be shown;
If the number of the data that the server that receives returns is 0, the latest data in user's reminder-data storehouse is the latest data on the server.
Alternatively, comprise in the request of described download new data: ask the data number of download, and downloaded to the sign of the up-to-date data in the database;
Describedly judge whether the described data of returning can be connected with the data with existing in the database and comprise: when the data number that the number of the described data of returning is downloaded less than described request, be judged as linking, when the data number that the number of the described data of returning is downloaded more than or equal to described request, be judged as divergence.
Alternatively, the method further comprises:
If divergence is saved between also will the fault zone corresponding with the layer data of divergence between the fault zone of safeguarding in the set.
Alternatively, described being saved between the fault zone of safeguarding between will the fault zone corresponding with the layer data of divergence comprises in the set:
Sign and the described sign that has downloaded to the up-to-date data in the database with the oldest data in the described data of returning form an array that represents between the fault zone, and this array is saved in the array set of gathering between the expression fault zone.
Alternatively, the method further comprises: adopt the array list in the JAVA class libraries to realize gathering between described fault zone.
According to this request of downloading new data that sends to server of the present invention, the data that reception server returns, judge whether the described data of returning can be connected with the data with existing in the database, if be connected, the described data of returning are saved in the database, and the show tags of the described data of returning is set to effectively, if divergence, existing show tags in the database is that the show tags of active data all is set to invalid, then the described data of returning are saved in the database, and the show tags of the described data of returning is set to effectively, only having show tags when showing is the technical scheme that active data can be shown, can behind each request new data, judge whether new data and existing data are connected, illustrate then that when divergence data have produced tomography, by arranging and safeguarding that show tags only shows up-to-date continuous data when showing, the user sees that data are continuous data like this, wherein there is not layer data, solved thus the user and can not know the problem that whether has layer data in the shown data.
Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of drawings
By reading hereinafter detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skills.Accompanying drawing only is used for the purpose of preferred implementation is shown, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts with identical reference symbol.In the accompanying drawings:
Fig. 1 shows a kind of according to an embodiment of the invention process flow diagram of the method for downloading data;
Fig. 2 shows the process flow diagram that is used for according to an embodiment of the invention the method for downloading data;
Fig. 3 shows the data variation schematic diagram of client in the data downloading process according to an embodiment of the invention;
Fig. 4 shows a kind of according to an embodiment of the invention structural drawing of the device for downloading data;
Fig. 5 shows the structural drawing that is used for according to an embodiment of the invention the device of downloading data.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
Fig. 1 shows a kind of according to an embodiment of the invention process flow diagram of the method for downloading data.As shown in Figure 1, the method comprises:
Step S110 sends the request of downloading new data, the data that reception server returns to server.
In one embodiment of the invention, comprise in the request of the download new data that this user end to server sends: ask the data number of download, and downloaded to the sign of the up-to-date data in the database.Like this, server end thinks that data that client is asked are the data till the Data Identification that comprises from the current up-to-date data of server end to described request, and the data number of request is the number that comprises in the described request.Here, " newly " and " old " relatively be the generation time of data, " newly " be generation time after data, " old " is generation time data formerly.
Step S120 judges whether the data that server returns can be connected with the data with existing in the database, if execution in step S130, if not execution in step S140.
In one embodiment of the invention, be judged as linking during data number that the number of the data of returning at server is downloaded less than request, be judged as divergence during data number that the number of the data of returning at server is downloaded more than or equal to request.This is the data number of downloading because of the request that comprises in the request of server end with the download new data of client transmission, and has downloaded to the result of the foundation that is designated return data of the up-to-date data in the database.
Increase progressively successively as example take the sign of the data sequencing according to its generation time: what client had downloaded to up-to-date data in the database is designated 1000,20 data of current request.When if server end receives the request of client, the sign of up-to-date data of server end is to 1050, and then server can return to client and be designated 20 data of 1031 ~ 1050, and client can be judged as divergence.When if server end receives the request of client, the sign of up-to-date data of server end is to 1015, and then server can return to client and be designated 15 data of 1001 ~ 1015, and client can be judged as linking.
Step S130, the data that server is returned are saved in the database, and the show tags of these data of returning is set to effectively.Execution in step S150.
Step S140 is with existing show tags in the database that the show tags of active data all is set to invalid, and the data of then server being returned are saved in the database, and the show tags of the data that server is returned is set to effectively.Execution in step S150.
Step S150 only shows that the show tags in the database is active data.
In the technical scheme shown in Figure 1, behind new data, all judge whether new data and existing data are connected in each request, illustrate then that when divergence data have produced tomography, show tags by setting and service data, and when showing, only show up-to-date continuous data, the user sees that data are continuous data like this, does not wherein have layer data, has solved thus the user and can not know the problem that whether has layer data in the shown data.
When method shown in Figure 1 can also be judged as divergence in step S 120, be saved between further will the fault zone corresponding with the layer data of divergence between the fault zone of safeguarding in the set.Be specially: the sign of the oldest data in the data of returning with server and the sign that has downloaded to the up-to-date data in the database form an array that represents between the fault zone, and this array is saved in the array set of gathering between the expression fault zone.For example, be designated 1000 with what aforesaid client had downloaded to up-to-date data in the database, 20 data of current request, when server end receives the request of client, the sign of up-to-date data of server end is to 1050, server returns to client and is designated 20 data instances of 1031 ~ 1050, is [1031,1000] for array between fault zone corresponding to the layer data of this divergence.Two of [1031,1000] end-point datas 1000 and 1031 are not included in the layer data between the fault zone, and namely corresponding layer data is 1001 ~ 1030.
For making technical scheme of the present invention clearer, below technical scheme of the present invention is further described.
Fig. 2 shows the process flow diagram that is used for according to an embodiment of the invention the method for downloading data.Fig. 3 shows the data variation schematic diagram of client in the data downloading process according to an embodiment of the invention.Below in conjunction with Fig. 3 method shown in Figure 2 is described, as shown in Figure 2, the flow process of a new data of client-requested comprises:
Step S202, user end to server sends the request of downloading new data.
In one embodiment of the invention, comprise in the request of the download new data that this user end to server sends: ask the data number of download, and downloaded to the sign of the up-to-date data in the database.
At first, client need be determined will " ask download data number ", as being 20 generally speaking.In addition, client also needs to obtain the sign of up-to-date data that (namely download in the client database) in the data with existing, such as the lines 310 among Fig. 3.Above-mentioned " request download data number " and " signs of the up-to-date data in the data with existing " saved as a variable for subsequent use.Then, client is spliced into a URL with " the data number that request is downloaded " and " signs of the up-to-date data in the data with existing ", to the data of server request down loading updating.
Step S204, the data that the client server returns.
Here, server can judge to return how many record certificates according to " signs of the up-to-date data in the data with existing ", and returns which data.Generally, " signs of the up-to-date data in the data with existing " form of expression on server is " request is arrived till this Data Identification " (such as lines among Fig. 3 310), also be, the interval that obtains the scope of data is " signs of just infinite up-to-date data in data with existing ", formula is: (∞, the sign of the up-to-date data in the data with existing), the specified data of sign that do not comprise the up-to-date data in this data with existing in its scope.Simultaneously, " request download data number " also will be as a kind of condition restriction, and namely server end " the data number of returning " is less than or equals this restriction.Finally, the condition of the return data of server end is: one, the number of return data is less than or equals " request download data number "; Two, the scope of obtaining data is (∞, the sign of the up-to-date data in the data with existing), two conditions become " with " relation.
Step S206, client judges whether the data number that server returns is less than or equal to 0, is execution in step S208 then, otherwise execution in step S210.
Step S208, if the data number that server returns is less than or equal to 0, represent that then Data Identification up-to-date in the client has been that the latest data of server end has identified, the data that are client have been up-to-date, server end does not have the data of renewal, client is latest data on the server to the latest data in user's reminder-data storehouse, need not to ask again, and transmission course stops.
Step S210, if the data number that server returns is greater than 0, then represent also new data of the existing latest data than client of server end, therefore continue to judge whether the data that server returns can be connected with the data with existing in the database, be specially and judge that data number that server returns is whether less than the data number downloaded of ask, execution in step S212 then, otherwise execution in step S214.
Step S212, if the data number that server returns is less than the data number of ask download, represent that then the data that server returns can be connected with the data of client terminal local, client is saved in the data that server returns in the database, and the show tags of the data that server is this time returned is set to effectively.For example, in one embodiment of the invention, can realize the data that server returns are inserted in the database with the SQL statement of an INSERT.Process ends.
Step S214, if the data number that server returns is more than or equal to the data number of ask download, represent that then the data that server returns can not be connected with the data of client terminal local, client has layer data, in then will be saved in and gather between the fault zone of safeguarding between fault zone corresponding to this layer data.
In one embodiment of the invention, the identification record of the oldest data in the data that client is at first returned server gets off, and saves as a variable, in the present embodiment, can be described as " signs of the oldest data in the server return data ", shown in lines among Fig. 3 320.Then, client shown in the lines 310 among Fig. 3, saves as a variable with " signs of the up-to-date data in the data with existing ", and is for subsequent use.Again then, from database, take out " the interval set of tomography " (in Fig. 3, have between fault zone, two places to be labeled as respectively 331 and 332, then these two is exactly " the interval set of tomography " altogether)." gather " the scope interval that is mainly used to record each tomography between the fault zone, these tomographies all also do not download in the client, but again can be to server request when client needs.And the purpose of taking out " gathering between the fault zone " is to add between new fault zone in this set.
In one embodiment of the invention, adopt the array list ArrayList in the JAVA class libraries to realize gathering between the fault zone.And be by the SQLite statement set between the fault zone to be taken out specific to the way in the Android client.Because what take out is Bytes type (also between available characters string descriptor fault zone), client can be passed through unserializing technology (de-serialize), also be the readObject method of the ObjectInputStream class of Android, this record is converted into an ArrayList object.And in the middle of the ArrayList, each all is made of the one-dimension array of Integer, and each array has two elements, is used for respectively representing two borders between this fault zone.What client will be done is as two borders between the fault zone with previously mentioned " signs of the oldest data in the data that server returns " and " signs of the up-to-date data in the data with existing ", insert respectively in the one-dimension array of new Integer, then it is added in the ArrayList object, at last, be a Bytes object with its serializing (serialize) again, also be the toByteArray () of the ObjectOutputStream of Android, finally, again it is deposited back in the middle of the database.So far, set is with between many new fault zones between the fault zone, and 333 among Fig. 3 is between this fault zone that newly increases.
Step S216 is with existing show tags in the database that the show tags of active data all is set to invalid.
The value that is about to existing data (such as the data segment 311 among Fig. 3) show tags in the client shows from 1() change 0(into and hide), can not be presented in the display interface of client to guarantee the data with existing section 311 before the tomography 333.Specific practice is: by a SQL statement, the value of the show tags of all data with existing is shown from 1() change 0(into and hide).
Step S218, the data of then server being returned are saved in the database, and the show tags of the data that server is returned is set to effectively.
Client can all be inserted into those data 333 of being returned by server end before in the database, and the value of its show tags is set to the 1(demonstration).So far, whole transmission course finishes.
By as seen above-mentioned, in the technical scheme of the present invention, by arranging and safeguard show tags, only show up-to-date continuous data, the user sees that data are continuous data like this, recorded in addition tomography interval, like this when the user wants to ask layer data, can be according to the corresponding layer data of tomography interval requests that records.
Fig. 4 shows a kind of according to an embodiment of the invention structural drawing of the device for downloading data.As shown in Figure 4, the device 400 of this downloading data comprises: Database Unit 401, display unit 402, new data download unit 403 and database maintenance unit 404;
New data download unit 403 is suitable for sending the request of downloading new data, the data that reception server returns to server.In one embodiment of the invention, new data download unit 403 comprises in the request of the download new data of server transmission: ask the data number of download, and downloaded to the sign of the up-to-date data in the database.
Database maintenance unit 404, be suitable for judging whether the data that server returns can be connected with the data with existing in the Database Unit 401, if be connected, the data that server is returned are saved in the Database Unit 401, and the show tags of the data that server is returned is set to effectively, if divergence, existing show tags in the Database Unit 401 is that the show tags of active data all is set to invalid, then the data of server being returned are saved in the Database Unit, and the show tags of the data that server is returned is set to effectively.
Database Unit 401 is suitable for the show tags of save data and data;
Display unit 402 is suitable for showing that the show tags in the Database Unit 401 is active data.
Device shown in Figure 4, behind each request new data, judge whether new data and existing data are connected, illustrate then that when divergence data have produced tomography, by arranging and safeguarding that show tags only shows up-to-date continuous data when showing, the user sees that data are continuous data like this, wherein there is not layer data, solved thus the user and can not know the problem that whether has layer data in the shown data.
Fig. 5 shows the structural drawing that is used for according to an embodiment of the invention the device of downloading data.As shown in Figure 5, the device 500 of this downloading data comprises: maintenance unit 505 and Tip element 506 between Database Unit 501, display unit 502, new data download unit 503, database maintenance unit 504, fault zone.
New data download unit 503 is suitable for sending the request of downloading new data, the data that reception server returns to server.In one embodiment of the invention, new data download unit 503 comprises in the request of the download new data of server transmission: ask the data number of download, and downloaded to the sign of the up-to-date data in the database.
Database maintenance unit 504, be suitable for judging whether the data that server returns can be connected with the data with existing in the Database Unit 501, if be connected, the data that server is returned are saved in the Database Unit 501, and the show tags of the data that server is returned is set to effectively, if divergence, existing show tags in the Database Unit 501 is that the show tags of active data all is set to invalid, then the data of server being returned are saved in the Database Unit, and the show tags of the data that server is returned is set to effectively.
Database Unit 501 is suitable for the show tags of save data and data;
Display unit 502 is suitable for showing that the show tags in the Database Unit 501 is active data.
In one embodiment of the invention, comprise in the request of the download new data that sends to server of new data download unit 503: the data number that request is downloaded and downloaded to the sign of the up-to-date data in the Database Unit 501.The condition of the return data of server end is: one, the return data number is less than or equals " request download data number "; Two, the scope of obtaining data is (∞ has downloaded to the sign of the up-to-date data in the Database Unit 501), two conditions become " with " relation.Then the database maintenance unit 504, are judged as linking during the number of the data that the number that is suitable for the data returned at server is downloaded less than request, are judged as divergence during the number of the data of downloading more than or equal to described request in the number of the described data of returning.
Maintenance unit 505 between the fault zone, are suitable for when data that server returns and the data with existing divergence in the Database Unit 501, are kept between will the fault zone corresponding with the layer data of divergence between the fault zone of safeguarding in the Database Unit 501 in the set.Specifically, the sign of the oldest data in the data that maintenance unit 505 usefulness servers return between the fault zone and the sign that has downloaded to the up-to-date data in the Database Unit 501 form an array that represents between the fault zone, and this array is saved in the array set of gathering between expression fault zone in the Database Unit 501.
In one embodiment of the invention, set is to be realized by the array list in the JAVA class libraries between the fault zone in the Database Unit 501.
Tip element 506, the number that is suitable for the data returned at server is 0, the latest data in user's reminder-data storehouse is the latest data on the server.
In sum, device shown in Figure 5, by arranging and safeguard show tags, only show up-to-date continuous data, the user sees that data are continuous data like this, recorded in addition tomography interval, like this when the user wants to ask layer data, can be according to the corresponding layer data of tomography interval requests that records.
Need to prove:
Intrinsic not relevant with any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can be with using based on the teaching at this.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be in the situation that there be these details to put into practice.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate clearly thus this embodiment into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different from this embodiment the module in the equipment among the embodiment.Can be combined into a module or unit or assembly to the module among the embodiment or unit or assembly, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless in addition clearly statement, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of the feature of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, perhaps realizes with the software module of moving at one or more processor, and perhaps the combination with them realizes.It will be understood by those of skill in the art that and to use in practice microprocessor or digital signal processor (DSP) to realize according to some of the device that is used for downloading data of the embodiment of the invention or all some or repertoire of parts.The present invention can also be embodied as be used to part or all equipment or the device program (for example, computer program and computer program) of carrying out method as described herein.Such realization program of the present invention can be stored on the computer-readable medium, perhaps can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, and perhaps provides at carrier signal, perhaps provides with any other form.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation of the scope that does not break away from claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed in element or step in the claim.Being positioned at word " " before the element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title with these word explanations.

Claims (10)

1. device that is used for downloading data, this device comprises: Database Unit, display unit, new data download unit, database maintenance unit and Tip element;
Described new data download unit is suitable for sending the request of downloading new data, the data that reception server returns to server;
Described database maintenance unit, be suitable for judging whether the described data of returning can be connected with the data with existing in the Database Unit, if be connected, the described data of returning are saved in the Database Unit, and the show tags of the described data of returning is set to effectively, if divergence, existing show tags in the Database Unit is that the show tags of active data all is set to invalid, then the described data of returning are saved in the Database Unit, and the show tags of the described data of returning is set to effectively;
Described Database Unit is suitable for the show tags of save data and data;
Described display unit is suitable for showing that the show tags in the described Database Unit is active data;
Described Tip element, the number that is suitable for the data returned at server is 0, the latest data in user's reminder-data storehouse is the latest data on the server.
2. device as claimed in claim 1 is characterized in that,
Comprise in the request of the described download new data that described new data download unit sends to described server: the data number that request is downloaded and downloaded to the sign of the up-to-date data in the Database Unit;
Described database maintenance unit, be judged as linking when being further adapted for the number of the data of downloading less than described request in the number of the described data of returning, be judged as divergence during the number of the data of downloading more than or equal to described request in the number of the described data of returning.
3. device as claimed in claim 1, wherein, this device further comprises maintenance unit between the fault zone;
Maintenance unit between described fault zone is suitable for when the described data of returning and the data with existing divergence in the Database Unit, is kept between will the fault zone corresponding with the layer data of divergence between the fault zone of safeguarding in the Database Unit in the set.
4. device as claimed in claim 3, wherein,
Maintenance unit between described fault zone, be further adapted for the sign of the oldest data in the described data of returning and the described sign that has downloaded to the up-to-date data in the Database Unit and form an array that represents between the fault zone, and this array is saved in the array set of gathering between expression fault zone in the Database Unit.
5. device as claimed in claim 4, wherein,
Set is to be realized by the array list in the JAVA class libraries between the described fault zone in the described Database Unit.
6. method that is used for downloading data, the method comprises:
Send the request of downloading new data, the data that reception server returns to server;
Judge whether the described data of returning can be connected with the data with existing in the database;
If be connected, the described data of returning be saved in the database, and the show tags of the described data of returning is set to effectively;
If divergence is with existing show tags in the database that the show tags of active data all is set to invalid, then the described data of returning is saved in the database, and the show tags of the described data of returning is set to effectively;
Wherein, only having show tags is that active data can be shown;
If the number of the data that the server that receives returns is 0, the latest data in user's reminder-data storehouse is the latest data on the server.
7. method as claimed in claim 6 wherein, comprises in the request of described download new data: ask the data number of download, and downloaded to the sign of the up-to-date data in the database;
Describedly judge whether the described data of returning can be connected with the data with existing in the database and comprise: when the data number that the number of the described data of returning is downloaded less than described request, be judged as linking, when the data number that the number of the described data of returning is downloaded more than or equal to described request, be judged as divergence.
8. method as claimed in claim 6, wherein, the method further comprises:
If divergence is saved between also will the fault zone corresponding with the layer data of divergence between the fault zone of safeguarding in the set.
9. method as claimed in claim 8, wherein, described being saved between the fault zone of safeguarding between will the fault zone corresponding with the layer data of divergence comprises in the set:
Sign and the described sign that has downloaded to the up-to-date data in the database with the oldest data in the described data of returning form an array that represents between the fault zone, and this array is saved in the array set of gathering between the expression fault zone.
10. method as claimed in claim 9, wherein, the method further comprises:
Adopt the array list in the JAVA class libraries to realize gathering between described fault zone.
CN201210553455.7A 2012-12-19 2012-12-19 For the method and apparatus of downloading data Expired - Fee Related CN103020245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210553455.7A CN103020245B (en) 2012-12-19 2012-12-19 For the method and apparatus of downloading data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210553455.7A CN103020245B (en) 2012-12-19 2012-12-19 For the method and apparatus of downloading data

Publications (2)

Publication Number Publication Date
CN103020245A true CN103020245A (en) 2013-04-03
CN103020245B CN103020245B (en) 2015-10-07

Family

ID=47968848

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210553455.7A Expired - Fee Related CN103020245B (en) 2012-12-19 2012-12-19 For the method and apparatus of downloading data

Country Status (1)

Country Link
CN (1) CN103020245B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036992A (en) * 2012-12-19 2013-04-10 北京奇虎科技有限公司 Method and device for data downloading
CN105100143A (en) * 2014-05-04 2015-11-25 腾讯科技(深圳)有限公司 Data display method and device
CN108960378B (en) * 2018-08-08 2020-05-12 腾讯科技(深圳)有限公司 Data downloading method, system, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120023506A1 (en) * 2010-07-20 2012-01-26 Apple Inc. Maintaining Data States Upon Forced Exit
CN102467553A (en) * 2010-11-18 2012-05-23 中兴通讯股份有限公司 Method and device for intelligently pushing data
CN103036992A (en) * 2012-12-19 2013-04-10 北京奇虎科技有限公司 Method and device for data downloading

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120023506A1 (en) * 2010-07-20 2012-01-26 Apple Inc. Maintaining Data States Upon Forced Exit
CN102467553A (en) * 2010-11-18 2012-05-23 中兴通讯股份有限公司 Method and device for intelligently pushing data
CN103036992A (en) * 2012-12-19 2013-04-10 北京奇虎科技有限公司 Method and device for data downloading

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036992A (en) * 2012-12-19 2013-04-10 北京奇虎科技有限公司 Method and device for data downloading
CN103036992B (en) * 2012-12-19 2015-10-07 北京奇虎科技有限公司 A kind of data download method and device
CN105100285A (en) * 2012-12-19 2015-11-25 北京奇虎科技有限公司 Data downloading method and device
CN105100143A (en) * 2014-05-04 2015-11-25 腾讯科技(深圳)有限公司 Data display method and device
CN108960378B (en) * 2018-08-08 2020-05-12 腾讯科技(深圳)有限公司 Data downloading method, system, device and storage medium

Also Published As

Publication number Publication date
CN103020245B (en) 2015-10-07

Similar Documents

Publication Publication Date Title
US11064053B2 (en) Method, apparatus and system for processing data
CN104065565B (en) The method of PUSH message, server, client terminal device and system
CN101512483B (en) Dynamically generating customized user interfaces
CN103678494A (en) Method and device for client side and server side data synchronization
KR101962301B1 (en) Caching pagelets of structured documents
CN103685528A (en) Information displaying method and device
CN103988200A (en) Lightweight framework for web applications
CN102932445A (en) Method and device for acquiring statuses of network contents
CN103067470A (en) Method, server and system for pushing information to browser
CN103078967A (en) Client, server, system and method for generating commonly used websites
CN102999578A (en) Method and device for processing page element
CN103077186A (en) Fault data processing device and method
CN105094868A (en) Software upgrading method, server and terminal
CN103177115A (en) Method and device of extracting page link of webpage
CN103034541A (en) Distributing type information system and equipment and method thereof
CN103036992A (en) Method and device for data downloading
CN105260421A (en) Webpage loading method and apparatus
CN105516333A (en) Interactive method and system based on webpage
CN102981848A (en) Webpage main body element processing browser and method
CN103631619A (en) Software mounting method and terminal
CN105208032A (en) Asynchronous login method and device
CN103020245A (en) Method and device for data download
CN102902784A (en) Web page classification storage system and method
CN103064910A (en) Device and method for processing fault data
CN105426541B (en) A kind of storage method and device of general data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220725

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151007