HK1141169A - Method, apparatus and system for image processing in internet - Google Patents
Method, apparatus and system for image processing in internet Download PDFInfo
- Publication number
- HK1141169A HK1141169A HK10107403.4A HK10107403A HK1141169A HK 1141169 A HK1141169 A HK 1141169A HK 10107403 A HK10107403 A HK 10107403A HK 1141169 A HK1141169 A HK 1141169A
- Authority
- HK
- Hong Kong
- Prior art keywords
- picture
- access request
- image
- user
- cdn node
- Prior art date
Links
Description
Technical Field
The invention relates to the technical field of networks, in particular to a method, a device and a system for processing images in the internet.
Background
With the development of the internet, especially various electronic commerce websites, photo sharing websites and the like, the requirements on images are more and more. Various web sites need to be provided with different sizes for the same image, such as a photograph, due to different presentation requirements and bandwidth limitations. For example, in some shopping websites, when listing a product, a 80 × 80 photo is usually provided, if a customer wants to see a product carefully, a 200 × 200 pixel or more photo is generally provided, while in other businesses, a more standard photo may be provided, and some businesses may need to perform some processing on the photo, such as watermarking a company, marking a brand, and so on.
The existing solution is to zoom the photos into different specifications in advance for storage to meet different application requirements; or only one size of the photo is provided as an original picture, and the original picture is downloaded to the client by the client and is automatically compressed and adjusted according to the needs of the client.
In the process of implementing the invention, the inventor finds that: if images with various specifications are stored in advance, a large number of files need to be generated, and when a new size is needed by a service, hundreds of millions of files need to be processed once to generate the size, so that the method is very inflexible and low in efficiency; if only one size of original pictures is provided, the original pictures are required to have higher quality in order to ensure the usability of the original pictures, so that a user needs to occupy a large amount of bandwidth in the process of downloading the original pictures to a client, and for a webpage displaying a product, when a plurality of pictures are displayed on one page, the page is basically not opened, and the real-time performance is poor.
Disclosure of Invention
In view of the above problems, embodiments of the present invention provide a method, an apparatus, and a system for image processing in the internet, which efficiently meet various requirements for images on the network in real time.
In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
a method of image processing in the internet, comprising:
receiving a picture access request sent by a user;
when the picture required by the picture access request does not exist locally, forwarding the picture access request to an image real-time processor;
and receiving a returned picture for a user to use after the image real-time processor processes the original picture according to the picture access request.
Preferably, the method further comprises the following steps:
and storing the received picture.
Preferably, the method further comprises the following steps:
maintaining the locally stored picture, wherein the maintaining comprises: and deleting the pictures with the access frequency lower than the preset threshold value according to the access frequency of the locally stored pictures.
Preferably, the maintaining of the locally stored picture specifically includes:
maintenance is carried out regularly;
alternatively, the CDN nodes are maintained when the locally available storage capacity is below a preset capacity threshold.
Preferably, when the picture required by the picture access request is not available locally, the picture access request is forwarded to the image real-time processor via the image server.
Preferably, the time when the picture required by the picture access request is not locally available refers to the time when the picture required by the picture access request is not the original picture.
A CDN node for realizing image processing in the Internet comprises: a first receiving unit for receiving
Receiving a picture access request sent by a user;
the forwarding unit is used for forwarding the picture access request to the image real-time processor when the forwarding unit does not have the picture required by the picture access request;
the second receiving unit is used for receiving a returned picture which is obtained by processing the original picture by the image real-time processor according to the picture access request and is used by a user;
and the sending unit is used for sending the picture meeting the picture access request to the user.
Preferably, the method further comprises the following steps:
and the storage unit is used for storing the picture received by the second receiving unit.
Preferably, the method further comprises the following steps:
a maintenance unit, configured to maintain the picture stored in the CDN node, where the maintenance includes: and deleting the pictures with the access frequency lower than the preset threshold value according to the access frequency of the pictures stored in the CDN node.
An image real-time processor for realizing image processing in the internet, comprising:
the receiving unit is used for receiving a picture access request of a user;
the processing unit is used for processing the original picture according to the picture access request received by the receiving unit;
and the sending unit is used for sending the picture processed by the processing unit to the CDN node.
A system for real-time processing of images for image processing in the internet, comprising:
the CDN node is used for sending the picture meeting the picture access request to the user when the CDN node has the picture required by the picture access request after receiving the picture access request sent by the user; when the image does not have the image required by the image access request, forwarding the image access request to the image real-time processor; receiving a returned picture after the image real-time processor processes the original picture according to the picture access request, and sending the received picture which accords with the picture access request to a user;
the image real-time processor is used for receiving a picture access request of a user, processing an original picture according to the received picture access request, and sending the processed picture to the CDN node after the processing is finished;
and the image storage center is used for storing the original pictures.
Preferably, the method further comprises the following steps:
the image server is used for receiving the picture access request forwarded by the CDN node, judging whether the picture access request is an original picture or not, and if so, directly returning the original picture stored in the image storage center to the CDN node; if not, the picture access request is forwarded to an image real-time processor.
Therefore, in the embodiment of the invention, the CDN node receives the picture access request sent by the user; when the CDN node does not have the pictures required by the picture access request, forwarding the picture access request to an image real-time processor; according to the embodiment of the invention, the user can obtain the required picture in real time, so that the user requirement is greatly met, and the satisfaction degree of the user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a system according to a fifth embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device and a system for processing images in the Internet, and the embodiment of the invention is described in detail below with reference to the attached drawings.
Referring to fig. 1, in a first embodiment of the present invention, a method provided for implementing the embodiment of the present invention includes the following steps:
step 101: a Content Delivery Network (CDN) node receives a picture access request sent by a user.
The picture access request carries a main file name and an auxiliary file name of the picture. The main file name corresponds to an original picture stored in the image server, and the auxiliary file name indicates a requirement for the picture, for example, a requirement for a specification of the picture, or a special processing requirement for the picture, such as watermarking, and the like.
Preferably, before step 101, the method further comprises:
and guiding the picture access request to the optimal CDN node away from the user through the DNS of the user access network.
The guidance is performed by DNS resolution, for example, by setting a DNS, requests for accessing a certain domain name in beijing are uniformly resolved to an IP address where a CDN site in beijing is located. This is the practice of standard internet DNS resolution. The CDN node which is optimal from the user is manually bound according to the network quality and the flow analysis of each region. For example, users in Beijing and Hebei can be directed to nodes in Beijing in a unified way.
The CDN is widely used for caching the image data near a user end, so that the access speed of the user is effectively improved, the data flow is dispersed, and the pressure of an image server is shunted.
Step 102: and when the CDN node does not have the pictures required by the picture access request, forwarding the picture access request to the image real-time processor.
Step 103: and the image real-time processor acquires an original image from the image storage center according to the image access request and processes the original image.
Step 104: and the image real-time processor returns the processed picture to the CDN node, and the CDN node provides the picture for the user to use.
In the embodiment of the invention, only one original picture is stored in the image server, and other pictures with various sizes can be calculated in real time by calling an image processing algorithm through the image real-time processor according to the parameters of the access request, so that the number of pictures to be stored is greatly reduced, and the flexibility of providing pictures with various requirements is greatly improved.
By the method provided by the embodiment of the invention, the original picture can be processed in real time according to the actual needs of the user, so that the user can obtain the needed picture.
Preferably, after step 104, further comprising:
step 105: and the CDN node stores the received picture.
The CDN stores the received picture, and can directly send the picture to the user without requesting the image real-time processor if the user requests the picture next time, so that time and network resources are saved, and efficiency is further improved.
Preferably, in another embodiment of the present invention, the step 102 of forwarding the picture access request to the image real-time processor specifically includes:
and the CDN node forwards the picture access request to an image real-time processor through an image server.
The method for forwarding the picture access request to the image real-time processor by the CDN node through the image server specifically includes:
the CDN node forwards the picture access request to an image server;
when the picture access request requires an original picture, the image server directly returns the original picture to the CDN node; otherwise, the picture access request is forwarded to the image real-time processor.
In the embodiment, before the CDN forwards the picture access request to the image real-time processor, the picture access request is forwarded to the image server, the image server determines whether the picture access request accesses an original picture, and if so, the original picture can be directly returned, and if not, the picture access request is forwarded to the image real-time processor for processing, so that the workflow of the image real-time processor is effectively saved, and the overall work efficiency is improved.
In addition, because pictures with various specifications can be obtained in real time by calling an image algorithm by the image real-time processor, a large amount of permanent storage space is saved.
Second, the embodiment of the present invention further describes a method for processing images in the internet, referring to fig. 2, where the method includes:
step 201: the CDN node receives a picture access request sent by a user.
Step 202: the CDN inquires whether a picture corresponding to the picture access request exists according to the picture access request, and if so, the step 203 is carried out; if step 204 is not entered.
Step 203: and returning the picture corresponding to the picture access request.
Step 204: and forwarding the picture access request to an image real-time processor.
Step 205: the image real-time processor judges whether the image required to be accessed is an original image or not according to the image access request, and if so, the step 206 is carried out; if not, go to step 207.
Step 206: and the image server issues the original picture.
Step 207: and the image real-time processor processes the original image according to the image access request and returns the processed image.
Preferably, step 207 further comprises:
and the image real-time processor normalizes the original images and unifies the original images into a format which can be identified by a browser.
By normalizing the original picture, uploading of some malicious codes disguised as the picture can be effectively prevented.
Preferably, the processing specifically includes:
scaling the original picture to a certain fixed size;
alternatively, the original image is watermarked.
In other embodiments, the processing can be customized by a customer, and the processing is performed according to the specific needs of the customer, so that the processing has good expansibility.
Step 208: and the CDN node receives the pictures processed by the image real-time processor for users to use.
Step 209: and the CDN node stores the received picture.
Preferably, after step 209, the method further includes:
maintaining the pictures stored in the CDN nodes, wherein the maintaining comprises the following steps: and deleting the pictures with the access frequency lower than the preset threshold value according to the access frequency of the pictures stored in the CDN node, so that the CDN node can update the pictures in real time according to the actual needs of the customers.
Preferably, the CDN node may be maintained periodically, or may be maintained when the available storage capacity of the CDN node is lower than a preset capacity threshold.
The capacity of the CDN node is limited, and a more efficient service can be provided for the user only by constantly updating the pictures stored in the CDN node.
By the method provided by the embodiment of the invention, the CDN node judges whether the CDN node stores the picture required by the user or not, and directly returns the picture required by the user when the CDN node can meet the requirement; when the user can not meet the requirements, the requirements of the user are forwarded to the image real-time processor, and the image real-time processor provides the required pictures for the user in real time according to the requirements of the user, so that the requirements of the user are met.
In addition, the CDN node caches the picture obtained from the image real-time processor, so that when the user requests to obtain the picture again, the CDN node can directly process the request, the time for processing the picture again by the image real-time processor is saved, the occupation of network resources is reduced, and the efficiency is improved.
In addition, the CDN processes the stored pictures according to the capacity of the CDN and the access frequency of the stored pictures, so that the adaptability of the CDN to network requirements is further ensured, and the working efficiency of the CDN is improved.
In a third embodiment, corresponding to the method embodiment provided in the present invention, an embodiment of the present invention provides a CDN node for implementing image processing in the internet, where, referring to fig. 3, the CDN node includes:
a first receiving unit 301, configured to receive a picture access request sent by a user.
A forwarding unit 302, configured to forward the picture access request to the image real-time processor when there is no picture required by the picture access request.
A second receiving unit 303, configured to receive a picture returned by the image real-time processor after processing the original picture according to the picture access request, for use by a user.
A sending unit 304, configured to send the picture meeting the picture access request to the user.
Preferably, the apparatus further comprises:
a storage unit 305, configured to store the picture received by the second receiving unit 303.
Preferably, the apparatus of fig. 3 further comprises:
a maintaining unit 306, configured to maintain the picture stored in the CDN node, where the maintaining includes: and deleting the pictures with the access frequency lower than the preset threshold value according to the access frequency of the pictures stored in the CDN node.
The working flow of the device described in fig. 3 is as follows: after receiving a picture access request sent by a user, a first receiving unit 301 sends a picture meeting the picture access request to the user by a sending unit 304 when the CDN node has a picture required by the picture access request; when there is no picture required by the picture access request in the CDN node, the forwarding unit 302 forwards the picture access request to the image real-time processor, the second receiving unit 303 receives a picture returned by the image real-time processor after processing the original picture according to the picture access request, the sending unit 304 sends the picture meeting the picture access request to the user, the storage unit 305 stores the picture received by the second receiving unit 303, and the maintenance unit 306 maintains the picture stored in the CDN node.
Fourth embodiment, referring to fig. 4, an embodiment of the present invention further provides an image real-time processor for implementing image processing in the internet, where the image real-time processor includes:
a receiving unit 401, configured to receive a picture access request of a user.
A processing unit 402, configured to process the original picture according to the picture access request received by the receiving unit 401.
Wherein the processing specifically comprises: scaling the original picture to a certain fixed size;
alternatively, the original image is watermarked.
A sending unit 403, configured to send the picture processed by the processing unit 402 to the CDN node.
The working flow of the device shown in fig. 4 is as follows:
after the processing unit 402 processes the original picture according to the picture access request received by the receiving unit 401, the sending unit 403 sends the picture processed by the processing unit 402 to the CDN node.
Fifth, an embodiment of the present invention provides a system for implementing real-time image processing in the internet, and referring to fig. 5, the system includes:
the CDN node 501 is configured to send, after receiving a picture access request sent by a user, a picture meeting the picture access request to the user when the CDN node has the picture required by the picture access request; when the image does not have the image required by the image access request, forwarding the image access request to the image real-time processor; and receiving a returned picture after the image real-time processor processes the original picture according to the picture access request, and sending the received picture which accords with the picture access request to a user.
The image real-time processor 502 is configured to receive a picture access request of a user, process an original picture obtained from the image storage center 503 according to the received picture access request, and send the processed picture to the CDN node after the processing is completed.
And an image storage center 503 for storing the original pictures.
Preferably, the system shown in fig. 5 further comprises:
the image server 504 is configured to receive a picture access request forwarded by the CDN node, determine whether the picture access request requires an original picture, and if so, directly return the original picture stored in the image storage center 503 to the CDN node; if not, the picture access request is forwarded to the image real-time processor 502.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (12)
1. A method for image processing in the internet, comprising:
receiving a picture access request sent by a user;
when the picture required by the picture access request does not exist locally, forwarding the picture access request to an image real-time processor;
and receiving a returned picture for a user to use after the image real-time processor processes the original picture according to the picture access request.
2. The method of claim 1, further comprising:
and storing the received picture.
3. The method of claim 2, further comprising:
maintaining the locally stored picture, wherein the maintaining comprises: and deleting the pictures with the access frequency lower than the preset threshold value according to the access frequency of the locally stored pictures.
4. The method according to claim 3, wherein the maintaining of the locally stored picture specifically comprises:
maintenance is carried out regularly;
alternatively, the locally stored pictures are maintained when the locally available storage capacity is below a preset capacity threshold.
5. The method of claim 1, wherein the picture access request is forwarded to an image real-time processor via an image server when the pictures required by the picture access request are not available locally.
6. The method according to claim 1 or 5, wherein when there is no picture required by the picture access request locally, it means when the picture required by the picture access request is not an original picture.
7. A CDN node for realizing image processing in the Internet is characterized by comprising: first is connected to
The receiving unit is used for receiving a picture access request sent by a user;
the forwarding unit is used for forwarding the picture access request to the image real-time processor when the forwarding unit does not have the picture required by the picture access request;
the second receiving unit is used for receiving a returned picture which is obtained by processing the original picture by the image real-time processor according to the picture access request and is used by a user;
and the sending unit is used for sending the picture meeting the picture access request to the user.
8. The apparatus of claim 7, further comprising:
and the storage unit is used for storing the picture received by the second receiving unit.
9. The apparatus of claim 8, further comprising:
a maintenance unit, configured to maintain the picture stored in the CDN node, where the maintenance includes: and deleting the pictures with the access frequency lower than the preset threshold value according to the access frequency of the pictures stored in the CDN node.
10. An image real-time processor for realizing image processing in the internet, comprising:
the receiving unit is used for receiving a picture access request of a user;
the processing unit is used for processing the original picture according to the picture access request received by the receiving unit;
and the sending unit is used for sending the picture processed by the processing unit to the CDN node.
11. A system for real-time processing of images for image processing in the internet, comprising:
the CDN node is used for sending the picture meeting the picture access request to the user when the CDN node has the picture required by the picture access request after receiving the picture access request sent by the user; when the image does not have the image required by the image access request, forwarding the image access request to the image real-time processor; receiving a returned picture after the image real-time processor processes the original picture according to the picture access request, and sending the received picture which accords with the picture access request to a user;
the image real-time processor is used for receiving a picture access request of a user, processing an original picture according to the received picture access request, and sending the processed picture to the CDN node after the processing is finished;
and the image storage center is used for storing the original pictures.
12. The system of claim 11, further comprising:
the image server is used for receiving the picture access request forwarded by the CDN node, judging whether the picture access request is an original picture or not, and if so, directly returning the original picture stored in the image storage center to the CDN node; if not, the picture access request is forwarded to an image real-time processor.
Publications (1)
| Publication Number | Publication Date |
|---|---|
| HK1141169A true HK1141169A (en) | 2010-10-29 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11194719B2 (en) | Cache optimization | |
| CN110096660B (en) | Method and device for loading page pictures and electronic equipment | |
| US20100057846A1 (en) | Image processing method, apparatus and system | |
| US9451046B2 (en) | Managing CDN registration by a storage provider | |
| US20170142062A1 (en) | Network resource identification | |
| CN109992406B (en) | Picture request method, picture request response method and client | |
| CN103778236B (en) | Web data distribution processing method and device and auto-building html files treating method and apparatus | |
| US8909808B2 (en) | Redundancy elimination for web caching | |
| CN105450780A (en) | CDN system and source tracing method thereof | |
| WO2014166332A1 (en) | Method, client, server, and system for sharing content | |
| CN108932277B (en) | Webpage loading method, webpage loading system and server | |
| CN104965877A (en) | Webpage picture acquisition method, picture cache server, coordination server and system | |
| CN101459571A (en) | Method, system and apparatus for website mirroring | |
| US20170168997A1 (en) | System and computer-implemented method for incorporating an image into a page of content for transmission from a web-site | |
| CN109167840A (en) | A kind of task method for pushing, Site autonomy server and edge cache server | |
| CN113382180B (en) | Picture processing method, computing device and readable storage medium | |
| CN108234638A (en) | A kind of data processing method and device based on content distributing network CDN | |
| EP3495967A1 (en) | Systems and methods for digital content delivery over a network | |
| HK1141169A (en) | Method, apparatus and system for image processing in internet | |
| CN106657039B (en) | Portal page acquisition method, wireless AP and Portal server | |
| US10237592B2 (en) | Method and apparatus for video transmission | |
| TW201040872A (en) | Internet image processing method, device and system | |
| CN115567737B (en) | Method and device for replacing cut-out picture | |
| JP3725760B2 (en) | Information display system | |
| JP2008293281A (en) | Cache device, server, cache system, cache method, and program |