[go: up one dir, main page]

CN105100285B - A kind of data download method and device - Google Patents

A kind of data download method and device Download PDF

Info

Publication number
CN105100285B
CN105100285B CN201510560762.1A CN201510560762A CN105100285B CN 105100285 B CN105100285 B CN 105100285B CN 201510560762 A CN201510560762 A CN 201510560762A CN 105100285 B CN105100285 B CN 105100285B
Authority
CN
China
Prior art keywords
data
database
unit
server
returned
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.)
Expired - Fee Related
Application number
CN201510560762.1A
Other languages
Chinese (zh)
Other versions
CN105100285A (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
Qizhi Software Beijing 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 CN201510560762.1A priority Critical patent/CN105100285B/en
Publication of CN105100285A publication Critical patent/CN105100285A/en
Application granted granted Critical
Publication of CN105100285B publication Critical patent/CN105100285B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/75Indicating network or usage conditions on the user display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Landscapes

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

Abstract

The invention discloses a kind of data download method and devices, are related to network communication technology field.The described method includes: sending the request of downloading new data to server, the data that server returns are received;Judge whether the data of the return can be connected with the data with existing in database;If linking, the data of the return are saved in database, and the display of the data of return label is set to effectively;If divergence, the display label by display existing in database labeled as effective data is all set in vain, and then the data by the return are saved in database, and the display of the data of return label is set to effectively;Wherein, only display can be shown labeled as effective data.In technical solution of the present invention, newest continuous data are only shown, it is continuous data that such user, which sees data, thus solves the problems, such as that user cannot be known in shown data with the presence or absence of layer data.

Description

A kind of data download method and device
Present patent application be the applying date be on December 19th, 2012, application No. is 201210553468.4, it is entitled The divisional application of the Chinese invention patent application of " a kind of data download method and device ".
Technical field
The present invention relates to network communication technology fields, and in particular to a kind of data download method and device.
Background technique
With popularizing for intelligent terminal, client (being referred to as " client " in this application below) is read increasingly More is applied on intelligent terminal.The storage of but its main functional parts --- data and the place of layer data Reason is all that more core, technical difficulty be larger but the inadequate place of optimization all the time.And this is to constitute client to use In the experience of family, a very important component part.
The reading data of client include article, picture, video, " microblogging " etc..During using client, there is one Kind the most universal scene is: user is first in certain time period (when such as noon lunch break) by client downloads reading data, and one As for, client can request about 20 reading data, be saved into database to show.When user has seen one section After time, client is exited, continues the thing of oneself.Then in another period (when such as the dusk six), user is again introduced into visitor Download new reading data in family end, it is however generally that, the considerations of for flow, transmission speed and experience, client will not will be from The reading data of the data (when noon lunch break as previously mentioned) that last downloaded is crossed till now always all it is requested come, during this Server end is possible to there has been hundreds of reading data, therefore client is only for user's request to about newest 20 readings Data.So, the centre for 20 readings (when such as lunch break) that data user with before requests, shape are read in 20 just requested At some reading data for being downloaded to client not yet.These, which are clipped in newest reading data and have, reads data Intermediate " hollow " part is referred to as " layer data ".
A kind of way in the prior art is not consider whether centre has tomography number after having downloaded new reading data According to, directly newly downloaded reading data are inserted into have read data before, and display when all show.This makes Obtaining user can not know between shown data whether there is layer data.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State a kind of data download method and device of problem.
According to one aspect of the present invention, a kind of data download apparatus is provided, which includes: Database Unit, shows Show unit, new data download unit and database maintenance unit;
The new data download unit receives what server returned suitable for sending the request of downloading new data to server Data;
The database maintenance unit, suitable for judging whether the data of the return can have number with Database Unit According to linking, if linking, the data of the return are saved in Database Unit, and by the display mark of the data of the return Note is set to effectively, if divergence, the display label by display existing in Database Unit labeled as effective data is all set To be invalid, then the data by the return are saved in Database Unit, and the display of the data of return label is set It is effective;
The Database Unit, suitable for saving the display label of data and data;
The display unit, the display suitable for showing in the Database Unit are labeled as effective data.
Optionally, the new data download unit is wrapped into the request for the downloading new data that the server is sent Contain: requesting the number of data of downloading and have been downloaded into the mark of the newest data in Database Unit;
The database maintenance unit is further adapted for being less than the request downloading in the item number of the data of the return It is judged as linking when the item number of data, is greater than or equal to the item of the data of the request downloading in the item number of the data of the return It is judged as divergence when number.
Optionally, which further comprises tomography section maintenance unit;
Tomography section maintenance unit, does not hold in the mouth suitable for the data with existing in the data and Database Unit of the return When connecing, tomography corresponding with the layer data of divergence section is stored in the tomography section set safeguarded in Database Unit In.
Optionally, tomography section maintenance unit, the oldest number being further adapted in the data with the return According to mark and the newest data having been downloaded into Database Unit one expression tomography section of mark composition Array, and the array is saved in the array set for indicating tomography section set in Database Unit.
Optionally, the tomography section set in the Database Unit is realized by the array list in JAVA class libraries 's.
Optionally, which further comprises: prompt unit;
The prompt unit, the item number suitable for the data returned in server are 0, are prompted the user with newest in database Data are the latest data on server.
According to another aspect of the present invention, a kind of data download method is provided, this method comprises:
The request of downloading new data is sent to server, receives the data that server returns;
Judge whether the data of the return can be connected with the data with existing in database;
If linking, the data of the return are saved in database, and the display of the data of the return is marked It is set to effectively;
If divergence, the display label by display existing in database labeled as effective data is all set in vain, Then the data by the return are saved in database, and the display of the data of return label is set to effectively;
Wherein, only display can be shown labeled as effective data.
Optionally, include: the number of data of request downloading in the request of the downloading new data, and have been downloaded into database In a newest data mark;
It includes: in the return that whether the data for judging the return can be connected with the data with existing in database The item number of data is judged as linking when being less than the number of data of the request downloading, be greater than in the item number of the data of the return or It is judged as divergence when equal to the number of data for requesting downloading.
Optionally, this method further comprises:
If divergence, tomography corresponding with the layer data of divergence section is also saved in safeguarded tomography section In set.
Optionally, described that tomography corresponding with the layer data of divergence section is saved in safeguarded tomography Interval Set Include: in conjunction
With the mark of the oldest data in the data of the return and newest one had been downloaded into database The array in one expression tomography section of mark composition of data, and the array is saved in the array for indicating tomography section set In set.
Optionally, this method further comprises: the tomography section set is realized using the array list in JAVA class libraries.
Optionally, this method further comprises: if the item number for the data that the server received returns is 0, to user Latest data in prompt database is the latest data on server.
This request that downloading new data is sent to server according to the present invention, receives the data that server returns, sentences Whether the data of the return of breaking can be connected with the data with existing in database, if linking, the data of the return are saved It is set to effectively into database, and by the display of the data of return label, it, will be existing aobvious in database if divergence It is invalid that the display label that indicating is denoted as effective data is all set to, and then the data by the return are saved in database, and The display label of the data of the return is set to effectively, in display, only display can be shown labeled as effective data Technical solution, can every time request new data after judge whether new data and existing data are connected, then when divergence Illustrate that data produce tomography, by being arranged and safeguarding that display label only shows newest continuous data in display, in this way User sees that data are continuous data, wherein layer data is not present, shown data cannot be known by thus solving user In whether there is layer data the problem of.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of data download method according to an embodiment of the invention;
Fig. 2 shows the flow charts of data download method according to an embodiment of the invention;
Fig. 3 shows the data variation schematic diagram of client in data downloading process according to an embodiment of the invention;
Fig. 4 shows a kind of structure chart of data download apparatus according to an embodiment of the invention;
Fig. 5 shows the structure chart of data download apparatus according to an embodiment of the 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 a kind of flow chart of data download method according to an embodiment of the invention.As shown in Figure 1, should Method includes:
Step S110 sends the request of downloading new data to server, receives the data that server returns.
In one embodiment of the invention, include: in the request for the downloading new data which sends The number of data of downloading is requested, and has been downloaded into the mark of the newest data in database.In this way, server end thinks visitor The requested data in family end are until the Data Identification that the current newest data of server end includes into the request Data, and request number of data be the request in the item number for including.Here, what " new " and " old " compared is data Generation time, " new " is the posterior data of generation time, " old " data first for generation time.
Step S120, whether the data for judging that server returns can be connected with the data with existing in database, if it is holding Row step S130 executes step S140 if not.
In one embodiment of the invention, when the item number for the data returned in server is less than the number of data of request downloading It is judged as linking, is judged as when the item number for the data that server returns is greater than or equal to the number of data of request downloading and does not hold in the mouth It connects.This is because the number of data for the request downloading for including in the request for the downloading new data that server end is sent with client, With the result of the foundation for being identified as returned data for the newest data having been downloaded into database.
By taking the mark of data is incremented by successively according to the sequencing of its generation time as an example: client has been downloaded into database In a newest data be identified as 1000,20 data of current request.If received server-side is to the request of client When, the mark of a newest data for server end to 1050, then server can be returned to client and be identified as 1031~ 1050 20 datas, client judge as divergence.If received server-side to client request when, server end A newest data mark to 1015, then server can be returned to client be identified as 1001~1015 15 numbers According to client judges as linking.
The data that server returns are saved in database by step S130, and the display of the data of the return is marked It is set to effectively.Execute step S150.
Step S140, the display label by display existing in database labeled as effective data are all set in vain, so The data that server returns are saved in database afterwards, and the display label for the data that server returns is set to effectively.It holds Row step S150.
Step S150 only shows that the display in database is labeled as effective data.
In technical solution shown in FIG. 1, all judge whether are new data and existing data after each request to new data Linking, then illustrates that data produce tomography when divergence, by being arranged and safeguarding that the display of data marks, and only in display Show newest continuous data, such user sees that data are continuous data, wherein layer data is not present, thus solves User cannot know in shown data the problem of with the presence or absence of layer data.
When method shown in FIG. 1 can also be judged as divergence in the step s 120, further by the tomography with divergence The corresponding tomography section of data is saved in safeguarded tomography section set.Specifically: in the data with server return The mark of an oldest data and the mark for the newest data having been downloaded into database form an expression tomography section Array, and by the array be saved in indicate tomography section set array set in.For example, having been downloaded with client above-mentioned A newest data into database is identified as 1000, and 20 data of current request, received server-side arrives client When request, the mark of a newest data for server end to 1050, server is identified as 1031 to client return~ For 1050 20 datas, the corresponding tomography section of the layer data of the divergence is that array is [1031,1000].Fault zone Between two end-point datas 1000 and 1031 of [1031,1000] do not include in layer data, i.e., corresponding layer data is 1001~1030.
To keep technical solution of the present invention clearer, technical solution of the present invention is further described below.
Fig. 2 shows the flow charts of data download method according to an embodiment of the invention.Fig. 3 is shown according to this hair The data variation schematic diagram of client in the data downloading process of bright one embodiment.Below in conjunction with Fig. 3 to method shown in Fig. 2 It is illustrated, as shown in Fig. 2, the process of new data of client request includes:
Step S202, user end to server send the request of downloading new data.
In one embodiment of the invention, include: in the request for the downloading new data which sends The number of data of downloading is requested, and has been downloaded into the mark of the newest data in database.
Firstly, client need to determination will the number of data of downloading " request ", be such as under normal circumstances 20.In addition, client Hold the mark for the newest data for also needing to obtain in data with existing and (have been downloaded into client database), such as Fig. 3 In lines 310.Above-mentioned " number of data of request downloading " and " mark of the newest data in data with existing " are saved as One variable is spare.Then, client will " number of data of request downloading " and " mark of the newest data in data with existing Know " it is spliced into a URL, the data for requesting downloading to update to server.
Step S204, client receive the data that server returns.
Herein, server can judge a how many piece should be returned according to " mark of the newest data in data with existing " Data, and which data returned.Under normal conditions, " mark of the newest data in data with existing " on the server The form of expression is " request is until the Data Identification " (lines 310 in such as Fig. 3), that is, obtaining the section of the range of data is " mark of a just infinite newest data into data with existing ", formula are as follows: (∞, the newest data in data with existing Mark), do not include data specified by the mark of the newest data in the data with existing in range.Meanwhile " request The number of data of downloading " will also be limited as a kind of condition, i.e., server end " number of data of return " is less than or is equal to The limitation.Finally, the condition of the returned data of server end are as follows: one, the item number of returned data is less than or is equal to " under request The number of data of load ";Two, the range for obtaining data is (∞, the mark of the newest data in data with existing), two conditions at The relationship of "AND".
Whether step S206, the number of data that client judges that server returns are less than or equal to 0, are to then follow the steps S208, it is no to then follow the steps S210.
Step S208, if the number of data that server returns is less than or equal to 0, then it represents that newest number in client That the latest data of server end identifies according to mark, i.e. the data of client be it is newest, server end does not update Data, it is the latest data on server that client, which prompts the user with the latest data in database, no longer need to request, pass Defeated process terminates.
Step S210, if the number of data that server returns is greater than 0, then it represents that server end has than client most New data also wants new data, therefore whether the data for continuing to judge that server returns can hold in the mouth with the data with existing in database It connects, specially judges whether the number of data that server returns is less than the number of data for requesting downloading, be to then follow the steps S212, it is no to then follow the steps S214.
Step S212, if the number of data that server returns is less than the number of data for requesting downloading, then it represents that service The data that device returns can be connected with the data of client local, and the data that server returns are saved in database by client In, and the display label for the data that server this time returns is set to effectively.For example, in one embodiment of the invention, using The SQL statement of one INSERT, which can be realized, is inserted into the data that server returns in database.Terminate process.
Step S214, if the number of data that server returns is greater than or equal to the number of data for requesting downloading, table The data for showing that server returns can not be connected with the data of client local, and there are layer datas, then client will break in this The corresponding tomography section of layer data is saved in safeguarded tomography section set.
In one embodiment of the invention, the oldest data in data that client first returns to server Identification record gets off, and saves as a variable, in the present embodiment, can be described as " oldest one in server returned data The mark of data ", as shown in lines 320 in Fig. 3.Then, client is by " mark of the newest data in data with existing ", As shown in the lines 310 in Fig. 3, a variable is saved as, it is spare.Subsequently, " the Interval Set of tomography is taken out from database Close " (in such as Fig. 3, there is tomography section at two to be respectively labeled as 331 and 332, then the two are exactly " the Interval Set of tomography altogether Close ")." tomography section set " is mainly used to record the range intervals of each tomography, and client all has not yet been downloaded in these tomographies In, but can be requested again to server when client needs.And the purpose for taking out " tomography section set " be will be in the collection New tomography section is added in conjunction.
In one embodiment of the invention, tomography section is realized using the array list ArrayList in JAVA class libraries Set.It and is that tomography section is gathered by SQLite sentence and is taken out specific to the way in Android client.Due to taking Out be Bytes type (also available characters string descriptor tomography section), client can pass through unserializing technology (de- Serialize) namely the readObject method of the ObjectInputStream class of Android, one is converted by the record A ArrayList object.And in ArrayList, each single item is all made of the one-dimension array of Integer, and each array has two A element is respectively intended to indicate two boundaries in the tomography section.Client to do is to by it is previously mentioned " server return Data in an oldest data mark " and " mark of the newest data in data with existing " as tomography section Two boundaries, are respectively filled in the one-dimension array of new Integer, are then added in ArrayList object, finally, Being serialized (serialize) again is a Bytes object namely the ObjectOutputStream of Android ToByteArray () finally, then is stored back in database.So far, tomography section set is by more new tomographies Section, 333 in Fig. 3 be the tomography section newly increased.
Step S216, the display label by display existing in database labeled as effective data are all set in vain.
The value of data existing in client (data segment 311 in such as Fig. 3) display label is changed to 0 from 1 (display) (hiding) will not be shown in the display interface of client with the data with existing section 311 before ensuring tomography 333.Specific practice Are as follows: by a SQL statement, the value of the display label of all data with existing is changed to 0 (hiding) from 1 (display).
Then data that the data that server returns are saved in database, and server is returned by step S218 Display label is set to effectively.
Client can will be inserted into database by those of server end return data 333 before, and be shown The value of label is set to 1 (display).So far, entire transmission process terminates.
From the foregoing, it can be seen that, by being arranged and safeguarding display label, only being shown newest continuous in technical solution of the present invention Data, such user sees that data are continuous data, is furthermore also recorded between fault zone, in this way when user wants to request tomography It, can be according to the corresponding layer data of tomography interval requests of record when data.
Fig. 4 shows a kind of structure chart of data download apparatus according to an embodiment of the invention.As shown in figure 4, should The device 400 of downloading data includes: Database Unit 401, display unit 402, new data download unit 403 and database maintenance Unit 404;
New data download unit 403 receives the number that server returns suitable for sending the request of downloading new data to server According to.In one embodiment of the invention, new data download unit 403 is wrapped into the request for the downloading new data that server is sent It includes: requesting the number of data of downloading, and have been downloaded into the mark of the newest data in database.
Database maintenance unit 404, suitable for judge server return data whether can in Database Unit 401 There is data-linkage, if linking, the data that server returns are saved in Database Unit 401, and server is returned The display label of data is set to effectively, if divergence, display existing in Database Unit 401 is labeled as effective data Display label be all set to invalid, then the data that server returns are saved in Database Unit, and server is returned Data display label be set to effectively.
Database Unit 401, suitable for saving the display label of data and data;
Display unit 402, the display suitable for showing in Database Unit 401 are labeled as effective data.
Device shown in Fig. 4 judges whether new data and existing data are connected after request new data every time, when not holding in the mouth Then illustrate that data produce tomography when connecing, by being arranged and safeguarding that display label only shows newest continuous number in display According to such user sees that data are continuous data, wherein layer data is not present, thus solves user and cannot know and show The problem of whether there is layer data in the data shown.
Fig. 5 shows the structure chart of data download apparatus according to an embodiment of the invention.As shown in figure 5, the downloading The device 500 of data includes: Database Unit 501, display unit 502, new data download unit 503, database maintenance unit 504, tomography section maintenance unit 505 and prompt unit 506.
New data download unit 503 receives the number that server returns suitable for sending the request of downloading new data to server According to.In one embodiment of the invention, new data download unit 503 is wrapped into the request for the downloading new data that server is sent It includes: requesting the number of data of downloading, and have been downloaded into the mark of the newest data in database.
Database maintenance unit 504, suitable for judge server return data whether can in Database Unit 501 There is data-linkage, if linking, the data that server returns are saved in Database Unit 501, and server is returned The display label of data is set to effectively, if divergence, display existing in Database Unit 501 is labeled as effective data Display label be all set to invalid, then the data that server returns are saved in Database Unit, and server is returned Data display label be set to effectively.
Database Unit 501, suitable for saving the display label of data and data;
Display unit 502, the display suitable for showing in Database Unit 501 are labeled as effective data.
In one embodiment of the invention, the downloading new data that new data download unit 503 is sent to server is asked Seek and include: requesting the number of data of downloading and have been downloaded into the mark of the newest data in Database Unit 501.Service The condition of the returned data at device end are as follows: one, returned data number is less than or is equal to the number of data of downloading " request ";Two, it obtains The range for evidence of fetching is (∞ has been downloaded into the mark of the newest data in Database Unit 501), and two conditions are at "AND" Relationship.Then database maintenance unit 504, the item number suitable for the data returned in server are less than the item number of the data of request downloading When be judged as linking, the return data item number be greater than or equal to it is described request downloading data item number when be judged as Divergence.
Tomography section maintenance unit 505, suitable for the data with existing in the data and Database Unit 501 that server returns When divergence, tomography corresponding with the layer data of divergence section is stored in the fault zone safeguarded in Database Unit 501 Between set in.Specifically, the mark for the oldest data in data that the server of tomography section maintenance unit 505 returns The array in tomography section is indicated with the mark composition one for the newest data having been downloaded into Database Unit 501, and will The array is saved in the array set for indicating tomography section set in Database Unit 501.
In one embodiment of the invention, the tomography section set in Database Unit 501 is by JAVA class libraries What array list was realized.
Prompt unit 506, the item number suitable for the data returned in server are 0, are prompted the user with newest in database Data are the latest data on server.
In conclusion device shown in fig. 5, shows label by being arranged and safeguarding, only shows newest continuous data, User sees that data are continuous data in this way, is furthermore also recorded between fault zone, in this way when user wants to request layer data, It can be according to the corresponding layer data of tomography interval requests of record.
It should be understood that
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
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, structure is not been shown in detail 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 features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
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.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) come realize some in data download apparatus according to an embodiment of the present invention or The some or all functions of person's whole component.The present invention is also implemented as one for executing method as described herein Point or whole device or device programs (for example, computer program and computer program product).Such this hair of realization Bright program can store on a computer-readable medium, or may be in the form of one or more signals.It is such Signal can be downloaded from an internet website to obtain, and is perhaps provided on the carrier signal or is provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.

