CN109358985A - A kind of method and electronic equipment based on browser power-off protection cache information - Google Patents

A kind of method and electronic equipment based on browser power-off protection cache information Download PDF

Info

Publication number
CN109358985A
CN109358985A CN201811084004.7A CN201811084004A CN109358985A CN 109358985 A CN109358985 A CN 109358985A CN 201811084004 A CN201811084004 A CN 201811084004A CN 109358985 A CN109358985 A CN 109358985A
Authority
CN
China
Prior art keywords
cache information
equipment
electronic equipment
storage
storage equipment
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.)
Withdrawn
Application number
CN201811084004.7A
Other languages
Chinese (zh)
Inventor
孙悦
李天驰
黎龙宇
李立强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Dianmao Technology Co Ltd
Original Assignee
Shenzhen Dianmao Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dianmao Technology Co Ltd filed Critical Shenzhen Dianmao Technology Co Ltd
Priority to CN201811084004.7A priority Critical patent/CN109358985A/en
Publication of CN109358985A publication Critical patent/CN109358985A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a kind of method and electronic equipment based on browser power-off protection cache information, wherein method includes: the cache information for obtaining and being stored in the first storage equipment;The cache information is synchronized to the target directory of the second storage equipment every preset time threshold;When the first storage device powers down, the cache information in the target directory is obtained, and is saved to the first storage equipment.Since after the second storage device powers down, data will not disappear, therefore, cache information is notified into the second storage equipment according to the preset time interval in advance, when the first storage device powers down, cache information can be obtained from the second storage equipment, so that cache information is not easy to lose.

Description

A kind of method and electronic equipment based on browser power-off protection cache information
Technical field
The present invention relates to browser field more particularly to a kind of method based on browser power-off protection cache information and Electronic equipment.
Background technique
Browser specifically refers to a kind of for online browse webpage, broadcasting music, the software for playing video or object for appreciation game.Tool Body first installs browser at electronic equipment (including smart phone, personal computer or laptop etc.), then can pass through Browser realizes corresponding function.
Existing browser mainly has IE browser, Chrome browser and QQ browser, browsing either among the above Device or other browsers, working method are substantially uniform.
Due to electronic equipment memory have at high speed, be randomly written and read the characteristics of data, majority is clear Device of looking at first regularly sends cache file to the memory of electronic equipment, to substantially increase the speed for reading cache file.
However, the data after power-off are irrecoverable due to another characteristic of memory, i.e., data cannot be stored in interior for a long time In depositing, therefore, data buffer storage file will be automatically deleted after memory power-off.
That is, the cache file of browser may disappear, and lead to shortage of data, can not look for after electronic equipment power-off It returns.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
In view of above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide one kind is cached based on browser power-off protection The method and electronic equipment of information, it is intended to solve the problems, such as that the cache file of browser is evanescent after electronic equipment power-off.
Technical scheme is as follows:
A method of based on browser power-off protection cache information comprising:
A, the cache information being stored in the first storage equipment is obtained;
B, the cache information is synchronized to the target directory of the second storage equipment every preset time threshold;
C, when the first storage device powers down, the cache information in the target directory is obtained, and save to described first Store equipment.
Preferably, the first storage equipment is the memory of electronic equipment, and the second storage equipment is electronic equipment Hard disk.
Preferably, include: after the step C
Webpage is loaded according to the cache information acquired.
Preferably, the time threshold is 24 hours, 48 hours or 72 hours.
Preferably, include: after the step B
It is deleted or is retained according to cache information of the preset retention time to target directory.
The present invention also provides a kind of electronic equipment comprising:
Processor is adapted for carrying out each instruction, and
Equipment is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
Obtain the cache information being stored in the first storage equipment;
The cache information is synchronized to the target directory of the second storage equipment at interval of preset time threshold;
When the first storage device powers down, the cache information in target directory is obtained, and saves to first storage and sets It is standby.
Preferably, the time threshold is 24 hours, 48 hours or 72 hours.
Preferably, the first storage equipment is the memory of electronic equipment, and the second storage equipment is electronic equipment Hard disk.
The present invention also provides a kind of computer program products, wherein computer program product is non-volatile including being stored in Computer program on computer readable storage medium, computer program include program instruction, when program instruction is held by processor When row, the processor is made to execute the method based on browser power-off protection cache information.
The present invention also provides a kind of non-volatile computer readable storage medium storing program for executing, wherein the non-volatile computer can It reads storage medium and is stored with computer executable instructions, when which is executed by one or more processors, One or more of processors may make to execute the method based on browser power-off protection cache information.
The utility model has the advantages that the method provided through the invention, first obtains the cache information in the first storage equipment, then will obtain The cache information obtained is synchronized to according to the preset time interval in the target directory in the second storage equipment, when the first storage When device powers down, the automatic cache information obtained in target directory, and save to the first storage equipment.Due to the second storage equipment After power-off, data will not disappear, and therefore, cache information be notified the second storage equipment according to the preset time interval in advance, when When the first storage device powers down, cache information can be obtained from the second storage equipment, so that cache information is not easy to lose.
Detailed description of the invention
Fig. 1 is that the present invention is based on the flow charts of the method preferred embodiment of browser power-off protection cache information.
Fig. 2 is the structural block diagram of electronic equipment preferred embodiment of the present invention.
Specific embodiment
The present invention provides a kind of method and electronic equipment based on browser power-off protection cache information, to make the present invention Purpose, technical solution and effect it is clearer, clear, the present invention is described in more detail below.It should be appreciated that this place The specific embodiment of description is only used to explain the present invention, is not intended to limit the present invention.
Referring to Fig. 1, a kind of method based on browser power-off protection cache information comprising:
The cache information that S1, acquisition are stored in the first storage equipment;
S2, the target directory that the cache information is synchronized to the second storage equipment every preset time threshold;
S3, when the first storage device powers down, obtain the cache information in the target directory, and save to described first Store equipment.
The method provided through the invention, if electronic equipment powers off suddenly, (the i.e. first storage equipment and the second storage are set Standby power-off), it is set since the storage information in the first storage equipment is synchronized to the second storage at predetermined intervals in advance It is standby, therefore, cache information can be obtained from the second storage equipment, and will acquire to obtain cache information and save to the first storage and set It is standby.In this way, browser can have using the first storage equipment at high speed, the characteristic that is randomly written and reads data it is quickly clear It lookes at webpage, and can have non-volatile characteristic to save cache information using the second storage equipment, to substantially increase browsing The performance of device.
Preferably, the first storage equipment is the memory of electronic equipment, and the second storage equipment is electronic equipment Hard disk.
The electronic equipment refers to personal computer, smart phone or laptop etc., certainly, as long as can pacify The equipment of dress application software (browser) can be used as the electronic equipment in the present invention.Wherein, memory and hard disk are electronic equipments Necessary component.
The memory refers to random access memory (RAM).RAM is the memory block of computer operation, it be one kind can at high speed, It is randomly written and reads a kind of semiconductor memory of data (writing speed and reading speed can be different);The advantages of RAM It is that access speed is fast, read-write is convenient, the disadvantage is that data cannot be kept for a long time, dies away after power-off.
RAM can be divided into static RAM (SRAM) and dynamic ram (DRAM) according to manufacturing theory difference.SRAM integrated level is low, Price is high, but speed is fast, is commonly used for cache memory.DRAM integrated level is high, and price is low, but periodically dynamic is needed to brush Newly, therefore speed is slow.
Currently, the memory in microcomputer (electronic equipment) is inserted on mainboard in the form of memory bar.
The hard disk refers to read-only memory (Read Only Memory, ROM).Read only memory ROM once has letter Breath, cannot change easily, will not lose during power down, they are the memory only for reading in computer systems.ROM There are two significant advantages for device: first is that structure is simple, so bit density is higher than readable/writeable memory.Second is that having non-volatile Property, so high reliablity.
But ROM device can be used only in the place for not needing often to modify and be written to information.Computer system In, storage system startup program and parameter list are usually used in ROM module, be also used to store memory-resident monitoring programme or The memory-resident part of operating system, or even can also be used to store the compiler of character library or certain language and explain journey Sequence.
In the step S1, the cache information in memory is obtained, cache information (Cookie) is stored in when being access website Computer is loaded with the archives of a small amount of data.They are widely used in maintaining web operation, or run it more efficiently, And information is provided for site owners.In recent years, the use of cache information has been the standard preset function of most of websites.Letter Single says, cache information (Cookie) refers to the historical record of access website.
It obtains the cache information in memory and refers to the cache information read in memory.
Preferably, the cache information read in a memory at interval of 1 hour.It is of course also possible to be read at interval of 2 hours Cache information in memory, the cache information read in a memory at interval of 5 hours were read primary at interval of 3 hours Cache information in memory.Specific time interval can according to need to be configured by background server.For example, being taken by backstage Business device configures time interval to 4 hours, then the cache information read in a memory at interval of 4 hours.
In the step S2, the time threshold is equally configured by background server.Wherein, the time interval and when Between threshold value can be identical, can not also be identical.For example, time interval and time threshold are each configured to 24 hours, such situation It is identical as time threshold to belong to time interval;For another example configuring time interval to 5 hours, it is small to configure 24 for time threshold When, it is not identical as time threshold that such situation belongs to time interval.
The target directory refers to a file in the second storage equipment.
Preferably, by the title of background server editor's target directory, and the attribute of target directory is defined.For example, The title of target directory is compiled as A, by the attribute definition of target directory A are as follows: the All Files in target directory A are hidden, it is hidden Hide the additional character etc. in target directory A title.
In such manner, it is possible to quickly find target directory, while the safety of target directory can be improved again, be not easy accidentally to delete target mesh Record.
The cache information that will acquire is synchronized in the target directory according to the time interval.Specifically, first right The storage information is replicated to obtain duplication file, then saves obtained duplication file at interval of preset time threshold To in the target directory.
For example, the time interval for first passing through background server configuration in advance is 24 hours, then at interval of 24 hours, automatically from Cache file is obtained in memory.For example, the cache file acquired is cache file B, first cache information B replicate It is 24 hours to duplication file B, also, by the time threshold that background server configures, then, it is calculated from current time, 24 After hour, duplication file B is saved into the target directory.
For another example the time interval for first passing through background server configuration in advance is 12 hours, then at interval of 12 hours, automatically Cache file is obtained from memory.For example, the cache file acquired is cache file C, first cache information C is replicated Duplication file C is obtained, also, after 12 hours, the cache file acquired is cache file D, is replicated to cache information D Obtain duplication file D.
It is 24 hours by the time threshold that background server configures, then, it is counted from the time for acquiring cache file C It calculates, after 24 hours, duplication file C and duplication file D is saved into the target directory.
In this way, the cache information in electronic equipment memory can be saved into the hard disk of electronic equipment, so as to Long-term preservation cache information, it is not easy to lose.
Preferably, include: after the step S2
It is deleted or is retained according to cache information of the preset retention time to target directory.
The retention time is similar to the time interval, time threshold, can be configured by background server, example Such as, it configures retention time to 3 months, configure retention time to 6 months or configures retention time to 12 months.
Second storage equipment will be automatically according to the duplication file (cache information) in holding time delete target catalogue.Specifically , according to the creation time and current time of duplication file, the time difference of current time and current time is calculated, if calculated The time difference arrived is greater than or equal to preset retention time, then duplication file will be automatically deleted, if the time being calculated Difference is less than preset retention time, then continuing " waiting ", until the time difference being calculated is greater than or equal to preset reservation Time just deletes corresponding duplication file.
For example, preset retention time is 12 months, current time is on September 11st, 2018, when replicating the creation of file B Between be on September 11st, 2017, it is clear that the time difference being calculated be 12 months, then, will be automatically deleted duplication file B;Example again Such as, the creation time for replicating file C is on August 11st, 2018, it is clear that the time difference being calculated is 1 month, then, it will continue Duplication file C is monitored, until current time is on August 11st, 2019, is just automatically deleted duplication file C.
In this way, the duplication file in target directory can be removed periodically, duplication file is avoided to occupy excessive storage empty Between.
Preferably, the identical duplication file of creation time is stored in the same target directory.
For example, the creation time of duplication file A is on September 11st, 2017, the creation time of duplication file B is 2017 9 The moon 11, the creation time of duplication file C are on September 11st, 2017, and the creation time of duplication file D is on September 11st, 2018 And the creation time of duplication file E is on September 11st, 2018, then duplication file A, duplication file B and duplication file C are protected It deposits to target directory A, duplication file D and duplication file E is saved to target directory B.
In this way, if the time difference be greater than or equal to the retention time, can be by answering in entire target File processed is deleted.For example, the creation time of the duplication file A in target directory A is on September 11st, 2017, current time is On September 11st, 2018, retention time are 12 months, then the time difference being calculated is 12 months, then by target directory A Duplication file A, duplication file B and duplication file C delete together, to improve efficiency, saved the time.
In the step S3, if electronic equipment powers off suddenly, that is to say, that electronic equipment stop working, in particular to First storage equipment (memory) and the second storage equipment (hard disk) stop working.After electronic equipment is resumed work, it will obtain automatically The cache information (duplication file) in target directory is taken, then cache information is replicated, obtains wave file, by what is obtained Wave file is saved into the first storage equipment.
For example, the cache information acquired from target directory is duplication file C after electronic equipment is resumed work, First duplication file C is replicated, obtains wave file C, then, wave file C is saved into the first storage equipment equipment.
It should be noted that either being replicated to obtain duplication file to cache information, or duplication file is carried out Duplication obtains wave file, does not change cache information or replicates the content of file, the file replicated and the text being replicated Both parts are identical.
In this way, even if the first storage device powers down also cache information can be obtained from the second storage equipment in time, and carry out Restore, to substantially increase the performance of browser.
Preferably, include: after the step S3
Webpage is loaded according to the cache information acquired.
Specifically, if electronic equipment power off, and memory reacquire cache information after, pass through a window remind user Whether according to the cache information load webpage before power-off, if user's selection loads webpage, electronics according to cache information Equipment will load webpage automatically according to cache information.
Certainly, if cache information includes the information for playing video or playing music, the window queries will be passed through Video whether is from the beginning played, or continues to play video from interruption place.
For example, from the beginning user's selection plays video, then, video will be played since going out the 00:00 of video progress;Example again Such as, user's selection continues to play music from interruption place, for example, be 02:30 at interruption, then, it will be from interruption place 02:30 after continued broadcasting It puts the music on.
Referring to Fig. 2, the present invention also provides a kind of electronic equipment 10 comprising:
Processor 110 is adapted for carrying out each instruction, and
Equipment 120 is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
Obtain the cache information being stored in the first storage equipment;
The cache information is synchronized to the target directory of the second storage equipment at interval of preset time threshold;
When the first storage device powers down, the cache information in target directory is obtained, and saves to first storage and sets It is standby.
Preferably, the time threshold is 24 hours, 48 hours or 72 hours.
Preferably, the first storage equipment is the memory of electronic equipment, and the second storage equipment is electronic equipment Hard disk.
Preferably, described when the first storage device powers down, the cache information in target directory is obtained, and save to described Include: after the step of first storage equipment
Webpage is loaded according to the cache information acquired.
The target directory that the cache information is synchronized to the second storage equipment at interval of preset time threshold Include: after step
It is deleted or is retained according to cache information of the preset retention time to target directory.
The processor 110 can for general processor, digital signal processor (DSP), specific integrated circuit (ASIC), Field programmable gate array (FPGA), single-chip microcontroller, ARM (Acorn RISC Machine) or other programmable logic device are divided Any combination of vertical door or transistor logic, discrete hardware component or these components.In addition, processor can also be any Conventional processors, microprocessor or state machine.Processor also may be implemented as calculating the combination of equipment, for example, DSP and Wei Chu Manage combination, multi-microprocessor, one or more microprocessors combination DSP core, any other this configuration of device.
It stores equipment 120 and is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software Program, non-volatile computer executable program and module, such as being delayed in the embodiment of the present invention based on browser power-off protection The corresponding program instruction of stored method.Processor by operation be stored in storage equipment in non-volatile software program, Instruction and unit, thereby executing using at various function application and data based on browser power-off protection cache information Reason, the i.e. method based on browser power-off protection cache information in realization above method embodiment.
It about the particular technique details of above-mentioned electronic equipment 10, is described in detail in above-mentioned steps, so not repeating them here.
The present invention also provides a kind of computer program products, wherein computer program product is non-volatile including being stored in Computer program on computer readable storage medium, computer program include program instruction, when program instruction is held by processor When row, the processor is made to execute the method based on browser power-off protection cache information.
The present invention also provides a kind of non-volatile computer readable storage medium storing program for executing, wherein the non-volatile computer can It reads storage medium and is stored with computer executable instructions, when which is executed by one or more processors, One or more of processors may make to execute the method based on browser power-off protection cache information.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention Protect range.

