CN109448075A - A kind of image processing method and server - Google Patents
A kind of image processing method and server Download PDFInfo
- Publication number
- CN109448075A CN109448075A CN201811198036.XA CN201811198036A CN109448075A CN 109448075 A CN109448075 A CN 109448075A CN 201811198036 A CN201811198036 A CN 201811198036A CN 109448075 A CN109448075 A CN 109448075A
- Authority
- CN
- China
- Prior art keywords
- picture processing
- picture
- data flow
- server
- target photo
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 12
- 238000012545 processing Methods 0.000 claims abstract description 317
- 238000011282 treatment Methods 0.000 claims abstract description 24
- 238000000034 method Methods 0.000 claims abstract description 17
- 230000005540 biological transmission Effects 0.000 claims description 7
- 230000010076 replication Effects 0.000 claims description 7
- 239000000284 extract Substances 0.000 claims description 6
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
-
- 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
-
- 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/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- 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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of image processing method and servers, belong to technical field of image processing.The described method includes: server, which receives the picture to Target Photo that client is sent, handles request, the data flow and picture processing parameter of the Target Photo are obtained;The online picture processor of the server is by the data flow and the picture processing parameter, the default picture processing module that is sent in the operating system for being integrated in the server;The default picture processing module is based on the picture processing parameter and handles the data flow, and the data flow is back to the online picture processor by treated;Based on treated, the data flow generates the processed Target Photo to the server, and the processed Target Photo is back to the client.Using the present invention, picture treatment effeciency can be improved.
Description
Technical field
The present invention relates to technical field of image processing, in particular to a kind of image processing method and server.
Background technique
With the rapid development of Internet, various network class applications emerge one after another, such as online picture processor.In line chart
Piece processor is usually write and is mounted on the server of provider by Java programming language, and user can be used above-mentioned in line chart
Piece processor carries out picture processing.
When user wants to handle a certain picture, user can be entered upper by the web browser of any client
Online picture processor is stated, then can select various editting functions in above-mentioned online picture processor, such as scaling is cut
Deng to above-mentioned picture progress picture processing operation.In this way, above-mentioned web browser can receive above-mentioned picture processing operation,
And corresponding picture processing request is generated based on the picture processing operation, picture processing request is sent to above-mentioned server.
Later, above-mentioned server can be based in online picture processor and picture processing when receiving above-mentioned picture processing request
Corresponding web (website, website) project calls local picture processor to carry out corresponding picture processing to above-mentioned picture, and
By treated, picture returns to user after the completion of picture processing.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
In order to support above-mentioned online picture processor, above-mentioned local picture processor is usually that Java programming language is used to compile
The application layer program write, so the local picture processor is weaker to the oncurrent processing ability of picture, processing speed is lower;Together
When, for the ease of operation management, usually above-mentioned local picture processor is deployed on other application server, so that above-mentioned
Picture processing request, which is often received by above-mentioned server and is transmitted to application server, to be handled, the time for causing picture to handle
It is longer.So picture treatment effeciency is lower.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of image processing method and servers.Institute
It is as follows to state technical solution:
In a first aspect, providing a kind of image processing method, which comprises
Server receives the picture to Target Photo that client is sent and handles request, obtains the data of the Target Photo
Stream and picture processing parameter;
The data flow and the picture processing parameter are sent to and are integrated in by the online picture processor of the server
Default picture processing module in the operating system of the server;
The default picture processing module is based on the picture processing parameter and handles the data flow, and will processing
The data flow afterwards is back to the online picture processor;
Based on treated, the data flow generates the processed Target Photo to the server, and will be processed
The Target Photo is back to the client
Further, the picture processing request carries the network address of Target Photo;
The data flow for obtaining the Target Photo, comprising:
The server extracts the network address of the Target Photo from picture processing request, and passes through access institute
The network address for stating Target Photo obtains the data flow of the Target Photo.
Further, the picture processing request carries the operational order to Target Photo;
The picture processing parameter for obtaining the Target Photo, comprising:
The server extracts the operational order to Target Photo from picture processing request, by the operation
Order is converted to the picture processing parameter.
Further, the application for being directed toward the default picture processing module is integrated in the online picture processor in advance
Program Interfaces;
The data flow and the picture processing parameter are sent to and are integrated in by the online picture processor of the server
Default picture processing module in the operating system of the server, comprising:
The online picture processor of the server is by the application programming interface, by the data flow and described
Picture processing parameter is sent to the default picture processing module in the operating system for being integrated in the server;
It is described that by treated, the data flow is back to the online picture processor, comprising:
The server is by the way that the application programming interface will treated that the data flow is back to is described online
Picture processor.
Further, the default picture processing module is generated based on the library ImageMagick, and with the shape of dynamic link library
Formula is integrated in the operating system of the server.
Further, the default picture processing module be based on the picture processing parameter to the data flow at
Reason, and the data flow is back to the online picture processor by treated, comprising:
When the picture processing parameter is multiple, the default picture processing module is according to the picture processing parameter
The data flow replication is a plurality of data flow by quantity, and is carried out simultaneously according to each picture processing parameter to every data stream
Hair processing;
The default picture processing module merges the pieces of data stream after concurrent processing, and will be described in after merging
Data flow is back to the online picture processor.
Further, the default picture processing module be based on the picture processing parameter to the data flow at
Reason, comprising:
When receiving the data flow, the default picture processing module carries out checking treatment to the data flow;
The default picture processing module locks the data flow, and be based on after completing the checking treatment
The picture processing parameter handles the data flow.
Second aspect, provides a kind of server, and the server is equipped with online picture processor, wherein the clothes
Business device include:
Module is obtained, for receiving the picture processing request to Target Photo of client transmission, obtains the target figure
The data flow and picture processing parameter of piece;
The online picture processor, for being sent to the data flow and the picture processing parameter and being integrated in institute
State the default picture processing module in the operating system of server;
The default picture processing module, for being handled based on the picture processing parameter the data flow, and
By treated, the data flow is back to the online picture processor;
Return module for based on treated, the data flow to generate the processed Target Photo, and will have been located
The Target Photo of reason is back to the client.
Further, the picture processing request carries the network address of Target Photo;
The acquisition module, is also used to:
The network address of the Target Photo is extracted from picture processing request, and by accessing the Target Photo
Network address obtain the data flow of the Target Photo.
Further, the picture processing request carries the operational order to Target Photo;
The acquisition module, is also used to:
The operational order to Target Photo is extracted from picture processing request, the operational order is converted to
The picture processing parameter.
Further, the application for being directed toward the default picture processing module is integrated in the online picture processor in advance
Program Interfaces;
The online picture processor, is also used to:
By the application programming interface, the data flow and the picture processing parameter are sent to and are integrated in institute
State the default picture processing module in the operating system of server;
The return module, is also used to:
By the application programming interface, by treated, the data flow is back to the online picture processor.
Further, the default picture processing module is generated based on the library ImageMagick, and with the shape of dynamic link library
Formula is integrated in the operating system of the server.
Further, the default picture processing module, is also used to:
When the picture processing parameter is multiple, according to the quantity of the picture processing parameter by the data flow replication
For a plurality of data flow, and concurrent processing is carried out to every data stream according to each picture processing parameter;
Pieces of data stream after concurrent processing is merged, and the data flow after merging is back to described online
Picture processor.
Further, the default picture processing module, is also used to:
When receiving the data flow, checking treatment is carried out to the data flow;
After completing the checking treatment, the data flow is locked, and based on the picture processing parameter to institute
Data flow is stated to be handled.
Technical solution provided in an embodiment of the present invention has the benefit that
In the present embodiment, the picture to Target Photo that server receives that client is sent handles request, obtains target
The data flow and picture processing parameter of picture;The online picture processor of server sends data flow and picture processing parameter
Default picture processing module into the operating system for being integrated in server;Default picture processing module is based on picture processing parameter
Data stream is handled, and data flow is back to online picture processor by treated;Server be based on treated number
Processed Target Photo is generated according to stream, and processed Target Photo is back to client.In this way, server can will be to
The picture of processing directly transfers to default picture processing module to carry out picture processing, is used as since this presets picture processing module
The oncurrent processing ability and processing speed of picture can be improved in the system service registered in operating system.Furthermore it is also possible to solve
Because server by picture to be processed be transmitted to other application server handled brought by network transmission consumption problem, into
One step reduces the picture processing time, effectively increases picture treatment effeciency.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is a kind of network scenarios schematic diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of image processing method flow chart provided in an embodiment of the present invention;
Fig. 3 is a kind of step schematic diagram of image processing method provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
The embodiment of the invention provides a kind of image processing method, the executing subject of this method can be server, can
To be deployed in the computer room that the provider of online picture processor is managed, above-mentioned online picture processor be can integrate in each offer
In the cloud storage business of quotient, for provide online picture editing function using the user of cloud storage business.Above-mentioned server can
To carry out picture processing to picture to be processed, while the web application of above-mentioned online picture processor can also be provided for user
Interface, user can log in the web application interface by operating in the web browser of any client, using above-mentioned in line chart
Piece processor carries out online picture processing to picture to be processed.Corresponding network scenarios can be as shown in Figure 1.Above-mentioned server
In may include processor, memory, transceiver, processor can be used for carrying out the processing in following processes to picture, storage
Device can be used for storing the data of the data and generation that need in following treatment processes, and transceiver can be used for sending and receiving
Related data in following treatment processes.
It is detailed to a kind of process flow progress of image processing method shown in Fig. 2 below in conjunction with specific embodiment
Explanation, content can be such that
Step 201, the picture to Target Photo that server receives that client is sent handles request, obtains Target Photo
Data flow and picture processing parameter.
In an implementation, when user wants to carry out picture processing to a certain picture (can be described as Target Photo), user can be
Mounted web browser is opened in any client (such as personal computer, tablet computer), then in web browser
Address field in Input Online picture processor web application interface IP (Internet Protocol, Internet protocol)
Address, so as to enter the online picture processor, later, user can select various in above-mentioned online picture processor
Editting function carries out picture processing operation, such as passes through the clipping region of mouse selection picture, combined mouse pulley and keyboard
Shortcut key carries out picture scaling etc..In this way, above-mentioned web browser can receive above-mentioned picture processing operation, and can be based on
Picture processing operation generates corresponding picture processing request, and later, web browser can send the processing request of above-mentioned picture
The server of online picture processing business is provided to for the client.Server is receiving that above-mentioned client sends to target
After the picture processing request of picture, can data flow to Target Photo and picture processing parameter obtain, wherein data flow
It can be the set of all binary data of Target Photo, picture processing parameter may include zooming parameter, cutting parameter, water
One or more processing parameters such as parameter are printed, each picture processing parameter may include one or more subparameters, for example, scaling
Parameter may include zoom width parameter, scaling height parameter, and cutting parameter may include cutting abscissa parameter, cutting vertical sit
Mark parameter.
Optionally, above-mentioned server can obtain the data flow of Target Photo by the network address of Target Photo, accordingly
Processing can be such that server from picture processing request in extract Target Photo network address, and pass through access target figure
The network address of piece obtains the data flow of Target Photo.
In an implementation, the picture processing request for the network address for carrying Target Photo can be generated in web browser.This
Sample, for above-mentioned server after receiving the picture processing request to Target Photo that above-mentioned client is sent, server can be from
The network address of Target Photo is extracted in picture processing request, later, the accessible network address of server obtains target
The data flow of picture.Specifically, the network address of Target Photo can be URL (Uniform Resource Locator, unification
Resource Locator) address, such as ww4.sinaimg.cn/large/006y8mN6gw1fa5ob, server is by accessing the URL
Address, the available data flow to Target Photo.Further, if Target Photo is stored in the figure of client local
Piece, the Target Photo for being stored in client then directly can be sent to above-mentioned server by web browser, in this way, above-mentioned service
The available data flow to Target Photo of device.
Optionally, the picture that above-mentioned server can obtain Target Photo based on the operational order to Target Photo handles ginseng
Number, corresponding processing can be such that server extracts the operational order to Target Photo from picture processing request, operation ordered
Order is converted to picture processing parameter.
In an implementation, web browser receive user progress picture processing operation after, can be generated at picture
Reason operates corresponding operational order, which can carry operation information relevant to picture processing operation, for example, net
Page browsing device can be generated and take when receiving the picture processing operation zoomed in and out using the shortcut key of mouse pulley and keyboard
The Scale command with scalability information.Later, the figure carried to the operational order of Target Photo can be generated in web browser
Piece processing request.In this way, above-mentioned server is after receiving the picture processing request to Target Photo that above-mentioned client is sent,
The operational order to Target Photo can be extracted from picture processing request, later, above-mentioned server can be based on operation life
The operation information carried is enabled, operational order is converted into picture processing parameter.
Step 202, data flow and picture processing parameter are sent to the service of being integrated in by the online picture processor of server
Default picture processing module in the operating system of device.
In an implementation, online picture processor can have been run in above-mentioned server, which can be
The common webpage interactive class java application write by Java programming language, can integrate multiple web projects, such as may be used
Web project, the local picture processor with calling other application server communicated with same outside carries out picture processing
Web project etc..In addition, default picture processing module is also integrated in the operating system of above-mentioned server, the default picture
Processing module can zoom in and out to picture, cut etc. all kinds of pictures processing based on picture processing parameter, as in operation system
The system service registered in system, picture oncurrent processing ability and processing speed with higher.In this way, above-mentioned server is obtaining
To after the data flow and picture processing parameter of Target Photo, the data flow of Target Photo and picture processing parameter can be sent to
Above-mentioned online picture processor.Later, online picture processor can send out the data flow of Target Photo and picture processing parameter
Give above-mentioned default picture processing module.
Optionally, above-mentioned default picture processing module can be generated based on the library ImageMagick, and with dynamic link library
Form is integrated in the operating system of above-mentioned server.Specifically, function can be carried out to it on the basis of the library ImageMagick
Extension and transformation such as optimize the thread lock mechanism lock in the library ImageMagick, to obtain default picture processing module.It
Afterwards, default picture processing module can be issued as to the dynamic link library of the operating system of above-mentioned server, to be registered as the clothes
The system service of business device.It should be noted that being by what default picture processing module was issued as the operating system of above-mentioned server
After system service, which will can directly be transferred at default picture processing module the picture of Target Photo processing task
Reason, so as to solve by the server by Target Photo be transmitted to other application server handled brought by network biography
Defeated consumption problem further decreases the time of picture processing, so as to effectively improve picture treatment effeciency.In addition, due to pre-
If picture processing module is bound with server, because without individually default picture processing module is safeguarded and is managed
Reason saves O&M cost, also, as system service, the service availability of default picture processing module can be equal to clothes
Therefore the stability of business device can effectively improve the stability of picture processing.
Optionally, can by application programming interface (Application Programming Interface,
API the transmission of data flow and picture processing parameter) is carried out, correspondingly, the specific processing of step 202 can be such that server
Data flow and picture processing parameter are sent to by application programming interface and are integrated in server by online picture processor
Default picture processing module in operating system.
In an implementation, above-mentioned application programming interface can be default picture processing module to the application program of outer package
Programming interface is previously implanted in above-mentioned online picture processor, and online picture processor can be according to application programming
The describing mode of interface calls above-mentioned default picture processing module to carry out picture processing to picture to be processed.In this way, in line chart
Piece processor can be by above-mentioned application programming interface, by the processing of the picture of the data flow of Target Photo and Target Photo
Parameter is sent to above-mentioned default picture processing module.
Step 203, it presets picture processing module to handle data stream based on picture processing parameter, and by treated
Data flow is back to online picture processor.
In an implementation, picture processing module is preset after the data flow and picture processing parameter for receiving Target Photo, it can
To call each picture processing unit in default picture processing module, according to picture processing parameter to the data flow of Target Photo
Carry out picture processing.For zooming in and out processing, default picture processing module can call scaling processing unit, according to corresponding
Scalability information, processing is zoomed in and out to Target Photo.After the completion of picture processing, above-mentioned default picture processing module can be incited somebody to action
Data flow that treated returns to above-mentioned online picture processor.Specifically, server can be handled by above-mentioned default picture
Module is to the application programming interface of outer package, and by treated, data flow returns to above-mentioned online picture processor.
Optionally, plurality of picture processing can be carried out to Target Photo simultaneously, corresponding processing can be such that at picture
When reason parameter is multiple, presetting picture processing module according to the quantity of picture processing parameter is a plurality of data by data flow replication
Stream, and concurrent processing is carried out to every data stream according to each picture processing parameter;Picture processing module is preset to concurrent processing
Pieces of data stream afterwards merges, and the data flow after merging is back to online picture processor.
In an implementation, for including the situation of multiple picture processing parameters in picture processing request, if be based on primary
The library ImageMagick carries out picture processing, then will carry out respective handling to data stream according to the processing sequence of picture processing parameter,
Meanwhile in order to ensure being handled according to above-mentioned processing sequence, data stream is handled based on each picture processing parameter
During, also capable locking will be flowed into data by thread lock mechanism and handled, to guarantee the consistency and picture processing of data
As a result accuracy, however above-mentioned locking processing will reduce the concurrent processing efficiency of picture.It at this moment, can be right
The thread lock mechanism in the library ImageMagick optimizes, and reduces default picture processing module and occupy when picture processing
Installed System Memory and processing time.Specifically, presetting picture processing when including multiple picture processing parameters in picture processing request
Module can according to picture processing parameter quantity by data flow replication be a plurality of data flow, then can be according to each picture at
It manages parameter and concurrent processing is carried out to every data stream.By taking three picture processing parameters as an example, picture processing parameter can be cutting
Parameter, zooming parameter, watermark parameters, then data stream can be replicated twice by presetting picture processing module, to obtain three
Identical data flow is can recorde respectively as A data flow, B data stream, C data stream, and then presetting picture processing module can be same
When to A data flow carry out cutting processing, to B data stream carry out scaling processing, to C data stream carry out watermark processing, with realize simultaneously
Hair processing.Later, the pieces of data stream after concurrent processing can be merged by presetting picture processing module, and then can will be closed
Data flow after and returns to online picture processor.
Optionally, it can be configured on the locking opportunity to data flow, corresponding processing, which can be such that work as, receives data
When stream, presets picture processing module and checking treatment is carried out to data stream;Default picture processing module is right after completing checking treatment
Data flow is locked, and is handled based on picture processing parameter data stream.
In an implementation, presetting picture processing module can lock after verifying to data stream, then to data stream
Processing.Specifically, default picture processing module can verify the data flow after receiving the data flow of Target Photo
The checking treatments such as processing, such as the verification of hash check, file consistence.Default picture processing module completes above-mentioned checking treatment
Afterwards, locking processing can be carried out to above-mentioned data flow, may then based on picture processing parameter and figure is carried out to the data flow of locking
Piece processing.In this way, unnecessary checking treatment can be rejected in lock range, to shorten the lock times of data flow,
The Installed System Memory for locking and occupying is reduced, picture treatment effeciency is further increased
Step 204, server is based on treated data flow and generates processed Target Photo, and by processed target
Picture is back to client.
It in an implementation, can will treated data flow in line picture processor after the data flow that receives that treated
It is sent to above-mentioned server.In this way, above-mentioned server can data flow generates processed Target Photo based on treated, so
Processed Target Photo is back to client afterwards.Specifically, above-mentioned server can data flow be reduced to by treated
The Target Photo of document form, then in the server by processed Target Photo caching, meanwhile, server can be generated
Then the buffer address is returned to client by the buffer address of the Target Photo of processing.In this way, client receive it is above-mentioned
After buffer address, the accessible buffer address of the web browser of client, the Target Photo that gets that treated, then net
The processed Target Photo that page browsing device can will acquire is rendered in display interface, so as to by processed target
Picture is presented to the user.
The above-mentioned detailed process for carrying out picture processing to Target Photo can be as shown in Figure 3.
In the present embodiment, the picture to Target Photo that server receives that client is sent handles request, obtains target
The data flow and picture processing parameter of picture;The online picture processor of server sends data flow and picture processing parameter
Default picture processing module into the operating system for being integrated in server;Default picture processing module is based on picture processing parameter
Data stream is handled, and data flow is back to online picture processor by treated;Server be based on treated number
Processed Target Photo is generated according to stream, and processed Target Photo is back to client.In this way, server can will be to
The picture of processing directly transfers to default picture processing module to carry out picture processing, is used as since this presets picture processing module
The oncurrent processing ability and processing speed of picture can be improved in the system service registered in operating system.Furthermore it is also possible to solve
Because server by picture to be processed be transmitted to other application server handled brought by network transmission consumption problem, into
One step reduces the picture processing time, effectively increases picture treatment effeciency.
Based on the same technical idea, the embodiment of the invention also provides a kind of servers, as shown in figure 4, the service
Device is equipped with online picture processor 402, wherein the server includes:
Module 401 is obtained, for receiving the picture processing request to Target Photo of client transmission, obtains the target
The data flow and picture processing parameter of picture;
The online picture processor 402, for being sent to the data flow and the picture processing parameter and being integrated in
Default picture processing module 403 in the operating system of the server;
The default picture processing module 403, for being handled based on the picture processing parameter the data flow,
And the data flow is back to the online picture processor 402 by treated;
Return module 404, for based on treated, the data flow to generate the processed Target Photo, and will
The Target Photo of processing is back to the client.
Optionally, the picture processing request carries the network address of Target Photo;
The acquisition module 401, is also used to:
The network address of the Target Photo is extracted from picture processing request, and by accessing the Target Photo
Network address obtain the data flow of the Target Photo.
Optionally, the picture processing request carries the operational order to Target Photo;
The acquisition module 401, is also used to:
The operational order to Target Photo is extracted from picture processing request, the operational order is converted to
The picture processing parameter.
Optionally, it is integrated in advance in the online picture processor 402 and is directed toward the default picture processing module 403
Application programming interface;
The online picture processor 402 is also used to:
By the application programming interface, the data flow and the picture processing parameter are sent to and are integrated in institute
State the default picture processing module 403 in the operating system of server;
The return module 404, is also used to:
By the application programming interface, by treated, the data flow is back to the online picture processor
402。
Optionally, the default picture processing module 403 is generated based on the library ImageMagick, and with dynamic link library
Form is integrated in the operating system of the server.
Optionally, the default picture processing module 403, is also used to:
When the picture processing parameter is multiple, according to the quantity of the picture processing parameter by the data flow replication
For a plurality of data flow, and concurrent processing is carried out to every data stream according to each picture processing parameter;
Pieces of data stream after concurrent processing is merged, and the data flow after merging is back to described online
Picture processor.
Optionally, the default picture processing module 403, is also used to:
When receiving the data flow, checking treatment is carried out to the data flow;
After completing the checking treatment, the data flow is locked, and based on the picture processing parameter to institute
Data flow is stated to be handled.
In the present embodiment, the picture to Target Photo that server receives that client is sent handles request, obtains target
The data flow and picture processing parameter of picture;The online picture processor of server sends data flow and picture processing parameter
Default picture processing module into the operating system for being integrated in server;Default picture processing module is based on picture processing parameter
Data stream is handled, and data flow is back to online picture processor by treated;Server be based on treated number
Processed Target Photo is generated according to stream, and processed Target Photo is back to client.In this way, server can will be to
The picture of processing directly transfers to default picture processing module to carry out picture processing, is used as since this presets picture processing module
The oncurrent processing ability and processing speed of picture can be improved in the system service registered in operating system.Furthermore it is also possible to solve
Because server by picture to be processed be transmitted to other application server handled brought by network transmission consumption problem, into
One step reduces the picture processing time, effectively increases picture treatment effeciency.
It should be understood that server provided by the above embodiment is when carrying out picture processing, only with above-mentioned each function mould
The division progress of block can according to need and for example, in practical application by above-mentioned function distribution by different functional modules
It completes, i.e., the internal structure of server is divided into different functional modules, to complete all or part of function described above
Energy.In addition, server provided by the above embodiment and image processing method embodiment belong to same design, process is implemented
It is detailed in embodiment of the method, which is not described herein again.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (14)
1. a kind of image processing method, which is characterized in that the described method includes:
What server received that client sends handles request to the picture of Target Photo, obtain the Target Photo data flow and
Picture processing parameter;
The data flow and the picture processing parameter are sent to described in being integrated in by the online picture processor of the server
Default picture processing module in the operating system of server;
The default picture processing module is based on the picture processing parameter and handles the data flow, and by treated
The data flow is back to the online picture processor;
Based on treated, the data flow generates the processed Target Photo to the server, and will be processed described
Target Photo is back to the client.
2. the method according to claim 1, wherein picture processing request carries the network of Target Photo
Address;
The data flow for obtaining the Target Photo, comprising:
The server extracts the network address of the Target Photo from picture processing request, and by accessing the mesh
The network address of piece of marking on a map obtains the data flow of the Target Photo.
3. the method according to claim 1, wherein picture processing request carries the behaviour to Target Photo
It orders;
The picture processing parameter for obtaining the Target Photo, comprising:
The server extracts the operational order to Target Photo from picture processing request, by the operational order
Be converted to the picture processing parameter.
4. being directed toward institute the method according to claim 1, wherein being integrated in advance in the online picture processor
State the application programming interface of default picture processing module;
The data flow and the picture processing parameter are sent to described in being integrated in by the online picture processor of the server
Default picture processing module in the operating system of server, comprising:
The online picture processor of the server is by the application programming interface, by the data flow and the picture
Processing parameter is sent to the default picture processing module in the operating system for being integrated in the server;
It is described that by treated, the data flow is back to the online picture processor, comprising:
By the application programming interface, by treated, the data flow is back to the online picture to the server
Processor.
5. method according to claim 1 or 4, which is characterized in that the default picture processing module is based on
The library ImageMagick generates, and the operating system of the server is integrated in the form of dynamic link library.
6. according to the method described in claim 5, it is characterized in that, the default picture processing module is based on picture processing
Parameter handles the data flow, and the data flow is back to the online picture processor by treated, comprising:
When the picture processing parameter be it is multiple when, the default picture processing module according to the picture processing parameter quantity
It is a plurality of data flow by the data flow replication, and every data stream is concurrently located according to each picture processing parameter
Reason;
The default picture processing module merges the pieces of data stream after concurrent processing, and by the data after merging
Stream is back to the online picture processor.
7. according to the method described in claim 5, it is characterized in that, the default picture processing module is based on picture processing
Parameter handles the data flow, comprising:
When receiving the data flow, the default picture processing module carries out checking treatment to the data flow;
The default picture processing module locks the data flow after completing the checking treatment, and based on described
Picture processing parameter handles the data flow.
8. a kind of server, which is characterized in that the server is equipped with online picture processor, wherein the server packet
It includes:
Module is obtained, for receiving the picture processing request to Target Photo of client transmission, obtains the Target Photo
Data flow and picture processing parameter;
The online picture processor, for being sent to the data flow and the picture processing parameter and being integrated in the clothes
The default picture processing module being engaged in the operating system of device;
The default picture processing module, for being handled based on the picture processing parameter the data flow, and will place
The data flow after reason is back to the online picture processor;
Return module, for based on treated, the data flow to generate the processed Target Photo, and will be processed
The Target Photo is back to the client.
9. server according to claim 8, which is characterized in that the picture processing request carries the net of Target Photo
Network address;
The acquisition module, is also used to:
The network address of the Target Photo, and the net by accessing the Target Photo are extracted from picture processing request
Network address obtains the data flow of the Target Photo.
10. server according to claim 8, which is characterized in that the picture processing request is carried to Target Photo
Operational order;
The acquisition module, is also used to:
The operational order to Target Photo is extracted from picture processing request, the operational order is converted to described
Picture processing parameter.
11. server according to claim 8, which is characterized in that be integrated with finger in advance in the online picture processor
To the application programming interface of the default picture processing module;
The online picture processor, is also used to:
By the application programming interface, the data flow and the picture processing parameter are sent to and are integrated in the clothes
The default picture processing module being engaged in the operating system of device;
The return module, is also used to:
By the application programming interface, by treated, the data flow is back to the online picture processor.
12. the server according to claim 8 or 11, which is characterized in that the default picture processing module is based on
The library ImageMagick generates, and the operating system of the server is integrated in the form of dynamic link library.
13. server according to claim 12, which is characterized in that the default picture processing module is also used to:
It by the data flow replication is more according to the quantity of the picture processing parameter when the picture processing parameter is multiple
Data stream, and concurrent processing is carried out to every data stream according to each picture processing parameter;
Pieces of data stream after concurrent processing is merged, and the data flow after merging is back to the online picture
Processor.
14. server according to claim 12, which is characterized in that the default picture processing module is also used to:
When receiving the data flow, checking treatment is carried out to the data flow;
After completing the checking treatment, the data flow is locked, and based on the picture processing parameter to the number
It is handled according to stream.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811198036.XA CN109448075A (en) | 2018-10-15 | 2018-10-15 | A kind of image processing method and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811198036.XA CN109448075A (en) | 2018-10-15 | 2018-10-15 | A kind of image processing method and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109448075A true CN109448075A (en) | 2019-03-08 |
Family
ID=65545513
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811198036.XA Pending CN109448075A (en) | 2018-10-15 | 2018-10-15 | A kind of image processing method and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109448075A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110806854A (en) * | 2019-10-17 | 2020-02-18 | 武汉天喻教育科技有限公司 | Method and system for web side to process pictures on line |
CN111782843A (en) * | 2020-05-28 | 2020-10-16 | 武汉斗争信息科技有限公司 | Cloud storage and localization preview system and method for image data |
CN112163991A (en) * | 2020-09-11 | 2021-01-01 | 杭州缦图摄影有限公司 | AI (Artificial intelligence) retouching training network model based on retouching slice |
CN112667941A (en) * | 2021-03-15 | 2021-04-16 | 智道网联科技(北京)有限公司 | Webpage map processing method and device based on vehicle-mounted intelligent equipment |
CN113393367A (en) * | 2021-07-08 | 2021-09-14 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004227291A (en) * | 2003-01-23 | 2004-08-12 | Fuji Photo Film Co Ltd | Web application system |
CN103631568A (en) * | 2013-12-20 | 2014-03-12 | 厦门大学 | Medical-image-oriented multi-thread parallel computing method |
CN104954448A (en) * | 2015-05-29 | 2015-09-30 | 努比亚技术有限公司 | Picture processing method, picture processing system and picture processing server |
CN104965813A (en) * | 2015-06-23 | 2015-10-07 | 百度在线网络技术(北京)有限公司 | Text material processing method and device |
CN105512329A (en) * | 2015-12-24 | 2016-04-20 | 上海携程商务有限公司 | GO-language-based dynamic figure cutting system |
CN106844600A (en) * | 2017-01-16 | 2017-06-13 | 百融(北京)金融信息服务股份有限公司 | A kind of website picture processing system and method |
CN107957997A (en) * | 2016-10-14 | 2018-04-24 | 厦门飞博共创网络科技股份有限公司 | A kind of method and apparatus of the editing picture in the HTML5 pages |
-
2018
- 2018-10-15 CN CN201811198036.XA patent/CN109448075A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004227291A (en) * | 2003-01-23 | 2004-08-12 | Fuji Photo Film Co Ltd | Web application system |
CN103631568A (en) * | 2013-12-20 | 2014-03-12 | 厦门大学 | Medical-image-oriented multi-thread parallel computing method |
CN104954448A (en) * | 2015-05-29 | 2015-09-30 | 努比亚技术有限公司 | Picture processing method, picture processing system and picture processing server |
CN104965813A (en) * | 2015-06-23 | 2015-10-07 | 百度在线网络技术(北京)有限公司 | Text material processing method and device |
CN105512329A (en) * | 2015-12-24 | 2016-04-20 | 上海携程商务有限公司 | GO-language-based dynamic figure cutting system |
CN107957997A (en) * | 2016-10-14 | 2018-04-24 | 厦门飞博共创网络科技股份有限公司 | A kind of method and apparatus of the editing picture in the HTML5 pages |
CN106844600A (en) * | 2017-01-16 | 2017-06-13 | 百融(北京)金融信息服务股份有限公司 | A kind of website picture processing system and method |
Non-Patent Citations (1)
Title |
---|
顾韦华: "基于ImageMagick和Magickwand的Web图像处理", 《电脑编程技巧与维护》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110806854A (en) * | 2019-10-17 | 2020-02-18 | 武汉天喻教育科技有限公司 | Method and system for web side to process pictures on line |
CN111782843A (en) * | 2020-05-28 | 2020-10-16 | 武汉斗争信息科技有限公司 | Cloud storage and localization preview system and method for image data |
CN112163991A (en) * | 2020-09-11 | 2021-01-01 | 杭州缦图摄影有限公司 | AI (Artificial intelligence) retouching training network model based on retouching slice |
CN112667941A (en) * | 2021-03-15 | 2021-04-16 | 智道网联科技(北京)有限公司 | Webpage map processing method and device based on vehicle-mounted intelligent equipment |
CN113393367A (en) * | 2021-07-08 | 2021-09-14 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
CN113393367B (en) * | 2021-07-08 | 2022-06-03 | 北京百度网讯科技有限公司 | Image processing method, apparatus, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109448075A (en) | A kind of image processing method and server | |
US10956652B2 (en) | Support for non-native file types in web application environment | |
US8516037B2 (en) | Methods for dynamic partitioning of applications in client-server environments | |
CN109743315A (en) | For Activity recognition method, apparatus, equipment and the readable storage medium storing program for executing of website | |
US20190079906A1 (en) | Content rendering | |
CN107590145A (en) | A kind for the treatment of method and apparatus of page static resource | |
US10754628B2 (en) | Extracting web API endpoint data from source code to identify potential security threats | |
US20080263216A1 (en) | Remote portlet consumer with enhanced resource url processing | |
Montesi | Process-aware web programming with Jolie | |
WO2020015199A1 (en) | Dark web security evaluation method, server and computer readable storage medium | |
CN111177664B (en) | Watermark information adding method, server and system | |
CN106126693A (en) | The sending method of the related data of a kind of webpage and device | |
EP2972827B1 (en) | Collaborative editing | |
CN111328394A (en) | Locally secure rendering of WEB content | |
CN113225379A (en) | Method and device for sending HTTP request message | |
Lautert et al. | A fog architecture for privacy-preserving data provenance using blockchains | |
EP3502925A1 (en) | Computer system and method for extracting dynamic content from websites | |
Phatak et al. | Web&: An architecture for non-interactive web | |
WO2015132793A1 (en) | Assignment of a machine-readable link to content as a payoff | |
US20150261733A1 (en) | Asset collection service through capture of content | |
CN110990465A (en) | Data export method and device, electronic equipment and storage medium | |
Roth et al. | A distributed content-based search engine based on mobile code and web service technology | |
US11977643B2 (en) | Methods and systems of a software-based solution for autonomous application security testing of cloud-native applications | |
CN113127429B (en) | Compression processing method and system and computing equipment | |
US20230350984A1 (en) | System and method for client-side rewriting of code included in a web page |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190308 |