CN108460053A - File memory method and device - Google Patents
File memory method and device Download PDFInfo
- Publication number
- CN108460053A CN108460053A CN201710095288.9A CN201710095288A CN108460053A CN 108460053 A CN108460053 A CN 108460053A CN 201710095288 A CN201710095288 A CN 201710095288A CN 108460053 A CN108460053 A CN 108460053A
- Authority
- CN
- China
- Prior art keywords
- memory
- page
- script file
- file
- stored
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F16/986—Document structures and storage, e.g. HTML extensions
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of file memory method and device, the method includes:When receiving the access request of accession page, determine whether memory is stored with script file corresponding with the page;If not storing the script file in the memory, expansible hypertext transfer request is generated;The script file corresponding to the page is obtained according to the expansible hypertext transfer request, and the script file is stored into the memory.The present invention is realized in the first accession page, stores script file corresponding with the page.When subsequently accessing the page again, the page is directly accessed according to the script file stored, need not go to obtain the script file corresponded to the page in network again, improve during accession page, the loading velocity of the page.Meanwhile if user be not for the first time access the page, do not appear in network signal intensity it is weaker when, the page load failure the phenomenon that.
Description
Technical field
The present invention relates to technical field of data processing more particularly to a kind of file memory methods and device.
Background technology
When user need access a page, open a page when, need in network obtain it is corresponding with the page
JavaScript file opens user's page to be accessed by acquired JavaScript file.When user visits again
When asking the page, JavaScript file corresponding with the page is reacquired again, causes page loading velocity excessively slow.And
And when network signal intensity is weaker, compares and be difficult to get JavaScript file corresponding with the page, page load speed
Degree is slower, even will appear the phenomenon that page load fails sometimes.
Invention content
The main purpose of the present invention is to provide a kind of file memory method and devices, it is intended to solve existing page load
The excessively slow technical problem of speed.
To achieve the above object, a kind of file memory method provided by the invention, the file memory method include:
When receiving the access request of accession page, determine whether memory is stored with script corresponding with the page
File;
If not storing the script file in the memory, expansible hypertext transfer request is generated;
The script file corresponding to the page is obtained according to the expansible hypertext transfer request, and by the script
File is stored into the memory.
It is preferably, described that script file corresponding to the page is obtained according to the expansible hypertext transfer request,
And store the script file to before the step in the memory, further include:
Determine the residual memory space of the memory;
If the residual memory space is less than predetermined threshold value, the script file stored in the memory is deleted, directly
It is more than or equal to the predetermined threshold value to the residual memory space.
Preferably, it if the residual memory space is less than predetermined threshold value, deletes and is stored in the memory
Script file, until the residual memory space includes more than or equal to the step of predetermined threshold value:
If the residual memory space is less than the predetermined threshold value, each script stored in the memory is calculated
The called number of file;
The number being called according to each script file determines the priority of each script file;
The script file stored in the memory is deleted successively from low to high according to the priority, until described surplus
Remaining memory space is more than or equal to the predetermined threshold value.
It is preferably, described that script file corresponding to the page is obtained according to the expansible hypertext transfer request,
And store the script file to the step in the memory, further include:
When receiving the access request for accessing the page again, storage and the page pair in the memory are called
The script file answered, to access the page.
Preferably, described when receiving the access request of the page, determine whether memory is stored with and the page pair
After the step of script file answered, further include:
If being stored with the script file in the memory, call storage in the memory corresponding with the page
Script file, to access the page.
In addition, to achieve the above object, the present invention also provides a kind of file storage device, the file storage device packet
It includes:
First determining module, for when receiving the access request of accession page, determine memory whether be stored with
The corresponding script file of the page;
Generation module generates expansible Hyper text transfer if for not storing the script file in the memory
Request;
Memory module, for obtaining the text of the script corresponding to the page according to the expansible hypertext transfer request
Part, and the script file is stored into the memory.
Preferably, the file storage device further includes:
Second determining module, the residual memory space for determining the memory;
Removing module is deleted and is stored in the memory if being less than predetermined threshold value for the residual memory space
Script file, until the residual memory space be more than or equal to the predetermined threshold value.
Preferably, the removing module includes:
Computing unit calculates institute in the memory if being less than the predetermined threshold value for the residual memory space
The called number of each script file of storage;
Determination unit, the number for being called according to each script file determine the priority of each script file;
Deleting unit, for deleting the script stored in the memory text successively from low to high according to the priority
Part, until the residual memory space is more than or equal to the predetermined threshold value.
Preferably, the file storage device further includes the first calling module, and the page is accessed for that ought receive again
When the access request in face, calls and store script file corresponding with the page in the memory, to access the page.
Preferably, the file storage device further includes the second calling module, if for being stored in the memory
Script file is stated, then calls and stores script file corresponding with the page in the memory, to access the page.
The present invention is by when receiving the access request of accession page, first determining whether memory is stored with and the page
The corresponding script file in face generates expansible hypertext transfer request if not storing the script file in the memory,
The script file corresponding to the page is obtained according to the expansible hypertext transfer request, and the script file is stored
To in the memory.It realizes in the first accession page, stores script file corresponding with the page.When subsequently again
When accessing the page, the page is directly accessed according to the script file stored, acquisition and institute in network need not be gone to again
The script file that the page corresponds to is stated, is improved during accession page, the loading velocity of the page.Meanwhile if user not
Be for the first time access the page, then do not appear in network signal intensity it is weaker when, the page load failure the phenomenon that.
Description of the drawings
Fig. 1 is the flow diagram of file memory method first embodiment of the present invention;
Fig. 2 is the flow diagram of file memory method second embodiment of the present invention;
Fig. 3 is the high-level schematic functional block diagram of file storage device first embodiment of the present invention;
Fig. 4 is the high-level schematic functional block diagram of file storage device second embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of file memory method.
Referring to Fig.1, Fig. 1 is the flow diagram of file memory method first embodiment of the present invention.
In the present embodiment, the file memory method includes:
Step S10 determines whether memory is stored with and the page pair when receiving the access request of accession page
The script file answered;
When server receives the access request of accession page, the server determines corresponding with the page to be accessed
Script file, identified script file is compared with the script file stored in memory, is determined in memory
It whether is stored with script file corresponding with the page, that is, judges whether it is to receive the access for accessing the page for the first time
Request.The access request can be understood as opening a webpage in a browser, and the memory is in the server
Local storage, in the present embodiment, the local storage are Local Storage, the Local Storage conducts
API (Application Programming Interface, the application program of web storage characteristics is locally stored in HTML5
One of programming interface), main function is saved the data in client, and the client is the client where the server
End.The script file is JavaScript file, and the JavaScript is a kind of literal translation formula script, is a kind of dynamic
Type, weak type, the language based on prototype, built-in support type, its interpreter are referred to as JavaScript engine, for browsing
A part for device, is widely used in the script of client, is that (one under standard generalized markup language is answered in HTML earliest
With) use on webpage, it is used for increasing dynamic function to html web page.
Step S20 generates expansible hypertext transfer request if not storing the script file in the memory;
When the server determines not script file identical with identified script file in the memory, institute
It states server and determines and be not stored with the script file in the memory, i.e., the described server receives described in access for the first time
When the access request of the page, the server generates expansible hypertext transfer request.The expansible hypertext transfer request
It is asked for XMLHttpRequest, the XMLHttpRequest requests can not submit full page to the server
In the case of, realize local updating webpage;After page whole loaded, the client passes through the XMLHttpRequest
It asks to the server request data, received server-side data and after handling, to the client feedback data.Institute
XMLHttpRequest requests are stated to provide to HTTP (HyperText Transfer Protocol, hypertext transfer protocol)
The complete access of agreement, including make the ability of POST and HEAD requests and common GET request.It is described
XMLHttpRequest asks either synchronously or asynchronously return to the response of Web server, and can be with text or a DOM text
Shelves form returned content.
Step S30 obtains the script file corresponding to the page according to the expansible hypertext transfer request, and will
The script file is stored into the memory.
When the server generates the expansible hypertext transfer request, the server is according to described expansible super
Script file corresponding to the page described in File Transfer acquisition request, and acquired script file is stored to the memory
In.Further, the server obtains the page institute in a text form according to the expansible hypertext transfer request
Corresponding script file.It is understood that the form of the text is the forms such as notepad or Word texts.
Further, the file memory method further includes:
Step a, when receiving the access request for accessing the page again, call in the memory storage with it is described
The corresponding script file of the page, to access the page.
Described in the server storage after script file, the server receives the access for accessing the page again
When request, script file corresponding with the page in memory described in the server calls, according to the script text called
Part accesses the page, i.e., opens the page according to called script file.Further, it is stored in the memory
Script file has unique identifier, the identifier that can uniquely determine the script file, with the script file institute
The identifier of the corresponding page is consistent.When the server receives the access request for accessing the page again, according to institute
It states the identifier in the page and calls script file corresponding with the page in the memory.
Further, the file memory method further includes:
Step b calls storage and the page in the memory if being stored with the script file in the memory
The corresponding script file in face, to access the page.
After the server receives the access request for accessing the page, the server determines in the memory
It is stored with script file corresponding with the page, i.e., the described server is not to receive the access for accessing the page for the first time
When request, script file corresponding with the page in memory described in the server calls is visited according to the script file
It asks the page, i.e., the page is opened according to the script file.
The present embodiment is by when receiving the access request of accession page, if not being stored in memory and the page
The corresponding script file, then generate expansible hypertext transfer request, is obtained according to the expansible hypertext transfer request
The script file corresponding to the page is taken, and the script file is stored into the memory.It realizes and is visited first
When asking the page, script file corresponding with the page is stored.When subsequently accessing the page again, directly according to being stored
Script file access the page, need not go to obtain the script file corresponded to the page in network again, improve
During accession page, the loading velocity of the page.Meanwhile if user is not to access the page for the first time, it will not go out
When network signal intensity is weaker now, the page loads the phenomenon that failing.
Further, the first embodiment based on file memory method of the present invention proposes the second embodiment of the present invention, ginseng
According to Fig. 2, in the present embodiment, before the step S30, further include:
Step S40 determines the residual memory space of the memory;
Step S50 deletes the script stored in the memory if the residual memory space is less than predetermined threshold value
File, until the residual memory space is more than or equal to the predetermined threshold value.
The server determines total memory space of the memory, and calculate the memory has used memory space,
By total memory space subtract it is described used memory space, obtain the residual memory space of the memory.When the service
When device obtains the residual memory space of the memory, judge whether the residual memory space is less than predetermined threshold value.When described
When residual memory space is less than the predetermined threshold value, the server deletes the script file stored in the memory, directly
It is more than or equal to the predetermined threshold value to the residual memory space;Described in being more than or equal to when the residual memory space
When predetermined threshold value, the server then continues storage and the script file corresponding to the page to be accessed.It should be noted that
The predetermined threshold value can be arranged according to specific needs, such as be set as 20%, i.e., the described residual memory space is always deposited less than described
When storing up the 20% of space, the server deletes the script file stored in the memory.
Further, the server timing or the in real time residual memory space of the determining memory.When the clothes
Described in business device timing determination when the residual memory space of memory, the server can be every determination one in 10 days or 15 days
The residual memory space of the secondary memory.It is understood that the residue of memory described in the server timing determination is deposited
The interval time in storage space can be arranged according to specific needs.
Further, the step S50 includes:
Step c, if the residual memory space be less than the predetermined threshold value, calculate stored in the memory it is each
The called number of a script file;
Step d, the number being called according to each script file determine the priority of each script file;
Step e deletes the script file stored in the memory according to the priority successively from low to high, until
The residual memory space is more than or equal to the predetermined threshold value.
Further, when the server determines that the residual memory space of the memory is less than the predetermined threshold value,
The server calculates the called number of each script file stored in the memory, each script that will be stored
File sorts from big to small according to called number, obtains ranking results.The server is determined according to the ranking results
The priority of each script file is called often, be arranged in the priority of the script file of front higher than called
Number is few, is arranged in subsequent script file.After the server determines the priority of each script file stored,
The server deletes the foot stored in the memory successively from low to high according to the height of each script file priority
This document, until the residual memory space is more than or equal to the predetermined threshold value.Preferentially delete the low script of priority
Then file deletes the high script file of priority again, until the residual memory space of the memory is more than or equal to institute
State predetermined threshold value.
Further, the number that each script file that the server is stored in calculating the memory is called
During, the number that each script file stored is called within a preset period of time can be calculated, is such as calculated in 50 days,
The number that each script file stored is called, or calculate what each script file stored at 30 days was called
Number.
The present embodiment is by when the residual memory space of the server is less than predetermined threshold value, being automatically deleted the storage
The script file that device is stored.Prevent memory storage space not foot phenomenon.Further, it is being automatically deleted the storage
During the script file that device is stored, the number being called according to each script file determines the preferential of each script file
Grade, it is preferential to delete the low script file of priority, it realizes under the premise of ensureing that memory has enough memory spaces, retains
The script file corresponding to the page that user's frequentation is asked improves the body of user to improve the speed that user accesses normal accession page
Test effect.
The present invention further provides a kind of file storage devices 100.
It is the high-level schematic functional block diagram of 100 first embodiment of file storage device of the present invention with reference to Fig. 3, Fig. 3.
It is emphasized that it will be apparent to those skilled in the art that module map shown in Fig. 3 is only a preferred embodiment
Exemplary plot, those skilled in the art surround file storage device 100 shown in Fig. 3 module, new mould can be carried out easily
The supplement of block;The title of each module is self-defined title, is only used for each program work(that auxiliary understands this document storage device 100
Energy block, is not used in restriction technical scheme of the present invention, the core of technical solution of the present invention is that the module of each self-defined title is wanted
The function of reaching.
In the present embodiment, the file storage device 100 includes:
First determining module 10, for when receiving the access request of accession page, determining whether memory is stored with
Script file corresponding with the page;
When server receives the access request of accession page, the server determines corresponding with the page to be accessed
Script file, identified script file is compared with the script file stored in memory, is determined in memory
It whether is stored with script file corresponding with the page, that is, judges whether it is to receive the access for accessing the page for the first time
Request.The access request can be understood as opening a webpage in a browser, and the memory is in the server
Local storage, in the present embodiment, the local storage are Local Storage, the Local Storage conducts
API (Application Programming Interface, the application program of web storage characteristics is locally stored in HTML5
One of programming interface), main function is saved the data in client, and the client is the client where the server
End.The script file is JavaScript file, and the JavaScript is a kind of literal translation formula script, is a kind of dynamic
Type, weak type, the language based on prototype, built-in support type, its interpreter are referred to as JavaScript engine, for browsing
A part for device, is widely used in the script of client, is that (one under standard generalized markup language is answered in HTML earliest
With) use on webpage, it is used for increasing dynamic function to html web page.
Generation module 20 generates expansible hypertext and passes if for not storing the script file in the memory
Defeated request;
When the server determines not script file identical with identified script file in the memory, institute
It states server and determines and be not stored with the script file in the memory, i.e., the described server receives described in access for the first time
When the access request of the page, the server generates expansible hypertext transfer request.The expansible hypertext transfer request
It is asked for XMLHttpRequest, the XMLHttpRequest requests can not submit full page to the server
In the case of, realize local updating webpage;After page whole loaded, the client passes through the XMLHttpRequest
It asks to the server request data, received server-side data and after handling, to the client feedback data.Institute
XMLHttpRequest requests are stated to provide to HTTP (HyperText Transfer Protocol, hypertext transfer protocol)
The complete access of agreement, including make the ability of POST and HEAD requests and common GET request.It is described
XMLHttpRequest asks either synchronously or asynchronously return to the response of Web server, and can be with text or a DOM text
Shelves form returned content.
Memory module 30, for obtaining the text of the script corresponding to the page according to the expansible hypertext transfer request
Part, and the script file is stored into the memory.
When the server generates the expansible hypertext transfer request, the server is according to described expansible super
Script file corresponding to the page described in File Transfer acquisition request, and acquired script file is stored to the memory
In.Further, the server obtains the page institute in a text form according to the expansible hypertext transfer request
Corresponding script file.It is understood that the form of the text is the forms such as notepad or Word texts.
Further, the file storage device 100 further includes the first calling module, and institute is accessed for that ought receive again
When stating the access request of the page, calls and store script file corresponding with the page in the memory, to access the page
Face.
Described in the server storage after script file, the server receives the access for accessing the page again
When request, script file corresponding with the page in memory described in the server calls, according to the script text called
Part accesses the page, i.e., opens the page according to called script file.Further, it is stored in the memory
Script file has unique identifier, the identifier that can uniquely determine the script file, with the script file institute
The identifier of the corresponding page is consistent.When the server receives the access request for accessing the page again, according to institute
It states the identifier in the page and calls script file corresponding with the page in the memory.
Further, the file storage device 100 further includes the second calling module, if for being stored in the memory
There is the script file, then calls and store script file corresponding with the page in the memory, to access the page.
After the server receives the access request for accessing the page, the server determines in the memory
It is stored with script file corresponding with the page, i.e., the described server is not to receive the access for accessing the page for the first time
When request, script file corresponding with the page in memory described in the server calls is visited according to the script file
It asks the page, i.e., the page is opened according to the script file.
The present embodiment is by when receiving the access request of accession page, if not being stored in memory and the page
The corresponding script file, then generate expansible hypertext transfer request, is obtained according to the expansible hypertext transfer request
The script file corresponding to the page is taken, and the script file is stored into the memory.It realizes and is visited first
When asking the page, script file corresponding with the page is stored.When subsequently accessing the page again, directly according to being stored
Script file access the page, need not go to obtain the script file corresponded to the page in network again, improve
During accession page, the loading velocity of the page.Meanwhile if user is not to access the page for the first time, it will not go out
When network signal intensity is weaker now, the page loads the phenomenon that failing.
Further, the first embodiment based on file storage device 100 of the present invention proposes the second embodiment of the present invention,
With reference to Fig. 4, in the present embodiment, the file storage device 100 further includes:
Second determining module 40, the residual memory space for determining the memory;
Removing module 50 is deleted and is deposited in the memory if being less than predetermined threshold value for the residual memory space
The script file of storage, until the residual memory space is more than or equal to the predetermined threshold value.
The server determines total memory space of the memory, and calculate the memory has used memory space,
By total memory space subtract it is described used memory space, obtain the residual memory space of the memory.When the service
When device obtains the residual memory space of the memory, judge whether the residual memory space is less than predetermined threshold value.When described
When residual memory space is less than the predetermined threshold value, the server deletes the script file stored in the memory, directly
It is more than or equal to the predetermined threshold value to the residual memory space;Described in being more than or equal to when the residual memory space
When predetermined threshold value, the server then continues storage and the script file corresponding to the page to be accessed.It should be noted that
The predetermined threshold value can be arranged according to specific needs, such as be set as 20%, i.e., the described residual memory space is always deposited less than described
When storing up the 20% of space, the server deletes the script file stored in the memory.
Further, the server timing or the in real time residual memory space of the determining memory.When the clothes
Described in business device timing determination when the residual memory space of memory, the server can be every determination one in 10 days or 15 days
The residual memory space of the secondary memory.It is understood that the residue of memory described in the server timing determination is deposited
The interval time in storage space can be arranged according to specific needs.
Further, the removing module 40 includes:
Computing unit calculates institute in the memory if being less than the predetermined threshold value for the residual memory space
The called number of each script file of storage;
Determination unit, the number for being called according to each script file determine the priority of each script file;
Deleting unit, for deleting the script stored in the memory text successively from low to high according to the priority
Part, until the residual memory space is more than or equal to the predetermined threshold value.
Further, when the server determines that the residual memory space of the memory is less than the predetermined threshold value,
The server calculates the called number of each script file stored in the memory, each script that will be stored
File sorts from big to small according to called number, obtains ranking results.The server is determined according to the ranking results
The priority of each script file is called often, be arranged in the priority of the script file of front higher than called
Number is few, is arranged in subsequent script file.After the server determines the priority of each script file stored,
The server deletes the foot stored in the memory successively from low to high according to the height of each script file priority
This document, until the residual memory space is more than or equal to the predetermined threshold value.Preferentially delete the low script of priority
Then file deletes the high script file of priority again, until the residual memory space of the memory is more than or equal to institute
State predetermined threshold value.
Further, the number that each script file that the server is stored in calculating the memory is called
During, the number that each script file stored is called within a preset period of time can be calculated, is such as calculated in 50 days,
The number that each script file stored is called, or calculate what each script file stored at 30 days was called
Number.
The present embodiment is by when the residual memory space of the server is less than predetermined threshold value, being automatically deleted the storage
The script file that device is stored.Prevent memory storage space not foot phenomenon.Further, it is being automatically deleted the storage
During the script file that device is stored, the number being called according to each script file determines the preferential of each script file
Grade, it is preferential to delete the low script file of priority, it realizes under the premise of ensureing that memory has enough memory spaces, retains
The script file corresponding to the page that user's frequentation is asked improves the body of user to improve the speed that user accesses normal accession page
Test effect.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that process, method, article or system including a series of elements include not only those elements, and
And further include the other elements being not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this
There is also other identical elements in the process of element, method, article or system.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.Pass through above embodiment party
The description of formula, it is required general that those skilled in the art can be understood that above-described embodiment method can add by software
The mode of hardware platform is realized, naturally it is also possible to which by hardware, but the former is more preferably embodiment in many cases.It is based on
Such understanding, substantially the part that contributes to existing technology can be with software product in other words for technical scheme of the present invention
Form embody, which is stored in a storage medium (such as ROM/RAM, magnetic disc, CD), including
Some instructions are used so that a station terminal equipment (can be mobile phone, computer, server or the network equipment etc.) executes this hair
Method described in bright each embodiment.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of file memory method, which is characterized in that the file memory method includes:
When receiving the access request of accession page, determine whether memory is stored with script text corresponding with the page
Part;
If not storing the script file in the memory, expansible hypertext transfer request is generated;
The script file corresponding to the page is obtained according to the expansible hypertext transfer request, and by the script file
It stores into the memory.
2. file memory method as described in claim 1, which is characterized in that described to be asked according to the expansible Hyper text transfer
The script file obtained corresponding to the page is sought, and the script file is stored to before the step in the memory,
Further include:
Determine the residual memory space of the memory;
If the residual memory space is less than predetermined threshold value, the script file stored in the memory, Zhi Daosuo are deleted
It states residual memory space and is more than or equal to the predetermined threshold value.
3. file memory method as claimed in claim 2, which is characterized in that preset if the residual memory space is less than
Threshold value then deletes the script file stored in the memory, until the residual memory space is more than or equal to described
The step of predetermined threshold value includes:
If the residual memory space is less than the predetermined threshold value, each script file stored in the memory is calculated
Called number;
The number being called according to each script file determines the priority of each script file;
The script file stored in the memory is deleted successively from low to high according to the priority, until the residue is deposited
It stores up space and is more than or equal to the predetermined threshold value.
4. file memory method as described in claim 1, which is characterized in that described to be asked according to the expansible Hyper text transfer
The script file obtained corresponding to the page is sought, and the script file is stored to the step in the memory,
Further include:
When receiving the access request for accessing the page again, call storage in the memory corresponding with the page
Script file, to access the page.
5. such as Claims 1-4 any one of them file memory method, which is characterized in that described when the visit for receiving the page
When asking request, after determining the step of whether memory is stored with script file corresponding with the page, further include:
If being stored with the script file in the memory, calls and store foot corresponding with the page in the memory
This document, to access the page.
6. a kind of file storage device, which is characterized in that the file storage device includes:
First determining module, for when receiving the access request of accession page, determine memory whether be stored with it is described
The corresponding script file of the page;
Generation module generates expansible hypertext transfer request if for not storing the script file in the memory;
Memory module, for obtaining the script file corresponding to the page according to the expansible hypertext transfer request, and
The script file is stored into the memory.
7. file storage device as claimed in claim 6, which is characterized in that the file storage device further includes:
Second determining module, the residual memory space for determining the memory;
Removing module deletes the foot stored in the memory if being less than predetermined threshold value for the residual memory space
This document, until the residual memory space is more than or equal to the predetermined threshold value.
8. file storage device as claimed in claim 7, which is characterized in that the removing module includes:
Computing unit is calculated and is stored in the memory if being less than the predetermined threshold value for the residual memory space
The called number of each script file;
Determination unit, the number for being called according to each script file determine the priority of each script file;
Deleting unit, for deleting the script file stored in the memory successively from low to high according to the priority,
Until the residual memory space is more than or equal to the predetermined threshold value.
9. file storage device as claimed in claim 6, which is characterized in that the file storage device further includes the first calling
Module, for when receiving the access request for accessing the page again, calling storage and the page in the memory
Corresponding script file, to access the page.
10. such as claim 6 to 9 any one of them file storage device, which is characterized in that the file storage device also wraps
Include the second calling module, if for being stored with the script file in the memory, call in the memory storage with
The corresponding script file of the page, to access the page.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710095288.9A CN108460053A (en) | 2017-02-20 | 2017-02-20 | File memory method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710095288.9A CN108460053A (en) | 2017-02-20 | 2017-02-20 | File memory method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108460053A true CN108460053A (en) | 2018-08-28 |
Family
ID=63229172
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710095288.9A Pending CN108460053A (en) | 2017-02-20 | 2017-02-20 | File memory method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108460053A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111858514A (en) * | 2020-07-27 | 2020-10-30 | 博泰车联网(南京)有限公司 | Data writing method and device and computer storage medium |
CN112131498A (en) * | 2020-09-23 | 2020-12-25 | 北京达佳互联信息技术有限公司 | Page loading method and device, electronic equipment and storage medium |
CN113806649A (en) * | 2021-02-04 | 2021-12-17 | 北京沃东天骏信息技术有限公司 | Data caching method and device for online application, electronic equipment and storage medium |
CN115982498A (en) * | 2022-12-26 | 2023-04-18 | 河南翔宇医疗设备股份有限公司 | Component loading method, device and medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103258055A (en) * | 2013-05-31 | 2013-08-21 | 北京奇虎科技有限公司 | Device and method for file downloading |
CN103269377A (en) * | 2013-05-31 | 2013-08-28 | 北京奇虎科技有限公司 | Script file processing method, server, client and system |
US20130227388A1 (en) * | 2012-02-28 | 2013-08-29 | Microsoft Corporation | Persistent Storage of Profile Data for Script Compilation |
CN103902588A (en) * | 2012-12-27 | 2014-07-02 | 腾讯科技(深圳)有限公司 | Webpage access method and user terminal |
CN104516973A (en) * | 2014-12-26 | 2015-04-15 | 北京奇虎科技有限公司 | Method and device for accessing page |
CN104965848A (en) * | 2015-02-12 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Front-end resource loading method and apparatus |
CN106227763A (en) * | 2016-07-13 | 2016-12-14 | 珠海市魅族科技有限公司 | The method and device that a kind of webpage loads |
-
2017
- 2017-02-20 CN CN201710095288.9A patent/CN108460053A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130227388A1 (en) * | 2012-02-28 | 2013-08-29 | Microsoft Corporation | Persistent Storage of Profile Data for Script Compilation |
CN103902588A (en) * | 2012-12-27 | 2014-07-02 | 腾讯科技(深圳)有限公司 | Webpage access method and user terminal |
CN103258055A (en) * | 2013-05-31 | 2013-08-21 | 北京奇虎科技有限公司 | Device and method for file downloading |
CN103269377A (en) * | 2013-05-31 | 2013-08-28 | 北京奇虎科技有限公司 | Script file processing method, server, client and system |
CN104516973A (en) * | 2014-12-26 | 2015-04-15 | 北京奇虎科技有限公司 | Method and device for accessing page |
CN104965848A (en) * | 2015-02-12 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Front-end resource loading method and apparatus |
CN106227763A (en) * | 2016-07-13 | 2016-12-14 | 珠海市魅族科技有限公司 | The method and device that a kind of webpage loads |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111858514A (en) * | 2020-07-27 | 2020-10-30 | 博泰车联网(南京)有限公司 | Data writing method and device and computer storage medium |
CN112131498A (en) * | 2020-09-23 | 2020-12-25 | 北京达佳互联信息技术有限公司 | Page loading method and device, electronic equipment and storage medium |
CN112131498B (en) * | 2020-09-23 | 2024-07-30 | 北京达佳互联信息技术有限公司 | Page loading method and device, electronic equipment and storage medium |
CN113806649A (en) * | 2021-02-04 | 2021-12-17 | 北京沃东天骏信息技术有限公司 | Data caching method and device for online application, electronic equipment and storage medium |
CN115982498A (en) * | 2022-12-26 | 2023-04-18 | 河南翔宇医疗设备股份有限公司 | Component loading method, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102855318B (en) | Method and system for preloading of webpages | |
CN106503134B (en) | Browser jumps to the method for data synchronization and device of application program | |
CN108460053A (en) | File memory method and device | |
CN108932332A (en) | The loading method and device of static resource | |
CN108228282A (en) | For the method and device of Website page loading | |
CN103118081B (en) | Server, client, the system and method for browsing pages in prestrain browser | |
CN103294688A (en) | Web page browsing method and system | |
CN108268622A (en) | Method and device for returning page and computer readable storage medium | |
CN104601691A (en) | Method and system for increasing loading speed of Web site resource | |
CN107291913A (en) | HTML webpage loading method and device | |
CN111124528B (en) | Page loading method and device, electronic equipment and computer readable storage medium | |
CN110032493A (en) | Monitoring method, device, terminal and the readable storage medium storing program for executing of the page | |
CN110489696A (en) | Buffering updating method, device and electronic equipment, storage medium | |
CN106599270A (en) | Network data capturing method and crawler | |
CN105634972A (en) | Method for improving access efficiency of Web client | |
CN109446801A (en) | Detect method, apparatus, server and the storage medium of simulator access | |
CN111752975A (en) | Data loading method and device based on Redis, computer equipment and storage medium | |
CN105871961B (en) | A kind of method and device of gray scale publication routing | |
CN107807830A (en) | Medical software update method and server based on cluster | |
CN109343908A (en) | A kind of method and apparatus of delay loading JS script | |
CN110020297A (en) | A kind of loading method of web page contents, apparatus and system | |
CN112926002A (en) | Service request processing method and device | |
CN103678312B (en) | A kind of method and client for recommending network address | |
CN110460685A (en) | User's unique identification processing method, device, computer equipment and storage medium | |
CN113672826B (en) | Page jump method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180828 |