Summary of the invention
In view of the above problems, the present invention is proposed to provide a kind of overcoming the problems referred to above or the application file method for down loading solved the problem at least in part and corresponding application file download apparatus.
According to one aspect of the present invention, provide a kind of application file method for down loading, comprising:
The application file that the file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded, described file server is for providing the server of application file download service to described terminal;
According to described terminal, the behavior that described application file is downloaded, accesses, creates or upgraded is screened the application file of buffer memory in described internal memory;
Receive the download request of the application programs file that described terminal is sent by described Intranet;
The application file that the request of extracting is downloaded in the internal memory of described file server returns to described terminal.
Alternatively, describedly in the internal memory of file server, extract the step that application file returns to terminal comprise:
Search in the internal memory of described file server and whether there is described application file;
If there is described application file, then extract described application file and return to described terminal;
If there is not described application file, then in the local disk of described file server, extract described application file return to described terminal, and described application file is buffered in the internal memory of described file server.
Alternatively, the described behavior carrying out downloading, access, create or upgrading according to terminal application programs file comprises the step that the application file of buffer memory in internal memory screens:
The application file that number of times that described terminal request downloads described application file does not meet preset range is deleted from described internal memory.
Alternatively, the step that the described number of times deleting terminal request down load application program file from internal memory does not meet the application file of preset range comprises:
Detect the download time of each application file in described internal memory;
If described download time exceeds apart from the difference of current time the expiration-time value arranged for described application file, the number of times then described application file being downloaded described application file as request in the first preset time period is the application file of zero, and described application file is deleted in described internal memory, wherein, to be described file server return to described terminal the time that time of described application file or described file server receive the download request to described application file described download time.
Alternatively, the step that the described number of times deleting terminal request down load application program file from internal memory does not meet the application file of preset range comprises:
For each application file in internal memory, add up the number of times that described terminal asks to download described application file in the second preset time period;
The number of times deleting statistics from described internal memory is less than the application file of preset value.
Alternatively, in the internal memory of described file server, preset configuration file, in described configuration file, preserve the expired time arranged for described application file.
Alternatively, described method also comprises:
The application file preserved in internal memory to described file server upgrades.
Alternatively, described application file carries file index information, and described index information comprises the filemodetime generated according to the time upgrading described application file;
Described the step that the application file preserved in the internal memory of file server upgrades to be comprised:
The filemodetime entrained by the application file preserved in described local disk is detected according to predeterminated frequency;
If the modification time detected is later than the filemodetime entrained by application file preserved in described internal memory, then according to the application file preserved in described local disk, the application file preserved in described internal memory is upgraded.
Alternatively, described method also comprises:
When the application file preserved in the internal memory to described file server upgrades, if receive the download request of described terminal to described application file, then return the failed information of request to described terminal or do not respond described download request.
Alternatively, the step of application file that the described file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded comprises:
Check the current capacities of the internal memory of described file server;
The size of the capacity of described internal memory and described application file is compared;
If described memory size is greater than the size of described application file, then described application file is buffered in the internal memory of file server.
Alternatively, the described step extracting application file in the local disk of file server comprises:
Search in the local disk of described file server and whether there is described application file;
If there is described application file, then in the local disk of described file server, extract described application file;
If there is not described application file, then pass through outer net further to application file described in external network server acquisition request, and the described application file obtained from external network server is kept in the local disk of described file server.
Alternatively, described method also comprises:
From external network server, obtain the application file of renewal, and the application file preserved in described file server local disk is upgraded.
Alternatively, described file index information also comprises the storing path of described application file in the local disk of described file server, and the size of described application file.
Alternatively, the communication between described file server and described terminal is based on hypertext transfer protocol.
According to another aspect of the present invention, additionally provide a kind of application file download apparatus, comprising:
Cache module, for the application file that the file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded, described file server is for providing the server of application file download service to described terminal;
Screening module, for screening the application file of buffer memory in described internal memory the behavior that described application file is downloaded, accesses, creates or upgraded according to described terminal;
Request receiving module, for receiving the download request of the application programs file that described terminal is sent by described Intranet;
Extraction module, the application file downloaded for the request of extracting in the internal memory of described file server returns to described terminal.
Alternatively, described extraction module comprises:
Whether ff submodule, exist described application file for searching in the internal memory of described file server;
First returns submodule, if for there is described application file, then extracts described application file and returns to described terminal;
Second returns submodule, if for there is not described application file, then in the local disk of described file server, extracts described application file return to described terminal;
File cache submodule, for being buffered in described application file in the internal memory of described file server.
Alternatively, described screening module, the number of times downloading described application file specifically for deleting described terminal request from described internal memory does not meet the application file of preset range.
Alternatively, described screening module comprises:
Very first time detection sub-module, for detecting the download time of each application file in described internal memory;
First deletes submodule, if exceed apart from the difference of current time the expiration-time value arranged for described application file for described download time, the number of times then described application file being downloaded described application file as request in the first preset time period is the application file of zero, and described application file is deleted in described internal memory, wherein, described download time, to be described file server returned to described terminal the time that time of described application file or described file server receive the download request to described application file.
Alternatively, described screening module comprises:
Number of times statistics submodule, for for each application file in internal memory, adds up the number of times that described terminal asks to download described application file in the second preset time period;
Second deletes submodule, and the number of times for deleting statistics from described internal memory is less than the application file of preset value.
Alternatively, in the internal memory of described file server, preset configuration file, in described configuration file, preserve the expired time arranged for described application file.
Alternatively, described device also comprises:
Memory file update module, upgrades for the application file preserved in the internal memory to described file server.
Alternatively, described application file carries file index information, and described index information comprises the filemodetime generated according to the time upgrading described application file;
Described memory file update module comprises:
Second time detecting submodule, for detecting the filemodetime entrained by the application file preserved in described local disk according to predeterminated frequency;
File update submodule, if the modification time for detecting is later than the filemodetime entrained by application file preserved in described internal memory, then according to the application file preserved in described local disk, the application file preserved in described internal memory is upgraded.
Alternatively, described device also comprises:
Respond module, when application file for preserving in the internal memory to described file server upgrades, if receive the download request of described terminal to described application file, then return the failed information of request to described terminal or do not respond described download request.
Alternatively, described cache module comprises:
Capacity check submodule, for checking the current capacities of the internal memory of described file server;
Capacity comparison sub-module, for comparing the size of the capacity of described internal memory and described application file;
File cache submodule, if the size being greater than described application file for described memory size, is then buffered in described application file in the internal memory of file server.
Alternatively, described second return submodule and comprise:
Subelement searched by disk, whether there is described application file for searching in the local disk of described file server;
Disk extracts subelement, if for there is described application file, then in the local disk of described file server, extracts described application file;
Outer net file acquisition subelement, if for there is not described application file, then passes through outer net further to application file described in external network server acquisition request;
Subelement preserved by outer net file, for being kept in the local disk of described file server by the described application file obtained from external network server.
Alternatively, described device also comprises:
Disk file update module, for obtaining the application file of renewal from external network server, and upgrades the application file preserved in described file server local disk.
Alternatively, described file index information also comprises the storing path of described application file in the local disk of described file server, and the size of described application file.
Alternatively, the communication between described file server and described terminal is based on hypertext transfer protocol.
According to the embodiment of the present invention, terminal is buffered in internal memory by the application file that Intranet request is downloaded by file server, and screen according to the download of terminal application programs file, access, the behavior such as establishment or renewal, after the request receiving terminal transmission, directly from internal memory, extract application file, owing to being far longer than the access speed to disk to the access speed of internal memory, therefore the download efficiency of file server can be improved, and the access that can reduce disk, extend the life-span of disk, improve the performance of server.Owing to screening the file in internal memory, thus application files maximum for terminal operation is preferentially placed in internal memory, and constantly adjusts in the operation that different times follows terminal always, further increase the download efficiency to active file.
According to the embodiment of the present invention, can also to making regular check on document change, so the promptness of the content of file can be ensured.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of specification, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
The embodiment of the present invention can be applied to computer system/server, and it can operate with other universal or special computing system environment numerous or together with configuring.The example of the well-known computing system being suitable for using together with computer system/server, environment and/or configuration includes but not limited to: personal computer system, server computer system, thin client, thick client computer, hand-held or laptop devices, the system based on microprocessor, Set Top Box, programmable consumer electronics, NetPC Network PC, little type Ji calculate machine Xi Tong ﹑ large computer system and comprise the distributed cloud computing technology environment of above-mentioned any system, etc.
Computer system/server can describe under the general linguistic context of the computer system executable instruction (such as program module) performed by computer system.Usually, program module can comprise routine, program, target program, assembly, logic, data structure etc., and they perform specific task or realize specific abstract data type.Computer system/server can be implemented in distributed cloud computing environment, and in distributed cloud computing environment, task is performed by the remote processing devices by communication network links.In distributed cloud computing environment, program module can be positioned at and comprise on the Local or Remote computing system storage medium of memory device.
With reference to figure 1, show the method flow diagram that application file is according to an embodiment of the invention downloaded, described method specifically can comprise:
The application file that step 101, the file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded, described file server is for providing the server of application file download service to described terminal.
In the embodiment of the present invention, file server belongs to a part for privately owned cloud security system, is located in same Intranet with end-frame, and terminal can access file server by connecting Intranet.
The file of multiple application program is kept at local disk by file server, to provide the download service of application programs file to terminal, terminal can send the acquisition request of application programs file to file server, file server receives the application file that the backward terminal of request returns request.
This application file, after first time receives the request of terminal, can be buffered in the internal memory of file server by file server.
Concrete, the step of the application file that the described file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded comprises:
Sub-step S11, check the current capacities of the internal memory of described file server;
Sub-step S12, the size of the capacity of described internal memory and described application file to be compared;
If the described memory size of sub-step S13 is greater than the size of described application file, then described application file is buffered in the internal memory of file server.
When application file is kept in internal memory, whether first check in internal memory has capacity can deposit this application file, by checking the current capacities of internal memory, and the size of current capacities and application file is compared, if memory size is greater than the size of application file, then application file can be kept in internal memory.
Step 102, according to described terminal, the behavior that described application file is downloaded, accesses, creates or upgraded to be screened the application file of buffer memory in described internal memory.
File server is after being cached to internal memory by application file, can also screen by application programs file, specifically, operation behavior according to terminal application programs file is screened, the operation behavior of terminal application programs file can comprise terminal can download behavior from this application file to file server requests, the behavior can be known by file server, terminal can also be comprised in this application program of its local IP access or create the behavior that this application program and application programs carry out upgrading, the behavior can be known by terminal itself and report file server, in concrete realization, other operation behaviors of terminal application programs file can also be comprised.
In the embodiment of the present invention, preferably, the described behavior carrying out downloading, access, create or upgrading according to terminal application programs file comprises the step that the application file of buffer memory in internal memory screens:
Sub-step S21, from described internal memory, delete the application file that number of times that described terminal request downloads described application file does not meet preset range.
According to the download behavior of terminal application programs file to when in internal memory, the application program of buffer memory is screened, the download behavior of terminal application programs file can be recorded, download time is not met to the application file of preset range, be considered as downloading the less and application file be of little use, it can be deleted from internal memory, thus make expired not have access application file deleted, automatically adjust that storage the most often uses.
In one preferred embodiment of the invention, the step that the described number of times deleting terminal request down load application program file from internal memory does not meet the application file of preset range can comprise:
Sub-step S21-1, detect download time of each application file in described internal memory.
If sub-step S21-2 described download time exceeds apart from the difference of current time the expiration-time value arranged for described application file, the number of times then described application file being downloaded described application file as request in the first preset time period is the application file of zero, and described application file is deleted in described internal memory, wherein, to be described file server return to described terminal the time that time of described application file or described file server receive the download request to described application file described download time.
Application file has corresponding download time, and download time is for file server to return time of application file to terminal, or file server receives the time of the download request of application programs file.
The application file that the download time distance current time of application file is distant can be considered as searching the less application file of download time, specifically, an expiration-time value is set, from expiration-time value to current time as being the first preset time period, application file download time in the first preset time period is 0, be equivalent to this application file download time distance present time difference beyond expiration-time value.
Its time of downloading for the last time can be found in the attribute or mark of each application file, detect this download time, and calculate the difference of distance current time, if difference exceeds default expiration-time value, to be then download time be 0 application file.
In another preferred embodiment of the invention, the step that the described number of times deleting terminal request down load application program file from internal memory does not meet the application file of preset range can comprise:
Sub-step S21-3, for each application file in internal memory, add up described terminal and ask to download the number of times of described application file in the second preset time period.
Sub-step S21-4, the number of times deleting statistics from described internal memory are less than the application file of preset value.
During terminal downloads application file, file server can to being downloaded into line item at every turn, when each application file screens in internal memory, statistics is in the second preset time period, terminal is to the download time of certain application file, for number of times be less than preset value to be considered as download time less, can delete.
In concrete realization, preset range can also be after the sequence from big to small of download time in preset time period, sequence is greater than certain ranking or certain ratio value, such as, before download time is greater than in sequence from big to small 50 or front 50%, do not meet this scope be considered as download less application file.
Preferably, in the internal memory of described file server, preset configuration file, in described configuration file, preserve the expired time arranged for described application file.The expired time that can arrange for each application file can be kept in profile, searches expired time by configuration file, when file is not made work within the time of specifying, then can be discharged.
Step 103, receive the download request of the application programs file that described terminal is sent by described Intranet.
Step 104, the application file that the request of extracting is downloaded in the internal memory of described file server return to described terminal.
Terminal can by connecting Intranet, and to file server requests down load application program file, after file server receives request, the application file downloaded from the request of extracting of internal memory transverse and longitudinal also returns.
Preferably, describedly in the internal memory of file server, extract the step that application file returns to terminal comprise:
Sub-step S31, in the internal memory of described file server, search whether there is described application file.
If sub-step S32 exists described application file, then extract described application file and return to described terminal.
If sub-step S33 does not exist described application file, then in the local disk of described file server, extract described application file return to described terminal, and described application file is buffered in the internal memory of described file server.
Application file is preserved and is all kept in the local disk of file server, application file requested in the past has then been kept in the internal memory of file server, when extracting the application file of request, first can search the application file that whether there is request from internal memory, if exist, then directly extract in internal memory and return, if do not exist, from disk, extract this application file and return, due to this application file requested mistake, can be buffered in the internal memory of file server, so that directly read from internal memory during request next time.
Owing to being far longer than the access speed to disk to the access speed of internal memory, therefore, the download efficiency of file server can be improved according to the embodiment of the present invention, and the access to disk can be reduced, extend the life-span of disk, improve the performance of server.Owing to being screened by the file in step 102 pair internal memory, thus application files maximum for terminal operation is preferentially placed in internal memory, and adjusts according to the operational circumstances of terminal, further increase the download efficiency to active file.
Further preferably, the described step extracting application file in the local disk of file server comprises:
Sub-step S33-1, in the local disk of described file server, search whether there is described application file;
If sub-step S33-2 exists described application file, then in the local disk of described file server, extract described application file;
If there is not described application file in sub-step S33-3, then pass through outer net further to application file described in external network server acquisition request, and the described application file obtained from external network server is kept in the local disk of described file server.
File server is when searching application file from local disk, this application file is there is if local, can extracting directly return to terminal, if there is not this application file, then can connect external the Internet further, namely connect outside publicly-owned cloud security system, download this application file further.
File server described in the embodiment of the present invention can be the file server based on http protocol (hypertext transfer protocol, HTTP-Hypertext transfer protocol).Communication between described file server and described terminal is based on hypertext transfer protocol.
With reference to figure 2, show application file method for down loading flow chart in accordance with another embodiment of the present invention, described method specifically can comprise:
The application file that step 201, the file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded, described file server is for providing the server of application file download service to described terminal.
Step 202, according to described terminal, the behavior that described application file is downloaded, accesses, creates or upgraded to be screened the application file of buffer memory in described internal memory.
Step 203, receive the download request of the application programs file that described terminal is sent by described Intranet.
Step 204, in the internal memory of described file server, search whether there is described application file;
If step 205 exists described application file, then extract described application file and return to described terminal;
If step 206 does not exist described application file, then in the local disk of described file server, extract described application file return to described terminal, and described application file is buffered in the internal memory of described file server.
In the embodiment of the present invention, can also comprise further, the application file preserved in the internal memory to described file server upgrades.
In the present embodiment, the file preserved in internal memory can also be upgraded, specifically, described application file carries file index information, described index information comprises the filemodetime generated according to the time upgrading described application file, describedly can comprise the step that the application file preserved in the internal memory of file server upgrades:
Sub-step S41, detect the filemodetime entrained by application file preserved in described local disk according to predeterminated frequency.
If the modification time that sub-step S43 detects is later than the filemodetime entrained by application file preserved in described internal memory, then according to the application file preserved in described local disk, the application file preserved in described internal memory is upgraded.
Whether application file may have renewal, and file update, in local disk, needs to upgrade accordingly in internal memory further, can be up-to-date according to the file in the frequency detecting internal memory preset.
Concrete, application file carries file index information, comprising the filemodetime of application file, filemodetime was generated by the time upgraded, when upgrading application program, this filemodetime is namely along with update time changes, the filemodetime of the application file preserved according to the frequency detecting local disk preset, and contrast with the filemodetime entrained by the application file preserved in internal memory, if the filemodetime entrained by the application file preserved in the local disk detected is later than the corresponding modification time in internal memory, then need to upgrade the corresponding application file preserved in internal memory according to the application file preserved in local disk.
In concrete realization, can set up a periodic detection thread, the change of periodic detection application file, upgrades file in time.
In the embodiment of the present invention, can also comprise further, when the application file preserved in the internal memory to described file server upgrades, if receive the download request of described terminal to described application file, then return the failed information of request to described terminal or do not respond described download request.
When application programs file upgrades, the download request to this file may be received, if any download request, can feedback request failure information or do not respond the information of described download request, can also and before having upgraded, do not processing new request, after all requests are released, load new file content.
In the embodiment of the present invention, preferably, described file index information also comprises the storing path of described application file in the local disk of described file server, when upgrading the application file in internal memory, can according to the path in file index information, fast finding is to the corresponding file in disk, described file index information can also comprise the size of described application file, during with this file of buffer memory in internal memory, can compare to file size and memory size fast, improve the speed of buffer memory.
In the embodiment of the present invention, can also comprise further, from external network server, obtain the application file of renewal, and the application file preserved in described file server local disk is upgraded.
Generally can preserve up-to-date application file in outer net, the application file that local disk is preserved can upgrade according to the file of outer net.
Below the embodiment of the present invention and existing cache way are compared.
In existing caching mechanism, due to the complexity of the http protocol that HTTP file server adopts, the http server of outer net all adopts relatively more conservative and simple mode in buffer memory support, as Apache HTTP Server(is called for short Apache Server), the applied environment of each terminal of serving due to external network server differs greatly, not obvious focus tendency, so by the file cache of assigned catalogue or specified type in internal memory, the whole regular update of file, or proactive notification memory refreshing during file generation change, so, cache file in internal memory can not change always, and in Intranet, generally have relatively more conventional program, and may in a period of time certain application program relatively more conventional, and another a period of time commonly uses Another application program, the mechanism of Apache frequently can not be screened program according to the use of user, and environment that is inapplicable and Intranet.
And the method for the foundation embodiment of the present invention, operation behavior according to terminal application programs file is screened the file in internal memory, thus application files maximum for terminal operation is preferentially placed in internal memory, and the operation of following terminal at different times constantly adjusts always, further increase the download efficiency to active file.And, the embodiment of the present invention is when upgrading file, adopt the mode of pressing predeterminated frequency regular update, useless renewal is decreased compared to the mode of update all, decrease the consumption of resource during renewal, compared to the mode of proactive notification memory refreshing, decrease the number of times of renewal, avoid taking resource for a long time when upgrading.
In sum, according to the embodiment of the present invention, terminal is buffered in internal memory by the application file that Intranet request is downloaded by file server, and according to the download of terminal application programs file, access, the behaviors such as establishment or renewal are screened, after the request receiving terminal transmission, directly from internal memory, extract application file, owing to being far longer than the access speed to disk to the access speed of internal memory, therefore the download efficiency of file server can be improved, and the access that can reduce disk, extend the life-span of disk, improve the performance of server.Owing to screening the file in internal memory, thus application files maximum for terminal operation is preferentially placed in internal memory, and constantly adjusts in the operation that different times follows terminal always, further increase the download efficiency to active file.
According to the embodiment of the present invention, can also to making regular check on document change, so the promptness of the content of file can be ensured.
It should be noted that, for aforesaid embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and involved action might not be essential to the invention.
With reference to figure 3, show application file download apparatus structured flowchart according to an embodiment of the invention, described device specifically can comprise:
Cache module 301, for the application file that the file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded, described file server is for providing the server of application file download service to described terminal;
Screening module 302, for screening the application file of buffer memory in described internal memory the behavior that described application file is downloaded, accesses, creates or upgraded according to described terminal;
Request receiving module 303, for receiving the download request of the application programs file that described terminal is sent by described Intranet;
Extraction module 304, the application file downloaded for the request of extracting in the internal memory of described file server returns to described terminal.
In the embodiment of the present invention, preferably, described extraction module comprises:
Whether ff submodule, exist described application file for searching in the internal memory of described file server;
First returns submodule, if for there is described application file, then extracts described application file and returns to described terminal;
Second returns submodule, if for there is not described application file, then in the local disk of described file server, extracts described application file return to described terminal;
File cache submodule, for being buffered in described application file in the internal memory of described file server.
In the embodiment of the present invention, preferably, described screening module, the number of times downloading described application file specifically for deleting described terminal request from described internal memory does not meet the application file of preset range.
In a kind of preferred exemplary of the embodiment of the present invention, preferably, described screening module comprises:
Very first time detection sub-module, for detecting the download time of each application file in described internal memory;
First deletes submodule, if exceed apart from the difference of current time the expiration-time value arranged for described application file for described download time, the number of times then described application file being downloaded described application file as request in the first preset time period is the application file of zero, and described application file is deleted in described internal memory, wherein, described download time, to be described file server returned to described terminal the time that time of described application file or described file server receive the download request to described application file.
In the another kind of preferred exemplary of the embodiment of the present invention, preferably, described screening module comprises:
Number of times statistics submodule, for for each application file in internal memory, adds up the number of times that described terminal asks to download described application file in the second preset time period;
Second deletes submodule, and the number of times for deleting statistics from described internal memory is less than the application file of preset value.
In the embodiment of the present invention, preferably, in the internal memory of described file server, preset configuration file, in described configuration file, preserve the expired time arranged for described application file.
In the embodiment of the present invention, preferably, described cache module comprises:
Capacity check submodule, for checking the current capacities of the internal memory of described file server;
Capacity comparison sub-module, for comparing the size of the capacity of described internal memory and described application file;
File cache submodule, if the size being greater than described application file for described memory size, is then buffered in described application file in the internal memory of file server.
In the embodiment of the present invention, preferably, described second return submodule and comprise:
Subelement searched by disk, whether there is described application file for searching in the local disk of described file server;
Disk extracts subelement, if for there is described application file, then in the local disk of described file server, extracts described application file;
Outer net file acquisition subelement, if for there is not described application file, then passes through outer net further to application file described in external network server acquisition request;
Subelement preserved by outer net file, for being kept in the local disk of described file server by the described application file obtained from external network server.
In the embodiment of the present invention, preferably, the communication between described file server and described terminal is based on hypertext transfer protocol.
According to the embodiment of the present invention, terminal is buffered in internal memory by the application file that Intranet request is downloaded by file server, and screen according to the download of terminal application programs file, access, the behavior such as establishment or renewal, after the request receiving terminal transmission, directly from internal memory, extract application file, owing to being far longer than the access speed to disk to the access speed of internal memory, therefore the download efficiency of file server can be improved, and the access that can reduce disk, extend the life-span of disk, improve the performance of server.Owing to screening the file in internal memory, thus application files maximum for terminal operation is preferentially placed in internal memory, and constantly adjusts in the operation that different times follows terminal always, further increase the download efficiency to active file.
With reference to figure 4, show application file download apparatus structured flowchart in accordance with another embodiment of the present invention, described device specifically can comprise:
Cache module 401, for the application file that the file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded, described file server is for providing the server of application file download service to described terminal;
Screening module 402, for screening the application file of buffer memory in described internal memory the behavior that described application file is downloaded, accesses, creates or upgraded according to described terminal;
Request receiving module 403, for receiving the download request of the application programs file that described terminal is sent by described Intranet;
Extraction module 404, the application file downloaded for the request of extracting in the internal memory of described file server returns to described terminal.
Described extraction module 404 comprises:
Whether ff submodule 4041, exist described application file for searching in the internal memory of described file server;
First returns submodule 4042, if for there is described application file, then extracts described application file and returns to described terminal;
Second returns submodule 4043, if for there is not described application file, then in the local disk of described file server, extracts described application file return to described terminal;
File cache submodule 4044, for being buffered in described application file in the internal memory of described file server.
In the embodiment of the present invention, can further include: memory file update module, upgrade for the application file preserved in the internal memory to described file server.
In the embodiment of the present invention, can further include: respond module, when application file for preserving in the internal memory to described file server upgrades, if receive the download request of described terminal to described application file, then return the failed information of request to described terminal or do not respond described download request.
In the embodiment of the present invention, can further include: disk file update module, for obtaining the application file of renewal from external network server, and the application file preserved in described file server local disk being upgraded.
In the embodiment of the present invention, preferably, described application file carries file index information, and described index information comprises the filemodetime generated according to the time upgrading described application file;
Described memory file update module comprises:
Second time detecting submodule, for detecting the filemodetime entrained by the application file preserved in described local disk according to predeterminated frequency;
File update submodule, if the modification time for detecting is later than the filemodetime entrained by application file preserved in described internal memory, then according to the application file preserved in described local disk, the application file preserved in described internal memory is upgraded.
In the embodiment of the present invention, preferably, described file index information also comprises the storing path of described application file in the local disk of described file server, and the size of described application file.
According to the embodiment of the present invention, terminal is buffered in internal memory by the application file that Intranet request is downloaded by file server, and screen according to the download of terminal application programs file, access, the behavior such as establishment or renewal, after the request receiving terminal transmission, directly from internal memory, extract application file, owing to being far longer than the access speed to disk to the access speed of internal memory, therefore the download efficiency of file server can be improved, and the access that can reduce disk, extend the life-span of disk, improve the performance of server.Owing to screening the file in internal memory, thus application files maximum for terminal operation is preferentially placed in internal memory, and constantly adjusts in the operation that different times follows terminal always, further increase the download efficiency to active file.
According to the embodiment of the present invention, can also to making regular check on document change, so the promptness of the content of file can be ensured.
For above-mentioned application file download apparatus embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method shown in Fig. 1 and Fig. 2.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.
Those skilled in the art are easy to it is envisioned that: the combination in any application of each embodiment above-mentioned is all feasible, therefore the combination in any between each embodiment above-mentioned is all embodiment of the present invention, but this specification does not just detail one by one at this as space is limited.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In specification provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.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 in each inventive aspect one or more, in the description above 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.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary compound mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the some or all parts in the application file download equipment of the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of 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 does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computer of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.
The invention discloses A1, a kind of application file method for down loading, comprising:
The application file that the file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded, described file server is for providing the server of application file download service to described terminal;
According to described terminal, the behavior that described application file is downloaded, accesses, creates or upgraded is screened the application file of buffer memory in described internal memory;
Receive the download request of the application programs file that described terminal is sent by described Intranet;
The application file that the request of extracting is downloaded in the internal memory of described file server returns to described terminal.
A2, method as described in A1, describedly in the internal memory of file server, extract the step that application file returns to terminal comprise:
Search in the internal memory of described file server and whether there is described application file;
If there is described application file, then extract described application file and return to described terminal;
If there is not described application file, then in the local disk of described file server, extract described application file return to described terminal, and described application file is buffered in the internal memory of described file server.
A3, method as described in A1, the described behavior carrying out downloading, access, create or upgrading according to terminal application programs file comprises the step that the application file of buffer memory in internal memory screens:
The application file that number of times that described terminal request downloads described application file does not meet preset range is deleted from described internal memory.
A4, method as described in A3, the step that the described number of times deleting terminal request down load application program file from internal memory does not meet the application file of preset range comprises:
Detect the download time of each application file in described internal memory;
If described download time exceeds apart from the difference of current time the expiration-time value arranged for described application file, the number of times then described application file being downloaded described application file as request in the first preset time period is the application file of zero, and described application file is deleted in described internal memory, wherein, to be described file server return to described terminal the time that time of described application file or described file server receive the download request to described application file described download time.
A5, method as described in A3, the step that the described number of times deleting terminal request down load application program file from internal memory does not meet the application file of preset range comprises:
For each application file in internal memory, add up the number of times that described terminal asks to download described application file in the second preset time period;
The number of times deleting statistics from described internal memory is less than the application file of preset value.
A6, method as described in A4, preset configuration file in the internal memory of described file server, preserve the expired time arranged for described application file in described configuration file.
A7, method as described in A2, also comprise:
The application file preserved in internal memory to described file server upgrades.
A8, method as described in A7, described application file carries file index information, and described index information comprises the filemodetime generated according to the time upgrading described application file;
Described the step that the application file preserved in the internal memory of file server upgrades to be comprised:
The filemodetime entrained by the application file preserved in described local disk is detected according to predeterminated frequency;
If the modification time detected is later than the filemodetime entrained by application file preserved in described internal memory, then according to the application file preserved in described local disk, the application file preserved in described internal memory is upgraded.
A9, method as described in A7, described method also comprises:
When the application file preserved in the internal memory to described file server upgrades, if receive the download request of described terminal to described application file, then return the failed information of request to described terminal or do not respond described download request.
A10, method as described in A1, the step of the application file that the described file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded comprises:
Check the current capacities of the internal memory of described file server;
The size of the capacity of described internal memory and described application file is compared;
If described memory size is greater than the size of described application file, then described application file is buffered in the internal memory of file server.
A11, method as described in A2, the described step extracting application file in the local disk of file server comprises:
Search in the local disk of described file server and whether there is described application file;
If there is described application file, then in the local disk of described file server, extract described application file;
If there is not described application file, then pass through outer net further to application file described in external network server acquisition request, and the described application file obtained from external network server is kept in the local disk of described file server.
A12, method as described in A2, also comprise:
From external network server, obtain the application file of renewal, and the application file preserved in described file server local disk is upgraded.
A13, method as described in A8, described file index information also comprises the storing path of described application file in the local disk of described file server, and the size of described application file.
A14, method as described in A1, the communication between described file server and described terminal is based on hypertext transfer protocol.
The invention also discloses B15, a kind of application file download apparatus, comprising:
Cache module, for the application file that the file server terminal request that buffer memory and described file server are erected at same Intranet in internal memory is downloaded, described file server is for providing the server of application file download service to described terminal;
Screening module, for screening the application file of buffer memory in described internal memory the behavior that described application file is downloaded, accesses, creates or upgraded according to described terminal;
Request receiving module, for receiving the download request of the application programs file that described terminal is sent by described Intranet;
Extraction module, the application file downloaded for the request of extracting in the internal memory of described file server returns to described terminal.
B16, device as described in B15, described extraction module comprises:
Whether ff submodule, exist described application file for searching in the internal memory of described file server;
First returns submodule, if for there is described application file, then extracts described application file and returns to described terminal;
Second returns submodule, if for there is not described application file, then in the local disk of described file server, extracts described application file return to described terminal;
File cache submodule, for being buffered in described application file in the internal memory of described file server.
B17, device as described in B15, described screening module, the number of times downloading described application file specifically for deleting described terminal request from described internal memory does not meet the application file of preset range.
B18, device as described in B17, described screening module comprises:
Very first time detection sub-module, for detecting the download time of each application file in described internal memory;
First deletes submodule, if exceed apart from the difference of current time the expiration-time value arranged for described application file for described download time, the number of times then described application file being downloaded described application file as request in the first preset time period is the application file of zero, and described application file is deleted in described internal memory, wherein, described download time, to be described file server returned to described terminal the time that time of described application file or described file server receive the download request to described application file.
B19, device as described in B17, described screening module comprises:
Number of times statistics submodule, for for each application file in internal memory, adds up the number of times that described terminal asks to download described application file in the second preset time period;
Second deletes submodule, and the number of times for deleting statistics from described internal memory is less than the application file of preset value.
B20, device as described in B18, preset configuration file in the internal memory of described file server, preserve the expired time arranged for described application file in described configuration file.
B21, device as described in B16, also comprise:
Memory file update module, upgrades for the application file preserved in the internal memory to described file server.
B22, device as described in B21, described application file carries file index information, and described index information comprises the filemodetime generated according to the time upgrading described application file;
Described memory file update module comprises:
Second time detecting submodule, for detecting the filemodetime entrained by the application file preserved in described local disk according to predeterminated frequency;
File update submodule, if the modification time for detecting is later than the filemodetime entrained by application file preserved in described internal memory, then according to the application file preserved in described local disk, the application file preserved in described internal memory is upgraded.
B23, device as described in B21, described device also comprises:
Respond module, when application file for preserving in the internal memory to described file server upgrades, if receive the download request of described terminal to described application file, then return the failed information of request to described terminal or do not respond described download request.
B24, device as described in B15, described cache module comprises:
Capacity check submodule, for checking the current capacities of the internal memory of described file server;
Capacity comparison sub-module, for comparing the size of the capacity of described internal memory and described application file;
File cache submodule, if the size being greater than described application file for described memory size, is then buffered in described application file in the internal memory of file server.
B25, device as described in B16, described second returns submodule comprises:
Subelement searched by disk, whether there is described application file for searching in the local disk of described file server;
Disk extracts subelement, if for there is described application file, then in the local disk of described file server, extracts described application file;
Outer net file acquisition subelement, if for there is not described application file, then passes through outer net further to application file described in external network server acquisition request;
Subelement preserved by outer net file, for being kept in the local disk of described file server by the described application file obtained from external network server.
B26, device as described in B16, also comprise:
Disk file update module, for obtaining the application file of renewal from external network server, and upgrades the application file preserved in described file server local disk.
B27, device as described in B22, described file index information also comprises the storing path of described application file in the local disk of described file server, and the size of described application file.
B28, device as described in B15, the communication between described file server and described terminal is based on hypertext transfer protocol.