WO2017096787A1 - 图片处理方法及装置 - Google Patents
图片处理方法及装置 Download PDFInfo
- Publication number
- WO2017096787A1 WO2017096787A1 PCT/CN2016/088116 CN2016088116W WO2017096787A1 WO 2017096787 A1 WO2017096787 A1 WO 2017096787A1 CN 2016088116 W CN2016088116 W CN 2016088116W WO 2017096787 A1 WO2017096787 A1 WO 2017096787A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- task
- image
- picture
- download
- idle resource
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0888—Throughput
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
- H04L67/1078—Resource delivery mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/16—Indexing scheme for image data processing or generation, in general involving adaptation to the client's capabilities
Definitions
- the embodiments of the present invention relate to the field of network technologies, and in particular, to a picture processing method and apparatus.
- the image is usually browsed by the client in the form of a thumbnail.
- various files in the network including files uploaded by the user or generated by the website, are first stored in the network.
- the image processing server first performs image processing.
- the image processing server first downloads the image from the network storage, and then processes the downloaded image, including correcting the orientation, renaming, and compressing the image.
- the compressed image is uploaded to the node server of each place, and the node server generates the image thumbnail and the access address of the image thumbnail. After the client knows the access address of the image thumbnail, the thumbnail of the image can be browsed.
- the processing of the picture by the picture processing server mainly includes three operations of downloading a picture, processing a picture, and uploading a picture.
- the picture processing server processes the picture in a single-threaded operation, and downloads any picture. After processing and uploading, other images are processed, but as the number of network images increases, this single-threaded operation will greatly affect the efficiency of image processing.
- the embodiment of the invention provides a picture processing method and device, which are used to solve the technical problem of low efficiency of image processing in the prior art.
- the embodiment of the invention further provides a picture processing device.
- An embodiment of the present invention provides a picture processing method, where the method includes:
- the image processing server acquires two or more image processing requests that are allocated, and generates corresponding two or more image downloading tasks;
- bandwidth idle resource When the bandwidth idle resource is detected, and the bandwidth idle resource is greater than the first threshold, performing at least one picture download task to obtain a download picture corresponding to the picture download task;
- processing idle resource When the processing idle resource is detected, and the processing idle resource is greater than the second threshold, performing at least one picture operation task, processing the downloaded picture corresponding to the picture operation task, and obtaining a processed picture;
- the bandwidth idle resource is detected, and the bandwidth idle resource is greater than the third threshold, the at least one image uploading task is performed, and the processed image corresponding to the image uploading task is uploaded.
- An embodiment of the present invention provides a picture processing apparatus, where the apparatus includes:
- the task generation module is configured to obtain two or more image processing requests that are allocated, and generate corresponding two or more image downloading tasks;
- a picture downloading module configured to: when the bandwidth idle resource is greater than the first threshold, perform at least one picture download task, and obtain a download picture corresponding to the picture download task;
- An operation task generation module is configured to generate a picture operation task according to each downloaded picture
- a picture operation module configured to: when the processing idle resource is greater than the second threshold, perform at least one picture operation task, process the downloaded picture corresponding to the picture operation task, and obtain a processed picture;
- An upload task generation module is configured to generate an image upload task according to each processed image
- the image uploading module is configured to: when the bandwidth idle resource is detected, and the bandwidth idle resource is greater than the third threshold, perform at least one image uploading task, and upload the processed image corresponding to the image uploading task.
- An embodiment of the present invention provides a picture processing device, including: a memory, a processor, where
- the memory is configured to store one or more instructions, wherein the one or more instructions are for execution by the processor;
- the processor is configured to obtain two or more image processing requests that are allocated, and generate corresponding two or more image downloading tasks;
- the at least one image uploading task is performed, and the processed image corresponding to the image uploading task is uploaded.
- an embodiment of the present invention further provides a computer readable storage medium, where the program for executing the above method is stored in the computer readable storage medium.
- the image processing server establishes a corresponding image downloading task for each image processing request allocated by the task server, and establishes a picture for each downloaded image obtained by executing the image downloading task downloading.
- Operation task establish an image upload task for each processed picture obtained by executing the picture operation task.
- the image download task or the image uploading task can be executed.
- the image operation task can be performed, and there is no need to process the image processing request, download the image, process the image, and upload the image, and then execute the next image processing request. Only when there are idle resources, the picture can be downloaded, processed or uploaded, thereby realizing multi-thread operation, which not only fully utilizes resources, but also improves image processing efficiency.
- FIG. 1 is a flow chart of an embodiment of a picture processing method according to the present invention.
- FIG. 2 is a flow chart of still another embodiment of a picture processing method according to the present invention.
- FIG. 3 is a schematic structural diagram of an embodiment of a picture processing apparatus according to the present invention.
- FIG. 4 is a schematic structural diagram of still another embodiment of a picture processing apparatus according to the present invention.
- FIG. 5 is a schematic diagram of connection of an embodiment of a picture processing device according to the present invention.
- the embodiments of the present invention are mainly applied to processing various pictures generated in a network.
- the files in the network include files uploaded by a user or generated by a website, and are first stored in a network storage system.
- the task engine end sends an image processing request, which is processed by the image processing server, and the image processing server has multiple clusters.
- the assignment of image processing requests is typically performed by the task server.
- the task server responsible for load balancing may be an nginx server (engine x, a high-performance web server and a direction proxy server), and the image processing server may be a resin server (an application server).
- the image processing server performs image downloading, processing, and uploading to the node server, wherein the node server may be a distributed local distribution CDN (Content Delivery Network) server, and the node server generates the image thumbnail and the access address of the image thumbnail. And feedback to the network storage system, after the client knows the access address of the picture thumbnail, the picture thumbnail can be browsed.
- CDN Content Delivery Network
- the image processing server establishes a corresponding image downloading task for each image processing request allocated by the task server; Download each downloaded image obtained by the task download, establish a picture operation task; establish a picture upload task for each processed picture obtained by performing the picture operation task.
- the detection of the bandwidth idle resource may be real-time detection or periodic detection.
- the image download task or the image upload task may be performed.
- the image operation task may be performed. There is no need to process a request for one picture, download the picture, process the picture, and upload the picture, and then execute the next picture processing request. Only if there is an idle resource, the picture can be downloaded, processed or uploaded, thereby implementing multi-thread operation. Make full use of resources and improve the efficiency of image processing.
- FIG. 1 is a flowchart of an embodiment of a picture processing method according to the present invention. The method may include the following steps:
- the image processing server acquires two or more image processing requests that are allocated, and generates corresponding two or more image downloading tasks.
- the image processing request is specifically assigned by the task server.
- two or more picture processing requests include two picture processing requests.
- the task server may be an nginx server, which mainly performs load balancing on image processing, and allocates image processing requests to the image processing server in the cluster.
- the image processing server can be a resin server.
- a corresponding image download task is generated to facilitate image downloading.
- Step 102 When detecting that there is a bandwidth idle resource, and the bandwidth idle resource is greater than the first threshold, perform at least one picture download task to obtain a download picture corresponding to the picture download task.
- It may be real-time detection or periodic detection, and performing a picture download task for image downloading, that is, obtaining a picture corresponding to the picture processing request from the network storage system.
- bandwidth resources can be monitored. At least one picture download task can be performed whenever it detects that there is a bandwidth idle resource.
- the first threshold may be set according to bandwidth resources required to perform a picture download task.
- the at least one picture download task may be determined according to the amount of bandwidth idle resources.
- the monitoring may continue until the bandwidth idle resource exists and the bandwidth idle resource is greater than the first threshold, and then the image download task is performed.
- the downloaded image After the downloaded image is obtained, the downloaded image can be processed, so a picture operation task corresponding to each downloaded picture is generated.
- the processing of the idle resource is greater than the second threshold, the at least one picture operation task is performed, and the downloaded picture corresponding to the picture operation task is processed to obtain a processed picture.
- the processing of the idle resource refers to the idle processing resource of the image processing server, and the image processing is performed to perform image processing, and the processing resource of the image processing server needs to be occupied.
- the embodiment of the present invention can monitor the processing resources of the image processing server, and when there are idle resources, the at least one picture operation task can be performed.
- the second threshold may be set according to processing resources required to perform a picture operation task.
- the at least one picture operation task may be determined according to how much idle resources are processed.
- the monitoring may continue until the idle resource is processed and the idle resource is greater than the second threshold, and then the picture operation task is performed.
- the processing of the downloaded image includes correcting the orientation of the image, renaming, and compressing the image. The same as the prior art, and details are not described herein again.
- the image uploading task also needs to occupy the bandwidth idle resource, when monitoring the bandwidth idle resource, at least one image uploading task can be performed.
- the third threshold may be set according to bandwidth resources required to perform an image uploading task.
- the monitoring may continue until the bandwidth idle resource exists or the bandwidth idle resource is greater than the third threshold, and then the image upload task is performed.
- the processing image is uploaded to the node server, and the node server generates the image thumbnail and the access address of the image thumbnail.
- the image downloading task is first established, and the corresponding image processing task is established for the downloaded image, and the corresponding image uploading task is established for the processed image, and the bandwidth idle resource is detected and detected.
- bandwidth idle resource you can The line picture download task or the image upload task can perform the picture operation task when detecting the existence of the idle resource, without processing the image processing request, downloading the picture, processing the picture, and uploading the picture, and then executing the next picture processing request. Only when there are idle resources, the picture can be downloaded, processed or uploaded, thereby realizing multi-thread operation, which not only fully utilizes resources, but also improves image processing efficiency.
- the image uploading task and the image uploading task are required.
- the third threshold may be smaller than the first threshold, so that the image uploading task can be preferentially executed.
- the third threshold may also be greater than the first threshold, so that the picture download task may be preferentially executed.
- At least one image download task is performed. Download the picture and get the downloaded picture to:
- the bandwidth idle resource is detected, and the bandwidth idle resource is greater than the first threshold, if there is an image uploading task, the at least one image uploading task is preferentially executed, and the processed image corresponding to the at least one image uploading task is uploaded;
- At least one image downloading task is executed, and the image downloading is performed, and the downloaded image corresponding to the image downloading task is obtained.
- At least one image download task is executed according to the download priority in descending order of the download priority, and the download corresponding to the image download task is obtained. image.
- the download priority can be set by the task server and notified to the image processing server. Of course, Set by the image processing server.
- the download priority can be set according to the image source.
- the image source is the download priority of the computer is higher than the download priority of the mobile source.
- performing at least one picture operation task, processing the downloaded picture corresponding to the picture operation task, and obtaining the processed picture may:
- At least one picture operation task is executed according to the operation priority from high to low, and the corresponding operation of the picture operation task is performed.
- the picture is processed to obtain a processed picture;
- performing at least one image uploading task, and uploading the processed image corresponding to the image uploading task may include:
- At least one image upload task is executed according to the upload priority from high to low, and the image upload task is processed correspondingly.
- the picture is uploaded.
- the operation priority and upload priority can be set in the same way as the download priority.
- the priority of the operation may be that the operation of the first downloaded picture has a higher priority and the later downloaded picture has a lower priority.
- the upload priority may be that the image upload priority is high first, and the post-process image priority is low.
- the method may further include:
- the method may further include:
- the method further includes:
- the detecting that there is a bandwidth idle resource, and when the bandwidth idle resource is greater than the first threshold, performing at least one image download task, and obtaining the download image corresponding to the image download task may be:
- the bandwidth idle resource When the bandwidth idle resource is detected, and the bandwidth idle resource is greater than the first threshold, the at least one image download task in the download queue is obtained and executed, and the download image corresponding to the image download task is obtained;
- the processing idle resource is greater than the second threshold
- the at least one picture operation task is performed, and the downloaded picture corresponding to the picture operation task is processed, and the obtained processed picture may be:
- the processing idle resource When the processing idle resource is detected, and the processing idle resource is greater than the second threshold, the at least one picture operation task is obtained from the picture operation queue and executed, and the downloaded picture corresponding to the picture operation task is processed to obtain a processed picture. ;
- the detecting that there is a bandwidth idle resource, and the bandwidth idle resource is greater than the third threshold, performing at least one image uploading task, and uploading the processed image corresponding to the image uploading task may be:
- the bandwidth idle resource When the bandwidth idle resource is detected, and the bandwidth idle resource is greater than the third threshold, the at least one image uploading task in the image uploading queue is obtained and executed, and the processed image corresponding to the image uploading task is uploaded.
- each picture download task can be arranged according to the download priority level, so that the picture download task can be obtained directly from the picture download queue.
- each picture operation task can be arranged according to the operation priority, so that the picture download task can be obtained directly from the picture operation queue.
- each image uploading task can be arranged according to the uploading priority, so that the image uploading task can be obtained directly from the image operation queue.
- the method may further include: performing at least one image downloading task, performing image downloading, and obtaining the downloaded image, the method may further include:
- the image download task After the image download task fails to be executed, the image download task is re-executed;
- the task server feeds back to the task engine.
- the task engine can regenerate the image processing request according to the image processing request corresponding to the failed image download task, and the task server performs the allocation process.
- the image upload may also fail. Therefore, when there is a bandwidth idle resource, and the bandwidth idle resource is greater than the third threshold, performing at least one image download task, performing image download, and obtaining the downloaded image,
- the method can also include:
- the uploading fault information is generated and fed back to the task server.
- the task server feeds back to the task engine.
- the task engine can regenerate the image processing request according to the image processing request corresponding to the failed image upload task, and the task server performs the allocation process.
- the image processing server uploads the processing image processing corresponding to the image uploading task, specifically uploading to the node server, and the node server may be a CDN server located in each area, and the node server will upload the image and generate the image thumbnail and the image thumbnail.
- the access address is returned to the image processing server, and the image processing server returns the access address of the image thumbnail to the task server, and the task server feeds back to the image storage system.
- the image storage The system feeds back the access address of the client thumbnail, and the client can browse the thumbnail of the image.
- FIG. 2 A further embodiment of the image processing method provided by the present invention is described below with reference to FIG. 2, which may include the following steps:
- the image processing server acquires two or more image processing requests that are allocated, and generates corresponding two or more image downloading tasks.
- step 203 Detect whether there is a bandwidth idle resource that is greater than the first threshold, and if yes, perform step 204, if no, continue to detect.
- step 209 Detect whether there is a processing idle resource that is greater than the second threshold, and if yes, perform step 210, if not continue detecting.
- FIG. 3 is a schematic structural diagram of an embodiment of a picture processing apparatus according to an embodiment of the present disclosure.
- the apparatus in this embodiment is mainly applied to a picture processing server, where the image processing server may refer to a resin server in an actual application.
- the device can include:
- the download task generation module 301 is configured to acquire two or more image processing requests that are allocated, and generate corresponding two or more image download tasks.
- the task server may be an nginx server, which mainly performs load balancing on image processing, and allocates image processing requests to the image processing server in the cluster.
- the image downloading module 302 is configured to detect that there is a bandwidth idle resource, and when the bandwidth idle resource is greater than the first threshold, perform at least one image download task to obtain a download image corresponding to the image download task.
- bandwidth resources can be monitored. At least one picture download task can be performed whenever it detects that there is a bandwidth idle resource.
- the first threshold may be set according to bandwidth resources required to perform a picture download task.
- the at least one picture download task may be determined according to the amount of bandwidth idle resources.
- the picture downloading module detects that there is no bandwidth idle resource, or the bandwidth idle resource is less than the first threshold, the monitoring may continue until the bandwidth idle resource exists, and the bandwidth idle resource is greater than the first threshold, and then the image download task is performed.
- the operation task generation module 303 is configured to generate a picture operation task according to each downloaded picture.
- the picture operation module 304 is configured to detect that there is a processing idle resource, and when the processing idle resource is greater than the second threshold, perform at least one picture operation task, and process the downloaded picture corresponding to the picture operation task to obtain a processed picture.
- the processing of the idle resource refers to the idle processing resource of the image processing server, and the image processing is performed to perform image processing, and the processing resource of the image processing server needs to be occupied.
- the embodiment of the present invention can monitor the processing resources of the image processing server, and when there are idle resources, the at least one picture operation task can be performed.
- the second threshold may be set according to processing resources required to perform a picture operation task.
- the at least one picture operation task may be determined according to how much idle resources are processed.
- the monitoring may continue until the idle resource is processed or the idle resource is greater than the second threshold, and then the picture operation task is performed.
- the processing of the downloaded image includes correcting the orientation of the image, renaming, and compressing the image. The same as the prior art, and details are not described herein again.
- the uploading task generating module 305 is configured to generate an image uploading task according to each processed image
- the image uploading module 306 is configured to detect that there is a bandwidth idle resource, and when the bandwidth idle resource is greater than the third threshold, perform at least one image uploading task, and upload the processed image corresponding to the image uploading task.
- the image uploading task also needs to occupy the bandwidth idle resource, when monitoring the bandwidth idle resource, at least one image uploading task can be performed.
- the third threshold may be set according to bandwidth resources required to perform an image uploading task.
- the monitoring may continue until the bandwidth idle resource exists or the bandwidth idle resource is greater than the third threshold, and then the image uploading task is performed.
- the image downloading task is first established, and the corresponding image processing task is established for the downloaded image, and the corresponding image uploading task is established for the processed image, and the bandwidth idle resource is detected. It is real-time detection or periodic detection. When detecting idle resources with bandwidth, you can perform image download task or image upload task. When detecting the existence of idle resources, you can perform image operation tasks without downloading pictures for one image processing request. After processing the image and uploading the image, the next image processing request is executed, and the image can be downloaded, processed, or uploaded only if there is an idle resource, thereby realizing multi-threading operation, fully utilizing resources, and improving the image. Processing efficiency.
- the image uploading task and the image uploading task are required.
- the third threshold may be smaller than the first threshold, so that the image uploading task can be preferentially executed.
- the third threshold may also be greater than the first threshold, so that the picture download task may be preferentially executed.
- the image downloading module may be specifically used for:
- the image uploading module is triggered to execute at least one image uploading task, and the processed image corresponding to the at least one image uploading task is uploaded;
- At least one image downloading task is executed, and the image downloading is performed, and the downloaded image corresponding to the image downloading task is obtained.
- the picture download module may be specifically used to:
- At least one image download task is executed according to the download priority from high to low, and the image download is performed to obtain the image download.
- the download priority can be set by the task server and notified to the image processing server, and of course can also be set by the image processing server.
- the download priority can be set according to the image source.
- the image source is the download priority of the computer is higher than the download priority of the mobile source.
- the picture operation module may be specifically configured to:
- At least one picture operation task is executed according to the operation priority from high to low, and the corresponding operation of the picture operation task is performed.
- the picture is processed to obtain a processed picture;
- the image uploading module may be specifically configured to:
- At least one image upload task is executed according to the upload priority from high to low, and the image upload task is processed correspondingly.
- the picture is uploaded.
- the operation priority and upload priority can be set in the same way as the download priority.
- the priority of the operation may be that the operation of the first downloaded picture has a higher priority and the later downloaded picture has a lower priority.
- the upload priority may be that the image upload priority is high first, and the post-process image priority is low.
- the apparatus may include:
- the first queue module 307 is configured to add each image download task to the created image download queue
- a second queue module 308, configured to add each picture operation task to the created picture operation queue
- the third queue module 309 is configured to add each image uploading task to the created image uploading queue
- the picture download module 302 can be specifically configured to:
- the bandwidth idle resource When the bandwidth idle resource is detected, and the bandwidth idle resource is greater than the first threshold, the at least one image download task in the download queue is obtained and executed, and the download image corresponding to the image download task is obtained;
- the picture operation module 304 can be specifically configured to:
- the processing idle resource When the processing idle resource is detected, and the processing idle resource is greater than the second threshold, the at least one picture operation task is obtained from the picture operation queue and executed, and the downloaded picture corresponding to the picture operation task is processed to obtain a processed picture. ;
- the image uploading module specific 306 may be specifically configured to:
- the bandwidth idle resource When the bandwidth idle resource is detected, and the bandwidth idle resource is greater than the third threshold, the at least one image uploading task in the image uploading queue is obtained and executed, and the processed image corresponding to the image uploading task is uploaded.
- the image downloading module 302 may perform at least one image download task to obtain a download image when the bandwidth downloading resource is greater than the first threshold. After that, it is further used to re-execute the image download task after any image download task fails to execute;
- the apparatus may further include:
- the first fault module 310 is configured to generate a download fault information feedback to the task server after the image download task continuously fails for the first preset number of times.
- the task server feeds back to the task engine.
- the task engine can regenerate the image processing request according to the image processing request corresponding to the failed image download task, and the task server performs the allocation process.
- the image uploading may also fail. Therefore, the image uploading module 306 performs at least one image uploading task when the bandwidth idle resource exists, and uploads the processed image corresponding to the image uploading task. After the execution of any image uploading task fails, the image uploading task is re-executed;
- the apparatus may further include:
- the second fault module 311 is configured to generate an upload fault information feedback to the task server after the image upload task fails to execute the second preset number of times.
- the task server feeds back to the task engine.
- the task engine can regenerate the image processing request according to the image processing request corresponding to the failed image upload task, and the task server performs the allocation process.
- the image uploading module uploads the processed image processing corresponding to the image uploading task, specifically uploading to the node server, where the node server may be a CDN server located in each area.
- the node server regenerates the image thumbnail and the access address of the image thumbnail, and returns the access address of the image thumbnail to the image processing device, and the image processing device returns the access address of the image thumbnail to the task server, the task
- the server then feeds back to the image storage system.
- the image storage system feeds back the access address of the thumbnail of the client, and the client can browse the thumbnail of the image.
- An embodiment of the present invention further provides a picture processing system, including a picture processing server, a task engine end, a task server, and a node server;
- the picture processing server is configured with a picture processing device as described in the corresponding embodiment of FIG. 3 or FIG. 4.
- the task server is configured to allocate a picture processing request to the image processing server, receive the download failure information of the image processing server, and upload the fault information, and transmit the download fault information and the upload fault information to the task engine;
- the task engine is configured to generate a picture processing request when detecting a picture in the network storage system; regenerate the picture processing request according to the download failure information and the uploading the failure information; and trigger the task server to allocate the picture processing request;
- the node server is configured to receive a picture uploaded by the picture processing server, and generate a picture thumbnail and an access address of the thumbnail.
- the client when the client browses the image, the client can browse the image thumbnail according to the access address of the thumbnail.
- the resources of the image processing server are fully utilized, and the image processing efficiency is improved.
- the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
- FIG. 5 is a connection flowchart of an embodiment of a picture processing device according to an embodiment of the present invention.
- the device in this embodiment may be part of a picture processing server or a picture processing server, and the device may include: a memory 501, a processor 502. ,among them,
- the memory 501 is configured to store one or more instructions, where the one or more instructions are used by the processor 502 to invoke execution;
- the processor 502 is configured to acquire two or more image processing requests that are allocated, and generate corresponding two or more image downloading tasks;
- the at least one image uploading task is performed, and the processed image corresponding to the image uploading task is uploaded.
- the processor 502 is further configured to:
- At least one image download task is executed according to the download priority in descending order of the download priority, and the download corresponding to the image download task is obtained.
- At least one picture operation task is executed according to the operation priority from high to low, and the corresponding operation of the picture operation task is performed.
- the picture is processed to obtain a processed picture;
- At least one image upload task is executed according to the upload priority from high to low, and the image upload task is processed correspondingly.
- the picture is uploaded.
- the processor 502 is further configured to: when the bandwidth idle resource exists, perform at least one image download task, and after obtaining the downloaded image,
- the image download task After the image download task fails to be executed, the image download task is re-executed;
- the download failure information is generated and fed back to the task server.
- the processor 502 is further configured to: when the bandwidth idle resource exists, perform at least one image uploading task, and upload the processed image corresponding to the image uploading task,
- the uploading fault information is generated and fed back to the task server.
- the processor 502 is further configured to: after generating a picture download task,
- the bandwidth idle resource when detecting that there is a bandwidth idle resource, and the bandwidth idle resource is greater than the first threshold, acquiring at least one picture download task in the download queue and executing, obtaining a download picture corresponding to the picture download task;
- processing idle resource when detecting that there is a processing idle resource, and the processing idle resource is greater than a second threshold, acquiring at least one picture operation task from the picture operation queue and executing, processing the download picture corresponding to the picture operation task , get processed pictures;
- the bandwidth idle resource when detecting that there is a bandwidth idle resource, and the bandwidth idle resource is greater than the third threshold, acquiring at least one image uploading task in the image uploading queue and executing the image processing task corresponding to the image uploading task.
- the bandwidth idle resource when detecting that there is a bandwidth idle resource, and the bandwidth idle resource is greater than the third threshold, acquiring at least one image uploading task in the image uploading queue and executing, uploading the processing image corresponding to the image uploading task .
- the processor 502 in the device is a specific implementation of the device in FIG. 4, and the specific functions and effects thereof can also be referred to the description of the device in FIG. 4.
- an embodiment of the present invention further provides a computer readable storage medium, where the program for executing the method of the foregoing embodiment is stored.
- the image processing server establishes a corresponding image download task for each image processing request allocated by the task server, and establishes a picture operation task for each downloaded image obtained by executing the image download task downloading. Create an image upload task for each processed image obtained by performing a picture operation task.
- the detection of the bandwidth idle resource may be real-time detection or periodic detection. When detecting the idle resource of the bandwidth, the image download task or the image upload task may be performed. When the idle resource is detected, the image operation task may be performed.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Information Transfer Between Computers (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Facsimiles In General (AREA)
Abstract
本发明实施例提供一种图片处理方法及装置,所述方法包括:图片处理服务器获取分配的两个以上图片处理请求,生成两个以上图片下载任务;检测存在带宽空闲资源且带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得图片下载任务对应的下载图片;根据每一个下载图片,生成图片操作任务;检测存在处理空闲资源且处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;根据每一个处理图片,生成图片上传任务;检测存在带宽空闲资源且带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。本发明实施例提高了图片处理效率。
Description
交叉引用
本申请引用于2015年12月9日递交的名称为“图片处理方法及装置”的第201510906769.4号中国专利申请,其通过引用被全部并入本申请。
本发明实施例涉及网络技术领域,尤其涉及一种图片处理方法及装置。
随着电子技术以及网络技术的发展,带动了网络的崛起和智能设备的普及,互联网上图片的产生变得容易起来,每天都会增加大量新的图片,图片的访问流量在整个互联网流量中所占比例也逐渐提高。
为了节省图片访问流量,图片通常先以缩略图的方式供客户端浏览,在现有的一种网络架构中,网络中的各种文件包括用户上传或者网站生成的文件等先进行网络存储,如果网络存储的文件包括图片时,会先由图片处理服务器进行图片处理,图片处理服务器先从网络存储中下载图片,再将下载图片进行处理,包括修正图片方位、重命名以及对图片进行压缩等,最后将压缩之后的图片上传到各地的节点服务器,由节点服务器生成图片缩略图以及图片缩略图的访问地址,客户端获知图片缩略图的访问地址之后,即可以对图片缩略图进行浏览。
由上述描述可知,图片处理服务器对图片的处理主要包括下载图片、处理图片以及上传图片三个操作,现有技术中图片处理服务器对图片的处理都是单线程操作,对任一个图片在下载、处理以及上传之后,再对其他图片进行处理,但是随着网络图片的数量逐渐增多,这种单线程操作会大大影响图片处理的效率。
发明内容
本发明实施例提供一种图片处理方法及装置,用以解决现有技术图片处理效率低的技术问题。
本发明实施例还提供一种图片处理设备。
本发明实施例提供一种图片处理方法,所述方法包括:
图片处理服务器获取分配的两个以上图片处理请求,生成对应的两个以上图片下载任务;
检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片;
根据每一个下载图片,生成图片操作任务;
检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
根据每一个处理图片,生成图片上传任务;
检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
本发明实施例提供一种图片处理装置,所述装置包括:
下载任务生成模块,用于获取分配的两个以上图片处理请求,生成对应的两个以上图片下载任务;
图片下载模块,用于检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片;
操作任务生成模块,用于根据每一个下载图片,生成图片操作任务;
图片操作模块,用于检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
上传任务生成模块,用于根据每一个处理图片,生成图片上传任务;
图片上传模块,用于检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
本发明实施例提供一种图片处理设备,包括:存储器、处理器,其中,
所述存储器,用于存储一条或多条指令,其中,所述一条或多条指令以供所述处理器调用执行;
所述处理器,用于获取分配的两个以上图片处理请求,生成对应的两个以上图片下载任务;
用于检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片;
用于根据每一个下载图片,生成图片操作任务;
用于检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
用于根据每一个处理图片,生成图片上传任务;
用于检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
相应地,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有用于执行上述方法的程序。
本发明实施例提供的图片处理方法、装置及设备,图片处理服务器针对任务服务器分配的每一个图片处理请求,建立对应的图片下载任务;对执行图片下载任务下载获得的每一个下载图片,建立图片操作任务;对执行图片操作任务获得的每一个处理图片,建立图片上传任务。通过对带宽空闲资源进行检测,可以是实时检测或者周期性检测,检测存在带宽空闲资源时,即
可以执行图片下载任务或者图片上传任务,在检测存在处理空闲资源时,即可以执行图片操作任务,无需针对一个图片处理请求,下载图片、处理图片以及上传图片结束之后,再执行下一个图片处理请求,只有存在空闲的资源即可以进行图片的下载、处理或上传,从而实现了多线程操作,既充分利用了资源,又提高了图片处理效率。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明图片处理方法一个实施例流程图;
图2为本发明图片处理方法又一个实施例流程图;
图3为本发明图片处理装置一个实施例的结构示意图;
图4为本发明图片处理装置又一个实施例的结构示意图;
图5为本发明图片处理设备一个实施例的连接示意图。
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例主要应用于对网络中生成的各种图片的处理,网络中的文件包括用户上传或者网站生成的文件等,首先存储在网络存储系统中。在网络存储系统中的文件包括图片时,任务引擎端即会下发图片处理请求,由图片处理服务器进行处理,图片处理服务器有多个形成集群。为了负载均衡,
通常由任务服务器进行图片处理请求的分配。在实际应用中,负责负载均衡的任务服务器可以是nginx服务器(engine x,一种高性能的web服务器和方向代理服务器),图片处理服务器可以是resin服务器(一种应用服务器)。
图片处理服务器进行图片下载、处理以及上传至节点服务器,其中,节点服务器可以是分布在各地的CDN(Content Delivery Network,内容分发网络)服务器,由节点服务器生成图片缩略图以及图片缩略图的访问地址,并反馈给网络存储系统,客户端获知图片缩略图的访问地址之后,即可以对图片缩略图进行浏览。
由于现有技术中图片处理服务器对图片的处理是单线程操作,对任一个图片在下载、处理以及上传之后,再对其他图片进行处理,而分配给图处理服务器的图片处理请求不止一个,因此就会大大影响图片处理的效率。
为了解决这一技术问题,发明人经过一系列研究提出本发明技术方案,在本发明实施例中,图片处理服务器针对任务服务器分配的每一个图片处理请求,建立对应的图片下载任务;对执行图片下载任务下载获得的每一个下载图片,建立图片操作任务;对执行图片操作任务获得的每一个处理图片,建立图片上传任务。通过对带宽空闲资源进行检测,可以是实时检测或者周期性检测,检测存在带宽空闲资源时,即可以执行图片下载任务或者图片上传任务,在检测存在处理空闲资源时,即可以执行图片操作任务,无需针对一个图片处理请求,下载图片、处理图片以及上传图片结束之后,再执行下一个图片处理请求,只有存在空闲的资源即可以进行图片的下载、处理或上传,从而实现了多线程操作,既充分利用了资源,又提高了图片处理效率。
图1为本发明提供的一种图片处理方法一个实施例的流程图,该方法可以包括以下几个步骤:
101:图片处理服务器获取分配的两个以上图片处理请求,生成对应的两个以上图片下载任务。
该图片处理请求具体是任务服务器分配的。
其中,两个以上图片处理请求包括两个图片处理请求的情况。
在一个实际应用中,该任务服务器可以是nginx服务器,主要对图片处理进行负载均衡,分配图片处理请求给集群中的图片处理服务器。
图片处理服务器可以是resin服务器。
图片处理服务器接收到两个以上图片处理请求之后,针对每一个图片处理请求,即会生成对应的图片下载任务,以便于进行图片下载。
102:检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片。
可以是实时检测或者周期性检测,执行图片下载任务进行图片下载也即从网络存储系统中获取图片处理请求对应的图片。
本发明实施例中,可以对带宽资源进行监控。只要检测存在带宽空闲资源时,即可以执行至少一个图片下载任务。
其中,该第一阈值可以根据执行一个图片下载任务所需带宽资源进行设定。
该至少一个图片下载任务,可以根据带宽空闲资源的多少进行确定。
当当前不存在带宽空闲资源,或者带宽空闲资源小于第一阈值,则可以继续进行监控,直至存在带宽空闲资源且带宽空闲资源大于第一阈值时,再执行图片下载任务。
103:根据每一个下载图片,生成图片操作任务。
获得下载图片之后,即可以对下载图片进行处理,因此生成针对每一个下载图片对应的图片操作任务。
104:检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片。
处理空闲资源是指图片处理服务器的空闲的处理资源,执行图片操作进行图片处理,需要占用图片处理服务器的处理资源。
本发明实施例可以对图片处理服务器的处理资源进行监控,存在处理空闲资源时,即可以执行至少一个图片操作任务。
其中,该第二阈值可以根据执行一个图片操作任务所需处理资源进行设定。
该至少一个图片操作任务,可以根据处理空闲资源的多少进行确定。
当当前不存在处理空闲资源,或者处理空闲资源小于第二阈值,则可以继续进行监控,直至存在处理空闲资源且处理空闲资源大于第二阈值时,再执行图片操作任务。
对下载图片进行处理包括修正图片方位、重命名以及对图片进行压缩等,与现有技术相同,在此不再赘述。
105:根据每一个处理图片,生成图片上传任务。
106:检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
获得处理图片之后,针对每一个处理图片,生成对应的图片上传任务。
由于图片上传任务也需要占用带宽空闲资源,因此监控存在带宽空闲资源时,即可以执行至少一个图片上传任务。
其中,该第三阈值可以根据执行一个图片上传任务所需带宽资源进行设定。
当当前不存在带宽空闲资源,或者带宽空闲资源小于第三阈值,则可以继续进行监控,直至存在带宽空闲资源或者带宽空闲资源大于第三阈值时,再执行图片上传任务。
其中,具体是将处理图片上传至节点服务器,由节点服务器生成图片缩略图以及图片缩略图的访问地址。
本发明实施例中,接收到两个以上图片处理请求,首先建立图片下载任务,对下载图片建立对应的图片处理任务,对处理图片建立对应的图片上传任务,通过对带宽空闲资源进行检测,检测存在带宽空闲资源时,即可以执
行图片下载任务或者图片上传任务,在检测存在处理空闲资源时,即可以执行图片操作任务,无需针对一个图片处理请求,下载图片、处理图片以及上传图片结束之后,再执行下一个图片处理请求,只有存在空闲的资源即可以进行图片的下载、处理或上传,从而实现了多线程操作,既充分利用了资源,又提高了图片处理效率。
由于图片下载以及图片上传均需要占用带宽资源,为了合理调配图片下载任务以及图片上传任务,作为又一个实施例,该第三阈值可以小于所述第一阈值,从而使得可以优先执行图片上传任务。
当然,根据不同的实际应用情况,该第三阈值也可以大于所述第一阈值,使得可以优先执行图片下载任务。
另外,作为又一个实施例,为了优先执行图片上传任务,以保证一个图片处理请求处理完毕,此时检测存在带宽空闲资源,且带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,进行图片下载,获得下载图片可以:
检测存在带宽空闲资源,且带宽空闲资源大于第一阈值时,如果存在图片上传任务,优先执行至少一个图片上传任务,将所述至少一个图片上传任务对应的处理图片进行上传;
如果不存在图片上传任务,执行至少一个图片下载任务,进行图片下载,获得所述图片下载任务对应的下载图片。
其中,如果存在两个以上图片下载任务,则所述检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片可以:
检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,根据下载优先级,按照下载优先级从高到低的顺序,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片。
该下载优先级可以由任务服务器设定并告知图片处理服务器,当然也可
以由图片处理服务器进行设定。
下载优先级可以根据图片来源进行设定,比如图片来源为计算机的下载优先级高于图片来源为移动端的下载优先级。
所述检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片可以:
检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,根据操作优先级,按照操作优先级从高到低的顺序,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
所述检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传可以包括:
检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,根据上传优先级,按照上传优先级从高到低的顺序,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
该操作优先级以及上传优先级,与下载优先级的设定方式可以相同。
当然,该操作优先级可以是先下载的图片的操作优先级高、后下载的图片优先级低。该上传优先级可以是先处理的图片上传优先级高、后处理的图片优先级低等。
其中,为了保证图片下载、图片处理以及图片上传能够有序执行。在生成图片下载任务之后,所述方法还可以包括:
将每一个图片下载任务加入创建的图片下载队列中。
生成图片操作任务之后,所述方法还可以包括:
将每一个图片操作任务加入创建的图片操作队列中;
所述生成图片上传任务之后,所述方法还包括:
将每一个图片上传任务加入创建的图片上传队列中;
则所述检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片可以是:
检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,获取所述下载队列中的至少一个图片下载任务并执行,获得所述图片下载任务对应的下载图片;
所述检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片可以是:
检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,从所述图片操作队列中获取至少一个图片操作任务并执行,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
所述检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传可以是:
检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,获取所述图片上传队列中的至少一个图片上传任务并执行,将所述图片上传任务对应的处理图片进行上传。
在图片下载队列中,各个图片下载任务可以按照下载优先级进行排列,从而直接从图片下载队列中依次获取图片下载任务即可。
在图片操作队列中,各个图片操作任务可以按照操作优先级进行排列,从而直接从图片操作队列中依次获取图片下载任务即可。
在图片上传队列中,各个图片上传任务可以按照上传优先级进行排列,从而直接从图片操作队列中依次获取图片上传任务即可。
其中,作为又一个实施例,由于图片下载可以下载失败,因此在存在带
宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,进行图片下载,获得下载图片之后,所述方法还可以包括:
在任一图片下载任务执行失败之后,重新执行所述图片下载任务;
在所述图片下载任务连续执行失败第一预设次数之后,生成下载故障信息反馈给所述任务服务器。
任务服务器即会反馈给任务引擎端,任务引擎端可以根据失败的图片下载任务对应的图片处理请求,重新生成图片处理请求,由任务服务器进行分配处理。
作为又一个实施例,图片上传也可能会失败,因此在存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片下载任务,进行图片下载,获得下载图片之后,所述方法还可以包括:
在任一图片上传任务执行失败之后,重新执行所述图片上传任务;
在所述图片上传任务连续执行失败第二预设次数之后,生成上传故障信息反馈给所述任务服务器。
任务服务器即会反馈给任务引擎端,任务引擎端可以根据失败的图片上传任务对应的图片处理请求,重新生成图片处理请求,由任务服务器进行分配处理。
图片处理服务器将图片上传任务对应的处理图片处理进行上传,具体是上传至节点服务器,该节点服务器可以是位于各个区域的CDN服务器,由节点服务器将上传图片再生成图片缩略图以及图片缩略图的访问地址,将图片缩略图的访问地址返回给图片处理服务器,图片处理服务器再将图片缩略图的访问地址返回给任务服务器,任务服务器再反馈给图片存储系统,客户端请求浏览图片时,图片存储系统反馈给客户端缩略图的访问地址,客户端即可以实现对图片缩略图的浏览。
下面结合图2,对本发明提供的图片处理方法又一个实施例进行描述,该方法可以包括以下几个步骤:
201:图片处理服务器获取分配的两个以上图片处理请求,生成对应的两个以上图片下载任务。
202:将所述图片下载任务加入创建的图片下载队列中。
203:检测是否存在大于第一阈值的带宽空闲资源,如果是,执行步骤204,如果否继续检测。
204:获取所述图片下载队列中的至少一个图片下载任务并执行,进行图片下载,获得所述图片下载任务对应的下载图片。
205:在任一图片下载任务执行失败之后,重新执行所述图片下载任务;
206:在所述图片下载任务连续执行失败第一预设次数之后,生成下载故障信息反馈给任务服务器。
207:根据每一个下载图片,生成图片操作任务。
208:将每一个图片操作任务加入创建的图片操作队列中。
209:检测是否存在大于第二阈值的处理空闲资源,如果是,执行步骤210,如果否继续检测。
210:从所述图片操作队列中获取至少一个图片操作任务并执行,对所述图片操作任务对应的下载图片进行处理,获得处理图片。
211:根据每一个处理图片,生成图片上传任务。
212:将每一个图片上传任务加入创建的图片上传队列中。
213:检测是否存在大于第三阈值的带宽空闲资源,如果是,执行步骤214,如果否,继续检测。
214:获取所述图片上传队列中的至少一个图片上传任务并执行,将所述图片上传任务对应的处理图片进行上传。
215:在任一图片上传任务执行失败之后,重新执行所述图片上传任务;
216:在所述图片上传任务连续执行失败第二预设次数之后,生成上传故障信息反馈给任务服务器。
通过本发明实施例,充分利用了资源,提高了图片处理效率。
图3为本发明实施例提供的一种图片处理装置一个实施例的结构示意图,本实施例所述装置主要应用于图片处理服务器中,该图片处理服务器中在一个实际应用中可以是指resin服务器,该装置可以包括:
下载任务生成模块301,用于获取分配的两个以上图片处理请求,生成对应的两个以上图片下载任务。
在一个实际应用中,该任务服务器可以是nginx服务器,主要对图片处理进行负载均衡,分配图片处理请求给集群中的图片处理服务器。
图片下载模块302,用于检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片。
本发明实施例中,可以对带宽资源进行监控。只要检测存在带宽空闲资源时,即可以执行至少一个图片下载任务。
其中,该第一阈值可以根据执行一个图片下载任务所需带宽资源进行设定。
该至少一个图片下载任务,可以根据带宽空闲资源的多少进行确定。
当图片下载模块检测当前不存在带宽空闲资源,或者带宽空闲资源小于第一阈值,则可以继续进行监控,直至存在带宽空闲资源,且带宽空闲资源大于第一阈值时,再执行图片下载任务。
操作任务生成模块303,用于根据每一个下载图片,生成图片操作任务。
图片操作模块304,用于检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片。
处理空闲资源是指图片处理服务器的空闲的处理资源,执行图片操作进行图片处理,需要占用图片处理服务器的处理资源。
本发明实施例可以对图片处理服务器的处理资源进行监控,存在处理空闲资源时,即可以执行至少一个图片操作任务。
其中,该第二阈值可以根据执行一个图片操作任务所需处理资源进行设定。
该至少一个图片操作任务,可以根据处理空闲资源的多少进行确定。
当图片操作模块检测当前不存在处理空闲资源,或者处理空闲资源小于第二阈值,则可以继续进行监控,直至存在处理空闲资源或者处理空闲资源大于第二阈值时,再执行图片操作任务。
对下载图片进行处理包括修正图片方位、重命名以及对图片进行压缩等,与现有技术相同,在此不再赘述。
上传任务生成模块305,用于根据每一个处理图片,生成图片上传任务;
图片上传模块306,用于检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
由于图片上传任务也需要占用带宽空闲资源,因此监控存在带宽空闲资源时,即可以执行至少一个图片上传任务。
其中,该第三阈值可以根据执行一个图片上传任务所需带宽资源进行设定。
当图片上传模块检测当前不存在带宽空闲资源,或者带宽空闲资源小于第三阈值,则可以继续进行监控,直至存在带宽空闲资源或者带宽空闲资源大于第三阈值时,再执行图片上传任务。
本发明实施例中,接收到两个以上图片处理请求,首先建立图片下载任务,对下载图片建立对应的图片处理任务,对处理图片建立对应的图片上传任务,通过对带宽空闲资源进行检测,可以是实时检测或者周期性检测,检测存在带宽空闲资源时,即可以执行图片下载任务或者图片上传任务,在检测存在处理空闲资源时,即可以执行图片操作任务,无需针对一个图片处理请求,下载图片、处理图片以及上传图片结束之后,再执行下一个图片处理请求,只有存在空闲的资源即可以进行图片的下载、处理或上传,从而实现了多线程操作,既充分利用了资源,又提高了图片处理效率。
由于图片下载以及图片上传均需要占用带宽资源,为了合理调配图片下载任务以及图片上传任务,作为又一个实施例,该第三阈值可以小于所述第一阈值,从而使得可以优先执行图片上传任务。
当然,根据不同的实际应用情况,该第三阈值也可以大于所述第一阈值,使得可以优先执行图片下载任务。
另外,作为又一个实施例,为了优先执行图片上传任务,以保证一个图片处理请求处理完毕,此时图片下载模块可以具体用于:
检测存在带宽空闲资源,且带宽空闲资源大于第一阈值时,如果存在图片上传任务,优先触发图片上传模块执行至少一个图片上传任务,将所述至少一个图片上传任务对应的处理图片进行上传;
如果不存在图片上传任务,执行至少一个图片下载任务,进行图片下载,获得所述图片下载任务对应的下载图片。
其中,如果存在两个以上图片下载任务,所述图片下载模块可以具体用于:
检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,根据下载优先级,按照下载优先级从高到低的顺序,执行至少一个图片下载任务,进行图片下载,获得所述图片下载任务对应的下载图片;
该下载优先级可以由任务服务器设定并告知图片处理服务器,当然也可以由图片处理服务器进行设定。
下载优先级可以根据图片来源进行设定,比如图片来源为计算机的下载优先级高于图片来源为移动端的下载优先级。
所述图片操作模块可以具体用于:
检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,根据操作优先级,按照操作优先级从高到低的顺序,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
所述图片上传模块可以具体用于:
检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,根据上传优先级,按照上传优先级从高到低的顺序,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
该操作优先级以及上传优先级,与下载优先级的设定方式可以相同。
当然,该操作优先级可以是先下载的图片的操作优先级高、后下载的图片优先级低。该上传优先级可以是先处理的图片上传优先级高、后处理的图片优先级低等。
其中,为了保证图片下载、图片处理以及图片上传能够有序执行。如图4所示,该装置可以包括:
第一队列模块307,用于将每一个图片下载任务加入创建的图片下载队列中;
第二队列模块308,用于将每一个图片操作任务加入创建的图片操作队列中;
第三队列模块309,用于将每一个图片上传任务加入创建的图片上传队列中;
则所述图片下载模块302可以具体用于:
检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,获取所述下载队列中的至少一个图片下载任务并执行,获得所述图片下载任务对应的下载图片;
所述图片操作模块304可以具体用于:
检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,从所述图片操作队列中获取至少一个图片操作任务并执行,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
所述图片上传模块具体306可以具体用于:
检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,获取所述图片上传队列中的至少一个图片上传任务并执行,将所述图片上传任务对应的处理图片进行上传。
其中,作为又一个实施例,由于图片下载可以下载失败,因此所述图片下载模块302在存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得下载图片之后,还用于在任一图片下载任务执行失败之后,重新执行所述图片下载任务;
如图4所示,该装置还可以包括:
第一故障模块310,用于在所述图片下载任务连续执行失败第一预设次数之后,生成下载故障信息反馈给所述任务服务器。
任务服务器即会反馈给任务引擎端,任务引擎端可以根据失败的图片下载任务对应的图片处理请求,重新生成图片处理请求,由任务服务器进行分配处理。
作为又一个实施例,图片上传也可能会失败,因此所述图片上传模块306在存在带宽空闲资源时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传之后,还用于在任一图片上传任务执行失败之后,重新执行所述图片上传任务;
如图4所示,该装置还可以包括:
第二故障模块311,用于在所述图片上传任务连续执行失败第二预设次数之后,生成上传故障信息反馈给所述任务服务器。
任务服务器即会反馈给任务引擎端,任务引擎端可以根据失败的图片上传任务对应的图片处理请求,重新生成图片处理请求,由任务服务器进行分配处理。
其中,图片上传模块将图片上传任务对应的处理图片处理进行上传,具体是上传至节点服务器,该节点服务器可以是位于各个区域的CDN服务器,
由节点服务器将上传图片再生成图片缩略图以及图片缩略图的访问地址,将图片缩略图的访问地址返回给该图片处理装置,图片处理装置再将图片缩略图的访问地址返回给任务服务器,任务服务器再反馈给图片存储系统,客户端请求浏览图片时,图片存储系统反馈给客户端缩略图的访问地址,客户端即可以实现对图片缩略图的浏览。
本发明实施例还提供了一种图片处理系统,包括图片处理服务器、任务引擎端、任务服务器以及节点服务器;
图片处理服务器配置有如图3或图4对应实施例所述的图片处理装置。
任务服务器用于向图片处理服务器分配图片处理请求,并接收图片处理服务器的下载故障信息以及上传故障信息,将下载故障信息以及上传故障信息传输至任务引擎端;
任务引擎端用于检测网络存储系统中存在图片时,生成图片处理请求;根据下载故障信息以及上传故障信息,重新生成图片处理请求;触发任务服务器分配图片处理请求;
节点服务器用于接收图片处理服务器上传的图片,并生成图片缩略图以及所述缩略图的访问地址。
从而客户端在进行图片浏览时,可以根据缩略图的访问地址浏览图片缩略图。
通过本发明实施例的技术方案,充分利用了图片处理服务器的资源,提高了图片处理效率。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
图5为本发明提供的一种图片处理设备一个实施例的连接流程图,本实施例所述设备可以为图片处理服务器或图片处理服务器中的一部分,该设备可以包括:存储器501、处理器502,其中,
所述存储器501,用于存储一条或多条指令,其中,所述一条或多条指令以供所述处理器502调用执行;
所述处理器502,用于获取分配的两个以上图片处理请求,生成对应的两个以上图片下载任务;
用于检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片;
用于根据每一个下载图片,生成图片操作任务;
用于检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
用于根据每一个处理图片,生成图片上传任务;
用于检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
其中,所述处理器502,进一步用于,
检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,根据下载优先级,按照下载优先级从高到低的顺序,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片;
检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,根据操作优先级,按照操作优先级从高到低的顺序,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,根据上传优先级,按照上传优先级从高到低的顺序,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
其中,所述处理器502,还用于,在存在带宽空闲资源时,执行至少一个图片下载任务,获得下载图片之后,
在任一图片下载任务执行失败之后,重新执行所述图片下载任务;
在所述图片下载任务连续执行失败第一预设次数之后,生成下载故障信息反馈给任务服务器。
其中,所述处理器502,还用于,在存在带宽空闲资源时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传之后,
在任一图片上传任务执行失败之后,重新执行所述图片上传任务;
在所述图片上传任务连续执行失败第二预设次数之后,生成上传故障信息反馈给任务服务器。
其中,所述处理器502,还用于,生成图片下载任务之后,
将每一个图片下载任务加入创建的图片下载队列中;
进一步用于,检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,获取所述下载队列中的至少一个图片下载任务并执行,获得所述图片下载任务对应的下载图片;
还用于,生成图片操作任务之后,
将每一个图片操作任务加入创建的图片操作队列中;
进一步用于,检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,从所述图片操作队列中获取至少一个图片操作任务并执行,对所述图片操作任务对应的下载图片进行处理,获得处理图片;
还用于,生成图片上传任务之后,
将每一个图片上传任务加入创建的图片上传队列中;
进一步用于,检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,获取所述图片上传队列中的至少一个图片上传任务并执行,将所述图片上传任务对应的处理图片。
进一步用于,检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,获取所述图片上传队列中的至少一个图片上传任务并执行,将所述图片上传任务对应的处理图片进行上传。
可以看到,该设备中的处理器502即是图4中装置一种具体实现,其具体功能和效果也可以参照对图4中装置的说明。
相应地,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有用于执行上述实施例方法的程序。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。
本发明实施例提供的图片处理方法及装置,图片处理服务器针对任务服务器分配的每一个图片处理请求,建立对应的图片下载任务;对执行图片下载任务下载获得的每一个下载图片,建立图片操作任务;对执行图片操作任务获得的每一个处理图片,建立图片上传任务。通过对带宽空闲资源进行检测,可以是实时检测或者周期性检测,检测存在带宽空闲资源时,即可以执行图片下载任务或者图片上传任务,在检测存在处理空闲资源时,即可以执行图片操作任务,无需针对一个图片处理请求,下载图片、处理图片以及上传图片结束之后,再执行下一个图片处理请求,只有存在空闲的资源即可以
进行图片的下载、处理或上传,从而实现了多线程操作,既充分利用了资源,又提高了图片处理效率。
Claims (12)
- 一种图片处理方法,其特征在于,包括:图片处理服务器获取分配的两个以上图片处理请求,生成对应的两个以上图片下载任务;检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片;根据每一个下载图片,生成图片操作任务;检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;根据每一个处理图片,生成图片上传任务;检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
- 根据权利要求1所述的方法,其特征在于,所述检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片包括:检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,根据下载优先级,按照下载优先级从高到低的顺序,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片;所述检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片包括:检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,根据操作优先级,按照操作优先级从高到低的顺序,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;所述检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传包括:检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,根据上传优先级,按照上传优先级从高到低的顺序,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
- 根据权利要求1所述的方法,其特征在于,所述在存在带宽空闲资源时,执行至少一个图片下载任务,获得下载图片之后,所述方法还包括:在任一图片下载任务执行失败之后,重新执行所述图片下载任务;在所述图片下载任务连续执行失败第一预设次数之后,生成下载故障信息反馈给任务服务器。
- 根据权利要求1所述的方法,其特征在于,所述在存在带宽空闲资源时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传之后,所述方法还包括:在任一图片上传任务执行失败之后,重新执行所述图片上传任务;在所述图片上传任务连续执行失败第二预设次数之后,生成上传故障信息反馈给任务服务器。
- 根据权利要求1所述的方法,其特征在于,所述生成图片下载任务之后,所述方法还包括:将每一个图片下载任务加入创建的图片下载队列中;所述检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片包括:检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,获取所述下载队列中的至少一个图片下载任务并执行,获得所述图片下载任务对应的下载图片;所述生成图片操作任务之后,所述方法还包括:将每一个图片操作任务加入创建的图片操作队列中;所述检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片包括:检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,从所述图片操作队列中获取至少一个图片操作任务并执行,对所述图片操作任务对应的下载图片进行处理,获得处理图片;所述生成图片上传任务之后,所述方法还包括:将每一个图片上传任务加入创建的图片上传队列中;所述检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传包括:检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,获取所述图片上传队列中的至少一个图片上传任务并执行,将所述图片上传任务对应的处理图片进行上传。
- 一种图片处理装置,其特征在于,包括:下载任务生成模块,用于获取分配的两个以上图片处理请求,生成对应的两个以上图片下载任务;图片下载模块,用于检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片;操作任务生成模块,用于根据每一个下载图片,生成图片操作任务;图片操作模块,用于检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;上传任务生成模块,用于根据每一个处理图片,生成图片上传任务; 图片上传模块,用于检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
- 根据权利要求6所述的装置,其特征在于,所述图片下载模块具体用于:检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,根据下载优先级,按照下载优先级从高到低的顺序,执行至少一个图片下载任务,获得所述图片下载任务对应的下载图片;所述图片操作模块具体用于:检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,根据操作优先级,按照操作优先级从高到低的顺序,执行至少一个图片操作任务,对所述图片操作任务对应的下载图片进行处理,获得处理图片;所述图片上传模块具体用于:检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,根据上传优先级,按照上传优先级从高到低的顺序,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传。
- 根据权利要求6所述的装置,其特征在于,所述图片下载模块在存在带宽空闲资源时,执行至少一个图片下载任务,获得下载图片之后,还用于在任一图片下载任务执行失败之后,重新执行所述图片下载任务;所述装置还包括:第一故障模块,用于在所述图片下载任务连续执行失败第一预设次数之后,生成下载故障信息反馈给任务服务器。
- 根据权利要求6所述的装置,其特征在于,所述图片上传模块在存在带宽空闲资源时,执行至少一个图片上传任务,将所述图片上传任务对应的处理图片进行上传之后,还用于在任一图片上传任务执行失败之后,重新执行所述图片上传任务;所述装置还包括:第二故障模块,用于在所述图片上传任务连续执行失败第二预设次数之后,生成上传故障信息反馈给任务服务器。
- 根据权利要求6所述的装置,其特征在于,还包括:第一队列模块,用于将每一个图片下载任务加入创建的图片下载队列中;第二队列模块,用于将每一个图片操作任务加入创建的图片操作队列中;第三队列模块,用于将每一个图片上传任务加入创建的图片上传队列中;所述图片下载模块具体用于:检测存在带宽空闲资源,且所述带宽空闲资源大于第一阈值时,获取所述下载队列中的至少一个图片下载任务并执行,获得所述图片下载任务对应的下载图片;所述图片操作模块具体用于:检测存在处理空闲资源,且所述处理空闲资源大于第二阈值时,从所述图片操作队列中获取至少一个图片操作任务并执行,对所述图片操作任务对应的下载图片进行处理,获得处理图片;所述图片上传模块具体用于:检测存在带宽空闲资源,且所述带宽空闲资源大于第三阈值时,获取所述图片上传队列中的至少一个图片上传任务并执行,将所述图片上传任务对应的处理图片进行上传。
- 一种图片处理设备,包括:一个或多个处理器;存储器;和一个或多个指令,所述一个或多个指令存储于所述存储器中并被配置成由所述一个或多个处理器执行,其中,所述一个或多个模块配置用于执行上述权利要求1-5任一所述的方法。
- 一种计算机可读存储介质,所述计算机可读存储介质中存储有用于执行权利要求1-5任一所述方法的程序。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/246,270 US20170171307A1 (en) | 2015-12-09 | 2016-08-24 | Method and electronic apparatus for processing picture |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510906769.4A CN105897500A (zh) | 2015-12-09 | 2015-12-09 | 图片处理方法及装置 |
| CN201510906769.4 | 2015-12-09 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/246,270 Continuation US20170171307A1 (en) | 2015-12-09 | 2016-08-24 | Method and electronic apparatus for processing picture |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017096787A1 true WO2017096787A1 (zh) | 2017-06-15 |
Family
ID=57002885
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/088116 Ceased WO2017096787A1 (zh) | 2015-12-09 | 2016-07-01 | 图片处理方法及装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20170171307A1 (zh) |
| CN (1) | CN105897500A (zh) |
| WO (1) | WO2017096787A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107885813A (zh) * | 2017-11-03 | 2018-04-06 | 广东欧珀移动通信有限公司 | 图片处理方法、移动终端及计算机可读存储介质 |
| CN108073894A (zh) * | 2017-11-17 | 2018-05-25 | 杭州中威电子股份有限公司 | 一种分布式人脸特征计算方法 |
| US11340760B2 (en) | 2019-09-06 | 2022-05-24 | Dropbox, Inc. | Generating a customized organizational structure for uploading content to a cloud-based storage system |
| CN112351113B (zh) * | 2021-01-08 | 2021-04-06 | 恒信东方文化股份有限公司 | 一种负载均衡系统及其方法 |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2018021A2 (en) * | 2007-07-18 | 2009-01-21 | Samsung Electronics Co., Ltd. | Method for selecting a QoS in a portable communication system |
| CN103634352A (zh) * | 2012-08-24 | 2014-03-12 | 腾讯科技(深圳)有限公司 | 图片上传方法和系统、客户端 |
| CN103677939A (zh) * | 2013-12-25 | 2014-03-26 | 广东天拓资讯科技有限公司 | 一种网络游戏场景图片的加载方法及装置 |
| CN103699566A (zh) * | 2013-11-01 | 2014-04-02 | 北京奇虎科技有限公司 | 一种图片实时切图装置及方法 |
| CN104391890A (zh) * | 2014-11-10 | 2015-03-04 | 广东欧珀移动通信有限公司 | 图片加载方法及系统 |
| US20150163304A1 (en) * | 2013-12-09 | 2015-06-11 | Sony Corporation | Method in an electronic mobile device and such a device |
| CN104994082A (zh) * | 2015-06-16 | 2015-10-21 | 努比亚技术有限公司 | 一种图片信息处理方法、服务器及系统 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101794567B (zh) * | 2010-02-10 | 2014-01-01 | 中兴通讯股份有限公司 | 图片加载的方法及终端 |
| CN103297468B (zh) * | 2012-02-29 | 2017-12-01 | 华为技术有限公司 | 针对群组资源的操作方法、群组服务器 |
| CN103327042B (zh) * | 2012-03-21 | 2015-12-16 | 腾讯科技(深圳)有限公司 | 一种将批量图片上传到网络相册的方法以及一种客户端 |
| CN103645892B (zh) * | 2013-11-29 | 2017-11-14 | 北京奇虎科技有限公司 | 一种图片处理方法和系统 |
-
2015
- 2015-12-09 CN CN201510906769.4A patent/CN105897500A/zh active Pending
-
2016
- 2016-07-01 WO PCT/CN2016/088116 patent/WO2017096787A1/zh not_active Ceased
- 2016-08-24 US US15/246,270 patent/US20170171307A1/en not_active Abandoned
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2018021A2 (en) * | 2007-07-18 | 2009-01-21 | Samsung Electronics Co., Ltd. | Method for selecting a QoS in a portable communication system |
| CN103634352A (zh) * | 2012-08-24 | 2014-03-12 | 腾讯科技(深圳)有限公司 | 图片上传方法和系统、客户端 |
| CN103699566A (zh) * | 2013-11-01 | 2014-04-02 | 北京奇虎科技有限公司 | 一种图片实时切图装置及方法 |
| US20150163304A1 (en) * | 2013-12-09 | 2015-06-11 | Sony Corporation | Method in an electronic mobile device and such a device |
| CN103677939A (zh) * | 2013-12-25 | 2014-03-26 | 广东天拓资讯科技有限公司 | 一种网络游戏场景图片的加载方法及装置 |
| CN104391890A (zh) * | 2014-11-10 | 2015-03-04 | 广东欧珀移动通信有限公司 | 图片加载方法及系统 |
| CN104994082A (zh) * | 2015-06-16 | 2015-10-21 | 努比亚技术有限公司 | 一种图片信息处理方法、服务器及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105897500A (zh) | 2016-08-24 |
| US20170171307A1 (en) | 2017-06-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11275622B2 (en) | Utilizing accelerators to accelerate data analytic workloads in disaggregated systems | |
| CN105245373B (zh) | 一种容器云平台系统的搭建及运行方法 | |
| JP6276273B2 (ja) | 分散型データグリッドクラスタにおけるメッセージ前処理をサポートするシステムおよび方法 | |
| US9043382B2 (en) | Stream processing using a client-server architecture | |
| JP2020501253A (ja) | 局所化されたデバイスコーディネータにおけるオンデマンドコード実行 | |
| CN112463290A (zh) | 动态调整计算容器的数量的方法、系统、装置和存储介质 | |
| CN103873597B (zh) | 分布式网页下载方法和系统 | |
| CN103412786A (zh) | 一种高性能服务器架构系统及数据处理方法 | |
| WO2018121334A1 (zh) | 一种提供网页应用服务的方法、装置、电子设备及系统 | |
| CN103995748A (zh) | 智能终端的任务处理方法及系统 | |
| JP2020502643A (ja) | オンデマンドコード実行能力を有する局所化されたデバイスコーディネータ | |
| WO2017096787A1 (zh) | 图片处理方法及装置 | |
| CN105978938A (zh) | 一种业务处理设备的业务状态确定方法及调度设备 | |
| US20160087759A1 (en) | Tuple recovery | |
| US9912570B2 (en) | Dynamic cloning of application infrastructures | |
| CN103501350B (zh) | 一种云计算平台中SaaS应用部署的方法及装置 | |
| CN107402862A (zh) | 用于在客户端实现资源编排的方法与设备 | |
| CN117807043A (zh) | Nexus仓库制品的同步方法、装置、计算机设备及存储介质 | |
| WO2015027733A1 (zh) | 一种分布式java程序运行方法、装置和系统 | |
| CN106294408A (zh) | 对动态网页的异步请求进行监控的方法和装置 | |
| CN106909456A (zh) | 一种信息获取方法及装置 | |
| WO2018196459A1 (zh) | 一种下载请求处理方法、装置、处理设备及介质 | |
| US20210168208A1 (en) | System And Method For Facilitating Deduplication Of Operations To Be Performed | |
| CN112988806A (zh) | 一种数据处理的方法及装置 | |
| US20250373678A1 (en) | Private micro frontends with api access to code artifacts in a software repository |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16871991 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16871991 Country of ref document: EP Kind code of ref document: A1 |