CN108073601B - Picture pushing method and device and server - Google Patents

Picture pushing method and device and server Download PDF

Info

Publication number
CN108073601B
CN108073601B CN201610992667.3A CN201610992667A CN108073601B CN 108073601 B CN108073601 B CN 108073601B CN 201610992667 A CN201610992667 A CN 201610992667A CN 108073601 B CN108073601 B CN 108073601B
Authority
CN
China
Prior art keywords
picture
target
browser
client
preset
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.)
Active
Application number
CN201610992667.3A
Other languages
Chinese (zh)
Other versions
CN108073601A (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.)
China Mobile Communications Group Co Ltd
China Mobile Group Anhui Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Anhui 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 China Mobile Communications Group Co Ltd, China Mobile Group Anhui Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201610992667.3A priority Critical patent/CN108073601B/en
Publication of CN108073601A publication Critical patent/CN108073601A/en
Application granted granted Critical
Publication of CN108073601B publication Critical patent/CN108073601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • 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

Landscapes

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

Abstract

The invention discloses a method, a device and a server for pushing pictures, relates to the technical field of communication, and can solve the problems that a user cannot see information on the pictures and the efficiency of acquiring webpage information by the user is reduced because the pictures pushed by a server cannot be displayed on some browsers. The method comprises the following steps: receiving a picture pushing request sent by a first client; opening a target browser corresponding to the attribute information based on the attribute information; importing a target picture in a preset picture library corresponding to the picture identifier into a target browser; detecting an attribute value of a target picture after the target picture is imported into a target browser; judging whether the attribute value of the target picture imported into the target browser changes or not; and when the attribute value of the target picture after the target browser is imported is judged to be unchanged, pushing the target picture imported into the target browser to the first client. The method and the device are suitable for scenes that the client requests the server to push the pictures.

Description

