Background technology
China Mobile has released (the Global System for MobileCommunications with GSM in 2000, global system for mobile communications) WAP (the Wireless Application Protocol that merges of network and Internet network communication, WAP (wireless application protocol)) business, not only having changed can only be with the situation of fixed terminal online, also for having erected an application platform between internet and the mobile communication.Though the development of WAP once was not expected, but through development in recent years, the WAP of China Mobile is professional still with characteristics such as its mobility, flexibility, individualized, information real-time, the brief practicalities of information, for the user provides a plurality of classifications colourful 250 multinomial business such as containing recreation, news, mail, downloads of the tinkle of bells picture, security lottery ticket, fashion information, the study of living.
Along with the increase of free WAP door, the user has read from preliminary reception WAP browser mode and has developed in order to get used to this browsing mode, and the user is stablized in the loyalty that increasing user becomes the WAP browser.
In the process that realizes the embodiment of the invention, the inventor finds that there are the following problems at least in the prior art:
During browsing page, the situation of paging is very common, and all there is the function of paging most of website.But, such as Search Results, the model of forum and tabulation, picture browsing, long article, novel etc., browsed current page, clicking down needs to wait the preceding paragraph time just can open down one page behind one page, and there is the long weak point that has the time, and therefore this situation has increased the time of user's browsing page, caused certain unnecessary waste, user's experience sense is relatively poor.
As Fig. 1 is the example schematic of reading of data in the prior art, when the user has browsed current page, browse again when seeing down one page, the preceding paragraph times such as needs could be under showing on the screen content of one page.Such as, it is longer than opening the literal time spent to open picture from network, as shown in fig. 1, in the process of download pictures from network, the user can only download by cancellation and finish the process of download pictures, if do not cancel download, then can only wait in the process of download pictures, finish up to the picture download, could make full page open.Begin to click next page or leaf from the user and show fully that to following one page this section period has length that weak point is arranged, but for the user, waits for that this section period all is unnecessary time waste.
Occur to wait for this section period be because terminal read follow-up being used to do not shown when being used to show the current page data under the data of one page handle, but after clicking request " following one page " as the user, just can begin to ask next follow-up page data, and ask next page data to need the time.
Summary of the invention
The problem that the embodiment of the invention will solve provides a kind of read method and device of data, the problem that need wait for when solving terminal in the prior art by the network browsing follow-up data, thereby make terminal response quicker, user experience is more coherent.
For achieving the above object, the embodiment of the invention proposes a kind of read method of data, may further comprise the steps:
From network, read current data;
Judge whether described current data exists follow-up data;
If there is described follow-up data, described follow-up data is stored in the buffer memory from described network;
From described buffer memory, read described follow-up data.
The embodiment of the invention has also proposed a kind of read method of data, comprising:
Buffer memory current data from network;
Piecemeal reads described current data, and judges whether described current data exists follow-up data;
If there is described follow-up data in described current data, when showing last blocks of data of described current data, described follow-up data is stored in the buffer memory from described network;
From described buffer memory, read described follow-up data.
The embodiment of the invention has also proposed a kind of reader reading data, comprising:
Read module is used to read current data;
Judge module is used to judge whether the current data that described read module reads exists follow-up data;
Cache module is used for when described judge module judges that there is follow-up data in current data that described read module reads the described follow-up data of buffer memory from network.
The technical scheme of the embodiment of the invention has the following advantages:
Thereby the behavior by predictive user is read to prejudge whether there is follow-up data when being used to show current data by network, if there is follow-up data, and when reading current data, the buffer memory follow-up data.Therefore, reduced the time that need wait for when the user reads follow-up data information in the prior art after having read current data information, thereby made terminal response quicker, user experience is more coherent.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.
In the embodiment of the invention one and two, be example with mobile phone by the network novel that network reads larger capacity, but the terminal of the indication of the embodiment of the invention is not limited only to mobile phone, other similar terminal equipments are also within protection scope of the present invention.
As shown in Figure 2, the read method schematic flow sheet for the data of the embodiment of the invention one specifically may further comprise the steps:
Step S201, from network, read current data.
Terminal request current data, and the content of demonstration current data.
When mobile phone reads first page data,, finish the process of reading directly by network requests first page data and show.
Step S202, judge whether described current data exists follow-up data.
Mobile phone is when showing current data, judges whether to exist follow-up data.
In embodiments of the present invention, mobile phone judges that whether current data exists follow-up data, promptly judges whether to exist second page data when reading first page data.
Step S203, if there is described follow-up data, described follow-up data is stored in the buffer memory from described network.
If there is second page data, then reading in first page, by network requests second page data, and second page data is buffered in the buffer memory equipment of mobile phone.
If there is not follow-up data, then do not initiate request to follow-up data.
Step S202 and step S203 carry out in the described current data of user's read step S201.
Step S204, from described buffer memory, read described follow-up data.
After the user had browsed the shown current page data of mobile phone, when clicking " following one page ", one page data presented got final product under follow-up being used for regard to only need directly reading from buffer memory equipment.Owing to directly from buffer memory equipment, asking and read next page data than from network, asking and reading next page data and save time, therefore, just reduced user's stand-by period, make user's experience more coherent.
Mobile phone is when reading described follow-up data, can continue to carry out above-mentioned steps, judge when reading follow-up data promptly whether follow-up data also exists follow-up data, if also there is follow-up data in follow-up data, then continue buffer memory follow-up data from network, when judging shown content when mobile phone, stop request msg for the last page of this packet.
In embodiments of the present invention; it is unit that mobile phone is not limited only to the page or leaf by each request of network and data in buffer; also can be to be unit with the piece; it is unit that mobile phone shown content on screen also is not limited to the page or leaf; also can be data to be divided into piece show that on screen above-mentioned situation belongs to protection scope of the present invention equally.
As shown in Figure 3, be the read method schematic flow sheet of the data of the embodiment of the invention two.
In embodiments of the present invention, terminal equipment can disposablely pass through the data of some pages of network requests and buffer memorys when reading the packet of larger capacity by network.Be example by the novel that network reads larger capacity now with mobile phone.
The segmentation of the data of the embodiment of the invention two is read in advance and be may further comprise the steps:
Step S301, buffer memory current data from network.
When mobile phone began to read novel, mobile phone passed through the data of some pages of network requests, and these current datas is buffered in the buffer memory equipment of mobile phone.
Mobile phone can show on the screen of mobile phone by some page datas of network requests, also data can be divided into some and show on the screen of mobile phone in paging.
Step S302, piecemeal read described current data, and judge whether described current data exists follow-up data.
Is example with mobile phone by network requests and buffer memory two page datas, after mobile phone stores two page datas into buffer memory, on screen, show first page data earlier, when needs show second page data, directly request second page data and demonstration from buffer memory, judge whether to exist follow-up data simultaneously, promptly whether have the 3rd page and the 4th page data.
Step S303 if there is described follow-up data in described current data, when showing last blocks of data of described current data, stores described follow-up data in the buffer memory into from described network.
If there is third and fourth page data, when mobile phone reads second page data, by third and fourth page data of network requests and be stored in the buffer memory of mobile phone.
In this step, show last blocks of data of described current data, be specially last piece of the current data that shows on the screen of mobile phone, the one page that is not limited only to data shows on the screen of mobile phone.
If there is not follow-up data, then do not initiate request to follow-up data.
Step S304, from described buffer memory, read described follow-up data.
After mobile phone reads second page data and finishes, in the time of need reading the 3rd page data, direct request the 3rd page data and show from buffer memory equipment is after reading the 3rd page data and finishing, in the time of need reading the 4th page data, directly request the 4th page data and demonstration from buffer memory.
Mobile phone is when reading described follow-up data, can continue to carry out above-mentioned steps, judge when reading follow-up data promptly whether follow-up data also has follow-up data, if also there is follow-up data in follow-up data, then continue buffer memory and read follow-up data, when judging shown content when mobile phone, stop request msg for the last page of this packet.
It is example that continuation is read novel with mobile phone, when mobile phone reads the 4th page data, judge whether to exist the 5th, six follow-up page datas, if exist, then proceed request, buffer memory and read, when going out shown content when terminal judges, just stop to ask to read for the last page of this packet.If when judging this packet and having only one page at last, i.e. request, buffer memory and the data content that reads only are a page data.
In embodiments of the present invention; each request of mobile phone and data in buffer are not limited only to two pages; also can be the data of other numbers of pages; it is unit that each request and data in buffer also are not limited only to the page or leaf; also can be to be unit with the piece; it is unit that mobile phone shown content on screen also is not limited to the page or leaf, also can be data to be divided into piece show on screen, and above-mentioned situation belongs to protection scope of the present invention equally.
As shown in Figure 4, be the reader reading data structural representation of the embodiment of the invention.Described reading device comprises:
Read module 41 is used to read current data;
Judge module 42 is used to judge whether the current data that described read module 41 reads exists follow-up data;
Cache module 43 is used for when there is follow-up data in the current data that the described read module 41 of described judge module 42 judgements reads the described follow-up data of buffer memory from network.
Further, described read module 41 comprises:
Network reading submodule 411 is used for reading described current data from described network;
Buffer memory reading submodule 412 is used for reading described follow-up data from described cache module 43.
Described read module 41 when reading of data, if the data that read have surpassed the heap(ed) capacity that device once can show, has just embodied the characteristics of piecemeal demonstration or Pagination Display.
Described judge module 42; when judging whether current data that described read module 41 reads exists follow-up data; be not limited to judge whether current data exists one page or a follow-up data; also can be some pages or leaves or some follow-up data, above-mentioned situation belongs to protection scope of the present invention equally.
Described cache module 43 when the buffer memory follow-up data, when also being not limited to a follow-up one page of buffer memory or a blocks of data, also can be a some pages or leaves or some follow-up data, and above-mentioned situation belongs to protection scope of the present invention equally.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.