Claims (10)

1.一种数据下载装置,该装置包括:数据库单元、显示单元、新数据下载单元和数据库维护单元;1. A data download device comprising: a database unit, a display unit, a new data download unit and a database maintenance unit; 所述新数据下载单元,适于向服务器发送下载新数据的请求,接收服务器返回的数据;所述新数据下载单元向所述服务器发送的所述下载新数据的请求中包含:请求下载的数据条数和已下载到数据库单元中的最新一条数据的标识;The new data downloading unit is adapted to send a request for downloading new data to the server, and receive data returned by the server; the request for downloading new data sent by the new data downloading unit to the server includes: the data requested to be downloaded The number of pieces and the identifier of the latest piece of data that has been downloaded to the database unit; 所述数据库维护单元,适于判断所述返回的数据是否能与数据库单元中的已有数据衔接,如果衔接,将所述返回的数据保存到数据库单元中,并将所述返回的数据的显示标记置为有效,如果不衔接,将数据库单元中已有的显示标记为有效的数据的显示标记都置为无效,然后将所述返回的数据保存到数据库单元中,并将所述返回的数据的显示标记置为有效;The database maintenance unit is adapted to judge whether the returned data can be connected with the existing data in the database unit, if connected, save the returned data in the database unit, and display the returned data The mark is set to be valid. If it is not connected, the display marks of the data that are marked as valid in the database unit are set to be invalid, and then the returned data is saved in the database unit, and the returned data is set to be invalid. The display flag of is set to be valid; 所述数据库单元,适于保存数据以及数据的显示标记;The database unit is adapted to save data and display marks of the data; 所述显示单元,适于显示所述数据库单元中的显示标记为有效的数据。The display unit is adapted to display the data marked as valid in the database unit. 2.如权利要求1所述的装置,其中,该装置进一步包括断层区间维护单元;2. The apparatus of claim 1, wherein the apparatus further comprises a fault interval maintenance unit; 所述断层区间维护单元,适于在所述返回的数据与数据库单元中的已有数据不衔接时,将与不衔接的断层数据对应的断层区间保存在数据库单元中维护的断层区间集合中。The fault interval maintenance unit is adapted to save the fault interval corresponding to the disconnected fault data in the fault interval set maintained in the database unit when the returned data is not connected with the existing data in the database unit. 3.如权利要求2所述的装置,其中,3. The apparatus of claim 2, wherein, 所述断层区间维护单元,进一步适于用所述返回的数据中的最旧一条数据的标识和所述已下载到数据库单元中的最新一条数据的标识组成一个表示断层区间的数组,并将该数组保存到数据库单元中的表示断层区间集合的数组集合中。The fault interval maintenance unit is further adapted to form an array representing the fault interval with the identifier of the oldest piece of data in the returned data and the identifier of the latest piece of data that has been downloaded into the database unit, and the The array is saved to a collection of arrays representing a collection of fault intervals in the database cell. 4.如权利要求3所述的装置,其中,4. The apparatus of claim 3, wherein, 所述数据库单元中的所述断层区间集合是由JAVA类库中的数组表实现的。The fault interval set in the database unit is realized by the array table in the JAVA class library. 5.如权利要求1-4任一项所述的装置,其中,该装置进一步包括:提示单元;5. The apparatus according to any one of claims 1-4, wherein the apparatus further comprises: a prompting unit; 所述提示单元,适于在服务器返回的数据的条数为0,向用户提示数据库中的最新数据即为服务器上的最新数据。The prompting unit is adapted to indicate to the user that the latest data in the database is the latest data on the server when the number of pieces of data returned by the server is 0. 6.一种数据下载方法,该方法包括:6. A data download method, the method comprising: 向服务器发送下载新数据的请求,接收服务器返回的数据;所述下载新数据的请求中包括:请求下载的数据条数,和已下载到数据库中的最新一条数据的标识;Send a request for downloading new data to the server, and receive the data returned by the server; the request for downloading new data includes: the number of data pieces requested to be downloaded, and the identification of the latest piece of data that has been downloaded into the database; 判断所述返回的数据是否能与数据库中的已有数据衔接;Judging whether the returned data can be connected with the existing data in the database; 如果衔接,将所述返回的数据保存到数据库中,并将所述返回的数据的显示标记置为有效;If connected, save the returned data in the database, and set the display flag of the returned data to be valid; 如果不衔接,将数据库中已有的显示标记为有效的数据的显示标记都置为无效,然后将所述返回的数据保存到数据库中,并将所述返回的数据的显示标记置为有效;If it is not connected, invalidate the display flags of the existing data marked as valid in the database, then save the returned data in the database, and set the display flags of the returned data to be valid; 其中,只有显示标记为有效的数据能够被显示。Of these, only data marked as valid can be displayed. 7.如权利要求6所述的方法,其中,该方法进一步包括:7. The method of claim 6, wherein the method further comprises: 如果不衔接,还将与不衔接的断层数据对应的断层区间保存到所维护的断层区间集合中。If not connected, the fault interval corresponding to the disconnected fault data is also saved into the maintained fault interval set. 8.如权利要求7所述的方法,其中,所述将与不衔接的断层数据对应的断层区间保存到所维护的断层区间集合中包括:8. The method of claim 7, wherein the storing the fault interval corresponding to the disjointed fault data into the maintained fault interval set comprises: 用所述返回的数据中的最旧一条数据的标识和所述已下载到数据库中的最新一条数据的标识组成一个表示断层区间的数组,并将该数组保存到表示断层区间集合的数组集合中。Using the identifier of the oldest piece of data in the returned data and the identifier of the latest piece of data downloaded into the database to form an array representing the fault interval, and saving the array into the array set representing the fault interval set . 9.如权利要求8所述的方法,其中,该方法进一步包括:9. The method of claim 8, wherein the method further comprises: 采用JAVA类库中的数组表来实现所述断层区间集合。The set of fault intervals is implemented by using the array table in the JAVA class library. 10.如权利要求6-9中任一项所述的方法,其中,该方法进一步包括:10. The method of any one of claims 6-9, wherein the method further comprises: 如果接收到的服务器返回的数据的条数为0,向用户提示数据库中的最新数据即为服务器上的最新数据。If the number of pieces of data returned by the server is 0, the user is prompted that the latest data in the database is the latest data on the server.
CN201510560762.1A 2012-12-19 2012-12-19 A kind of data download method and device Expired - Fee Related CN105100285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510560762.1A CN105100285B (en) 2012-12-19 2012-12-19 A kind of data download method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510560762.1A CN105100285B (en) 2012-12-19 2012-12-19 A kind of data download method and device
CN201210553468.4A CN103036992B (en) 2012-12-19 2012-12-19 A data download method and device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201210553468.4A Division CN103036992B (en) 2012-12-19 2012-12-19 A data download method and device