Picture pushing method and device and server
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a server for pushing a picture.
Background
With the development of software technology, the types of browsers are more and more, and since the browser kernels are different in general among different types of browsers, different types of browsers may support different formats for the same content. In a B/S (Browser/Server) structured system, a Server stores contents of a web page, such as pictures, etc., and when a client accesses the web page through a Browser, the Server sends the contents of the web page accessed by the client to the client, and the client displays the contents sent by the Server on the Browser. However, when the new format of the picture appears, if the webpage maintainer considers that the new format of the picture is more beneficial to display and transmission of webpage content, the picture of the server side is updated to the new format of the picture, and when the server accesses the webpage through the browser at the client side, the new format of the picture is pushed to the client side. However, because the format of the picture is short in appearance time or the browser version is low, not all browsers support the picture in the new format, when the browser used by the client does not support the picture format pushed by the server, the browser used by the client cannot display the picture on the webpage, so that the user cannot see the information on the picture, and the efficiency of the user for acquiring the webpage information is reduced.
Disclosure of Invention
The invention provides a picture pushing method, a picture pushing device and a server, which can solve the problems that some browsers cannot display pictures pushed by a server side, so that users cannot see information on the pictures, and the efficiency of the users for acquiring webpage information is reduced.
In a first aspect, the present invention provides a method for pushing pictures, including:
receiving a picture pushing request sent by a first client, wherein the picture pushing request carries attribute information of a browser used by the first client and a picture identifier of a picture requested to be pushed; opening a target browser corresponding to the attribute information based on the attribute information; importing pictures in a preset picture library corresponding to the picture identification into a target browser, wherein the preset picture library has target pictures with different attributes in formats supported by the browser, and the target pictures are pictures requested to be pushed by a first client; detecting an attribute value of a target picture after the target picture is imported into a target browser; judging whether the attribute value of the target picture imported into the target browser changes or not; and when the attribute value of the target picture after the target browser is imported is judged to be unchanged, pushing the target picture imported into the target browser to the first client.
With reference to the first aspect, in a first implementation manner of the first aspect, the method further includes:
and when the attribute value of the target picture after the target browser is introduced is changed, introducing the target picture which is not introduced into the target browser in the preset picture library into the target browser.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the method further includes:
and determining the sequence of leading the target pictures in the preset picture library into the target browser according to the compression ratio of the target pictures in the preset picture library.
With reference to the second implementation manner of the first aspect, in a third implementation manner of the first aspect, determining, according to a compression ratio of a target picture in a preset picture library, a sequence of importing the target picture in the preset picture library into a target browser includes:
and determining the sequence of leading the target pictures in the preset picture library into the target browser according to the sequence of the compression ratios of the target pictures in the preset picture library from large to small.
With reference to the first aspect, in a fourth implementation manner of the first aspect, the opening a target browser corresponding to the attribute information includes:
and opening the target browser from a preset window.
With reference to the first aspect, in a fifth implementation manner of the first aspect, before opening the target browser corresponding to the attribute information, the method further includes:
a browser to install at least one attribute.
With reference to the first aspect or the second implementation manner of the first aspect, in a sixth implementation manner of the first aspect, the attribute value includes a size of a picture.
With reference to the first aspect or the second implementation manner of the first aspect, in a seventh implementation manner of the first aspect, the method further includes:
and when the target picture with the unchanged attribute value after the target browser is introduced does not exist in the preset picture, pushing the target picture in the universal format of the preset browser corresponding to the picture identification to the first client.
With reference to the first aspect or the second implementation manner of the first aspect, in an eighth implementation manner of the first aspect, after pushing a target picture imported into a target browser to a first client, the method further includes:
and establishing a corresponding relation between the picture pushed to the first client and the attribute information and the picture identification.
With reference to the eighth implementation manner of the first aspect, in a ninth implementation manner of the first aspect, the method further includes:
when a picture pushing request carrying attribute information and picture identification and sent by a second client is received, determining a picture corresponding to the attribute information and the picture identification according to the corresponding relation;
and pushing the picture corresponding to the attribute information and the picture identification to the second client.
In a second aspect, the present invention provides an apparatus for pushing pictures, including:
the receiving unit is used for receiving a picture pushing request sent by a first client, wherein the picture pushing request carries attribute information of a browser used by the first client and a picture identifier of a picture requested to be pushed;
a browser opening unit configured to open a target browser corresponding to the attribute information based on the attribute information;
the picture importing unit is used for importing pictures in a preset picture library corresponding to the picture identification into a target browser, wherein the preset picture library has target pictures with formats supported by browsers with different attributes, and the target pictures are pictures requested to be pushed by the first client;
the detection unit is used for detecting the attribute value of the target picture after the target browser is imported;
the judging unit is used for judging whether the attribute value of the target picture imported into the target browser changes or not;
and the pushing unit is used for pushing the target picture imported into the target browser to the first client when the attribute value of the target picture imported into the target browser is judged not to be changed.
With reference to the second aspect, in a first implementation manner of the second aspect, the picture importing unit is further configured to import, into the target browser, a target picture that is not imported into the target browser in the preset picture library when an attribute value of the target picture after the target browser is imported is changed.
With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the method further includes:
and the sequence determining unit is used for determining the sequence of leading the target pictures in the preset picture library into the target browser according to the compression ratio of the target pictures in the preset picture library.
With reference to the second implementation manner of the second aspect, in a third implementation manner of the second aspect, the order determining unit is specifically configured to determine, according to a descending order of compression ratios of target pictures in the preset picture library, an order of importing the target pictures in the preset picture library into the target browser.
With reference to the second aspect, in a fourth implementation manner of the second aspect, the browser opening unit is further configured to open the target browser from a preset window.
With reference to the second aspect, in a fifth implementation manner of the second aspect, the method further includes:
and the installation unit is used for installing the browser with at least one attribute.
With reference to the second aspect or the second implementation manner of the second aspect, in a sixth implementation manner of the second aspect, the attribute value includes a size of a picture.
With reference to the second aspect or the second implementation manner of the second aspect, in a seventh implementation manner of the second aspect, the pushing unit is further configured to, when there is no target picture with an unchanged attribute value after the target browser is imported into the preset picture, push the target picture in the preset browser-generic format corresponding to the picture identifier to the first client.
With reference to the second aspect or the second implementation manner of the second aspect, in an eighth implementation manner of the second aspect, the method further includes:
and the establishing unit is used for establishing the corresponding relation between the picture pushed to the first client and the attribute information and the picture identification.
With reference to the eighth implementation manner of the second aspect, in a ninth implementation manner of the second aspect, the method further includes:
the picture determining unit is used for determining a picture corresponding to the attribute information and the picture identifier according to the corresponding relation when receiving a picture pushing request which is sent by the second client and carries the attribute information and the picture identifier;
the pushing unit is further used for pushing the picture corresponding to the attribute information and the picture identifier to the second client.
In a third aspect, the present invention provides a server for pushing pictures, including:
a memory for storing an executable program;
an input/output interface for communicating with an external device;
the processor is used for executing a program stored in the memory, and specifically used for receiving a picture pushing request sent by a first client through an input/output interface, wherein the picture pushing request carries attribute information of a browser used by the first client and a picture identifier of a picture requested to be pushed; and opening a target browser corresponding to the attribute information based on the attribute information; the system comprises a preset picture library, a first client and a second client, wherein the preset picture library is used for importing pictures in the preset picture library corresponding to picture identifications into a target browser, the preset picture library has target pictures with formats supported by browsers with different attributes, and the target pictures are pictures requested to be pushed by the first client; the attribute value of the target picture after the target picture is imported into the target browser is detected; the method comprises the steps of importing a target browser into a target picture, and judging whether the attribute value of the target picture imported into the target browser changes or not; and when the attribute value of the target picture after the target browser is imported is judged not to be changed, pushing the target picture imported into the target browser to the first client.
The invention provides a method, a device and a server for pushing pictures, wherein after receiving a picture pushing request of a client, a server in the invention can obtain attribute information of a browser used by the client and a picture identifier of a target picture requested to be pushed from the picture pushing request, then open a target browser corresponding to the attribute information in the server, import the target picture in a preset picture library corresponding to the picture identifier into the target browser, and detect an attribute value of the target picture imported into the target browser; whether the target browser supports the format of the imported target picture or not is determined by judging whether the attribute value of the target picture after the target browser is imported changes or not, so that the picture supported by the target browser is determined, and then the picture supported by the target browser is sent to the client, so that the situation that the browser used by the client can display the picture pushed by the server is ensured, the situation that the format of the picture pushed by the server cannot be consistent with the format of the picture supported by the browser used by the client, so that the picture pushed by the server cannot be displayed by the browser used by the client is avoided, the efficiency of acquiring webpage information by a user is improved, and the time of the user is saved.
Drawings
The invention may be better understood from the following description of specific embodiments thereof taken in conjunction with the accompanying drawings, in which:
other features, objects and advantages of the invention will become apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings in which like or similar reference characters refer to the same or similar parts.
FIG. 1 is a schematic flow chart diagram of a method of picture pushing according to an embodiment of the invention;
FIG. 2 is a schematic flow chart diagram of a method of picture pushing according to another embodiment of the present invention;
FIG. 3 is a schematic flow chart of opening a target browser in the method for pushing pictures shown in FIG. 1;
FIG. 4 is a schematic flow chart diagram of a method of picture pushing according to yet another embodiment of the present invention;
FIG. 5 is a schematic flow chart diagram of a method of picture pushing according to yet another embodiment of the present invention;
FIG. 6 is a schematic block diagram of an apparatus for picture pushing according to an embodiment of the present invention;
FIG. 7 is a schematic block diagram of an apparatus for picture pushing according to yet another or more embodiments of the invention;
fig. 8 is a schematic block diagram of a server for picture pushing according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention. The present invention is in no way limited to any specific configuration and algorithm set forth below, but rather covers any modification, replacement or improvement of elements, components or algorithms without departing from the spirit of the invention. In the drawings and the following description, well-known structures and techniques are not shown in order to avoid unnecessarily obscuring the present invention.
The method and the system are suitable for scenes that the server pushes the pictures to the client when the client accesses the webpage of the server through the browser under the B/S architecture. In the invention, the server side presets a preset picture library comprising a plurality of picture formats for each picture, when a picture pushing request sent by the client side is received, the picture supported by the browser used by the client side is firstly determined based on the information carried by the picture pushing request, and then the determined picture is pushed to the client side, so that the browser used by the client side can display the picture pushed by the server side.
Fig. 1 is a schematic flow chart of a method 100 for pushing pictures according to an embodiment of the present invention. As shown in fig. 1, the method 100 includes the steps of: s110, receiving a picture pushing request sent by a first client; s120, opening a target browser corresponding to the attribute information based on the attribute information; s130, importing a target picture in a preset picture library corresponding to the picture identifier into a target browser; s140, detecting the attribute value of the target picture after the target browser is imported; s150, judging whether the attribute value of the target picture imported into the target browser changes; and S160, when the attribute value of the target picture after the target browser is imported is judged not to be changed, pushing the target picture imported into the target browser to the first client.
In step S110, the picture request carries attribute information of the first client using the browser and a picture identifier of the picture requested to be pushed. The attribute information is used to indicate the version of the browser, and may include the type and version number of the browser, and the like. The picture identifier of the picture requested to be pushed by the first client represents which picture is requested to be pushed by the first client at this time.
In step S120, after receiving the picture pushing request sent by the first client, the server may determine, from the attribute information carried in the picture pushing request, an attribute of the first client using the browser. And after the server determines that the first client uses the attribute of the browser, opening a target browser corresponding to the attribute information from the server.
In step S130, a preset picture library including multiple picture formats is preset in the server for each picture, where the pictures in the preset picture library have the same content but different formats, and the preset picture library has pictures in formats supported by browsers with different attributes. The picture requested to be pushed by the first client is a target picture. The server can determine a preset picture library corresponding to the picture identifier according to the picture identifier, and then target pictures with the same content but different formats are stored in the preset picture library corresponding to the picture identifier, and the preset picture library contains the target pictures with different attributes and formats supported by the browser. After the target browser is opened, the target picture in the preset picture library is imported into the target browser to judge whether the target browser supports the imported target picture.
It should be noted that, when the target picture in the preset picture library is imported into the target browser in this step, all the target pictures in the preset picture library may be imported into the target browser, or some target pictures in the preset picture library may be imported into the target browser, which is not limited herein.
In step S150, it may be determined whether the attribute value of the target picture after the target browser is introduced is changed, where the attribute value of the target picture after the target browser is introduced is determined to be the same as the original attribute value of the target picture, and the original attribute value represents the attribute value of the target picture before the target browser is introduced, that is, the attribute value of the target picture before the target browser is introduced in step S130. Whether the attribute value of the target picture imported into the target browser is changed is determined, that is, whether the attribute value of the target picture which needs to be imported into the target browser in step S130 is changed from the attribute value when the target browser is not imported into the target browser to the attribute value after the target browser is imported into the target browser is determined. The attribute value of the picture may include a size of the picture, for example, a height and a width of the picture, and the like.
In this step, it is determined whether the target browser supports the imported target picture by determining whether the attribute value of the target picture imported into the target browser changes. If the attribute value of the target picture of the imported target browser is changed, the target browser supports the imported target picture; if the attribute value of the picture imported into the target browser changes, the target browser does not support the imported target picture. Since the attribute information of the target browser corresponds to the attribute information of the browser used by the first client, when the target browser supports the imported target picture, it is indicated that the browser used by the first client also supports the imported target picture.
In step S160, when the attribute value of the target picture of the target browser is not changed, it indicates that the target browser supports the imported target picture, and further indicates that the browser used by the first client also supports the imported target picture, and then the target picture of the target browser is pushed to the first client, so that the browser used by the client is ensured to be able to display the picture pushed by the server.
In the embodiment of the invention, after receiving a picture pushing request of a client, a server can obtain attribute information of a browser used by the client and a picture identifier of a target picture requested to be pushed from the picture pushing request, then open a target browser corresponding to the attribute information in a server, import the target picture in a preset picture library corresponding to the picture identifier into the target browser, and detect an attribute value of the target picture imported into the target browser; whether the target browser supports the format of the imported target picture or not is determined by judging whether the attribute value of the target picture after the target browser is imported changes or not, so that the picture supported by the target browser is determined, and then the picture supported by the target browser is sent to the client, so that the situation that the browser used by the client can display the picture pushed by the server is ensured, the situation that the format of the picture pushed by the server cannot be consistent with the format of the picture supported by the browser used by the client, so that the picture pushed by the server cannot be displayed by the browser used by the client is avoided, the efficiency of acquiring webpage information by a user is improved, and the time of the user is saved.
Fig. 2 is a schematic flow chart of a method for pushing pictures according to another embodiment of the present invention. The method embodiment shown in fig. 2 differs from the method embodiment shown in fig. 1 in that the method 100 further comprises: step S170, when the attribute value of the target picture after the target browser is imported changes, importing the target picture, into which the target browser is not imported, in the preset picture library into the target browser.
In step S170, the attribute value of the target picture imported into the target browser changes, which indicates that the target browser does not support the imported target picture, and further indicates that the browser used by the first client does not support the imported target picture, so that the target picture that is not imported into the target browser is selected from the preset picture library and is then imported into the target browser again, and step S150 is executed to determine whether the attribute value of the target picture imported into the target browser in this step changes, so as to determine whether the target browser supports the target picture imported in this step, and step S160 is executed to push the target picture imported into the target browser to the first client when the attribute value of the target picture imported into the target browser changes.
It should be noted that this embodiment is suitable for importing, in step S130, part of the target pictures in the preset picture library into the scene of the target browser, importing, in step S130, part of the target pictures in the preset picture library into the target browser, and determining, in step S150, whether the attribute values of the target pictures imported into the target browser have changed, at this time, step S170 may be executed, the target pictures that are not imported into the target browser in the preset picture library are imported into the target browser, and then, step S150 and step S160 are executed, so that the pictures that the target browser supports import may be further selected from the preset picture library.
When the target picture in the preset picture library, into which the target browser has not been introduced, is introduced into the target browser in step S170, all the target pictures in the preset picture library, into which the target browser has not been introduced, may be introduced into the target browser, or a part of the target pictures in the preset picture library, into which the target browser has not been introduced, may be introduced into the target browser, which is not limited herein. When a part of the target pictures in the preset picture library, which have not been imported by the target browser, are imported into the target browser and the attribute value of the target pictures imported into the target browser is determined to be changed in step S150, step S170, step S150, and step S160 may be executed again until the target pictures, which are supported by the target browser and are imported, are selected from the preset picture library or the target pictures, for which the attribute value after the target browser is imported does not exist, are changed in the preset picture library.
In this embodiment, when the target picture supported by the target browser cannot be selected from the target pictures imported into the target browser in step S130, step S170 may be executed again, and then the target picture imported into the target browser again is selected, so that the target pictures in the preset picture library are imported into the target browser for multiple times for selection, and generally, all the target pictures in the preset picture library do not need to be imported into the target browser for selection, thereby effectively reducing the workload of data processing.
It should be noted that, when target pictures in the preset picture library are imported into the target browser for multiple times, the order of importing the target pictures into the target browser may be set according to picture attributes and the like, for example, the order of importing the target pictures in the preset picture library into the target browser is determined according to the compression ratio of the target pictures in the preset picture library.
Specifically, the sequence of importing the target pictures in the preset picture library into the target browser is determined according to the sequence of the compression ratios of the target pictures in the preset picture library from large to small. That is, before step S130 is executed, a preset picture library corresponding to the picture identifier is determined, then target pictures in the preset picture library are sorted in an order from a large compression ratio to a small compression ratio, and when step S130 is executed, one or more target pictures with the largest compression ratio in the preset picture library are imported into the target browser. In the step S160, one or more target pictures with the largest compression ratio among the target pictures in the preset picture library that have not been imported into the target browser may be selected and imported into the target browser again.
The larger the compression ratio of the picture is, the faster the picture is loaded, so that the sequence of leading the target picture in the preset picture library into the target browser is determined according to the sequence of the compression ratios of the target pictures in the preset picture library from large to small, and the target picture supported by the target browser and having the largest compression ratio can be determined, so that when the target picture is pushed to the first client side by the server, the situation that the browser used by the first client side can support the picture pushed by the server is ensured, and the picture loading speed is also improved.
Fig. 3 is a schematic flowchart of opening a target browser in the method for pushing pictures shown in fig. 1. The difference between the embodiment of the method shown in fig. 3 and the embodiment of the method shown in fig. 1 is that in the method 100 shown in fig. 1, the step S120 can be specifically implemented as: step S121, opening a target browser corresponding to the attribute information from a preset window.
In step S121, the server establishes a preset window in advance, and the size, shape, and the like of the preset window may not be limited. When the server needs to open the target browser, the target browser can be loaded into the preset window, namely, the target browser is opened from the preset window. And when the target picture needs to be imported into the target browser in the subsequent steps, the target picture can be loaded into a preset window to open the target browser.
Fig. 4 is a schematic flow chart of a method for pushing pictures according to another embodiment of the present invention. The method embodiment shown in fig. 4 differs from the method embodiment shown in fig. 1 in that the method 100 further comprises: and step S180, when the attribute value of the imported target browser does not exist in the preset picture, which is the changed target picture, the target picture in the universal format of the preset browser corresponding to the picture identifier is sent to the first client.
In step S180, the target pictures in the preset browser common format include target pictures supported by multiple browsers, for example, a target picture in jpeg format, a target picture in bnp format, and so on.
It should be noted that the method embodiment shown in fig. 4 may also be the same as the basic steps of the method embodiment shown in fig. 2, and is different from the method embodiment shown in fig. 2 in that the method further includes step S180.
Fig. 5 is a schematic flow chart of a method for pushing pictures according to still another embodiment of the invention. The method embodiment shown in fig. 5 differs from the method embodiment shown in fig. 1 in that after step S160 is performed in the method 100, the method further includes: step S190, establishing a corresponding relation between the picture pushed to the first client and the attribute information and the picture identification.
In step S190, the server pushes the target picture imported into the target browser to the first client, which indicates that the browser used by the first client supports the picture pushed by the server, so that a corresponding relationship between the picture pushed by the server to the first client and the attribute information and the picture identifier of the picture requested to be pushed by the first client is established in this step, that is, a one-to-one corresponding relationship between the picture pushed by the server to the first client, the attribute information of the browser used by the first client and the picture identifier of the picture requested to be pushed by the first client is established, that is, a third party can be uniquely determined by any two of the three.
After step S190, the method 100 may further perform the following steps: step S1100, when receiving a picture pushing request which is sent by a second client and carries attribute information and picture identification, determining a picture corresponding to the attribute information and the picture identification according to the corresponding relation; step S1110, the attribute information and the picture identifier are pushed to the second client.
In step S1100, a picture pushing request carrying attribute information and a picture identifier sent by a second client is received, which indicates that the attribute information of the browser used by the second client is the same as the attribute information of the browser used by the first client and that the picture requested to be pushed by the second client is the same as the picture requested to be pushed by the first client, i.e. the second client uses the same browser with the same attributes as the first client and requests the same picture, further the method shown in figure 1 determines that the first client can push the second clients using pictures supported by the browser, when receiving the picture push request carrying the attribute information and the picture identifier sent by the second client, and determining the picture corresponding to the attribute information and the picture identifier according to the corresponding relationship established in the step S190, that is, the first client uses the picture supported by the browser. Therefore, the server can be prevented from executing the steps S120 to S150 again after receiving the picture pushing request of the second terminal, and the picture corresponding to the attribute information and the picture identifier is determined directly through the corresponding relationship established in the step S190, so that the complexity of data processing is reduced, and the resource consumption is reduced.
The second client may be the same as or different from the first client. The method embodiment shown in fig. 5 may also be the same as the basic steps of the method embodiment shown in fig. 2, and differs from the method embodiment shown in fig. 2 in that it further comprises step S190, and step S1100 and step S1110.
It should be noted that, in the above method embodiment, before step S120, the method may further include the step of: a browser to install at least one attribute. Therefore, the browser used by the client is stored in the server.
Fig. 6 is a schematic block diagram of an apparatus 200 for pushing pictures according to an embodiment of the present invention. In the embodiment shown in fig. 6, the apparatus 200 comprises:
a receiving unit 201, configured to receive a picture pushing request sent by a first client, where the picture pushing request carries attribute information of a browser used by the first client and a picture identifier of a picture requested to be pushed;
a browser opening unit 202 configured to open a target browser corresponding to the attribute information based on the attribute information;
a picture importing unit 203, configured to import a picture in a preset picture library corresponding to the picture identifier into the target browser, where the preset picture library has target pictures in formats supported by browsers with different attributes, and the target picture is a picture requested to be pushed by the first client;
a detecting unit 204, configured to detect an attribute value of a target picture imported into the target browser;
a determining unit 205, configured to determine whether an attribute value of the target picture imported into the target browser changes;
a pushing unit 206, configured to, when it is determined that the attribute value of the target picture imported into the target browser is not changed, push the target picture imported into the target browser to the first client.
In the embodiment of the present invention, after receiving a picture pushing request from a client, in the device 200, attribute information of a browser used by the client and a picture identifier of a target picture requested to be pushed may be obtained from the picture pushing request, then a target browser corresponding to the attribute information in a server is opened, the target picture in a preset picture library corresponding to the picture identifier is imported into the target browser, and an attribute value of the target picture imported into the target browser is detected; whether the target browser supports the format of the imported target picture or not is determined by judging whether the attribute value of the target picture after the target browser is imported changes or not, so that the picture supported by the target browser is determined, and then the picture supported by the target browser is sent to the client, so that the situation that the picture pushed by the device 200 can be displayed by the browser used by the client is ensured, the situation that the picture pushed by the device 200 cannot be displayed by the browser used by the client due to the fact that the format of the picture pushed by the device 200 cannot be consistent with the format of the picture supported by the browser used by the client is avoided, the efficiency of acquiring webpage information by a user is improved, and the time of the user is saved.
The attribute value comprises the size of the picture, and the original attribute value comprises the size of the picture.
As an optional embodiment, the picture importing unit 203 is further configured to import, into the target browser, a target picture that is not imported into the target browser in the preset picture library when an attribute value of the target picture after the target browser is imported changes.
As an alternative embodiment, as shown in fig. 7, the apparatus 200 may further include:
and the sequence determining unit 207 is configured to determine, according to the compression ratio of the target picture in the preset picture library, a sequence in which the target picture in the preset picture library is imported into the target browser.
Specifically, the order determining unit 207 is specifically configured to determine, according to a sequence that compression ratios of target pictures in the preset picture library are from large to small, an order in which the target pictures in the preset picture library are imported into the target browser.
As an optional embodiment, the browser opening unit 202 is further configured to open the target browser from a preset window.
As an alternative embodiment, as shown in fig. 7, the apparatus 200 may further include:
an installation unit 208 for installing the browser of at least one attribute.
As an optional embodiment, the pushing unit 206 is further configured to, when there is no target picture with an unchanged attribute value after the target browser is imported into the preset picture, push the target picture in the preset browser common format corresponding to the picture identifier to the first client.
As an alternative embodiment, as shown in fig. 7, the apparatus 200 may further include:
an establishing unit 209, configured to establish a correspondence between the picture pushed to the first client and the attribute information and the picture identifier.
As an alternative embodiment, as shown in fig. 7, the apparatus 200 may further include:
a picture determining unit 210, configured to determine, according to the correspondence, a picture corresponding to the attribute information and the picture identifier when a picture pushing request that is sent by a second client and carries the attribute information and the picture identifier is received;
the pushing unit 206 is further configured to push the picture corresponding to the attribute information and the picture identifier to the second client.
In an embodiment of the schematic block diagram of the apparatus shown in fig. 7, all the units shown in fig. 7 may not be included, that is, the units shown in fig. 7 may be added, subtracted or combined according to an actual application scenario.
Fig. 8 is a schematic block diagram of a server 300 for picture pushing according to an embodiment of the present invention. As shown in fig. 8, the server 300 includes a processor 301, a memory 302 and an input/output interface 303, the memory 302 is used for storing executable programs, the processor 301 is used for executing the programs stored in the memory 301, the input/output interface 303 is used for communicating with external devices, such as clients, and the server 300 further includes a bus 304, and the bus 304 is used for connecting the processor 301, the memory 302 and the input/output interface 303, so that the processor 301, the memory 302 and the input/output interface 303 can communicate with each other through the bus 304.
Specifically, the processor 301 is specifically configured to receive, through the input/output interface 303, a picture pushing request sent by a first client, where the picture pushing request carries attribute information of a browser used by the first client and a picture identifier of a picture requested to be pushed; and opening a target browser corresponding to the attribute information based on the attribute information; the image server is used for importing the image in a preset image library corresponding to the image identifier into the target browser, wherein the preset image library has target images in formats supported by browsers with different attributes, and the target images are the images requested to be pushed by the first client; the attribute value of the target picture after the target browser is imported is detected; and the attribute value of the target picture is used for judging whether the attribute value of the target picture imported into the target browser is changed or not; and the client is used for pushing the target picture imported into the target browser to the first client when the attribute value of the target picture imported into the target browser is judged not to be changed.
It should be noted that the processor 301 in the server 300 may also be used to execute the method in the embodiments shown in fig. 1 to 5.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The present embodiments are to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (21)

