CN107766469A - A kind of method for caching and processing and device - Google Patents
A kind of method for caching and processing and device Download PDFInfo
- Publication number
- CN107766469A CN107766469A CN201710915063.3A CN201710915063A CN107766469A CN 107766469 A CN107766469 A CN 107766469A CN 201710915063 A CN201710915063 A CN 201710915063A CN 107766469 A CN107766469 A CN 107766469A
- Authority
- CN
- China
- Prior art keywords
- picture
- caching
- identification information
- buffer
- information
- 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/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
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 Transfer Between Computers (AREA)
Abstract
This application discloses a kind of method for caching and processing and device.This method includes:Obtain the uniform resource position mark URL of the picture browsed on webpage;According at least to the identification information of URL generation pictures;Search whether picture corresponding to identification information be present in the buffer using identification information;In the case where not finding, picture is cached and preserves the identification information of picture;In the case where finding, picture is obtained from caching and is shown.By present application addresses in correlation technique can not whether picture is buffered in accurate judgement webpage the problem of, and then in accurate judgement webpage picture whether buffered effect.
Description
Technical field
The application is related to data processing field, in particular to a kind of method for caching and processing and device.
Background technology
When multiple pictures in webpage typically be present, and browsing webpage every time, if all reloading a picture, need
Some time or flow are expended, so the picture in webpage is generally all cached in equipment.But in the prior art,
The picture cached in equipment all neither one unique marks, cause when browsing webpage every time can not be in accurate judgement webpage figure
Whether piece has been buffered.
For in correlation technique can not whether picture is buffered in accurate judgement webpage the problem of, not yet propose have at present
The solution of effect.
The content of the invention
This application provides a kind of method for caching and processing, to solve in correlation technique picture to be in accurate judgement webpage
No the problem of being buffered.
According to the one side of the application, there is provided a kind of method for caching and processing.This method includes:Acquisition is browsed webpage
On picture uniform resource position mark URL;According at least to the identification information of URL generation pictures;Cached using identification information
In search whether picture corresponding to identification information be present;In the case where not finding, picture is cached and preserves figure
The identification information of piece;In the case where finding, picture is obtained from caching and is shown.
Further, this method also includes:When picture is cached and preserves identification information, holding time information,
Wherein, temporal information is the time by picture preservation in the buffer.
Further, this method also includes:Temporal information corresponding to picture in caching is traveled through;According to current time
The duration that picture preserves in the buffer is determined with temporal information;It is removed from the cache the picture that duration exceedes first threshold.
Further, carrying out traversal to temporal information corresponding to picture in caching includes:Obtain remaining storage in caching
Space;In the case where remaining memory space is less than Second Threshold, to temporal information progress time corresponding to the picture in caching
Go through.
According to the another aspect of the application, there is provided a kind of buffer processing device.The device includes:A kind of caching process dress
Put, it is characterised in that including:First acquisition unit, for obtaining the URL of the picture browsed on webpage
URL;Generation unit, for generating the identification information of picture according at least to URL;Searching unit, for being delayed using identification information
Search whether picture corresponding to identification information be present in depositing;Buffer unit, in the case where not finding, picture to be carried out
Cache and preserve the identification information of picture;Second acquisition unit, in the case where finding, picture to be obtained from caching
And shown.
Further, the buffer unit includes:Preserving module, for being cached picture and preserving identification information
When, holding time information, wherein, temporal information is the time by picture preservation in the buffer.
Further, the device also includes:Traversal Unit, for temporal information progress time corresponding to picture in caching
Go through;Determining unit, for determining duration that picture preserves in the buffer according to current time and temporal information;Unit is deleted, is used
In be removed from the cache duration exceed first threshold picture.
Further, the Traversal Unit includes:Acquisition module, for obtaining remaining memory space in caching;Travel through mould
Block, in the case of being less than Second Threshold in remaining memory space, temporal information corresponding to the picture in caching is carried out
Traversal.
According to the another aspect of the application, there is provided a kind of storage medium, storage medium include the program of storage, wherein,
Program performs the method for caching and processing of above-mentioned any one.
According to the another aspect of the application, there is provided a kind of processor, processor are used for operation program, wherein, program fortune
The method for caching and processing of above-mentioned any one is performed during row.
By the application, using following steps:Obtain the uniform resource position mark URL of the picture browsed on webpage;Extremely
Few identification information that picture is generated according to URL;Search whether figure corresponding to identification information be present in the buffer using identification information
Piece;In the case where not finding, picture is cached and preserves the identification information of picture;In the case where finding,
Obtain and picture and shown from caching, whether solve in correlation technique picture can not be buffered in accurate judgement webpage
The problem of.The application uses identification information by obtaining the URL of picture on webpage and the identification information of picture being generated according to URL
Search in caching with the presence or absence of corresponding to picture and the picture being cached when to find corresponding picture, find the picture
The picture is then obtained shown, and then in accurate judgement webpage picture whether buffered effect.
Brief description of the drawings
The accompanying drawing for forming the part of the application is used for providing further understanding of the present application, the schematic reality of the application
Apply example and its illustrate to be used to explain the application, do not form the improper restriction to the application.In the accompanying drawings:
Fig. 1 is the flow chart of the method for caching and processing provided according to the embodiment of the present application;And
Fig. 2 is the schematic diagram of the buffer processing device provided according to the embodiment of the present application.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
In order that those skilled in the art more fully understand application scheme, below in conjunction with the embodiment of the present application
Accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only
The embodiment of the application part, rather than whole embodiments.Based on the embodiment in the application, ordinary skill people
The every other embodiment that member is obtained under the premise of creative work is not made, it should all belong to the model of the application protection
Enclose.
It should be noted that term " first " in the description and claims of this application and above-mentioned accompanying drawing, "
Two " etc. be for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so use
Data can exchange in the appropriate case, so as to embodiments herein described herein.In addition, term " comprising " and " tool
Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing series of steps or unit
Process, method, system, product or equipment are not necessarily limited to those steps clearly listed or unit, but may include without clear
It is listing to Chu or for the intrinsic other steps of these processes, method, product or equipment or unit.
For the ease of description, below to the present embodiments relate to part noun or term illustrate:
MD5, i.e. Message-Digest Algorithm 5 (Message-Digest Algorithm 5), for ensuring that information transfer is complete
Unanimously.It is one of widely used hash algorithm of computer (translating digest algorithm, hash algorithm again), main flow programming language is universal
There are MD5 realizations.It is another fixed-length value by data (such as Chinese character) computing, is the basic principle of hash algorithm, MD5 predecessor has
MD2, MD3 and MD4.MD5 algorithms have the characteristics that:Compressibility:The data of random length, the MD5 values length calculated are all solid
Fixed;Easily calculate:MD5 values are calculated from former data to be easy to;Anti- modification:Former data are made any change, even only
1 byte is changed, resulting MD5 values have very big difference;Strong impact resistant:Known former data and its MD5 value, want to find one
Data (i.e. data falsification) with identical MD5 values are extremely difficult.MD5 effect is to allow Large Copacity information to be signed with numeral
By " compression " into a kind of form of secrecy before name software signature private key.MD5 values are calculated according to using MD5 algorithms
As a result.
According to embodiments herein, there is provided a kind of method for caching and processing.
Fig. 1 is the flow chart according to the method for caching and processing of the embodiment of the present application.As shown in figure 1, this method is including following
Step:
Step S101, obtain the uniform resource position mark URL of the picture browsed on webpage.
It should be noted that uniform resource position mark URL is uniquely corresponding for each picture on webpage, therefore can lead to
Cross and obtain the URL of picture and calculate the identification information of picture, pass through above-mentioned technological means so that picture and identification information are unique
It is corresponding.
Step S102, the identification information of picture is generated according at least to URL.
Optionally, it is that a kind of secrecy lattice are calculated according to URL by special algorithm according to the identification information of URL generation pictures
Formula information is as identification information.For example, generating the identification information of picture according to URL., by MD5 algorithms, MD5 values are calculated,
And the identification information using MD5 values as picture.Optionally, for calculating secrecy format information as identification information according to URL
Special algorithm can also be sha-1 algorithms, RIPEMD algorithms or Haval algorithms etc..
What the byte serial of random length corresponding to the URL of picture was transformed to a regular length by above-mentioned technological means 16 enters
Numeric string processed, and the identification information using the hexadecimal number word string of regular length as picture, have been provided to the information of picture
Whole property protection.
Step S103, search whether picture corresponding to identification information be present in the buffer using identification information.
It should be noted that because identification information is to be generated according to the URL of picture, identification information is uniquely right with picture
Should, and searching whether picture corresponding to identification information be present in the buffer using identification information, needed when being and calculating loading webpage
The identification information for the picture to be shown, identification information corresponding with the picture in caching are contrasted to search.In above-mentioned caching
Picture corresponding to identification information be identification information that the picture generates in caching according to the URL of the picture, and by the figure
The identification information of piece is also marked on the picture.The identification information of picture shown will be needed when will load webpage, and in caching
Identification information corresponding to picture is contrasted to search, if finding the identification information of the picture with needing to show during loading webpage
Identification information corresponding to picture in identical caching, the then picture that load needs to show during webpage are present in caching, if
Identification information corresponding with the picture in the identification information identical caching for the picture for needing to show during loading webpage is not found,
The picture that then load needs to show during webpage is not existed in caching.
For example, existing picture 1 in caching, and the picture 1, with the addition of identification information BZ1, the BZ1 is according to picture
1 URL generations.User is when browsing webpage, it is necessary to which Load Image 2 and picture 3, picture 2 is generated according to the URL of picture 2
Identification information is BZ1, according to the URL of picture 3 generate picture 3 identification information be BZ2, then by the identification information BZ1 of picture 2 with
And the identification information BZ2 of picture 3 and picture in caching identification information are contrasted, the result of contrast is the mark letter of picture 2
Breath is identical with the identification information of picture 1 in caching, and does not find the identification information BZ2 identicals with picture 3 in the buffer
Identification information, then it can determine whether as picture 2 is present in caching, and picture 3 is not cached also.
By above-mentioned technological means, realize needs whether the picture shown is present in caching when judging to load webpage
In.
Step S104, in the case where not finding, picture is cached and preserves the identification information of picture.
It should be noted that the identification information that the identification information for not finding picture in the buffer is corresponding, then the picture is simultaneously
Do not exist in caching, then picture is cached and preserve the identification information of picture.Picture is cached and preserved
After the identification information of picture, if need to load the picture again, the identification information can be found in the buffer, and then directly
Picture corresponding to the identification information is shown, without being loaded again by network from server.
By above-mentioned technological means, the picture in the caching that can enrich constantly, enable the picture more crossed when browsing webpage
It is enough directly to be extracted from caching, accelerate the speed of webpage loading.
Optionally, when being cached picture and preserving identification information, holding time information, wherein, temporal information is
By the time of picture preservation in the buffer.
It should be noted that preserve temporal information corresponding to the time of picture preservation in the buffer, enabling query graph
The time of piece loading, and then, optionally, the picture stored in caching can be ranked up according to the time that picture loads, sieved
The work such as choosing.
Step S105, in the case where finding, picture is obtained from caching and is shown.
It should be noted that the identification information that the identification information for finding picture in the buffer is corresponding, the i.e. picture and depositing
In caching.Picture is obtained from caching to be shown, specially extracts and browse the figure that webpage needs to load from caching
Piece has a picture of same identification information, and the picture extracted in caching, which loaded, needs the picture that loads corresponding in user's webpage
Position.Therefore by above-mentioned technological means, the picture cached can be directly displayed when browsing webpage in webpage, without
By all pictures in webpage all by being loaded in server corresponding to network from webpage, the speed of webpage loading is improved.
The method for caching and processing that the embodiment of the present application provides, determined by obtaining by the unified resource of the picture browsed on webpage
Position symbol URL;According at least to the identification information of URL generation pictures;Search whether mark letter be present in the buffer using identification information
Picture corresponding to breath;In the case where not finding, picture is cached and preserves the identification information of picture;Finding
In the case of, obtain and picture and shown from caching, solve in correlation technique picture to be in accurate judgement webpage
No the problem of being buffered, and then in accurate judgement webpage picture whether buffered effect.
Optionally, above-described embodiment also includes:Temporal information corresponding to picture in caching is traveled through;According to it is current when
Between and temporal information determine the duration that picture preserves in the buffer;It is removed from the cache the picture that duration exceedes first threshold.
It should be noted that due to being the picture in webpage corresponding to the picture in caching, and the picture in webpage makes
After some time, may change or delete, thus cache in saved prolonged picture can be due to webpage
In picture replacing or deletion and it is ineffective, and the picture is stored in caching and generates the waste of storage area,
Therefore, first threshold is set, needs to delete in picture when the overlong time that picture preserves in caching.Set in above-mentioned technological means
First threshold has been put, has then been deleted more than first threshold when the time that picture preserves in caching, therefore pass through above-mentioned technology hand
Section can delete picture that is ineffective in caching and taking storage area.Above-mentioned first threshold can be according to the renewal speed of corresponding website
Spend and determine.
For example, first threshold is arranged to 6 months, the temporal information of the picture A in caching is on May 3rd, 2016,2017
, on September 3, temporal informations to picture in caching traveled through, then the holding time for obtaining picture A is 16 months, more than first
Threshold value 6 months, therefore picture A is deleted.
It is in order to according to temporal information it should be noted that being traveled through to temporal information corresponding to the picture in caching
To delete holding time long picture, and then the storage area of caching is discharged, therefore, optionally, above-mentioned technological means can be only
Performed in the storage area deficiency of caching.Therefore, optionally, in above-described embodiment, the time corresponding to picture in caching is believed
Breath, which carries out traversal, to be included:Obtain remaining memory space in caching;In the case where remaining memory space is less than Second Threshold,
Temporal information corresponding to picture in caching is traveled through, and then, optionally, be more than to the picture of first threshold the holding time
Delete
For example, Second Threshold is arranged to 20%, first threshold is arranged to 6 months, and the temporal information of the picture A in caching is
On May 3rd, 2016, in September in 2017 3 days, the remaining space of caching was less than 20%, then in September in 2017 3 days in caching
The temporal information of picture is traveled through, and the holding time for obtaining picture A is 16 months, more than first threshold 6 months, therefore will figure
Piece A is deleted.
By above-mentioned technological means, to temporal information corresponding to the picture in caching when can be all in cache storage insufficient space
Traveled through, and then the holding time in caching is exceeded to the picture deletion of first threshold.
Optionally, found using identification information in the case of picture corresponding to identification information being present, also united in the buffer
The picture is counted by browsed number.The caching figure being of little use is deleted by browsed number by the picture that comes out
Piece.Optionally, the 3rd threshold value is set, when the number that picture is browsed in caching then judges the picture for seldom less than the 3rd threshold value
Caching picture, is deleted.
Optionally, above-mentioned picture by browsed number be picture within a certain period of time by browsed number, therefore will
The temporal information of picture is combined with number of visits to judge whether picture is to need the picture deleted.For example, preset time is 6
Individual month, the 3rd threshold value was 3 times, and picture A temporal information is on May 3rd, 2016 in caching, and is judged on November 3rd, 2016
Picture A is 2 times on May 3rd, 2016 to the number browsed altogether between 3 days November in 2016, less than the 3rd threshold value 3 times,
Therefore the picture A in caching is deleted.
Optionally, above by number of visits, to delete, the technological means of picture can be only in the storage area of caching in caching
Performed when insufficient, specifically, when the remaining storage area of caching is less than Second Threshold, judge that picture is in one before in caching
Whether the 3rd preset value is less than by number of visits in section preset time, when the number that picture is browsed in caching is less than the 3rd threshold
The caching picture that value then judges the picture seldom to be browsed, is deleted.
For example, preset time is 6 months, the 3rd threshold value is 3 times, Second Threshold 20%, the storage area of caching takes
In September in 2017 18 days more than 80%, then the remaining storage area now cached is less than 20%, therefore counts picture in caching and exist
The number that on March 18 to 2017, on September browsed between 18, in 2017, picture B is obtained 18 days to 2017 March in 2017
September is browsed 1 time between 18 days, therefore can determine whether that picture B is the picture seldom browsed, and picture B is deleted.
The picture seldom browsed in caching can be deleted by above-mentioned technological means, discharge the storage resources of caching.
In another embodiment, when caching picture, URL corresponding to picture and temporal information are preserved;Protect
Leave the URL come and temporal information combines progress big data statistical analysis, it is relatively more to analyze access in a period of time recently
Website, or access the predetermined column of more website;In the case of network idle, above-mentioned website is downloaded in advance or is somebody's turn to do
Picture in the predetermined column in website.
It should be noted that in the case of the network idle stored in order to maintain the remaining storage area of caching, in caching
The quantity a predetermined level is exceeded for the picture downloaded in advance then stops downloading.Optionally, picture size threshold value is set, carried out in advance
When download pictures, judge whether the size of picture to be cached is more than picture size threshold value, and only cache size exceedes threshold
The picture of value.
By above-mentioned technological means, allow the picture in the predetermined column of website that frequentation is asked or website in network idle
In the case of cached in advance, and then improve the access speed of the predetermined column of website that frequentation asks or website.The same time limit
Determine the quantity that picture is downloaded in advance, prevent the picture of buffered in advance from taking excessive cache storage space.There is provided picture size
Threshold value, thus can in the predetermined column of website that only buffered in advance frequentation is asked or website more difficult caching big picture so that subtracting
The fluency of website loading is ensure that while small cache storage space pressure.
It should be noted that can be in such as one group of computer executable instructions the flow of accompanying drawing illustrates the step of
Performed in computer system, although also, show logical order in flow charts, in some cases, can be with not
The order being same as herein performs shown or described step.
The embodiment of the present application additionally provides a kind of buffer processing device, it is necessary to explanation, the caching of the embodiment of the present application
Processing unit can be used for perform the embodiment of the present application provided be used for method for caching and processing.The embodiment of the present application is carried below
The buffer processing device of confession is introduced.
Fig. 2 is the schematic diagram according to the buffer processing device of the embodiment of the present application.As shown in Fig. 2 the device includes:First
Acquiring unit 10, generation unit 20, searching unit 30, buffer unit 40 and second acquisition unit 50.
Specifically, first acquisition unit 10, for obtaining the uniform resource position mark URL of the picture browsed on webpage;
Generation unit 20, for generating the identification information of picture according at least to URL;
Searching unit 30, for searching whether picture corresponding to identification information be present in the buffer using identification information;
Buffer unit 40, in the case where not finding, picture being cached and preserves the mark letter of picture
Breath;
Second acquisition unit 50, in the case where finding, obtaining picture from caching and being shown.
The buffer processing device that the embodiment of the present application provides, the figure browsed on webpage is obtained by first acquisition unit 10
The uniform resource position mark URL of piece;Generation unit 20 generates the identification information of picture according at least to URL;Searching unit 30 uses
Identification information searches whether picture corresponding to identification information be present in the buffer;Buffer unit 40 in the case where not finding,
Picture is cached and preserves the identification information of picture;Second acquisition unit 50 is in the case where finding, from caching
Obtain picture simultaneously to be shown, solve the problems, such as in correlation technique picture whether can not be buffered in accurate judgement webpage,
And then in accurate judgement webpage picture whether buffered effect.
Alternatively, above-mentioned buffer unit 40 includes:Preserving module, for being cached picture and preserving identification information
When, holding time information, wherein, temporal information is the time by picture preservation in the buffer.
Alternatively, above-described embodiment also includes:Traversal Unit, for temporal information progress time corresponding to picture in caching
Go through;Determining unit, for determining duration that picture preserves in the buffer according to current time and temporal information;Unit is deleted, is used
In be removed from the cache duration exceed first threshold picture.
Optionally, above-mentioned Traversal Unit includes:Acquisition module, for obtaining remaining memory space in caching;Travel through mould
Block, in the case of being less than Second Threshold in remaining memory space, temporal information corresponding to the picture in caching is carried out
Traversal.
Buffer processing device includes processor and memory, above-mentioned first acquisition unit 10, generation unit 20, searching unit
30th, buffer unit 40 and second acquisition unit 50 etc. store in memory as program unit, are stored by computing device
Said procedure unit in memory realizes corresponding function.
Kernel is included in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can set one
Or more, make whether picture in accurate judgement webpage has been buffered by adjusting kernel parameter.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/
Or the form such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM), memory includes at least one deposit
Store up chip.
The embodiments of the invention provide a kind of storage medium, program is stored thereon with, it is real when the program is executed by processor
Existing method for caching and processing.
The embodiments of the invention provide a kind of processor, processor is used for operation program, wherein, performed when program is run slow
Deposit processing method.
The embodiments of the invention provide a kind of equipment, equipment includes processor, memory and storage on a memory and can
The program run on a processor, following steps are realized during computing device program:Obtain the system of the picture browsed on webpage
One URLs URL;According at least to the identification information of URL generation pictures;Search whether to deposit in the buffer using identification information
In picture corresponding to identification information;In the case where not finding, picture is cached and preserves the identification information of picture;
In the case where finding, picture is obtained from caching and is shown.
When picture is cached and preserves identification information, holding time information, wherein, temporal information is to protect picture
Deposit the time in the buffer.
Temporal information corresponding to picture in caching is traveled through;Determine picture slow according to current time and temporal information
Deposit the duration of middle preservation;It is removed from the cache the picture that duration exceedes first threshold.
Carrying out traversal to temporal information corresponding to picture in caching includes:Obtain remaining memory space in caching;Surplus
In the case that remaining memory space is less than Second Threshold, temporal information corresponding to the picture in caching is traveled through.Herein
Equipment can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program product, when being performed on data processing equipment, is adapted for carrying out just
The program of beginningization there are as below methods step:Obtain the uniform resource position mark URL of the picture browsed on webpage;According at least to
URL generates the identification information of picture;Search whether picture corresponding to identification information be present in the buffer using identification information;Not
In the case of finding, picture is cached and preserves the identification information of picture;In the case where finding, from caching
Obtain picture and shown.
When picture is cached and preserves identification information, holding time information, wherein, temporal information is to protect picture
Deposit the time in the buffer.
Temporal information corresponding to picture in caching is traveled through;Determine picture slow according to current time and temporal information
Deposit the duration of middle preservation;It is removed from the cache the picture that duration exceedes first threshold.
Carrying out traversal to temporal information corresponding to picture in caching includes:Obtain remaining memory space in caching;Surplus
In the case that remaining memory space is less than Second Threshold, temporal information corresponding to the picture in caching is traveled through.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, apparatus or computer program
Product.Therefore, the application can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the application can use the computer for wherein including computer usable program code in one or more
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The application be with reference to according to the method, apparatus of the embodiment of the present application and the flow chart of computer program product and/or
Block diagram describes.It should be understood that can by each flow in computer program instructions implementation process figure and/or block diagram and/or
Square frame and the flow in flow chart and/or block diagram and/or the combination of square frame.These computer program instructions can be provided to arrive
All-purpose computer, special-purpose computer, the processor of Embedded Processor or other programmable data processing devices are to produce one
Machine so that produced by the instruction of computer or the computing device of other programmable data processing devices and flowed for realizing
The device for the function of being specified in one flow of journey figure or multiple flows and/or one square frame of block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/
Or the form such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Memory is computer-readable Jie
The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping
Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including key element
Other identical element in process, method, commodity or equipment also be present.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code
The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
Embodiments herein is these are only, is not limited to the application.To those skilled in the art,
The application can have various modifications and variations.All any modifications made within spirit herein and principle, equivalent substitution,
Improve etc., it should be included within the scope of claims hereof.
Claims (10)
- A kind of 1. method for caching and processing, it is characterised in that including:Obtain the uniform resource position mark URL of the picture browsed on webpage;The identification information of the picture is generated according at least to the URL;Search whether picture corresponding to the identification information be present in the buffer using the identification information;In the case where not finding, the picture is cached and preserves the identification information of the picture;In the case where finding, the picture is obtained from the caching and is shown.
- 2. according to the method for claim 1, it is characterised in that methods described also includes:When the picture is cached and preserves the identification information, holding time information, wherein, the temporal information is By the time of picture preservation in the buffer.
- 3. according to the method for claim 1, it is characterised in that methods described also includes:Temporal information corresponding to picture in caching is traveled through;The duration that picture preserves in the buffer is determined according to current time and the temporal information;The picture that duration exceedes first threshold is deleted from the caching.
- 4. according to the method for claim 3, it is characterised in that to temporal information progress time corresponding to picture in the caching Go through including:Obtain remaining memory space in caching;In the case where the remaining memory space is less than Second Threshold, to temporal information corresponding to the picture in the caching Traveled through.
- A kind of 5. buffer processing device, it is characterised in that including:First acquisition unit, for obtaining the uniform resource position mark URL of the picture browsed on webpage;Generation unit, for generating the identification information of the picture according at least to the URL;Searching unit, for searching whether picture corresponding to the identification information be present in the buffer using the identification information;Buffer unit, in the case where not finding, the picture being cached and preserves the mark of the picture Information;Second acquisition unit, in the case where finding, obtaining the picture from the caching and being shown.
- 6. device according to claim 5, it is characterised in that the buffer unit includes:Preserving module, for when the picture is cached and preserves the identification information, holding time information, wherein, The temporal information is the time by picture preservation in the buffer.
- 7. device according to claim 5, it is characterised in that described device also includes:Traversal Unit, for being traveled through to temporal information corresponding to picture in caching;Determining unit, for determining duration that picture preserves in the buffer according to current time and the temporal information;Unit is deleted, the picture for exceeding first threshold for deleting duration from the caching.
- 8. device according to claim 7, it is characterised in that the Traversal Unit includes:Acquisition module, for obtaining remaining memory space in caching;Spider module, in the case of being less than Second Threshold in the remaining memory space, to the picture in the caching Corresponding temporal information is traveled through.
- A kind of 9. storage medium, it is characterised in that storage medium include storage program, wherein, program execution profit require 1 to The method for caching and processing of any one in 4.
- A kind of 10. processor, it is characterised in that processor is used for operation program, wherein, perform claim requirement 1 when program is run The method for caching and processing of any one into 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710915063.3A CN107766469A (en) | 2017-09-29 | 2017-09-29 | A kind of method for caching and processing and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710915063.3A CN107766469A (en) | 2017-09-29 | 2017-09-29 | A kind of method for caching and processing and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107766469A true CN107766469A (en) | 2018-03-06 |
Family
ID=61266394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710915063.3A Pending CN107766469A (en) | 2017-09-29 | 2017-09-29 | A kind of method for caching and processing and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107766469A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108924668A (en) * | 2018-06-11 | 2018-11-30 | 聚好看科技股份有限公司 | Picture load, data offering method and device |
CN110175053A (en) * | 2019-04-24 | 2019-08-27 | 阿里巴巴集团控股有限公司 | Picture loading method and device |
CN110555118A (en) * | 2018-03-28 | 2019-12-10 | 武汉斗鱼网络科技有限公司 | Method and device for loading picture |
CN110825991A (en) * | 2019-09-17 | 2020-02-21 | 五八有限公司 | Picture processing method and picture processing device |
CN110990611A (en) * | 2019-12-03 | 2020-04-10 | 北京奇艺世纪科技有限公司 | Picture caching method and device, electronic equipment and storage medium |
CN111324586A (en) * | 2018-12-14 | 2020-06-23 | 中移(杭州)信息技术有限公司 | Image display method and device based on cache, electronic equipment and medium |
CN111723266A (en) * | 2019-03-19 | 2020-09-29 | 北京沃东天骏信息技术有限公司 | Mass data processing method and device |
CN112084155A (en) * | 2020-09-09 | 2020-12-15 | 深圳市欢太科技有限公司 | Picture processing method, device, equipment, terminal and readable storage medium |
CN113282547A (en) * | 2021-04-25 | 2021-08-20 | 维沃移动通信有限公司 | File processing method and device and electronic equipment |
CN114238167A (en) * | 2021-12-14 | 2022-03-25 | 海光信息技术股份有限公司 | Information prefetching method, processor and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741986A (en) * | 2009-12-31 | 2010-06-16 | 优视科技有限公司 | Page cache method for mobile communication equipment terminal |
CN102096712A (en) * | 2011-01-28 | 2011-06-15 | 深圳市五巨科技有限公司 | Method and device for cache-control of mobile terminal |
CN102207976A (en) * | 2011-06-24 | 2011-10-05 | 厦门雅迅网络股份有限公司 | Method for downloading and browsing webpage data |
WO2013071779A1 (en) * | 2011-11-15 | 2013-05-23 | Tencent Technology (Shenzhen) Company Limited | Method and device for accessing web pages |
-
2017
- 2017-09-29 CN CN201710915063.3A patent/CN107766469A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741986A (en) * | 2009-12-31 | 2010-06-16 | 优视科技有限公司 | Page cache method for mobile communication equipment terminal |
CN102096712A (en) * | 2011-01-28 | 2011-06-15 | 深圳市五巨科技有限公司 | Method and device for cache-control of mobile terminal |
CN102207976A (en) * | 2011-06-24 | 2011-10-05 | 厦门雅迅网络股份有限公司 | Method for downloading and browsing webpage data |
WO2013071779A1 (en) * | 2011-11-15 | 2013-05-23 | Tencent Technology (Shenzhen) Company Limited | Method and device for accessing web pages |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110555118A (en) * | 2018-03-28 | 2019-12-10 | 武汉斗鱼网络科技有限公司 | Method and device for loading picture |
CN108924668A (en) * | 2018-06-11 | 2018-11-30 | 聚好看科技股份有限公司 | Picture load, data offering method and device |
CN108924668B (en) * | 2018-06-11 | 2021-07-27 | 聚好看科技股份有限公司 | Picture loading and data providing method and device |
CN111324586A (en) * | 2018-12-14 | 2020-06-23 | 中移(杭州)信息技术有限公司 | Image display method and device based on cache, electronic equipment and medium |
CN111324586B (en) * | 2018-12-14 | 2024-04-09 | 中移(杭州)信息技术有限公司 | Picture display method and device based on cache, electronic equipment and medium |
CN111723266A (en) * | 2019-03-19 | 2020-09-29 | 北京沃东天骏信息技术有限公司 | Mass data processing method and device |
CN110175053B (en) * | 2019-04-24 | 2023-10-27 | 创新先进技术有限公司 | Picture loading method and device |
CN110175053A (en) * | 2019-04-24 | 2019-08-27 | 阿里巴巴集团控股有限公司 | Picture loading method and device |
CN110825991A (en) * | 2019-09-17 | 2020-02-21 | 五八有限公司 | Picture processing method and picture processing device |
CN110990611A (en) * | 2019-12-03 | 2020-04-10 | 北京奇艺世纪科技有限公司 | Picture caching method and device, electronic equipment and storage medium |
CN110990611B (en) * | 2019-12-03 | 2023-04-21 | 北京奇艺世纪科技有限公司 | Picture caching method and device, electronic equipment and storage medium |
CN112084155B (en) * | 2020-09-09 | 2024-03-22 | 深圳市欢太科技有限公司 | Picture processing method, device, equipment, terminal and readable storage medium |
CN112084155A (en) * | 2020-09-09 | 2020-12-15 | 深圳市欢太科技有限公司 | Picture processing method, device, equipment, terminal and readable storage medium |
CN113282547A (en) * | 2021-04-25 | 2021-08-20 | 维沃移动通信有限公司 | File processing method and device and electronic equipment |
CN114238167A (en) * | 2021-12-14 | 2022-03-25 | 海光信息技术股份有限公司 | Information prefetching method, processor and electronic equipment |
CN114238167B (en) * | 2021-12-14 | 2022-09-09 | 海光信息技术股份有限公司 | Information prefetching method, processor and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107766469A (en) | A kind of method for caching and processing and device | |
CN105378726B (en) | Utilize the partitions of database of update step | |
US9223880B2 (en) | Evaluation of web pages | |
US11157652B2 (en) | Obfuscation and deletion of personal data in a loosely-coupled distributed system | |
US9305176B2 (en) | Database generation from a spreadsheet | |
CN106649316A (en) | Video pushing method and device | |
CN104679778A (en) | Search result generating method and device | |
CN111008348A (en) | Anti-crawler method, terminal, server and computer readable storage medium | |
CN108021590A (en) | A kind of destination object attribute determining method, attribute update method and device | |
CN105677904B (en) | Small documents storage method and device based on distributed file system | |
Zhang et al. | A method to predict the performance and storage of executing contract for ethereum consortium-blockchain | |
CN110457628A (en) | Webpage edition correcting method, device, equipment and storage medium | |
CN107515875A (en) | Data query method and device | |
CN110620657A (en) | Webpage word processing method, system and device | |
CN107357794A (en) | Optimize the method and apparatus of the data store organisation of key value database | |
CN107025235A (en) | Crawl the method and device of webpage | |
CN108154024A (en) | A kind of data retrieval method, device and electronic equipment | |
CN103684823A (en) | Weblog recording method, network access path determining method and related devices | |
CN109284428A (en) | Data processing method, device and storage medium | |
CN108460116A (en) | Searching method, device, computer equipment, storage medium and search system | |
CN110020297A (en) | A kind of loading method of web page contents, apparatus and system | |
CN116304458B (en) | Method, device, equipment and medium for web page real-time notification update | |
GB2556080A (en) | Reducing data sent from a user device to a server | |
CN106339183A (en) | Data retrieving method and server | |
CN114201370B (en) | Webpage file monitoring method and system |
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 |
Application publication date: 20180306 |
|
RJ01 | Rejection of invention patent application after publication |