Claims (10)

1. a kind of method based on browser power-off protection cache information characterized by comprising
A, the cache information being stored in the first storage equipment is obtained;
B, the cache information is synchronized to the target directory of the second storage equipment every preset time threshold;
C, when the first storage device powers down, the cache information in the target directory is obtained, and is saved to first storage Equipment.
2. the method according to claim 1 based on browser power-off protection cache information, which is characterized in that described first The memory that equipment is electronic equipment is stored, the second storage equipment is the hard disk of electronic equipment.
3. the method according to claim 1 based on browser power-off protection cache information, which is characterized in that the step Include: after C
Webpage is loaded according to the cache information acquired.
4. the method according to claim 1 based on browser power-off protection cache information, which is characterized in that the time Threshold value is 24 hours, 48 hours or 72 hours.
5. the method according to claim 1 based on browser power-off protection cache information, which is characterized in that the step Include: after B
It is deleted or is retained according to cache information of the preset retention time to target directory.
6. a kind of electronic equipment characterized by comprising
Processor is adapted for carrying out each instruction, and
Equipment is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
Obtain the cache information being stored in the first storage equipment;
The cache information is synchronized to the target directory of the second storage equipment at interval of preset time threshold;
When the first storage device powers down, the cache information in target directory is obtained, and is saved to the first storage equipment.
7. electronic equipment according to claim 6, which is characterized in that the time threshold is 24 hours, 48 hours or 72 Hour.
8. electronic equipment according to claim 6, which is characterized in that the first storage equipment is the interior of electronic equipment It deposits, the second storage equipment is the hard disk of electronic equipment.
9. a kind of computer program product, which is characterized in that computer program product can including being stored in non-volatile computer The computer program on storage medium is read, computer program includes program instruction, when program instruction is executed by processor, makes institute It states processor perform claim and requires the described in any item methods based on browser power-off protection cache information of 1-5.
10. a kind of non-volatile computer readable storage medium storing program for executing, which is characterized in that the non-volatile computer readable storage medium Matter is stored with computer executable instructions, when which is executed by one or more processors, may make institute It states one or more processors perform claim and requires the described in any item sides based on browser power-off protection cache information 1-5 Method.
CN201811084004.7A 2018-09-17 2018-09-17 A kind of method and electronic equipment based on browser power-off protection cache information Withdrawn CN109358985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811084004.7A CN109358985A (en) 2018-09-17 2018-09-17 A kind of method and electronic equipment based on browser power-off protection cache information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811084004.7A CN109358985A (en) 2018-09-17 2018-09-17 A kind of method and electronic equipment based on browser power-off protection cache information