1. A method for pushing pictures, comprising:
receiving a picture pushing request sent by a first client, wherein the picture pushing request carries attribute information of a browser used by the first client and a picture identifier of a picture requested to be pushed;
opening a target browser of a server side corresponding to the attribute information based on the attribute information;
importing a target picture in a preset picture library corresponding to the picture identifier into the target browser, wherein the preset picture library has target pictures in formats supported by browsers with different attributes, and the target picture is a picture requested to be pushed by the first client;
detecting an attribute value of a target picture imported into the target browser;
judging whether the attribute value of the target picture imported into the target browser changes or not;
and when the attribute value of the target picture imported into the target browser is judged not to be changed, pushing the target picture imported into the target browser to the first client.
2. The method of claim 1, further comprising:
and when the attribute value of the target picture after the target browser is introduced is changed, introducing the target picture which is not introduced into the target browser in the preset picture library into the target browser.
3. The method of claim 2, further comprising:
and determining the sequence of leading the target pictures in the preset picture library into the target browser according to the compression ratio of the target pictures in the preset picture library.
4. The method according to claim 3, wherein the determining the sequence of importing the target pictures in the preset picture library into the target browser according to the compression ratio of the target pictures in the preset picture library comprises:
and determining the sequence of leading the target pictures in the preset picture library into the target browser according to the sequence of the compression ratios of the target pictures in the preset picture library from large to small.
5. The method of claim 1, wherein the opening a target browser corresponding to the attribute information comprises:
and opening the target browser from a preset window.
6. The method of claim 1, wherein prior to said opening a target browser corresponding to said attribute information, said method further comprises:
a browser to install at least one attribute.
7. The method according to claim 1 or 2, wherein the attribute value comprises a size of a picture.
8. The method according to claim 1 or 2, characterized in that the method further comprises:
and when the target picture with the unchanged attribute value after the target browser is introduced does not exist in the preset picture, pushing the target picture in the universal format of the preset browser corresponding to the picture identifier to the first client.
9. The method according to claim 1 or 2, wherein after pushing the target picture imported into the target browser to the first client, the method further comprises:
and establishing a corresponding relation between the picture pushed to the first client and the attribute information and the picture identification.
10. The method of claim 9, further comprising:
when a picture pushing request which is sent by a second client and carries the attribute information and the picture identification is received, determining a picture corresponding to the attribute information and the picture identification according to the corresponding relation;
and pushing the picture corresponding to the attribute information and the picture identification to the second client.
11. An apparatus for pushing pictures, comprising:
the system comprises a receiving unit, a sending unit and a processing unit, wherein the receiving unit is used for receiving a picture pushing request sent by a first client, and the picture pushing request carries attribute information of a browser used by the first client and a picture identifier of a picture requested to be pushed;
the browser opening unit is used for opening a target browser corresponding to the attribute information at the server side based on the attribute information;
the picture importing unit is used for importing pictures in a preset picture library corresponding to the picture identifier into the target browser, wherein the preset picture library has target pictures with formats supported by browsers with different attributes, and the target pictures are pictures requested to be pushed by the first client;
the detection unit is used for detecting the attribute value of the target picture after the target browser is imported;
the judging unit is used for judging whether the attribute value of the target picture imported into the target browser changes or not;
and the pushing unit is used for pushing the target picture imported into the target browser to the first client when the attribute value of the target picture imported into the target browser is judged not to be changed.
12. The apparatus according to claim 11, wherein the picture importing unit is further configured to import, into the target browser, a target picture that is not imported into the target browser in the preset picture library when an attribute value of the target picture after importing the target browser changes.
13. The apparatus of claim 12, further comprising:
and the sequence determining unit is used for determining the sequence of leading the target pictures in the preset picture library into the target browser according to the compression ratio of the target pictures in the preset picture library.
14. The apparatus according to claim 13, wherein the order determining unit is specifically configured to determine, according to a descending order of compression ratios of target pictures in the preset picture library, an order in which the target pictures in the preset picture library are imported into the target browser.
15. The apparatus of claim 11, wherein the browser opening unit is further configured to open the target browser from a preset window.
16. The apparatus of claim 11, further comprising:
and the installation unit is used for installing the browser with at least one attribute.
17. The apparatus according to claim 11 or 12, wherein the attribute value comprises a size of a picture.
18. The apparatus according to claim 11 or 12, wherein the pushing unit is further configured to, when there is no target picture with an unchanged attribute value after the target browser is imported in the preset picture, push the target picture in the preset browser generic format corresponding to the picture identifier to the first client.
19. The apparatus of claim 11 or 12, further comprising:
and the establishing unit is used for establishing the corresponding relation between the picture pushed to the first client and the attribute information and the picture identification.
20. The apparatus of claim 19, further comprising:
the picture determining unit is used for determining a picture corresponding to the attribute information and the picture identifier according to the corresponding relation when receiving a picture pushing request which is sent by a second client and carries the attribute information and the picture identifier;
the pushing unit is further configured to push the picture corresponding to the attribute information and the picture identifier to the second client.
21. A server for pushing pictures, comprising:
a memory for storing an executable program;
an input/output interface for communicating with an external device;
the processor is configured to execute a program stored in the memory, and specifically, configured to receive, through the input/output interface, a picture push request sent by a first client, where the picture push request carries attribute information of a browser used by the first client and a picture identifier of a picture requested to be pushed; the target browser corresponding to the attribute information of the server side is opened based on the attribute information; the image server is used for importing the image in a preset image library corresponding to the image identifier into the target browser, wherein the preset image library has target images in formats supported by browsers with different attributes, and the target images are the images requested to be pushed by the first client; the attribute value of the target picture after the target browser is imported is detected; and the attribute value of the target picture is used for judging whether the attribute value of the target picture imported into the target browser is changed or not; and the client is used for pushing the target picture imported into the target browser to the first client when the attribute value of the target picture imported into the target browser is judged not to be changed.
CN201610992667.3A 2016-11-10 2016-11-10 Picture pushing method and device and server Active CN108073601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610992667.3A CN108073601B (en) 2016-11-10 2016-11-10 Picture pushing method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610992667.3A CN108073601B (en) 2016-11-10 2016-11-10 Picture pushing method and device and server