Publications (2)

Publication Number Publication Date
CN105100285A CN105100285A (en) 2015-11-25
CN105100285B true CN105100285B (en) 2019-02-01

Family

ID=48023464

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201210553468.4A Active CN103036992B (en) 2012-12-19 2012-12-19 A data download method and device
CN201510560762.1A Expired - Fee Related CN105100285B (en) 2012-12-19 2012-12-19 A kind of data download method and device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201210553468.4A Active CN103036992B (en) 2012-12-19 2012-12-19 A data download method and device

Country Status (1)

Country Link
CN (2) CN103036992B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9544386B2 (en) * 2012-12-19 2017-01-10 Beijing Qihoo Technology Company Limited Device and method for processing slice data
CN103020245B (en) * 2012-12-19 2015-10-07 北京奇虎科技有限公司 For the method and apparatus of downloading data
CN103036992B (en) * 2012-12-19 2015-10-07 北京奇虎科技有限公司 A data download method and device
CN108960378B (en) * 2018-08-08 2020-05-12 腾讯科技(深圳)有限公司 Data downloading method, system, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1627290A (en) * 2003-12-12 2005-06-15 鸿富锦精密工业(深圳)有限公司 System and method for resuming data download
US7318153B2 (en) * 2001-04-17 2008-01-08 Ntt Communications Corporation Mark information issuing method and system
CN101727505A (en) * 2010-02-03 2010-06-09 中兴通讯股份有限公司 Efficient data processing method and device
CN103036992B (en) * 2012-12-19 2015-10-07 北京奇虎科技有限公司 A data download method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7711844B2 (en) * 2002-08-15 2010-05-04 Washington University Of St. Louis TCP-splitter: reliable packet monitoring methods and apparatus for high speed networks
FR2950499B1 (en) * 2009-09-23 2011-09-09 Peugeot Citroen Automobiles Sa CONTROL DEVICE FOR THE RESETTING OF A RESTART OF AN ELECTRONIC MEMBER OF A COMMUNICATION NETWORK
CN203036992U (en) * 2012-12-13 2013-07-03 合肥美的荣事达电冰箱有限公司 Door tray used for refrigerator and refrigerator provided with same
CN103020245B (en) * 2012-12-19 2015-10-07 北京奇虎科技有限公司 For the method and apparatus of downloading data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7318153B2 (en) * 2001-04-17 2008-01-08 Ntt Communications Corporation Mark information issuing method and system
CN1627290A (en) * 2003-12-12 2005-06-15 鸿富锦精密工业(深圳)有限公司 System and method for resuming data download
CN101727505A (en) * 2010-02-03 2010-06-09 中兴通讯股份有限公司 Efficient data processing method and device
CN103036992B (en) * 2012-12-19 2015-10-07 北京奇虎科技有限公司 A data download method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种智能终端数据共享中的预取缓存技术;杨培勇等;《网络新媒体技术》;20120731;第1卷(第4期);全文