Publications (1)

Publication Number Publication Date
CN109358985A true CN109358985A (en) 2019-02-19

Family

ID=65350948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811084004.7A Withdrawn CN109358985A (en) 2018-09-17 2018-09-17 A kind of method and electronic equipment based on browser power-off protection cache information

Country Status (1)

Country Link
CN (1) CN109358985A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467037A (en) * 2023-06-09 2023-07-21 成都融见软件科技有限公司 Graphic user interface work state recovery method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467037A (en) * 2023-06-09 2023-07-21 成都融见软件科技有限公司 Graphic user interface work state recovery method
CN116467037B (en) * 2023-06-09 2023-09-22 成都融见软件科技有限公司 Graphic user interface work state recovery method

Similar Documents

Publication Publication Date Title
CN102782683B (en) Buffer pool extension for database server
US9104413B2 (en) System and method for dynamic memory power management
CN102158349B (en) A kind of log management apparatus and method
TW200839516A (en) A method and system for facilitating fast wake-up of a flash memory system
CN102902716A (en) Storage system based on Hadoop distributed computing platform
KR20190013729A (en) High-speed system state cloning
CN108549525A (en) Data storage and access method, apparatus, electronic equipment and storage medium
CN105589926A (en) Method for clearing cache files of mobile terminal in real time
WO2017045481A1 (en) Method and system for web cross-page selection of data
CN106250496A (en) A kind of method and system of the data collection in journal file
CN105930537A (en) Page storing method and electronic equipment
WO2023277819A3 (en) Data processing method, system, device, computer program product, and storage function
CN104281673A (en) Cache building system and method for database
CN102508857B (en) Desktop cloud searching method based on event correlation
CN105573782A (en) Software pre-loading method for transparent wearable intelligent device
CN109358985A (en) A kind of method and electronic equipment based on browser power-off protection cache information
CN114416677A (en) Cold storage data updating method, device, equipment and storage medium
CN103778064B (en) A kind of data managing method and device
WO2017172373A1 (en) Search navigation element
US8539492B1 (en) Managing data dependencies among multiple jobs using separate tables that store job results and dependency satisfaction
CN111913913A (en) Access request processing method and device
CN111741107A (en) Layering method and device based on file storage system and electronic equipment
CN104332170B (en) A kind of storage device and date storage method
CN115357622A (en) Service processing method based on hotspot data and server
CN101163298A (en) Method and system for memorizing use custom of user

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190219