Publications (2)

Publication Number Publication Date
CN108073601A CN108073601A (en) 2018-05-25
CN108073601B true CN108073601B (en) 2020-10-02

Family

ID=62154561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610992667.3A Active CN108073601B (en) 2016-11-10 2016-11-10 Picture pushing method and device and server

Country Status (1)

Country Link
CN (1) CN108073601B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010056514A (en) * 1999-12-15 2001-07-04 오길록 Method for changing contents and caching for the web browser based on real-time operating system
CN102340523A (en) * 2010-07-16 2012-02-01 腾讯科技(北京)有限公司 Mobile terminal, mobile terminal downloading method, server and server data transmission method
CN103106205A (en) * 2011-11-10 2013-05-15 腾讯科技(深圳)有限公司 Method and device for browsing files on mobile terminal
CN105045893A (en) * 2015-07-31 2015-11-11 北京奇虎科技有限公司 Adaptation method and apparatus for picture in webpage
CN105956062A (en) * 2016-04-27 2016-09-21 广东欧珀移动通信有限公司 Picture acquisition method, system and equipment thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010056514A (en) * 1999-12-15 2001-07-04 오길록 Method for changing contents and caching for the web browser based on real-time operating system
CN102340523A (en) * 2010-07-16 2012-02-01 腾讯科技(北京)有限公司 Mobile terminal, mobile terminal downloading method, server and server data transmission method
CN103106205A (en) * 2011-11-10 2013-05-15 腾讯科技(深圳)有限公司 Method and device for browsing files on mobile terminal
CN105045893A (en) * 2015-07-31 2015-11-11 北京奇虎科技有限公司 Adaptation method and apparatus for picture in webpage
CN105956062A (en) * 2016-04-27 2016-09-21 广东欧珀移动通信有限公司 Picture acquisition method, system and equipment thereof

