CN109992406A - The method and client that picture requesting method, response picture are requested - Google Patents

The method and client that picture requesting method, response picture are requested Download PDF

Info

Publication number
CN109992406A
CN109992406A CN201711499082.9A CN201711499082A CN109992406A CN 109992406 A CN109992406 A CN 109992406A CN 201711499082 A CN201711499082 A CN 201711499082A CN 109992406 A CN109992406 A CN 109992406A
Authority
CN
China
Prior art keywords
client
picture
request
application server
dimension
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711499082.9A
Other languages
Chinese (zh)
Other versions
CN109992406B (en
Inventor
张之硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201711499082.9A priority Critical patent/CN109992406B/en
Priority to PCT/CN2018/108753 priority patent/WO2019128357A1/en
Publication of CN109992406A publication Critical patent/CN109992406A/en
Application granted granted Critical
Publication of CN109992406B publication Critical patent/CN109992406B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Present disclose provides a kind of picture requesting methods, are applied to electronic equipment, client are equipped on the electronic equipment, this method comprises: determining the size for the memory that electronic equipment is distributed to client during client request picture;And make client according to electronic equipment distribute client memory size come to application server request correspondingly-sized picture.The disclosure additionally provides method, a kind of client, a kind of application server, a kind of computer system and a kind of computer readable storage medium of a kind of response picture request.

Description

The method and client that picture requesting method, response picture are requested
Technical field
This disclosure relates to which Internet technical field, is requested more particularly, to a kind of picture requesting method, response picture Method and client and application server, computer system, computer readable storage medium.
Background technique
Currently, being frequently encountered memory in some low side communication equipment overflows (out of memory, referred to as oom) Problem, for example, be frequently encountered on some low side types of Android in list picture due to quality it is excessively high it is excessive caused by oom.Even if imageview width and height very little defined in program, but the dimension of picture that server-side issues is very big, is arranging During table loads, since picture to be shown will be all loaded into memory, even if picture shows very little, but Be picture itself pixel it is very big, dimension of picture loaded into memory can carry out committed memory according to the pixel of picture itself, this A large amount of memory will be occupied, even if program, which normally recycles, removes the memory that screen bitmaps occupy, as current image accounts for It is excessive with memory, cause oom problem.During Mobile Development, oom is easy to encounter, for example develops in client Cheng Zhong, Android just face always oom problem, and final solution is uniformly to reduce picture quality, and client in server end It is recycled again for oom memory optimization.
During realizing disclosure design, at least there are the following problems in the related technology for inventor's discovery: servicing Device end uniformly reduces picture quality, although low side communication equipment can reduce oom problem, high end communication to a certain extent Equipment cannot but use the picture of high quality, cause to influence user experience.
Summary of the invention
In view of this, present disclose provides a kind of picture requesting methods for preventing client from oom problem occur, response picture The method and client and application server of request.
An aspect of this disclosure provides a kind of picture requesting method, is applied to electronic equipment, on the electronic equipment Client is installed, the above method includes: to determine above-mentioned electronic equipment to above-mentioned during above-mentioned client request picture The size of the memory of client distribution;And above-mentioned client is made to distribute to the memory of above-mentioned client according to above-mentioned electronic equipment Size come to application server request correspondingly-sized picture.
In accordance with an embodiment of the present disclosure, above-mentioned client is made to distribute to the memory of above-mentioned client according to above-mentioned electronic equipment Size including: to make above-mentioned client will in above-mentioned client terminal start-up to the picture of application server request correspondingly-sized The relevant information for the memory size that the identification information of itself and above-mentioned electronic equipment distribute to above-mentioned client is sent to above-mentioned answer With server, so that above-mentioned application server can distribute to the phase of the memory size of above-mentioned client according to above-mentioned electronic equipment It closes information and calculates corresponding with above-mentioned client dimension of picture compression ratio, and by above-mentioned dimension of picture compression ratio and above-mentioned client Identification information and between the two corresponding relationship storage in the database;During above-mentioned client request picture, Make above-mentioned client when sending picture request in the identification information for wherein carrying itself, so that above-mentioned application server can be based on The identification information carried in above-mentioned picture request is responded, and returns to corresponding response results to above-mentioned client;And make Above-mentioned client obtains the picture of correspondingly-sized according to above-mentioned response results.
In accordance with an embodiment of the present disclosure, above-mentioned client is made to obtain the picture packet of correspondingly-sized according to above-mentioned response results It includes: in the case where above-mentioned application server returns to the URL for having dimension of picture to above-mentioned client, being based on above-mentioned client Picture of the above-mentioned URL with dimension of picture information to picture servers request correspondingly-sized.
Another aspect of the disclosure additionally provides a kind of method of response picture request, is applied to application server, on The method of stating includes: to obtain above-mentioned electronic equipment to upper during the picture request that the client for responding electronic equipment is sent State the relevant information of the memory size of client distribution;And make above-mentioned application server according to above-mentioned electronic equipment to above-mentioned visitor The relevant information of the memory size of family end distribution is requested to respond the picture that above-mentioned client is sent.
In accordance with an embodiment of the present disclosure, above-mentioned application server is distributed to above-mentioned client according to above-mentioned electronic equipment The relevant information of memory size requests to include: the mistake in above-mentioned client request picture to respond the picture that above-mentioned client is sent Cheng Zhong, the identification information carried in the above-mentioned picture request for sending above-mentioned application server based on above-mentioned client search data Library, to find out the dimension of picture compression ratio that there is corresponding relationship with above-mentioned identification information;It is based on above-mentioned application server above-mentioned Dimension of picture compression ratio generates the URL for having dimension of picture information;And make above-mentioned application server by above-mentioned with picture ruler The URL of very little information returns to above-mentioned client so that above-mentioned client can based on the above-mentioned URL with dimension of picture information to The picture of picture servers request correspondingly-sized.
In accordance with an embodiment of the present disclosure, the above method further include: the mark of itself sent when obtaining above-mentioned client terminal start-up Know the relevant information for the memory size that information and above-mentioned electronic equipment are distributed to above-mentioned client;According to above-mentioned electronic equipment to upper State the associated information calculation above-mentioned dimension of picture compression ratio corresponding with above-mentioned client of the memory size of client distribution;And And corresponding relationship by the identification information of above-mentioned dimension of picture compression ratio and above-mentioned client and between the two be stored in it is above-mentioned In database.
Another aspect of the disclosure provides a kind of client, installs on an electronic device, for carrying out picture request, Above-mentioned client comprises determining that module, for during client request picture, determining above-mentioned electronic equipment to above-mentioned visitor The size of the memory of family end distribution;And request module, it is above-mentioned for distributing to above-mentioned client according to above-mentioned electronic equipment The size of the memory of client requests the picture of correspondingly-sized to application server.
In accordance with an embodiment of the present disclosure, above-mentioned request module includes: the first transmission unit, in above-mentioned client terminal start-up When, the identification information of above-mentioned client itself is distributed to the related letter of the memory size of above-mentioned client to above-mentioned electronic equipment Breath is sent to above-mentioned application server, so that above-mentioned application server can distribute to above-mentioned client according to above-mentioned electronic equipment Memory size associated information calculation dimension of picture compression ratio corresponding with above-mentioned client, and above-mentioned dimension of picture is compressed Corresponding relationship storage than the identification information with above-mentioned client and between the two is in the database;Second request unit is used In the mark for wherein carrying itself when during above-mentioned client request picture, making above-mentioned client send picture request Information so that above-mentioned application server can be requested based on above-mentioned picture in the identification information that carries be responded, and to above-mentioned Client returns to corresponding response results;And acquiring unit, for making above-mentioned client according to the acquisition pair of above-mentioned response results Answer the picture of size.
In accordance with an embodiment of the present disclosure, above-mentioned acquiring unit is also used to: being returned in above-mentioned application server to above-mentioned client In the case where the URL for rewinding dimension of picture, take above-mentioned client to picture based on the above-mentioned URL with dimension of picture information The picture for device request correspondingly-sized of being engaged in.
Another aspect of the disclosure provides a kind of application server, the picture of the client for responding electronic equipment Request, comprising: first obtains module, for obtaining above-mentioned electricity during responding the picture request that above-mentioned client is sent The relevant information for the memory size that sub- equipment is distributed to above-mentioned client;And respond module, for making above-mentioned application server The figure that above-mentioned client is sent is responded to the relevant information of the memory size of above-mentioned client distribution according to above-mentioned electronic equipment Piece request.
In accordance with an embodiment of the present disclosure, above-mentioned respond module includes: searching unit, in above-mentioned client request picture During, the identification information carried in the above-mentioned picture request that sends above-mentioned application server based on above-mentioned client is searched Database, to find out the dimension of picture compression ratio that there is corresponding relationship with above-mentioned identification information;Generation unit, for making above-mentioned answer The URL for having dimension of picture information is generated based on above-mentioned dimension of picture compression ratio with server;And feedback unit, for making It states application server and the above-mentioned URL with dimension of picture information is returned into above-mentioned client, so that above-mentioned client being capable of base The picture of correspondingly-sized is requested to picture servers in the above-mentioned URL with dimension of picture information.
In accordance with an embodiment of the present disclosure, above-mentioned application server further include: second obtains module, for obtaining above-mentioned client The related letter for the memory size that the identification information of itself sent when the starting of end is distributed to above-mentioned electronic equipment to above-mentioned client Breath;Computing module, for according to above-mentioned electronic equipment to above-mentioned client distribute memory size associated information calculation with State the corresponding above-mentioned dimension of picture compression ratio of client;And memory module, be used for and by above-mentioned dimension of picture compression ratio and The identification information and corresponding relationship between the two for stating client are stored in above-mentioned database.
Another aspect of the present disclosure provides a kind of computer system, comprising: one or more processors;Memory is used In the one or more programs of storage, wherein when said one or multiple programs are executed by said one or multiple processors, make It obtains said one or multiple processors realizes described in any item picture requesting methods among the above and respond the method that picture is requested.
Another aspect of the present disclosure provides a kind of computer readable storage medium, is stored thereon with executable instruction, should Instruction makes processor realize what described in any item picture requesting methods among the above and response picture were requested when being executed by processor Method.
By the embodiment of the present disclosure, the size of the memory for distributing client based on itself requests the figure of correspondingly-sized Piece not only can prevent low side devices from oom problem occur, and high-end communication apparatus can also be enable to do as usual and use the figure of high quality Piece, to will not influence user experience.
Detailed description of the invention
By referring to the drawings to the description of the embodiment of the present disclosure, the above-mentioned and other purposes of the disclosure, feature and Advantage will be apparent from, in the accompanying drawings:
Fig. 1 is diagrammatically illustrated can apply picture requesting method and response picture to request according to the embodiment of the present disclosure The exemplary system architecture of method;
Fig. 2A diagrammatically illustrates the flow chart of the picture requesting method according to the embodiment of the present disclosure;
Fig. 2 B diagrammatically illustrates the size of the memory for distributing client according to itself according to the embodiment of the present disclosure Come request correspondingly-sized picture flow chart;
Fig. 3 A diagrammatically illustrates the flow chart of the method for the response picture request according to the embodiment of the present disclosure;
Fig. 3 B diagrammatically illustrates the memory for distributing application server according to client according to the embodiment of the present disclosure The relevant information of size carrys out the flow chart of the picture request of customer in response end transmission;
Fig. 3 C diagrammatically illustrates the flow chart of the method for the response picture request according to another embodiment of the disclosure;
Fig. 4 A diagrammatically illustrates the block diagram of client according to an embodiment of the present disclosure;
Fig. 4 B diagrammatically illustrates the block diagram of request module according to an embodiment of the present disclosure;
Fig. 5 A diagrammatically illustrates the block diagram of application server according to an embodiment of the present disclosure;
Fig. 5 B diagrammatically illustrates the block diagram of respond module according to an embodiment of the present disclosure;
Fig. 5 C diagrammatically illustrates the block diagram of application server according to another embodiment of the present disclosure;And
Fig. 6, which is diagrammatically illustrated, is adapted for carrying out picture requesting method and response picture request according to the embodiment of the present disclosure Method computer system block diagram.
Specific embodiment
Hereinafter, will be described with reference to the accompanying drawings embodiment of the disclosure.However, it should be understood that these descriptions are only exemplary , and it is not intended to limit the scope of the present disclosure.In addition, in the following description, descriptions of well-known structures and technologies are omitted, with Avoid unnecessarily obscuring the concept of the disclosure.
Term as used herein is not intended to limit the disclosure just for the sake of description specific embodiment.It uses herein The terms "include", "comprise" etc. show the presence of the feature, step, operation and/or component, but it is not excluded that in the presence of Or add other one or more features, step, operation or component.
There are all terms (including technical and scientific term) as used herein those skilled in the art to be generally understood Meaning, unless otherwise defined.It should be noted that term used herein should be interpreted that with consistent with the context of this specification Meaning, without that should be explained with idealization or excessively mechanical mode.
It, in general should be according to this using statement as " at least one in A, B and C etc. " is similar to Field technical staff is generally understood the meaning of the statement to make an explanation (for example, " system at least one in A, B and C " Should include but is not limited to individually with A, individually with B, individually with C, with A and B, with A and C, have B and C, and/or System etc. with A, B, C).Using statement as " at least one in A, B or C etc. " is similar to, generally come Saying be generally understood the meaning of the statement according to those skilled in the art to make an explanation (for example, " having in A, B or C at least One system " should include but is not limited to individually with A, individually with B, individually with C, with A and B, have A and C, have B and C, and/or the system with A, B, C etc.).It should also be understood by those skilled in the art that substantially arbitrarily indicating two or more The adversative conjunction and/or phrase of optional project shall be construed as either in specification, claims or attached drawing A possibility that giving including one of these projects, either one or two projects of these projects.For example, phrase " A or B " should A possibility that being understood to include " A " or " B " or " A and B ".
Embodiment of the disclosure provides a kind of picture requesting method for preventing client from oom problem occur, response picture The method of request and the client and application server that the corresponding method can be applied.The picture requesting method is included in client During end request picture, the size of the memory distributed to client is determined;And distribute client according to itself The size of memory requests the picture of correspondingly-sized.
Fig. 1 is diagrammatically illustrated can apply picture requesting method and response picture to request according to the embodiment of the present disclosure The exemplary system architecture of method.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network according to this embodiment 104 and server 105.Network 104 between terminal device 101,102,103 and server 105 to provide communication link Medium.Network 104 may include various connection types, such as wired and or wireless communications link etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 101,102,103 (merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client and/or social platform softwares.
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 105 can be to provide the server of various services, such as utilize terminal device 101,102,103 to user The website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to the use received The data such as family request analyze etc. processing, and by processing result (such as according to user's request or the webpage of generation, believe Breath or data etc.) feed back to terminal device.
It should be noted that the method for response picture request generally can be by server provided by the embodiment of the present disclosure 105 execute.The method of response picture request provided by the embodiment of the present disclosure can also be by being different from server 105 and can be with The server or server cluster that terminal device 101,102,103 and/or server 105 communicate execute.
It should be noted that picture requesting method provided by the embodiment of the present disclosure can also by terminal device 101,102, Or 103 execute, or can also by be different from terminal device 101,102 or 103 other terminal devices execute.Correspondingly, originally Client provided by open embodiment also can be set in terminal device 101,102 or 103, or is set to and is different from eventually In other terminal devices of end equipment 101,102 or 103.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Fig. 2A diagrammatically illustrates the flow chart of the picture requesting method according to the embodiment of the present disclosure.As shown in Figure 2 A, should Method is applied to electronic equipment, and client is equipped on the electronic equipment, and this method includes operation S201~S202, in which:
In operation S201, during client request picture, the memory that electronic equipment is distributed to client is determined Size;And
In operation S202, make client according to electronic equipment distribute to client memory size come to application server Request the picture of correspondingly-sized.
In the embodiments of the present disclosure, the process of client request picture may include preparation stage and request stage.
A kind of situation, client can be in the sizes and client itself of memory that the preparation stage is distributed itself Device identifier (Unique Device Identifie, referred to as UDID) is sent to http-server in advance, is serviced by http These information are transmitted to application server by device, then the memory with the client is calculated according to these information by application server Adaptable dimension of picture, and then in the database by calculated result storage, it is based on this, the client is in request stage to http When server sends the request of data comprising picture request, which can be transmitted to application server for request of data, It is gone in database to read above-mentioned calculated result by application server again, and is generated according to the information of reading and have dimension of picture information URL, and the URL is returned into the client, at this point, client can use the URL to picture servers request pair Answer the picture of size.
Another situation, client can be in the sizes and client itself for the memory that request stage is distributed itself UDID carrying be sent to http-server in the request of data requested comprising picture, by http-server by these information turn Application server is issued, then calculates the picture ruler being adapted with the memory of the client according to these information by application server It is very little, and the URL for having dimension of picture information is generated according to calculated result, and the URL is returned into the client, at this point, objective Family end can use the URL to the picture of picture servers request correspondingly-sized.
Preferably, it can choose the previous case, the picture being adapted with the memory of client determined that in the preparation stage Size, so as to reduce the waiting time of the adaptable dimension of picture of the memory for requesting to determine in real time this with client, in turn Working efficiency can be improved, and improve user experience.
By the embodiment of the present disclosure, the size of the memory for distributing client based on itself requests the figure of correspondingly-sized Piece not only can prevent low side devices from oom problem occur, and high-end communication apparatus can also be enable to do as usual and use the figure of high quality Piece, to will not influence user experience.
Below with reference to Fig. 2 B, method shown in Fig. 2A is described further in conjunction with specific embodiments.
Fig. 2 B diagrammatically illustrates the size of the memory for distributing client according to itself according to the embodiment of the present disclosure Come request correspondingly-sized picture flow chart.As shown in Figure 2 B, as a kind of optional embodiment, make client according to itself The size of the memory distributed includes: to request the picture of correspondingly-sized
Make client that the identification information of itself and electronic equipment are distributed to visitor in client terminal start-up in operation S2021 The relevant information of the memory size at family end is sent to application server, so that application server can be distributed to according to electronic equipment The associated information calculation for the memory size that client itself is distributed dimension of picture compression ratio corresponding with client, and by picture Corresponding relationship storage of the size compression than the identification information with client and between the two is in the database.
In the embodiments of the present disclosure, it can the operation is executed when client starts for the first time, it can also be every in client The primary operation is carried out when secondary starting.
Since the size of the memory distributed to each client can be modified dynamically, in order to guarantee client The memory information of upload is newest, it is preferable that the primary operation can be carried out when client starts every time.Wherein, objective Family end executes the operation every time, and application server can all judge whether oneself has corresponding dimension of picture to compress by the UDID of the client Than, if not then UDID and dimension of picture compression ratio are saved into database, if there is continuing to judge that dimension of picture compresses Whether than as saved before, being just to terminate process, the no UDID and dimension of picture compression ratio of just saving is into database.
Specifically, a handshake request will be sent to http server-side since client starts every time, at this time may be used So that the UDID of the size and client itself for the memory that client is distributed itself is carried in the number requested comprising picture According to http-server is sent in request, these information are transmitted to application server by http-server, then by application service Device calculates dimension of picture compression ratio corresponding with client according to these information, and then calculated result is stored in database In.
UDID is carried since request header generally can all be defaulted, so only needing the correlation letter of the memory size of client Breath is transmitted to http server-side as parameter, and http-server is not processed, and continues the information that client uploads being transmitted to application Server, application server calculate the dimension of picture compression ratio of client according to memory size, and by UDID and corresponding picture Size compression is than storage into database.
Furthermore, it is possible to the corresponding relationship of memory range Yu dimension of picture compression ratio is pre-configured with, when memory size falls in certain In a memory range, then the corresponding dimension of picture compression ratio of the memory range is exactly desired dimension of picture compression ratio, works as memory When maximum value beyond default memory range, client is just using the picture on default url, that is, original image.It is all in this way Memory size can correspond to a dimension of picture compression ratio.
In operation S2022, during client request picture, carry client wherein when sending picture request The identification information of itself so that application server can be requested based on picture in the identification information that carries be responded, and to visitor Family end returns to corresponding response results.
Specifically, client can exist when request stage sends the request of data comprising picture request to http-server Request header carries UDID, and after request of data can be transmitted to application server by http-server, application server can go to count According to the dimension of picture compression ratio read in library with the UDID with corresponding relationship, and is generated according to the information of reading and have picture ruler The URL of very little information, and the URL is returned into the client, at this point, client can use the URL to picture servers Request the picture of correspondingly-sized.
For example, original image size is 720x 720, and the dimension of picture compression ratio of certain client is 50%, and original image number of responses Picture URL hypothesis in is:
Https: //m.360buying.com/imp/default.jfs/testPic.jpg,
So application server is based on dimension of picture compression ratio 50% treated that picture URL is exactly:
https://m.360buying.com/imp/360x 360.jfs/testPic.Jpg。
Operation S2023, make client according to response result obtain correspondingly-sized picture.
Front oneself through illustrating, client pass through following picture URL:
Https: //m.360buying.com/imp/360x 360.jfs/testPic.Jpg,
The address URL that step generates on this can request the picture of 360 size of 360x, and the size of this picture It is generated to be namely based on step dimension of picture compression ratio, thus meets client memory size.
It should be noted that a client generally has one or more list page interface, therefore in practical application Flexible configuration mode can be used, carries out picture URL processing just for some or certain common list page interfaces, without It is that must will carry out picture URL processing to the request of data of all list page interfaces of client.
By the embodiment of the present disclosure, since the size of memory and the configuration of mobile phone are generally positively correlated, i.e., general memory is small Mobile phone, configure it is not high, so being very reasonable, institute according to the same picture that memory size loads different dimensions The picture of suitable dimension can be requested in the case where not influencing user experience, the oom of small memory mobile terminal is solved the problems, such as.
As a kind of optional embodiment, making the client picture that result obtains correspondingly-sized according to response includes: to answer In the case where returning to the URL with dimension of picture to client with server, make client based on dimension of picture information Picture of the URL to picture servers request correspondingly-sized.
After the address picture URL in the response data requested every time due to client is sent to application service end, the service Device will be the picture URL special disposal in response data once, that is, is met according to the generation of the dimension of picture compression ratio of oneself storage The address picture URL of the suitable dimension of memory size, successively client can request the figure of correspondingly-sized to picture servers Piece.
When client requests the picture of correspondingly-sized to picture servers based on the URL with dimension of picture information, figure The response logic of piece server is as follows:
(1) for user upload picture, picture servers are without any processing, for example, uploading pictures storage path such as Under:
Https: //m.360buying.com/imp/default.jfs/testPic.jpg,
(1) when someone is by following path request picture:
Https: //m.360buying.com/imp/726x450.jfs/testPic.jpg,
If this picture exists, picture servers just send it to corresponding client, if it does not, picture takes Business device is not also handled, and original image is returned to corresponding client at once, in addition to this, picture servers also will record a text Part, for illustrating that someone has done such picture request.In this way, the apache camel of picture servers side will be by this File, which is picked up, to be come, and size as required handles original image, finally obtains the picture of size required for meeting.
Further, since the disk space of server is limited, if someone ceaselessly generates difference using program The URL of the picture of size carrys out malicious requests, then the picture that disk space may be generated soon takes.Based on this, in order to anti- Model malicious attack can set the number for the various sizes of picture for allowing apache camel to handle for an original image, than As only apache camel allowed to handle 6 various sizes of pictures, if exceeded, the picture generated earliest will be replaced Fall.
The disclosure is elaborated with next specific embodiment:
Operation 1, client send request of data, and request header default carries UDID;
Operation 2, application server judges whether there is picture URL in the response data of the request, if not then response Data return to client, if so, just carrying out following process flow;
Operation 3, application server inquires dimension of picture compression ratio into database according to the UDID carried in request;
Operation 4, application server is according to the newly-generated address URL with picture suitable dimension of dimension of picture compression proportion;
The newly-generated address picture URL is returned to client by operation 5, application server;
Operation 6, client request picture to picture servers according to the address picture URL;
Operation 7, picture servers are judged that picture whether there is according to the address URL of the request picture, are shown based on aforementioned Example, can be to look for here either with or without the picture to be requested having a size of 360x 360.If there is being carried out operation 8 and terminating, If not then operation 9 and operation 10 are executed in succession;
Operation 8, picture is returned to client by picture servers;
Operation 9, original image is returned to client by picture servers, and records this requested picture;
Operation 10, picture servers carry out apache camel processing to picture, the figure for walking record are generated according to original image Piece, that is, the picture having a size of 360x 360, in case request next time, certain server is not raw without limitation apache camel At picture, but there is the limitation of a quantity, for example only allow to generate 6 various sizes of pictures, if exceeded, generates earliest Picture will be replaced.
It should be noted that apache camel is the frame of an open source, it is rule-based and processing a engine, User can be made to provide more size pictures by the change request server end of the parameter in the address picture URL.
By the embodiment of the present disclosure, in the case where not influencing user experience, asked in the smaller client of certain memories It asks during picture according to the picture of the size dynamic requests suitable dimension of the occupied memory of client, saves mobile terminal Memory, solve the problems, such as the oom being easy to appear on mobile terminal.Further, scheme provided by the disclosure is dynamically adapting , because the memory size of client distribution can change, for example client can be modified in Android mobile phone terminal Default maximum memory, after user modifies the default maximum memory of client, this programme can be according to new modified values come again Request the picture of the suitable memory.
Fig. 3 A diagrammatically illustrates the flow chart of the method for the response picture request according to the embodiment of the present disclosure.Such as Fig. 3 A institute Show, this method is applied to application server, including operation S301~S302, in which:
Electronic equipment is obtained during the picture request that the client for responding electronic equipment is sent in operation S301 To the relevant information for the memory size that client is distributed;And
In operation S302, the relevant information of the memory size for distributing application server to client according to electronic equipment come The picture request that customer in response end is sent.
In the embodiments of the present disclosure, the process of client request picture may include preparation stage and request stage.
A kind of situation, client can be in the sizes and client itself of memory that the preparation stage is distributed itself Device identifier (Unique Device Identifie, referred to as UDID) is sent to http-server in advance, is serviced by http These information are transmitted to application server by device, then the memory with the client is calculated according to these information by application server Adaptable dimension of picture, and then in the database by calculated result storage, it is based on this, the client is in request stage to http When server sends the request of data comprising picture request, which can be transmitted to application server for request of data, It is gone in database to read above-mentioned calculated result by application server again, and is generated according to the information of reading and have dimension of picture information URL, and the URL is returned into the client, at this point, client can use the URL to picture servers request pair Answer the picture of size.
Another situation, client can be in the sizes and client itself for the memory that request stage is distributed itself UDID carrying be sent to http-server in the request of data requested comprising picture, by http-server by these information turn Application server is issued, then calculates the picture ruler being adapted with the memory of the client according to these information by application server It is very little, and the URL for having dimension of picture information is generated according to calculated result, and the URL is returned into the client, at this point, objective Family end can use the URL to the picture of picture servers request correspondingly-sized.
Preferably, it can choose the previous case, the picture being adapted with the memory of client determined that in the preparation stage Size, so as to reduce the waiting time of the adaptable dimension of picture of the memory for requesting to determine in real time this with client, in turn Working efficiency can be improved, and improve user experience.
By the embodiment of the present disclosure, the size of the memory for distributing client based on itself requests the figure of correspondingly-sized Piece not only can prevent low side devices from oom problem occur, and high-end communication apparatus can also be enable to do as usual and use the figure of high quality Piece, to will not influence user experience.Correspondingly, application server can dynamically issue not according to the memory size of client With the picture of size to save the limited memory of mobile terminal, oom problem can effectively solve.
Below with reference to Fig. 3 B and 3C, method shown in Fig. 3 A is described further in conjunction with specific embodiments.
Fig. 3 B diagrammatically illustrates the memory for distributing application server according to client according to the embodiment of the present disclosure The relevant information of size carrys out the flow chart of the picture request of customer in response end transmission.As shown in Figure 3B, as a kind of optional reality Example is applied, sends relevant information of the application server according to electronic equipment to the memory size that client is distributed come customer in response end Picture request include:
In operation S3021, during client request picture, the picture that sends application server based on client The identification information carried in request searches database, to find out the dimension of picture compression ratio for having corresponding relationship with identification information;
In operation S3022, application server is made to generate the URL for having dimension of picture information based on dimension of picture compression ratio; And
In operation S3023, make application server that the URL with dimension of picture information is returned to client, so that client End can request the picture of correspondingly-sized based on the URL with dimension of picture information to picture servers.
Specifically, client can exist when request stage sends the request of data comprising picture request to http-server Request header carries UDID, and after request of data can be transmitted to application server by http-server, application server can go to count According to the dimension of picture compression ratio read in library with the UDID with corresponding relationship, and is generated according to the information of reading and have picture ruler The URL of very little information, and the URL is returned into the client, at this point, client can use the URL to picture servers Request the picture of correspondingly-sized.
For example, original image size is 720x 720, and the dimension of picture compression ratio of certain client is 50%, and original image number of responses Picture URL hypothesis in is:
Https: //m.360buying.com/imp/default.jfs/testPic.jpg,
So application server is based on dimension of picture compression ratio 50% treated that picture URL is exactly:
https://m.360buying.com/imp/360x 360.jfs/testPic.Jpg。
Operation S2023, make client according to response result obtain correspondingly-sized picture.
Front oneself through illustrating, client pass through following picture URL:
Https: //m.360buying.com/imp/360x 360.jfs/testPic.Jpg,
The address URL that step generates on this can request the picture of 360 size of 360x, and the size of this picture It is generated to be namely based on step dimension of picture compression ratio, thus meets client memory size.
It should be noted that a client generally has one or more list page interface, therefore in practical application Flexible configuration mode can be used, carries out picture URL processing just for some or certain common list page interfaces, without It is that must will carry out picture URL processing to the request of data of all list page interfaces of client.
By the embodiment of the present disclosure, since the size of memory and the configuration of mobile phone are generally positively correlated, i.e., general memory is small Mobile phone, configure it is not high, so being very reasonable, institute according to the same picture that memory size loads different dimensions The picture for adapting to memory size can be issued in the case where not influencing user experience, the oom of small memory mobile terminal is solved Problem.
Fig. 3 C diagrammatically illustrates the flow chart of the method for the response picture request according to another embodiment of the disclosure.Such as figure Shown in 3C, as a kind of optional embodiment, method can also include: other than it may include the operation in Fig. 3 A and 3B
In operation S303, the identification information of itself and electronic equipment sent when obtaining client terminal start-up is distributed to client Memory size relevant information;
In operation S304, according to the associated information calculation and client pair of the memory size that electronic equipment is distributed to client The dimension of picture compression ratio answered;And
In operation S305, and corresponding relationship by the identification information of dimension of picture compression ratio and client and between the two Storage is in the database.
In the embodiments of the present disclosure, it can the operation is executed when client starts for the first time, it can also be every in client The primary operation is carried out when secondary starting.
Since the size of the memory distributed to each client can be modified dynamically, in order to guarantee client The memory information of upload is newest, it is preferable that the primary operation can be carried out when client starts every time.Wherein, objective Family end executes the operation every time, and application server can all judge whether oneself has corresponding dimension of picture to compress by the UDID of the client Than, if not then UDID and dimension of picture compression ratio are saved into database, if there is continuing to judge that dimension of picture compresses Whether than as saved before, being just to terminate process, the no UDID and dimension of picture compression ratio of just saving is into database.
Specifically, a handshake request will be sent to http server-side since client starts every time, at this time may be used So that the UDID of the size and client itself for the memory that client is distributed itself is carried in the number requested comprising picture According to http-server is sent in request, these information are transmitted to application server by http-server, then by application service Device calculates dimension of picture compression ratio corresponding with client according to these information, and then calculated result is stored in database In.
UDID is carried since request header generally can all be defaulted, so only needing the correlation letter of the memory size of client Breath is transmitted to http server-side as parameter, and http-server is not processed, and continues the information that client uploads being transmitted to application Server, application server calculate the dimension of picture compression ratio of client according to memory size, and by UDID and corresponding picture Size compression is than storage into database.
Furthermore, it is possible to the corresponding relationship of memory range Yu dimension of picture compression ratio is pre-configured with, when memory size falls in certain In a memory range, then the corresponding dimension of picture compression ratio of the memory range is exactly desired dimension of picture compression ratio, works as memory When maximum value beyond default memory range, client is just using the picture on default url, that is, original image.It is all in this way Memory size can correspond to a dimension of picture compression ratio.
By the embodiment of the present disclosure, since the size of memory and the configuration of mobile phone are generally positively correlated, i.e., general memory is small Mobile phone, configure it is not high, so the picture compression size of client is calculated, in this way in client request according to memory size The picture to match with its memory size can be provided based on the picture compression size when picture, thus can not influenced The picture for adapting to memory size is issued in the case where user experience, solves the problems, such as the oom of small memory mobile terminal.
Fig. 4 A diagrammatically illustrates the block diagram of client according to an embodiment of the present disclosure.As shown in Figure 4 A, the client On an electronic device, for carrying out picture request, client 400 comprises determining that module 410 and request module 420 for 400 installations. Determining module 410 determines electronic equipment to the memory of client distribution distribution for during client request picture Size;And request module 420, for making according to client according to the big of the memory of the distributed to client of electronic equipment itself It is small that the picture of correspondingly-sized is requested to application server.
By the embodiment of the present disclosure, the size of the memory for distributing client based on itself requests the figure of correspondingly-sized Piece not only can prevent low side devices from oom problem occur, and high-end communication apparatus can also be enable to do as usual and use the figure of high quality Piece, to will not influence user experience.
Fig. 4 B diagrammatically illustrates the block diagram of request module according to an embodiment of the present disclosure.As shown in Figure 4 B, as one Kind optional embodiment, request module 420 includes: the first transmission unit 421, is used in client terminal start-up, certainly by client The relevant information of the memory size of the distributed to client of identification information and electronic equipment itself of body is sent to application server, So that application server can distribute to the associated information calculation for the memory size that client itself is distributed according to electronic equipment Dimension of picture compression ratio corresponding with client, and by the identification information of dimension of picture compression ratio and client and between the two Corresponding relationship storage in the database;Second request unit 422, for making client during client request picture In the identification information for wherein carrying itself when end sends picture request, so that application server can be based on carrying in picture request Identification information responded, and return to corresponding response results to client;And acquiring unit 423, for making client Result obtains the picture of correspondingly-sized according to response.
By the embodiment of the present disclosure, since the size of memory and the configuration of mobile phone are generally positively correlated, i.e., general memory is small Mobile phone, configure it is not high, so being very reasonable, institute according to the same picture that memory size loads different dimensions The picture of suitable dimension can be requested in the case where not influencing user experience, the oom of small memory mobile terminal is solved the problems, such as.
As a kind of optional embodiment, acquiring unit is also used to: being returned in application server to client and is had picture In the case where the URL of size, client is made to request correspondingly-sized to picture servers based on the URL with dimension of picture information Picture.
By the embodiment of the present disclosure, in the case where not influencing user experience, asked in the smaller client of certain memories It asks during picture according to the picture of the size dynamic requests suitable dimension of the occupied memory of client, saves mobile terminal Memory, solve the problems, such as the oom being easy to appear on mobile terminal.Further, scheme provided by the disclosure is dynamically adapting , because the memory size of client distribution can change, for example client can be modified in Android mobile phone terminal Default maximum memory, after user modifies the default maximum memory of client, this programme can be according to new modified values come again Request the picture of the suitable memory.
Fig. 5 A diagrammatically illustrates the block diagram of application server according to an embodiment of the present disclosure.As shown in Figure 5A, this is answered Picture with server 500 for customer in response end is requested, comprising: first obtains module 510 and respond module 520.First obtains Modulus block 510 obtains electronic equipment to client during the picture for sending in the client for responding electronic equipment is requested Hold the relevant information of the memory size of distribution;And respond module 520, for making application server according to electronic equipment to client The relevant information of distributed memory size is held to carry out the picture request of customer in response end transmission.
By the embodiment of the present disclosure, the size of the memory for distributing client based on itself requests the figure of correspondingly-sized Piece not only can prevent low side devices from oom problem occur, and high-end communication apparatus can also be enable to do as usual and use the figure of high quality Piece, to will not influence user experience.Correspondingly, application server can dynamically issue not according to the memory size of client With the picture of size to save the limited memory of mobile terminal, oom problem can effectively solve.
Fig. 5 B diagrammatically illustrates the block diagram of respond module according to an embodiment of the present disclosure.As shown in Figure 5 B, as one Kind optional embodiment, respond module 520 includes: searching unit 521, for making to answer during client request picture The identification information carried in the picture request sent with server based on client searches database, has to find out with identification information There is the dimension of picture compression ratio of corresponding relationship;Generation unit 522, for generating application server based on dimension of picture compression ratio URL with dimension of picture information;And feedback unit 523, for making application server that will have the URL of dimension of picture information Client is returned to, to enable the client to request correspondingly-sized to picture servers based on the URL with dimension of picture information Picture.
By the embodiment of the present disclosure, since the size of memory and the configuration of mobile phone are generally positively correlated, i.e., general memory is small Mobile phone, configure it is not high, so being very reasonable, institute according to the same picture that memory size loads different dimensions The picture for adapting to memory size can be issued in the case where not influencing user experience, the oom of small memory mobile terminal is solved Problem.
Fig. 5 C diagrammatically illustrates the block diagram of application server according to another embodiment of the present disclosure.As shown in Figure 5 C, As a kind of optional embodiment, application server 500 further include: second obtains module 530, when for obtaining client terminal start-up The relevant information for the memory size that the identification information of itself and electronic equipment sent is distributed to client itself;Computing module 540, the associated information calculation of the memory size for being distributed according to electronic equipment to client itself is corresponding with client Dimension of picture compression ratio;And memory module 550, it is used for and by the identification information and two of dimension of picture compression ratio and client Corresponding relationship storage between person is in the database.
By the embodiment of the present disclosure, since the size of memory and the configuration of mobile phone are generally positively correlated, i.e., general memory is small Mobile phone, configure it is not high, so the picture compression size of client is calculated, in this way in client request according to memory size The picture to match with its memory size can be provided based on the picture compression size when picture, thus can not influenced The picture for adapting to memory size is issued in the case where user experience, solves the problems, such as the oom of small memory mobile terminal.
It is understood that determining module 410 and request module 420 (or first obtain module 510 and respond module 520) it may be incorporated in a module and realize or any one module therein can be split into multiple modules.Alternatively, At least partly function of one or more modules in these modules can be combined at least partly function of other modules, and It is realized in a module.According to an embodiment of the invention, determining module 410 and request module 420 (or first obtain module 510 and respond module 520) at least one of can at least be implemented partly as hardware circuit, such as field programmable gate Array (FPGA), programmable logic array (PLA), system on chip, the system on substrate, the system in encapsulation, dedicated integrated electricity Road (ASIC), or can be realized with carrying out the hardware such as any other rational method that is integrated or encapsulating or firmware to circuit, Or it is realized with software, the appropriately combined of hardware and firmware three kinds of implementations.Alternatively, determining module 410 and request module At least one of 420 (or the first acquisition module 510 and respond modules 520) can at least be implemented partly as computer Program module can execute the function of corresponding module when the program is run by computer.
It should be noted that components of system as directed and method part in embodiment of the disclosure are opposite in embodiment of the disclosure It answers, the description of components of system as directed is with specific reference to method part, and details are not described herein.
Fig. 6, which is diagrammatically illustrated, is adapted for carrying out picture requesting method and response picture request according to the embodiment of the present disclosure Method computer system block diagram.Computer system shown in Fig. 6 is only an example, should not be to the embodiment of the present disclosure Function and use scope bring any restrictions.
As shown in fig. 6, include processor 601 according to the computer system 600 of the embodiment of the present disclosure, it can be according to storage It is loaded into random access storage device (RAM) 603 in the program in read-only memory (ROM) 602 or from storage section 608 Program and execute various movements appropriate and processing.Processor 601 for example may include general purpose microprocessor (such as CPU), refer to Enable set processor and/or related chip group and/or special microprocessor (for example, specific integrated circuit (ASIC)), etc..Processing Device 601 can also include the onboard storage device for caching purposes.Processor 601 may include for executing with reference to Fig. 2A and 2B And the single treatment unit of the different movements of the method flow according to the embodiment of the present disclosure of Fig. 3 A~3C description is either more A processing unit.
In RAM 603, it is stored with computer system 600 and operates required various programs and data.Processor 601, ROM 602 and RAM 603 is connected with each other by bus 604.Processor 601 is by executing the journey in ROM 602 and/or RAM 603 Sequence come execute above with reference to Fig. 2A and 2B and Fig. 3 A~3C description various operations.It is noted that described program can also deposit Storage is in one or more memories in addition to ROM 602 and RAM 603.Processor 601 can also be stored in by executing Program in one or more of memories executes the various operations above with reference to Fig. 2A and 2B and Fig. 3 A~3C description.
In accordance with an embodiment of the present disclosure, computer system 600 can also include input/output (I/O) interface 605, input/ Output (I/O) interface 605 is also connected to bus 604.Computer system 600 can also be including being connected to the following of I/O interface 605 It is one or more in component: the importation 606 including keyboard, mouse etc.;Including such as cathode-ray tube (CRT), liquid crystal The output par, c 607 of display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.;And including such as The communications portion 609 of the network interface card of LAN card, modem etc..Communications portion 609 is held via the network of such as internet Row communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as disk, CD, magnetic CD, semiconductor memory etc. are mounted on as needed on driver 610, in order to from the computer program read thereon It is mounted into storage section 608 as needed.
In accordance with an embodiment of the present disclosure, it may be implemented as computer software journey above with reference to the method for flow chart description Sequence.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer readable storage medium Computer program, which includes the program code for method shown in execution flow chart.In such implementation In example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media 611 It is mounted.When the computer program is executed by processor 601, the above-mentioned function limited in the system of the embodiment of the present disclosure is executed Energy.In accordance with an embodiment of the present disclosure, system as described above, unit, module, unit etc. can pass through computer program Module is realized.
It should be noted that computer readable storage medium shown in the disclosure can be computer-readable signal media or Person's computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- But be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above group It closes.The more specific example of computer readable storage medium can include but is not limited to: have being electrically connected for one or more conducting wires Connect, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed it is read-only Memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium, which can be, any include or stores The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And In the disclosure, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer readable storage medium other than readable storage medium storing program for executing, which can send, propagate or Person's transmission is for by the use of instruction execution system, device or device or program in connection.It is computer-readable to deposit The program code for including on storage media can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF Etc. or above-mentioned any appropriate combination.In accordance with an embodiment of the present disclosure, on computer readable storage medium may include One or more memories other than the ROM 602 and/or RAM 603 and/or ROM602 and RAM 603 of text description.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
As on the other hand, the disclosure additionally provides a kind of computer readable storage medium, the computer-readable storage medium Matter can be included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment. Computer readable storage medium carries one or more program, when one or more program is executed by the equipment When, so that the equipment executes: during client request picture, determining the size of the memory distributed to client;And The size for the memory for distributing client according to itself requests the picture of correspondingly-sized, and the equipment is executed: During the picture request that customer in response end is sent, the relevant information of the memory size distributed to client is obtained;And make The picture request that the relevant information for the memory size that application server is distributed according to client sends come customer in response end.
Embodiment of the disclosure is described above.But the purpose that these embodiments are merely to illustrate that, and It is not intended to limit the scope of the present disclosure.Although respectively describing each embodiment above, but it is not intended that each reality Use cannot be advantageously combined by applying the measure in example.The scope of the present disclosure is defined by the appended claims and the equivalents thereof.It does not take off From the scope of the present disclosure, those skilled in the art can make a variety of alternatives and modifications, these alternatives and modifications should all fall in this Within scope of disclosure.

Claims (16)

1. a kind of picture requesting method is applied to electronic equipment, is equipped with client, the method packet on the electronic equipment It includes:
During the client request picture, determine the electronic equipment to the client distribute memory it is big It is small;And
The size for the memory for making the client distribute to the client according to the electronic equipment is asked to application server Seek the picture of correspondingly-sized.
2. according to the method described in claim 1, wherein, the client is made to distribute to the client according to the electronic equipment The size of the memory at end come to application server request correspondingly-sized picture include:
In the client terminal start-up, make the client that the identification information of itself and the electronic equipment are distributed to the visitor The relevant information of the memory size at family end is sent to the application server, so that the application server can be according to the electricity Sub- equipment distributes to the associated information calculation dimension of picture compression corresponding with the client of the memory size of the client Than, and corresponding relationship by the identification information of the dimension of picture compression ratio and the client and between the two is stored in number According in library;
During the client request picture, make the client when sending picture request in the mark for wherein carrying itself Know information so that the application server can be requested based on the picture in the identification information that carries be responded, and to institute It states client and returns to corresponding response results;And
The client is set to obtain the picture of correspondingly-sized according to the response results.
3. according to the method described in claim 2, wherein, the client is made to obtain correspondingly-sized according to the response results Picture includes:
In the case where the application server returns to the URL for having dimension of picture to the client, make client's end group The picture of correspondingly-sized is requested to picture servers in the URL with dimension of picture information.
4. a kind of method of response picture request, is applied to application server, which comprises
During the picture request that the client for responding electronic equipment is sent, the electronic equipment is obtained to the client The relevant information of the memory size of distribution;And
Ring the application server to the relevant information of the memory size of client distribution according to the electronic equipment The picture request for answering the client to send.
5. according to the method described in claim 4, wherein, making the application server according to the electronic equipment to the client The relevant information of the memory size of distribution is held to respond the picture request that the client is sent and include:
During the client request picture, the picture that sends the application server based on the client The identification information carried in request searches database, is compressed with finding out the dimension of picture for having corresponding relationship with the identification information Than;
The application server is set to generate the URL for having dimension of picture information based on the dimension of picture compression ratio;And
Make the application server that the URL with dimension of picture information is returned to the client, so that the client End can request the picture of correspondingly-sized based on the URL with dimension of picture information to picture servers.
6. according to the method described in claim 5, wherein, the method also includes:
What the identification information of itself and the electronic equipment sent when obtaining the client terminal start-up was distributed to the client The relevant information of memory size;
It is corresponding with the client to the associated information calculation of the memory size of client distribution according to the electronic equipment The dimension of picture compression ratio;And
And corresponding relationship by the identification information of the dimension of picture compression ratio and the client and between the two is stored in In the database.
7. a kind of client, on an electronic device, for carrying out picture request, the client includes: for installation
Determining module, for during client request picture, determining what the electronic equipment was distributed to the client The size of memory;And
Request module, for make the client according to the electronic equipment distribute to the client memory size come to The picture of application server request correspondingly-sized.
8. client according to claim 7, wherein the request module includes:
First transmission unit is used in the client terminal start-up, by the identification information and the electronics of the client itself The relevant information that equipment distributes to the memory size of the client is sent to the application server, so that the application service Device can distribute to the associated information calculation and the client pair of the memory size of the client according to the electronic equipment The dimension of picture compression ratio answered, and by the identification information of the dimension of picture compression ratio and the client and between the two Corresponding relationship stores in the database;
Second request unit, when for during the client request picture, making the client send picture request In the identification information for wherein carrying itself, so that the application server can be based on the mark letter carried in picture request Breath is responded, and returns to corresponding response results to the client;And
Acquiring unit, for making the client according to the picture of response results acquisition correspondingly-sized.
9. client according to claim 8, wherein the acquiring unit is also used to:
In the case where the application server returns to the URL for having dimension of picture to the client, make client's end group The picture of correspondingly-sized is requested to picture servers in the URL with dimension of picture information.
10. a kind of application server, the picture for customer in response end is requested, comprising:
First obtains module, during the picture for sending in the client for responding electronic equipment is requested, obtains institute State the relevant information for the memory size that electronic equipment is distributed to the client;And
Respond module, the memory size for distributing the application server to the client according to the electronic equipment Relevant information is requested to respond the picture that the client is sent.
11. application server according to claim 10, wherein the respond module includes:
Searching unit, for during the client request picture, making the application server be based on the client The identification information carried in the picture request sent searches database, has corresponding relationship with the identification information to find out Dimension of picture compression ratio;
Generation unit, for generating the application server with dimension of picture information based on the dimension of picture compression ratio URL;And
Feedback unit, for making the application server that the URL with dimension of picture information is returned to the client, So that the client can request the figure of correspondingly-sized based on the URL with dimension of picture information to picture servers Piece.
12. application server according to claim 11, wherein the application server further include:
Second obtain module, the identification information of itself and the electronic equipment sent when for obtaining the client terminal start-up to The relevant information of the memory size of the client distribution;
Computing module, the associated information calculation of the memory size for giving the client to distribute according to the electronic equipment and institute State the corresponding dimension of picture compression ratio of client;And
Memory module, is used for and pair by the identification information of the dimension of picture compression ratio and the client and between the two It should be related to storage in the database.
13. a kind of computer system, comprising:
One or more processors;
Memory, for storing one or more programs,
Wherein, when one or more of programs are executed by one or more of processors, so that one or more of Processor realizes picture requesting method described in any one of claims 1 to 3.
14. a kind of computer readable storage medium, is stored thereon with executable instruction, which makes to handle when being executed by processor Device realizes picture requesting method described in any one of claims 1 to 3.
15. a kind of computer system, comprising:
One or more processors;
Memory, for storing one or more programs,
Wherein, when one or more of programs are executed by one or more of processors, so that one or more of The method that processor realizes response picture request described in any one of claim 4 to 6.
16. a kind of computer readable storage medium, is stored thereon with executable instruction, which makes to handle when being executed by processor The method that device realizes response picture request described in any one of claim 4 to 6.
CN201711499082.9A 2017-12-29 2017-12-29 Picture request method, picture request response method and client Active CN109992406B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711499082.9A CN109992406B (en) 2017-12-29 2017-12-29 Picture request method, picture request response method and client
PCT/CN2018/108753 WO2019128357A1 (en) 2017-12-29 2018-09-29 Picture requesting method, method for responding to picture request, and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711499082.9A CN109992406B (en) 2017-12-29 2017-12-29 Picture request method, picture request response method and client

Publications (2)

Publication Number Publication Date
CN109992406A true CN109992406A (en) 2019-07-09
CN109992406B CN109992406B (en) 2022-06-07

Family

ID=67062979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711499082.9A Active CN109992406B (en) 2017-12-29 2017-12-29 Picture request method, picture request response method and client

Country Status (2)

Country Link
CN (1) CN109992406B (en)
WO (1) WO2019128357A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112203158A (en) * 2020-09-27 2021-01-08 北京字节跳动网络技术有限公司 Image display method, device, system, equipment and medium
CN113382180A (en) * 2021-06-01 2021-09-10 海南车智易通信息技术有限公司 Picture processing method, computing device and readable storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400626A (en) * 2020-03-09 2020-07-10 联通沃音乐文化有限公司 Rapid self-adaptive output system and method for webpage pictures
CN112883261A (en) * 2021-01-28 2021-06-01 北京百度网讯科技有限公司 Configuration data pushing method and device, electronic equipment and medium
CN113641928B (en) * 2021-08-11 2023-10-31 上海浦东发展银行股份有限公司 Webpage request method, system and storage medium
CN113676756A (en) * 2021-08-23 2021-11-19 北京字跳网络技术有限公司 Picture request method, device, equipment, storage medium and program product

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6651094B1 (en) * 1998-07-17 2003-11-18 International Business Machines Corporation Method and apparatus for creating a preload image for network installation
CN103516748A (en) * 2012-06-25 2014-01-15 北京智慧风云科技有限公司 Method and system for self-adaption file downloading processing of cloud server and cloud server
CN103677942A (en) * 2013-12-30 2014-03-26 Tcl集团股份有限公司 Method and device for browsing network pictures at mobile terminal
CN104965877A (en) * 2015-06-12 2015-10-07 郑州悉知信息技术有限公司 Webpage picture acquisition method, picture cache server, coordination server and system
CN105183560A (en) * 2015-09-01 2015-12-23 北京金山安全软件有限公司 Method for adjusting picture, picture adjusting device and system
CN105956062A (en) * 2016-04-27 2016-09-21 广东欧珀移动通信有限公司 Picture acquisition method, system and equipment thereof
CN107179947A (en) * 2017-04-26 2017-09-19 武汉斗鱼网络科技有限公司 A kind of network picture method for down loading and system for mobile terminal
CN107193887A (en) * 2017-04-28 2017-09-22 武汉斗鱼网络科技有限公司 A kind of method and device for the resource that Loads Image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100640491B1 (en) * 2003-12-08 2006-10-30 삼성전자주식회사 Apparatus and method for downloading picture
CN102650946B (en) * 2012-03-22 2015-04-01 杭州梵艺科技有限公司 Method for loading and displaying graphical interface at hand-held terminal
CN103399822B (en) * 2013-08-14 2017-05-24 上海斐讯数据通信技术有限公司 Memory allocation method and system for solving problem of insufficient memory for applied pictures
CN103544207B (en) * 2013-08-19 2019-01-29 Tcl集团股份有限公司 A kind of method and system of picture loaded and displayed

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6651094B1 (en) * 1998-07-17 2003-11-18 International Business Machines Corporation Method and apparatus for creating a preload image for network installation
CN103516748A (en) * 2012-06-25 2014-01-15 北京智慧风云科技有限公司 Method and system for self-adaption file downloading processing of cloud server and cloud server
CN103677942A (en) * 2013-12-30 2014-03-26 Tcl集团股份有限公司 Method and device for browsing network pictures at mobile terminal
CN104965877A (en) * 2015-06-12 2015-10-07 郑州悉知信息技术有限公司 Webpage picture acquisition method, picture cache server, coordination server and system
CN105183560A (en) * 2015-09-01 2015-12-23 北京金山安全软件有限公司 Method for adjusting picture, picture adjusting device and system
CN105956062A (en) * 2016-04-27 2016-09-21 广东欧珀移动通信有限公司 Picture acquisition method, system and equipment thereof
CN107179947A (en) * 2017-04-26 2017-09-19 武汉斗鱼网络科技有限公司 A kind of network picture method for down loading and system for mobile terminal
CN107193887A (en) * 2017-04-28 2017-09-22 武汉斗鱼网络科技有限公司 A kind of method and device for the resource that Loads Image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
C. SERRANO 等: ""Segmentation-based lossless compression for color images"", 《PROCEEDINGS 10TH INTERNATIONAL CONFERENCE ON IMAGE ANALYSIS AND PROCESSING》 *
孙岳龙: ""Android应用开发中内存管理优化方法的研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112203158A (en) * 2020-09-27 2021-01-08 北京字节跳动网络技术有限公司 Image display method, device, system, equipment and medium
CN113382180A (en) * 2021-06-01 2021-09-10 海南车智易通信息技术有限公司 Picture processing method, computing device and readable storage medium
CN113382180B (en) * 2021-06-01 2023-02-28 海南车智易通信息技术有限公司 Picture processing method, computing device and readable storage medium

Also Published As

Publication number Publication date
WO2019128357A1 (en) 2019-07-04
CN109992406B (en) 2022-06-07

Similar Documents

Publication Publication Date Title
CN109992406A (en) The method and client that picture requesting method, response picture are requested
CN110096344A (en) Task management method, system, server cluster and computer-readable medium
US20130326502A1 (en) Installing applications remotely
CN108846753B (en) Method and apparatus for processing data
WO2017167050A1 (en) Configuration information generation and transmission method, and resource loading method, apparatus and system
CN108989362A (en) A kind for the treatment of method and apparatus of static resource
CN111737270A (en) Data processing method and system, computer system and computer readable medium
CN110427304A (en) O&M method, apparatus, electronic equipment and medium for banking system
CN110019539A (en) A kind of method and apparatus that the data of data warehouse are synchronous
CN110007936A (en) Data processing method and device
CN108880923A (en) The method and apparatus that policer operation applied to application server is requested
CN113179324B (en) Block chain link point and service processing method executed by block chain link point
CN110223179A (en) The data processing method of fund, device, system, medium
CN112650804B (en) Big data access method, device, system and storage medium
CN109597912A (en) Method for handling picture
CN110928594A (en) Service development method and platform
CN110113176A (en) Information synchronization method and device for configuration server
CN109218041A (en) Request processing method and device for server system
CN109150928A (en) Method and apparatus for handling request
CN115858905A (en) Data processing method and device, electronic equipment and storage medium
CN109614603A (en) Method and apparatus for generating information
CN109005250A (en) Method and apparatus for accessing server-side
CN110147368A (en) Data capture method and device for server
CN108833517A (en) Data processing system, method, electronic equipment and storage medium
CN109491830A (en) The method and system in switch data source

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant