[embodiment]
In order to make full use of Internet resources, by data download when connecting idle or more remaining bandwidth is arranged and be stored in this locality, when in the process that the user uses, needing to use these data, can read these data fast, make full use of idle or remaining Internet resources, obviously accelerate the speed of access to netwoks, improve user's experience.
As shown in Figure 1, a kind of acquisition methods of network data may further comprise the steps:
Step S110 sets up network and connects.Connect by the main frame on wired or wireless mode and the corresponding network, for example, when carrying out web page access, connect with page server; When carrying out game on line, connect with the corresponding game server.
Step S120 detects the network connection state.The network connection state can comprise one or more in the following information: whether network connection type, connection bandwidth, idle bandwidth, network connect occupied.Wherein, network connection type can be GPRS, 3G, cable LAN, WLAN (wireless local area network).For example, the detection of cell phone network connection type can be by mobile phone request correspondence the IP section of IP address correspondence, inquire corresponding network environment from the corresponding relation of the network segment mapping table of networks such as GPRS or WLAN (wireless local area network), can also pass through cell phone platform (for example system such as symbian, windows mobile, android) API (ApplicationProgramming Interface, application programming interface) and obtain the network environment of current use.Connecting bandwidth and can be the high bandwidth of theory, as 10Mbps, 100Mbps, also can be actual connection speed, as the actual test speed that is connected with certain server.Idle bandwidth is meant that the connecting band reductions goes occupied bandwidth.Whether network connects whether occupied being meant has the use of application network to connect.
Step S130 judges whether the network connection state satisfies predetermined condition.Predetermined condition can be set as required, for example, predetermined condition is made as in the following condition one or more: network connection type is that predefined type or connecting band are wider than and predeterminedly connect bandwidth or idle bandwidth is unoccupied greater than predetermined idle bandwidth or network connection.
Step S140, the backstage is downloaded the required data of the related level of current application automatically and is saved in this locality if the network connection state satisfies predetermined condition.For portable mobile termianl, the predefined type of network connection type can be defined as WLAN (wireless local area network) or 3G, that is to say, have only when network connection type be that WLAN (wireless local area network) or 3G just download automatically, and when network connection type is GPRS, do not download automatically.In other embodiments, also predetermined condition can be made as idle bandwidth and just allow to download automatically greater than the predetermined idle bandwidth of 50kbps, perhaps predetermined condition is made as and only connect unoccupiedly at network, promptly the free time gets off just to allow to download automatically fully.The required data of the related level of current application can change the required data of other functions over to or enter the required data of other scene of game from current scene of game for the page data of current web page page link or from current function.For example, after the user opens the homepage of certain website,, then obtain the link in the homepage, and download the page that link is pointed in the homepage if the network connection state satisfies predetermined condition; And for example, in the recreation that a plurality of scenes are arranged, when the user plays in some scenes,, then download the required data of other scenes that current scene of game can directly enter automatically on the backstage if the network connection state satisfies predetermined condition.
In a preferred embodiment, if the required data of the related level of current application are a lot, the best priority level of preset data is then determined the order of downloading automatically according to default priority.Priority can be determined according to the importance of each level in the related level of user's hobby, historical record or current application.For example be provided with hobby physical culture in user's the personal settings, then when the page of download link sensing automatically, have the page of the link sensing of " physical culture ", " football " or printed words such as " NBA " in the preferential download link literal, or have the page of the link sensing of " sports " in the preferential download URL.
In a preferred embodiment, detecting the network connection state among the step S120 is regularly to carry out, if the network connection state no longer satisfies predetermined condition in the automatic process of downloading in backstage, then further comprise the step of judging whether the automatic download function in backstage opens, if the automatic download function in backstage is opened, then close and return the step that detects the network connection state after the automatic download function in backstage; If the automatic download function in backstage is closed, then return the step that detects the network connection state.Close the automatic download function in backstage when not satisfying predetermined condition, it is too crowded to avoid network to connect, and required network speed impacts during to normal use.
In the acquisition methods of above-mentioned network data, by judging whether the network connection state satisfies predetermined condition, if satisfy predetermined condition, for example be during by high speed network insertion the Internets such as WLAN (wireless local area network) or 3G, download the required data of the related level of current application and be saved in this locality, because these data of downloading are data of related level, the user uses these data possibly, for example, the user is after opening certain page, automatically download the page that link is pointed in this page by the backstage, when user clicks on links, can read the page data of having downloaded fast, make full use of idle or remaining Internet resources, obviously accelerate the speed of access to netwoks, improve user's experience.
Further, as shown in Figure 2, it is the flow chart of acquisition methods when customer access network of network data among the embodiment:
Step S210 receives network access request.Receive the network access request of user, for example key in web page address, click certain client that links, starts online game, enter certain function interface of certain network software etc. by inputs such as keyboard or touch screen.
Step S220 judges local data of whether preserving request by automatic download.Whether store the data of this network access request of user of downloading by step S140 by inquiry judging this locality.
Step S230 is if the local data that request is arranged then read local data and enter step S240.If the local data that do not have request then directly enter step S250.
Step S240 judges whether local data is complete, if complete, then finishes operation this time.If imperfect, then enter step S250.
Step S250, the data of download request.In preferred embodiment, download automatically on the backstage of suspending among the execution in step S140 during data of download request, for the data of download request are stopped enough bandwidth.In other embodiments, if bandwidth is enough, also download automatically on the backstage that can not suspend among the execution in step S140.
Step S260 judges whether the required data of current task are downloaded to finish, and finishes if download, and then can give the user with data display, otherwise returns the data that step S250 continues download request.
The acquisition methods of above-mentioned network data is specially adapted to portable mobile termianl, for example equipment such as mobile phone, palmtop PC, notebook computer.When the portable mobile termianl user under network connection state preferably during (as radio local network environment) accesses network, the network connection state satisfies predetermined condition easily, can download the required data of the related level of current application automatically in the backstage, make full use of preferable network environment.When customer location changes, its preferably network environment may be converted to slower network environment (as the GPRS environment), this moment, the user was when obtaining data again, because required data are downloaded, can improve the speed of obtaining data greatly, the content that the user is required presents fast.
In further improved embodiment, the acquisition methods of above-mentioned network data also comprises closes the automatic download function in backstage and deletes the step that is saved in local data by automatic download when withdrawing from current application.Deletion is saved in local data by automatic download, can save memory space, improves system performance.
As shown in Figure 3, also provide a kind of system that obtains of network data, comprised the memory module and the input module of the network connecting module setting up network and connect, processing module, store local data.
If processing module comprises the detecting unit of the detection network connection state that connects with described network connecting module, link to each other with described detecting unit and judge according to the testing result of described detecting unit judging unit that whether the network connection state satisfies predetermined condition reaches and link to each other with described judging unit that the network connection state satisfies predetermined condition then the required data of the related level of current application are downloaded on the backstage automatically and be saved in the download unit of described memory module.Described predetermined condition is that network connection type is that predefined type or network speed connect unoccupied greater than predetermined speed or idle bandwidth greater than bandwidth or network.For portable mobile termianl, described network connecting module is the wireless network link block, and described predefined type is WLAN (wireless local area network) or 3G.The required data of the related level of described current application are the page data of current web page page link or change the required data of other functions over to or enter the required data of other scene of game from current scene of game from current function.
Described input module is used for the fan-in network access request, described processing module also comprises control unit, described control unit links to each other with described input module and memory module, judge according to described network access request whether described memory module stores the data of the request of preserving by automatic download, if described memory module stores the data of request, then read the data of the request of storing in the memory module; If described memory module is not stored the data of request, then instruct the data of described download unit download request.
In a preferred embodiment, described control unit is used for also when memory module stores the data of request judging whether the data of request of storage are complete, if imperfect, then instructs the data of described download unit download request.
Deletion was saved in the data of memory module when in a preferred embodiment, described control unit also was used to withdraw from current application by automatic download.Deletion is saved in local data by automatic download, can save memory space, improves system performance.
In a preferred embodiment, described detecting unit regularly detects the network connection state, described judging unit also is used for further not judging whether the automatic download function in backstage opens when the network connection state does not satisfy predetermined condition, if the automatic download function in backstage is opened, then instruct described download unit to close the automatic download function in backstage.Close the automatic download function in backstage when not satisfying predetermined condition, it is too crowded to avoid network to connect, and required network speed impacts during to normal use.
In a preferred embodiment, described processing module also comprises dispensing unit, described download unit is determined the order of download automatically according to priority default in the described dispensing unit, and described priority is determined according to the importance of each level in the related level of user's hobby, historical record or current application.Priority default in the dispensing unit can be passed through the input module input instruction to control unit by the user, is changed by control unit; Also can directly change by input module to dispensing unit; Can also be changed automatically according to user's historical record by control unit, for example the user often browses the information of automotive-type, and then when the page of download link sensing automatically, preferential download has the page of automotive-type information.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.