Also Published As

Publication number Publication date
CN108073601A (en) 2018-05-25

Similar Documents

Publication Publication Date Title
CN110708346B (en) Information processing system and method
CN106874471B (en) Information pushing method and device
US8001213B2 (en) Method, apparatus and computer program product for providing unrestricted content on a user terminal
CN107015870B (en) Method and device for realizing communication between web page and local application and electronic equipment
US20180107686A1 (en) Search method and apparatus
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
CN107689975B (en) Cloud computing-based computer virus identification method and system
US11588822B2 (en) Right control method and apparatus for terminal device
CN110837534A (en) Data list display method, device, equipment and storage medium
CN110674481A (en) Account registration method, device, equipment and storage medium of application program
CN109471713B (en) Method and device for inquiring information
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN108073601B (en) Picture pushing method and device and server
CN112732302A (en) Configuration updating method and device of application program and electronic equipment
CN101170576A (en) A method, system and device for file upload
CN105721604A (en) Data sending method and device based on downloading request of user
CN112905355B (en) Method, apparatus and computer storage medium for information processing
CN112203158A (en) Image display method, device, system, equipment and medium
EP2854025B1 (en) Information processing apparatus, information processing method and information processing program
CN110309403B (en) Method and device for capturing data
CN110324377B (en) Push interaction method and device, electronic equipment and medium
CN112732457A (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN114157917B (en) Video editing method and device and terminal equipment
CN110855767B (en) Method, device, equipment and storage medium for responding operation request

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