Also Published As

Publication number Publication date
CN105100285A (en) 2015-11-25
CN103036992A (en) 2013-04-10
CN103036992B (en) 2015-10-07

Similar Documents

Publication Publication Date Title
CN105100285B (en) A kind of data download method and device
US8751925B1 (en) Phased generation and delivery of structured documents
CN103763354B (en) The method and device that a kind of data of upgrading are downloaded
WO2017077404A1 (en) Deep linking to mobile application states through programmatic replay of user interface events
US20140310588A1 (en) Managing a display of results of a keyword search on a web page
CN110427225A (en) A kind of method and apparatus starting small routine
CN110515959A (en) Data consistency implementation method, device and readable storage medium storing program for executing
WO2014110009A1 (en) Displaying dynamic content on a map based on user's location and scheduled task
CN110019537A (en) Local cache method for refreshing, device, computer equipment and storage medium
CN109739704A (en) An interface testing method, server and computer-readable storage medium
CN103077186B (en) A kind of layer data treating apparatus and method
CN105630927B (en) Link generation method and apparatus
CN108123970A (en) Method for exhibiting data and relevant apparatus
CN111859077B (en) Data processing method, device, system and computer readable storage medium
CN109190367A (en) Utilize the method and device of sandbox operation application program installation kit
CN103020245B (en) For the method and apparatus of downloading data
CN107590064A (en) A kind of application upgrade method of testing, device and system
CN106371809B (en) Thread processor and thread processing method
CN103064910B (en) The apparatus and method processing layer data for android system
CN103530155A (en) Method and device for installing application program
AU2011223998B2 (en) Treatment controller
CN115756527A (en) Client multi-language file updating method and device, electronic device and storage medium
CN109032654B (en) Method and apparatus for configuring parameters in server, server and storage medium
CN116136772A (en) Buried point data acquisition method and device
CN104536839B (en) Method and apparatus for method invocation between processes

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
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: 20190201

Termination date: 20211219