CN107609030A - A kind of picture management method and system - Google Patents
A kind of picture management method and system Download PDFInfo
- Publication number
- CN107609030A CN107609030A CN201710676113.7A CN201710676113A CN107609030A CN 107609030 A CN107609030 A CN 107609030A CN 201710676113 A CN201710676113 A CN 201710676113A CN 107609030 A CN107609030 A CN 107609030A
- Authority
- CN
- China
- Prior art keywords
- picture
- data information
- filename
- hash values
- file name
- 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.)
- Granted
Links
Abstract
The present invention relates to a kind of picture management method and system.This method includes:Obtain the static data information and dynamic data information of current page;The hash values of current page filename are determined according to static data information and dynamic data information;Storage file name corresponding to the initial picture for obtaining current page storage according to the page name of current page;Picture is managed according to hash values and storage file name.Pass through above-mentioned technical proposal, on the one hand, avoid when being managed in the prior art by URL to picture, cause to repeat the technology drawback managed;On the other hand, realize and improve load running speed, saved the technique effect of the memory space of computer.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of picture management method and system.
Background technology
With the continuous development of scientific technology, the development of Internet technology is even more rapid, and increasing website selection is logical
Cross picture and transmit various information to user.In the prior art, each website is cached the data for the picture for needing to show,
Image link (such as picture URL) on website is used the link of buffer service, and set it to link pass with picture source file
System.When user accesses, image link only need to be clicked on, then is immediately seen the picture of relevant information.
But during inventor realizes the present invention, at least there is problems with discovery:
URL when the 1st, managing picture dependent on picture, if more picture servers correspond to different domain names and IP, meeting
Cause to repeat to manage;
2nd, wasting space, access speed is reduced.
The content of the invention
In order to solve the above technical problems, the invention provides a kind of picture management method and system.
According to an aspect of the present invention, the embodiments of the invention provide a kind of picture management method, methods described to include:
Obtain the static data information and dynamic data information of current page;
The hash values of current page filename are determined according to the static data information and the dynamic data information;
Storage file corresponding to the initial picture for obtaining the current page storage according to the page name of the current page
Name;
The picture is managed according to the hash values and the storage file name.
According to the present embodiment provide technical scheme, by obtain current page filename hash values and, obtain currently
Storage file name corresponding to the initial picture of page storage, is managed to picture.On the one hand, avoid in the prior art, by
When being managed by URL to picture, because same picture is in different servers, corresponding different URL is corresponding different
IP address, undoubtedly cause the technology drawback that is repeatedly managed same picture;On the other hand, the fortune for improving load is realized
Scanning frequency degree, the technique effect in the space of storage is saved.
Further, it is described that current page filename is determined according to the static data information and the dynamic data information
Hash values, specifically include:
According to the picture file name of static data acquisition of information first;
Second picture filename is obtained according to the dynamic data information;
The hash values are determined according to first picture file name and the second picture filename.
The technical scheme provided by the present embodiment, by respectively to the first picture file name corresponding to static data information
Obtained, second picture filename corresponding to dynamic data information is obtained, and according to the two picture texts got
Part name determines hash values.Realize the technique effect of hash values that are quick and accurately obtaining current page filename.
Further, it is described that the hash is determined according to first picture file name and the second picture filename
Value, is specifically included:
First picture file name and the second picture filename are spliced, obtain splicing filename;
According to the splicing filename generation character string;
The hash values are determined according to the character string.
The technical scheme provided by the present embodiment, by the way that get two picture file names are spliced, so as to
Obtain splicing filename, hash values are determined according to character string corresponding to the splicing filename.It furthermore achieved that quick and accurate
Acquisition current page filename hash values technique effect.
Further, it is described that the picture is managed according to the hash values and the storage file name, specific bag
Include:
When hash values corresponding to the storage file name and the hash values differ, then the initial picture is deleted
Remove;
Picture renewal request is sent to server according to the static data information and the dynamic data information;
The picture is cached according to the information of the server feedback received.
The technical scheme provided by the present embodiment, when being managed to picture, there is different way to manages.By
To hash values corresponding to storage file name compared with hash values after, if two hash values differ, by initial picture
Deleted, and picture is cached.Realize the management deleted picture and updated in time.
Further, the information for the server feedback that the basis receives caches to the picture, specifically
Including:
Original image corresponding to the picture cached according to the information of server feedback determination needs;
The original image is drawn according to the element information of the current page;
Cached after the form of picture after drafting is converted into preset format.
The technical scheme provided by the present embodiment, by being drawn to original image, and to its form after drafting
Changed, to realize the caching to picture.Realize technique effect that is quick and accurately being cached picture.
According to another aspect of the present invention, the embodiments of the invention provide a kind of picture corresponding with above-described embodiment
Management system, the system include:
First acquisition module:For obtaining the static data information and dynamic data information of current page;
Determining module:For determining current page filename according to the static data information and the dynamic data information
Hash values;
Second acquisition module:For obtaining the initial graph of the current page storage according to the page name of the current page
Storage file name corresponding to piece;
Management module:For being managed according to the hash values and the storage file name to the picture.
Further, the determining module is specifically used for:
According to the picture file name of static data acquisition of information first;
Second picture filename is obtained according to the dynamic data information;
The hash values are determined according to first picture file name and the second picture filename.
Further, the determining module also particularly useful for:
First picture file name and the second picture filename are spliced, obtain splicing filename;
According to the splicing filename generation character string;
The hash values are determined according to the character string.
Further, the management module is specifically used for:
When the storage file name and the hash values differ, then the initial picture is deleted;
Picture renewal request is sent to server according to the static data information and the dynamic data information;
The picture is cached according to the information of the server feedback received.
Further, the management module also particularly useful for:
Original image corresponding to the picture cached according to the information of server feedback determination needs;
The original image is drawn according to the element information of the current page;
Cached after the form of picture after drafting is converted into preset format.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of picture management method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet for picture management method that another embodiment of the present invention provides;
Fig. 3 is a kind of schematic flow sheet for picture management method that another embodiment of the present invention provides;
Fig. 4 is a kind of schematic flow sheet for picture management method that another embodiment of the present invention provides;
Fig. 5 is a kind of schematic flow sheet for picture management method that another embodiment of the present invention provides;
Fig. 6 is a kind of structural representation of picture management system provided in an embodiment of the present invention.
Embodiment
In describing below, in order to illustrate rather than in order to limit, it is proposed that such as particular system structure, interface, technology it
The detail of class, understand the present invention to cut thoroughly.However, it will be clear to one skilled in the art that there is no these specific
The present invention can also be realized in the other embodiments of details.In other situations, omit to well-known system, circuit and
The detailed description of method, in case unnecessary details hinders description of the invention.
The invention provides a kind of picture management method and system.
According to an aspect of the present invention, the embodiment of the present invention provides a kind of picture management method.
Referring to Fig. 1, Fig. 1 is a kind of schematic flow sheet of picture management method provided in an embodiment of the present invention.
As shown in figure 1, this method includes:
Step S100:Obtain the static data information and dynamic data information of current page;
Step S200:The hash values of current page filename are determined according to static data information and dynamic data information;
Step S300:Storage file corresponding to the initial picture for obtaining current page storage according to the page name of current page
Name;
Step S400:Picture is managed according to hash values and storage file name.
In the present embodiment, according to the static data information and dynamic data information of the current page got to current page
The hash values of face filename are determined.It is understood that storage file name corresponding to the initial picture of each page storage
One-to-one relation be present with its page name.So current page storage can be got according to the page name of current page
Initial picture corresponding to storage file name.After hash values and storage file name is obtained, according to hash values and storage file name
Picture is managed.
The technical scheme provided by the present embodiment, on the one hand, avoid in the prior art, according to the URL of picture to figure
Piece is managed, if more picture servers correspond to different URL or IP, can cause the technology of the repetition management to picture
Drawback.And the memory space of pictures management is undoubtedly wasted, reduce speed during access.On the other hand, realize it is quick and
Accurately picture is managed, saves memory space, reduces load, accelerates the technique effect of the speed of service.
Referring to Fig. 2, Fig. 2 is a kind of schematic flow sheet for picture management method that another embodiment of the present invention provides.
As shown in Fig. 2 step S200 is specifically included:
Step S210:According to the picture file name of static data acquisition of information first;
Step S220:Second picture filename is obtained according to dynamic data information;
Step S230:Hash values are determined according to the first picture file name and second picture filename.
In the present embodiment, to how according to static data information and dynamic data information to determine current page filename
Hash values have been described in detail.Specifically:
The second picture file that the first picture file name and dynamic data information determined according to static data information determines
Name, is determined according to two picture file names to hash values.
It should be noted that the first picture file name herein refers to all figures got from static data information
The filename of piece be combined after filename.Similarly, the institute got in the entitled driven state data message of second picture file
Filename after the filename combination of some pictures.
The technical scheme provided by the present embodiment, realize hash that is quick and accurately determining current page filename
The technique effect of value, further to realize technique effect that is quick and being accurately managed to picture.
Referring to Fig. 3, Fig. 3 is a kind of schematic flow sheet for picture management method that another embodiment of the present invention provides.
As shown in figure 3, step S230 is specifically included:
S231:First picture file name and second picture filename are spliced, obtain splicing filename;
S232:According to splicing filename generation character string;
S233:Hash values are determined according to character string.
In the present embodiment, to how according to two picture files to determine that hash values have been described in detail.Specifically:
Two picture file names are spliced, obtain splicing filename.After according to splicing filename generation character string,
Hash values are determined according to the character string of generation.
Further, character string is calculated into generation hash values using MD5 algorithms.
The technical scheme provided by the present embodiment, technique effect that is quick and accurately determining hash values is realized, with
Realize technique effect that is quick and being accurately determined to the hash values of current page filename.Further quickly and accurately
Realize the technique effect being managed to picture.
Referring to Fig. 4, Fig. 4 is a kind of schematic flow sheet for picture management method that another embodiment of the present invention provides.
As shown in figure 4, step S400 is specifically included:
Step S410:When hash values corresponding to storage file name and hash values differ, then initial picture is deleted;
Step S420:Picture renewal request is sent to server according to static data information and dynamic data information;
Step S430:Picture is cached according to the information of the server feedback received.
In the present embodiment, hash values corresponding to storage file name and the hash values of current web page filename are compared
Compared with.
If it is understood that to hash values corresponding to storage file name and the hash value phases of current web page filename
Together, then explanation need not be updated to picture.
When the hash values to hash values corresponding to storage file name and current web page filename differ, then explanation needs
Initial picture is updated.Specifically:
First initial picture is deleted, picture is sent to server further according to static data information and dynamic data information
Renewal request.Specifically, the address of the picture in static data information and dynamic data information, picture is sent to server
Renewal request.The request is used to indicate to obtain picture money corresponding to the picture address in static data information and dynamic data information
Source, picture is cached further according to the information of server feedback.
The technical scheme provided by the present embodiment, realize the technology for the management deleted picture and updated in time
Effect.
Referring to Fig. 5, Fig. 5 is a kind of schematic flow sheet for picture management method that another embodiment of the present invention provides.
As shown in figure 5, step S430 is specifically included:
Step S431:Original image corresponding to the picture cached according to the information of server feedback determination needs;
Step S432:Original image is drawn according to the element information of current page;
Step S433:Cached after the form of picture after drafting is converted into preset format.
In the present embodiment, feedback information is included corresponding to the picture address in static data information and dynamic data information
Picture resource, the picture for determining to need to cache according to the information of the server feedback corresponding original image in picture resource.
According to the element information of current page, such as position, size information is drawn to original image, to ensure to draw
Picture afterwards meets the displaying requirement of current page.
After being drawn to original image, by painting canvas method, the picture after drafting is entered into row format conversion.Specifically
Ground, the form of the picture after drafting is converted into image/octet-stream.Then the picture is cached.
Specifically, after original image is plotted in painting canvas, character string is generated in painting canvas, wherein, character string is
Base64 picture character string, the mime type in character string are modified, are revised as byte stream.
For example, creating a label a, after label a href is converted into data url, label a download is set
Attribute is hash values.When triggering label a click events, hash values are obtained according to byte stream, perform the step in Fig. 4 or Fig. 5
Suddenly, and picture storage table corresponding to current web page is updated.
According to another aspect of the present invention, the invention provides a kind of picture management system corresponding with above-described embodiment.
Referring to Fig. 6, Fig. 6 is a kind of structural representation of picture management system provided in an embodiment of the present invention.
As shown in fig. 6, the system includes:
First acquisition module:For obtaining the static data information and dynamic data information of current page;
Determining module:For determining the hash of current page filename according to static data information and dynamic data information
Value;
Second acquisition module:For corresponding to the initial picture according to the acquisition current page storage of the page name of current page
Storage file name;
Management module:For being managed according to hash values and storage file name to picture.
More specifically, determining module is specifically used for:
According to the picture file name of static data acquisition of information first;
Second picture filename is obtained according to dynamic data information;
Hash values are determined according to the first picture file name and second picture filename.
More specifically, determining module also particularly useful for:
First picture file name and second picture filename are spliced, obtain splicing filename;
According to splicing filename generation character string;
Hash values are determined according to character string.
More specifically, management module is specifically used for:
When storage file name and hash values differ, then initial picture is deleted;
Picture renewal request is sent to server according to static data information and dynamic data information;
Picture is cached according to the information of the server feedback received.
More specifically, management module also particularly useful for:
Original image corresponding to the picture cached according to the information of server feedback determination needs;
Original image is drawn according to the element information of current page;
Cached after the form of picture after drafting is converted into preset format.
Reader should be understood that in the description of this specification, reference term " one embodiment ", " some embodiments ", " show
The description of example ", " specific example " or " some examples " etc. mean to combine the specific features of the embodiment or example description, structure,
Material or feature are contained at least one embodiment or example of the present invention.In this manual, above-mentioned term is shown
The statement of meaning property need not be directed to identical embodiment or example.Moreover, specific features, structure, material or the feature of description
It can be combined in an appropriate manner in any one or more embodiments or example.In addition, in the case of not conflicting, this
The technical staff in field can be by the different embodiments or example described in this specification and the spy of different embodiments or example
Sign is combined and combined.
It is apparent to those skilled in the art that for convenience of description and succinctly, the dress of foregoing description
The specific work process with unit is put, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, it can be passed through
Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of unit, is only
A kind of division of logic function, can there is an other dividing mode when actually realizing, for example, multiple units or component can combine or
Person is desirably integrated into another system, or some features can be ignored, or does not perform.
The unit illustrated as separating component can be or may not be physically separate, be shown as unit
Part can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple networks
On unit.Some or all of unit therein can be selected to realize the mesh of scheme of the embodiment of the present invention according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
It is that unit is individually physically present or two or more units are integrated in a unit.It is above-mentioned integrated
Unit can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can
To be stored in a computer read/write memory medium.Based on such understanding, technical scheme substantially or
Say that the part to be contributed to prior art, or all or part of the technical scheme can be embodied in the form of software product
Out, the computer software product is stored in a storage medium, including some instructions are causing a computer equipment
(can be personal computer, server, or network equipment etc.) performs all or part of each embodiment method of the present invention
Step.And foregoing storage medium includes:It is USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random
Access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with Jie of store program codes
Matter.
More than, it is only embodiment of the invention, but protection scope of the present invention is not limited thereto, and it is any to be familiar with
Those skilled in the art the invention discloses technical scope in, various equivalent modifications or substitutions can be readily occurred in,
These modifications or substitutions should be all included within the scope of the present invention.Therefore, protection scope of the present invention should be wanted with right
The protection domain asked is defined.
Claims (10)
1. a kind of picture management method, it is characterised in that methods described includes:
Obtain the static data information and dynamic data information of current page;
The hash values of current page filename are determined according to the static data information and the dynamic data information;
Storage file name corresponding to the initial picture for obtaining the current page storage according to the page name of the current page;
The picture is managed according to the hash values and the storage file name.
2. a kind of picture management method according to claim 1, it is characterised in that described according to the static data information
The hash values of current page filename are determined with the dynamic data information, are specifically included:
According to the picture file name of static data acquisition of information first;
Second picture filename is obtained according to the dynamic data information;
The hash values are determined according to first picture file name and the second picture filename.
3. a kind of picture management method according to claim 2, it is characterised in that described according to first picture file
Name and the second picture filename determine the hash values, specifically include:
First picture file name and the second picture filename are spliced, obtain splicing filename;
According to the splicing filename generation character string;
The hash values are determined according to the character string.
4. a kind of picture management method according to any one of claim 1-3, it is characterised in that described in the basis
Hash values and the storage file name are managed to the picture, are specifically included:
When hash values corresponding to the storage file name and the hash values differ, then the initial picture is deleted;
Picture renewal request is sent to server according to the static data information and the dynamic data information;
The picture is cached according to the information of the server feedback received.
A kind of 5. picture management method according to claim 4, it is characterised in that the service that the basis receives
Device feedack caches to the picture, specifically includes:
Original image corresponding to the picture cached according to the information of server feedback determination needs;
The original image is drawn according to the element information of the current page;
Cached after the form of picture after drafting is converted into preset format.
6. a kind of picture management system, it is characterised in that the system includes:
First acquisition module:For obtaining the static data information and dynamic data information of current page;
Determining module:For determining current page filename according to the static data information and the dynamic data information
Hash values;
Second acquisition module:For obtaining the initial picture pair of the current page storage according to the page name of the current page
The storage file name answered;
Management module:For being managed according to the hash values and the storage file name to the picture.
7. a kind of picture management system according to claim 6, it is characterised in that the determining module is specifically used for:
According to the picture file name of static data acquisition of information first;
Second picture filename is obtained according to the dynamic data information;
The hash values are determined according to first picture file name and the second picture filename.
A kind of 8. picture management system according to claim 7, it is characterised in that the determining module also particularly useful for:
First picture file name and the second picture filename are spliced, obtain splicing filename;
According to the splicing filename generation character string;
The hash values are determined according to the character string.
A kind of 9. picture management system according to any one of claim 6-8, it is characterised in that the management module tool
Body is used for:
When the storage file name and the hash values differ, then the initial picture is deleted;
Picture renewal request is sent to server according to the static data information and the dynamic data information;
The picture is cached according to the information of the server feedback received.
A kind of 10. picture management system according to claim 9, it is characterised in that the management module also particularly useful for:
Original image corresponding to the picture cached according to the information of server feedback determination needs;
The original image is drawn according to the element information of the current page;
Cached after preset format will be converted to the form of the picture after drafting.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710676113.7A CN107609030B (en) | 2017-08-09 | 2017-08-09 | Picture management method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710676113.7A CN107609030B (en) | 2017-08-09 | 2017-08-09 | Picture management method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107609030A true CN107609030A (en) | 2018-01-19 |
CN107609030B CN107609030B (en) | 2020-09-29 |
Family
ID=61064644
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710676113.7A Active CN107609030B (en) | 2017-08-09 | 2017-08-09 | Picture management method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107609030B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112396459A (en) * | 2020-11-19 | 2021-02-23 | 上海源慧信息科技股份有限公司 | Cloud auditing method for shopping certificate verification |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070074119A1 (en) * | 2005-09-27 | 2007-03-29 | Nec Nexsolutions, Ltd. | Image array authentication system |
US20110199478A1 (en) * | 2010-02-17 | 2011-08-18 | Fujifilm Corporation | Inspection system and inspection method, management server, mobile terminal, inspection program and memory medium |
CN102902724A (en) * | 2012-09-05 | 2013-01-30 | 重庆市勘测院 | Mass raster tile map release method |
CN107025675A (en) * | 2016-02-01 | 2017-08-08 | 广州市动景计算机科技有限公司 | Method, equipment, browser and the electronic equipment of processing interception picture |
-
2017
- 2017-08-09 CN CN201710676113.7A patent/CN107609030B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070074119A1 (en) * | 2005-09-27 | 2007-03-29 | Nec Nexsolutions, Ltd. | Image array authentication system |
US20110199478A1 (en) * | 2010-02-17 | 2011-08-18 | Fujifilm Corporation | Inspection system and inspection method, management server, mobile terminal, inspection program and memory medium |
CN102902724A (en) * | 2012-09-05 | 2013-01-30 | 重庆市勘测院 | Mass raster tile map release method |
CN107025675A (en) * | 2016-02-01 | 2017-08-08 | 广州市动景计算机科技有限公司 | Method, equipment, browser and the electronic equipment of processing interception picture |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112396459A (en) * | 2020-11-19 | 2021-02-23 | 上海源慧信息科技股份有限公司 | Cloud auditing method for shopping certificate verification |
Also Published As
Publication number | Publication date |
---|---|
CN107609030B (en) | 2020-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106575298B (en) | Rapid presentation of web sites containing dynamic content and stale content | |
US10015226B2 (en) | Methods for making AJAX web applications bookmarkable and crawlable and devices thereof | |
WO2018129774A1 (en) | Method and device for page processing | |
US8225192B2 (en) | Extensible cache-safe links to files in a web page | |
US10645192B2 (en) | Identifying content files in a cache using a response-based cache index | |
CN103051706A (en) | Dynamic webpage request processing system and method for dynamic website | |
US20130013859A1 (en) | Structure-Based Adaptive Document Caching | |
US20140258371A1 (en) | Collaborative editing | |
CN107197359A (en) | Video file caching method and device | |
CA2845279A1 (en) | Methods for compressing web page menus and devices thereof | |
US20100257413A1 (en) | Verification service for dynamic content update | |
US10116726B2 (en) | Methods for bundling images and devices thereof | |
CN109284428B (en) | Data processing method, device and storage medium | |
CN108200127A (en) | Data transmission method for uplink, device, server, terminal and storage medium | |
CN113641928A (en) | Webpage request method, system and storage medium | |
CN107609030A (en) | A kind of picture management method and system | |
US8984028B2 (en) | Systems and methods for storing data and eliminating redundancy | |
JP4451925B1 (en) | Guideline management device and guideline management program | |
JP2007219619A (en) | Information management program, device, and method | |
CN109710604A (en) | Data processing method, device, system, computer readable storage medium | |
US20110320927A1 (en) | Methods and Apparatus Utilizing XooML: Cross (X) Tool Markup Language | |
CN107451182B (en) | File caching method based on Appcache | |
Ibrahim et al. | A performance-oriented interface design model of web applications | |
JP2005100005A (en) | Content management system, content management method and program therefor | |
CN104519084A (en) | Method and device for displaying messages |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |