CN109936504B - Picture display method and device, server equipment and storage medium - Google Patents

Picture display method and device, server equipment and storage medium Download PDF

Info

Publication number
CN109936504B
CN109936504B CN201910129617.6A CN201910129617A CN109936504B CN 109936504 B CN109936504 B CN 109936504B CN 201910129617 A CN201910129617 A CN 201910129617A CN 109936504 B CN109936504 B CN 109936504B
Authority
CN
China
Prior art keywords
picture
server
terminal
query request
information
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
CN201910129617.6A
Other languages
Chinese (zh)
Other versions
CN109936504A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910129617.6A priority Critical patent/CN109936504B/en
Publication of CN109936504A publication Critical patent/CN109936504A/en
Application granted granted Critical
Publication of CN109936504B publication Critical patent/CN109936504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a method and a device for displaying pictures, server equipment and a storage medium, wherein the method comprises the following steps: acquiring a query request and terminal information; acquiring a query result according to the query request, wherein the query result comprises a first picture; when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, processing the first picture to acquire a second picture corresponding to the terminal information for responding to the query request; and caching the second picture. Therefore, compared with the prior art, the picture display method and device can better display the picture according to the query request of the terminal, reduce the storage space, improve the picture display efficiency, and further improve the use convenience and use experience of the user.

Description

Picture display method and device, server equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for displaying a picture, a server device, and a storage medium.
Background
With the great popularization and application of the terminal, the terminal can support more and more applications and more powerful functions, and therefore the requirement of the user on the server device is higher and higher. The user can browse different pictures through the terminal. For example, the user can browse pictures of favorite commodities of the user through 'panning on the mobile phone'. However, when a user browses a large number of pictures at present, the terminal generally needs to load the pictures to be browsed and display the pictures on the display screen, and the problems of slow picture loading and poor picture quality can occur, so that the user is inconvenient to use and experiences poor.
Disclosure of Invention
The embodiment of the application provides a picture display method and device, server equipment and a storage medium, which can better display pictures according to the needs of users, improve the picture display efficiency, reduce the storage space and further improve the use convenience and use experience of the users.
In a first aspect, an embodiment of the present application provides a method for displaying an image, including:
acquiring a query request and terminal information;
acquiring a query result according to the query request, wherein the query result comprises a first picture;
when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, processing the first picture to acquire a second picture corresponding to the terminal information for responding to the query request;
and caching the second picture.
In a second aspect, an embodiment of the present application provides an apparatus for displaying pictures, including:
the first acquisition unit is used for acquiring the query request and the terminal information;
the second obtaining unit is used for obtaining a query result according to the query request, wherein the query result comprises a first picture;
the processing unit is used for processing the first picture when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, and acquiring a second picture corresponding to the terminal information to be used for responding to the query request;
and the caching unit is used for caching the second picture.
In a third aspect, an embodiment of the present application provides a server device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements any one of the methods described above when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is configured to implement the method described in any one of the above when executed by a processor.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, in the method for displaying pictures described in this embodiment of the application, the server device obtains the query request and the terminal information, obtains the query result according to the query request, and processes the first picture when the CDN address of the first picture corresponding to the terminal information is not obtained in the server, so as to obtain the second picture corresponding to the terminal information, so as to respond to the query request, and cache the second picture. Therefore, when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, the server device can process the first picture to obtain the second picture corresponding to the terminal information and cache the second picture, the picture can be better displayed according to the query request of the terminal, the storage space is reduced, the picture display efficiency is improved, and the use convenience and the use experience of a user are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 shows a schematic diagram of an exemplary system architecture of a picture presentation apparatus that may be applied to embodiments of the present invention;
fig. 2 is a schematic flowchart illustrating a picture displaying method disclosed in an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram illustrating a method for displaying pictures according to another embodiment of the present disclosure;
FIG. 4 is a schematic flow chart diagram illustrating a method for displaying pictures according to another embodiment of the present disclosure;
FIG. 5 is an interactive diagram illustrating a method for displaying pictures disclosed in an embodiment of the present application;
fig. 6a and 6b are schematic interface diagrams of terminal picture display disclosed in the embodiment of the present application;
FIG. 7 is a schematic structural diagram of a picture display device disclosed in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal disclosed in an embodiment of the present application;
fig. 9 shows a schematic structural diagram of a terminal disclosed in another embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
First, some terms referred to in the embodiments of the present application are explained:
a Content Delivery Network (CDN) has a basic idea that bottlenecks and links on the internet that may affect data transmission speed and stability are avoided as much as possible, so that content transmission is faster and more stable. When the method is applied, the CDN system can redirect the request of the terminal to the service node closest to the user according to the network flow, the connection of each node, the load condition, the distance to the terminal, the response time and other comprehensive information in real time by placing a layer of intelligent virtual network on the basis of the existing Internet, which is formed by node server equipment at each position of the network, so that the user can obtain the required content nearby, the crowded condition of the Internet network is solved, and the response speed of the user for accessing the website is improved.
The query request refers to a query request sent by the terminal to the server device, and the query request may be at least one of text information, voice information or picture information.
And the terminal information comprises the model of the terminal, the size of a display screen, the resolution and the like.
Message Queue (MQ) is a highly available, highly concurrent, highly scalable, low-latency distributed Message Queue service that is utilized for asynchronously synchronizing relevant information of products, such as in killing of seconds or robbery activities, when some hot-selling products of a highly concurrent, highly visited distributed e-commerce website typically update the relevant information of the products in the background.
KV memories, i.e., Key-Value Stores (KVs), are commonly used in a variety of large-scale data intensive database applications. These database applications have random access to large data sets (datasets) and select key-value stores rather than conventional relational databases due to their high scalability and simplicity. Several research efforts have been done on flash-based KVS to take advantage of flash memory characteristics to improve performance and reduce host memory usage. These KVS operations maintain key-value (KV) pairs in flash memory and index structures (or metadata per KV pair) in main memory (e.g., dynamic random access memory or DRAM) to support fast insert, delete, and lookup operations.
The following describes embodiments of the present application in detail.
Fig. 1 shows a schematic diagram of an exemplary system architecture of a picture presentation apparatus that can be applied to an embodiment of the present invention.
As shown in fig. 1, the system architecture 100 may include one or more of terminals 101, 102, 103, a network 104, and a server device 105. The network 104 serves as a medium for providing communication links between the terminals 101, 102, 103 and the server device 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of terminals, networks and server devices in fig. 1 is merely illustrative. There may be any number of terminals, networks and server devices, as is practical. For example, server device 105 may be a server cluster comprised of a plurality of servers, and the like.
The user may use the terminals 101, 102, 103 to interact with the server device 105 via the network 104 to receive or send messages or the like. The terminals 101, 102, 103 may be various electronic devices having a display screen, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.
The server device 105 may be a server that provides various services. For example, the user sends an inquiry request to the server apparatus 105 by using the terminal 103 (which may be the terminal 101 or 102). The server device 105 acquires the query request and the terminal information; acquiring a query result according to the query request, wherein the query result comprises a first picture; when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, the server device 105 processes the first picture to obtain a second picture corresponding to the terminal information for responding to the query request; the second picture is cached and sent to the terminal 103, so that the terminal 103 can better display the picture, the picture display efficiency is improved, and the use convenience and the use experience of a user are improved.
Also for example, the user sends the same query request again to the server apparatus 105 by using the terminal 103 (which may also be the terminal 101 or 102). When the server device 105 acquires the query request, the CDN address is acquired when it is determined in the picture storage server that the CDN address of the first picture corresponding to the terminal information is acquired in the server, and the CDN address is sent to the terminal 103, and the terminal 103 can access the address and display a picture corresponding to the size of the display screen on the display screen, so that the loading speed of the terminal 103 on the picture is increased, and the adaptability of the terminal 103 to picture display is improved.
It should be noted that the image displaying method provided by the embodiment of the present invention is generally executed by the server apparatus 105, and accordingly, the image displaying apparatus is generally disposed in the server apparatus 105, but the present invention is not limited thereto.
Fig. 2 is a schematic flowchart illustrating a picture displaying method disclosed in an embodiment of the present application, where the picture displaying method illustrated in fig. 2 can be used in the picture displaying apparatus illustrated in fig. 1. As shown in fig. 2, the method for displaying pictures includes the following steps:
s201, acquiring the inquiry request and the terminal information.
After a user inputs query information on a terminal, the terminal sends a query request containing the query information to a server device, and the server device acquires the query request. The query information may be at least one of text information, voice information, or picture information. When the server equipment acquires the text information, the keywords in the text information can be identified through an intelligent algorithm. For example, the text information acquired by the server device may be: and identifying that the keywords in the character information are long-style and wind-style coats through an intelligent algorithm.
Optionally, the query request acquired by the server device carries terminal information, where the terminal information may be a terminal model and/or display screen information. When only the terminal model is included in the terminal information, the server device may acquire display screen information including the size and resolution of the display screen according to the terminal model. The server device may pre-store the models of the different terminals and the sizes and resolutions of the corresponding display screens. The query request obtained by the server device may be, for example: the system comprises a long wind coat and an A type terminal, wherein the query information is the long wind coat, and the terminal information is the A type terminal. And the server equipment reads the size and the resolution of the display screen corresponding to the signal terminal A from the memory according to the terminal of the model A. The query request acquired by the server device may be, for example: the display screen information comprises a long wind coat, a model A terminal and display screen information corresponding to the model A terminal.
S202, obtaining a query result according to the query request, wherein the query result comprises the first picture.
And the server equipment identifies the characteristic information in the query request according to the acquired query request. For example, identifying keywords of text information or voice information and feature information in picture information, and based on the keywords or the feature information, obtaining query results related to the query request in different webpages, where the query results include a first picture related to the query request. The first picture may be, for example, an original picture. The first picture may also be, for example, a picture that has been processed prior to the query request.
For example, the query result obtained by the server device includes an image a, which is an original image, and the image a is a first image.
Optionally, only the picture B is included in the query result obtained by the server device, where the picture B is obtained by processing the original picture a according to the terminal information before the server device obtains the query request, and the picture B is the first picture.
Optionally, the keywords identified by the server device may be: the server equipment inquires character information with higher similarity with the money and the coat on different webpages based on the text similarity, and the inquiry result is one or more pictures corresponding to the character information with higher similarity.
And S203, when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, processing the first picture to obtain a second picture corresponding to the terminal information for responding to the query request.
When the server device determines that the CDN address of the first picture corresponding to the terminal information is not obtained in the server, the server device may be a picture storage server, that is, when the server device determines that the CDN address of the first picture corresponding to the terminal information is not obtained in the picture storage server, the server device obtains information of the first picture, where the information includes an address, an ID, a memory size, a resolution, and the like of the first picture, and according to the information of the first picture and the terminal information, processes the first picture using a picture processing algorithm to obtain a second picture corresponding to the terminal information, where the second picture is used to respond to an inquiry request obtained by the server device. For example, the size of a display screen in the terminal information is 6.5 inches, when a CDN address of a first picture corresponding to the size of the display screen is not acquired in the picture storage server, the server device acquires information of the first picture, and processes the first picture according to the information of the first picture and the terminal information to obtain a second picture corresponding to the size of the display screen.
Optionally, the server device may perform at least one of sharpness processing, cutting processing, scaling processing, and format conversion processing on the first picture by using a picture processing algorithm according to the terminal information.
Optionally, the processing of the first picture by the server device includes sharpness processing. The first picture may be, for example, a relatively fuzzy landscape picture, the server device needs to perform sharpness processing on the picture, the processing command may be to adjust sharpness, the processing parameter is sharpness increase by 60%, after receiving a data packet containing the landscape picture and its processing command and processing parameter, the server device parses the landscape picture from the data packet, and its processing command and processing parameter, and performs sharpness increase by 60% on the landscape picture by using a picture processing algorithm according to its processing parameter, so as to obtain a second picture corresponding to the terminal.
Optionally, the processing of the first picture by the server device further includes a cutting process. The method comprises the steps that server equipment obtains a first picture from a webpage or a picture storage server, sets a first picture area needing to be cut and the display size of the cut first picture according to the size of a display screen of a terminal, and cuts the first picture by adopting a picture processing algorithm to obtain a second picture corresponding to the size of the display screen of the terminal. For example, the size of the terminal display screen is 6.5 inches, the size of the first picture is 7 inches, and the first picture is cut according to the size of the terminal display screen to obtain a second picture corresponding to the size of the terminal display screen. Before the server device cuts the first picture, the server device further identifies a main body in the first picture through an identification algorithm, so that the main body is located at a proper position of the second picture.
Optionally, the processing of the first picture by the server device further includes scaling. The server equipment obtains the size of a display screen of the terminal and the size information of the first picture, and when the size of the display screen of the terminal is not consistent with the size information of the first picture, the first picture is zoomed by adopting a picture processing algorithm to obtain a second picture corresponding to the size of the display screen of the terminal.
Optionally, the processing of the first picture by the server device further includes format conversion processing. The server device obtains attribute information of a first picture in a webpage or in a picture storage server. The first picture may be, for example, an original picture. The first picture may also be, for example, a picture that has been processed prior to the query request. And the server equipment adopts a corresponding format conversion mode to convert the format of the first picture into a second picture corresponding to the terminal information. For example, the type a terminal may display a picture in a JPG format, the server device obtains a first picture in a web page in a GIF format, and converts the first picture in the GIF format into a picture in the JPG format, that is, a second picture, according to a preset GIF format conversion and JPG format conversion mode. By carrying out format conversion processing on the first picture, the second picture after format conversion is ensured to be suitable for the corresponding terminal, the subsequent picture loading speed of the terminal is increased, and the picture display adaptability of the terminal is improved.
The first picture is any type of picture, and may be a landscape picture, a person picture, an animal picture, and formats of the pictures also include multiple formats, for example, JPG, JPEG, BMP, and PNG formats, as long as the server device can identify and process the first picture, and the type of the picture to be processed and the format of the picture to be processed are not limited in the embodiment of the present invention. Specifically, the server device may arbitrarily select one or more pictures as the first picture.
And S204, caching the second picture.
And the server equipment caches the obtained second picture, and stores the information of the first picture and the CDN address of the second picture in a picture storage server after the server equipment receives the information that the caching of the second picture is successful. When the server device obtains the same query request of the terminal again, the server device may directly read the CDN address in the picture storage server and return the CDN address to the terminal, and the terminal accesses the CDN address and displays a picture corresponding to a terminal display screen. In the embodiment of the present application, caching the obtained second picture by the server device is that the server device caches the obtained second picture by using the CDN.
According to the technical scheme of the embodiment of the application, the server equipment can obtain the query request and the terminal information, obtain the query result according to the query request, process the first picture according to the terminal information to obtain the second picture corresponding to the terminal information when the CDN address of the first picture corresponding to the terminal information is not obtained in the server, and cache the second picture, so that compared with the prior art, the scheme of the embodiment of the application can be combined with an online method and an offline method, the CDN space is stored after the picture triggered by an online user, and the space waste is reduced; and caching the second picture after offline processing is performed on the first picture to obtain the second picture through a trigger mechanism. Furthermore, the server device displays the picture better according to the query request of the terminal, so that the resources of a Central Processing Unit (CPU) are guaranteed, the storage space is reduced, the picture Processing time is saved, the picture display efficiency is improved, and the use convenience and the use experience of a user are improved.
Fig. 3 is a schematic flow chart of a picture displaying method according to another embodiment of the present application. As shown in fig. 3, the method for displaying pictures includes the following steps:
s301, acquiring the query request and the terminal information.
For a detailed description, refer to S201, which is not described herein again.
S302, obtaining a query result according to the query request, wherein the query result comprises a first picture.
For a detailed description, refer to S202, which is not described herein.
S303A, according to the information of the first picture, determining, by using the picture storage server, whether or not the CDN address of the first picture corresponding to the terminal information is acquired in the server.
And the server equipment acquires the information of the first picture in the query result, and judges whether the CDN address of the first picture corresponding to the terminal information is acquired in the server or not by using the picture storage server according to the information of the first picture. Wherein the picture storage server comprises a KV memory. In the KV memory, a correspondence table between the a terminal information and the B picture CDN address is stored in advance.
S303B, when the CDN address of the first picture corresponding to the terminal information is acquired in the server, the CDN address is acquired to respond to the query request.
When the server device acquires the CDN address of the first picture corresponding to the terminal information in the picture storage server, the server device directly acquires the CDN address to respond to the acquired query request. And the server equipment acquires the CDN address and then sends the CDN address to the terminal, and the terminal accesses the CDN address and displays a picture corresponding to the terminal information.
S303C, when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, processing the first picture to obtain a second picture corresponding to the terminal information, where the second picture is used to respond to the query request.
For a detailed description, refer to S203, which is not described herein.
And S304, caching the second picture.
For a detailed description, refer to S204, which is not described herein again.
And after the server equipment finishes caching the second picture, updating the corresponding relation table in the KV memory. For example, after the server device receives a query request of a C-type terminal, a query result is obtained according to the query request, when the CDN address of a D picture corresponding to the C-type terminal information is not obtained in the server, the D picture is processed according to the C-type terminal information by using the picture storage server, an E picture corresponding to the C-type terminal information is obtained, after the E picture is cached, a correspondence table in the KV memory is updated, and the updated correspondence table includes a correspondence between the C-type terminal and the E picture CDN address.
According to the technical scheme of the embodiment of the application, when the CDN address of the first picture corresponding to the terminal information is obtained in the server through judgment of the picture storage server, the server equipment obtains the CDN address to respond to the query request; and when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, processing the first picture to acquire a second picture corresponding to the terminal information, and caching the second picture. Therefore, compared with the prior art, the scheme of the embodiment of the application can better display the picture according to the query request of the terminal, reduces space waste, reduces storage space, saves picture processing time, improves picture display efficiency, and further improves use convenience and use experience of a user.
Fig. 4 is a schematic flowchart of a picture displaying method according to another embodiment of the present application. As shown in fig. 4, the method for displaying pictures includes the following steps:
s401, acquiring the query request and the terminal information.
For a detailed description, refer to S201, which is not described herein again.
S402, obtaining a query result according to the query request, wherein the query result comprises a first picture.
For a detailed description, refer to S202, which is not described herein.
S403A, when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, place the information of the first picture in a message queue.
The server device in the technical solution of the present application may include a plurality of servers, for example, the server device may include a query server, a picture processing server, a picture cache server, a CDN server, and the like. Wherein the plurality of servers is not limited to the listed servers but optionally also includes servers that are not listed.
The query server determines that the CDN address of the first picture corresponding to the terminal information is not obtained in the picture storage server, obtains the information of the first picture, and puts the information of the first picture into a message queue.
S403B, obtaining the first picture according to the message queue.
The image processing server monitors the message queue, and when a new message queue is monitored, the information of the first image is obtained. The image processing server monitors the message queue, can acquire the first image in time, and accelerates the processing speed of the first image.
And S403C, obtaining a second picture according to the first picture.
And the picture processing server processes the first picture according to the information of the first picture to obtain a second picture corresponding to the terminal information. For a detailed description, refer to S203, which is not described herein.
And the picture processing server sends the second picture to a picture cache server, and the picture cache server is used for temporarily storing the second picture so as to accelerate the processing speed of the picture processing server on the first picture.
S404A, providing the second picture to the CDN server.
And the picture cache server provides the second picture for the CDN server, the CDN server performs CDN cache on the second picture, and after the CDN cache is successful, the CDN server sends a message that the CDN cache of the second picture is successful to the picture processing server.
S404B, storing the CDN address of the second picture and the information of the first picture in the picture storage server.
And after receiving the message that the CDN cache of the second picture is successful, the picture processing server puts the information of the first picture and the CDN address of the second picture into the picture storage server. When the query server obtains the same query request of the terminal again, the query server may directly read the CDN address from the picture storage server, and return the CDN address to the terminal.
According to the technical scheme of the embodiment of the application, when a CDN address of a first picture corresponding to terminal information is not acquired in a server, server equipment can place information of the first picture into a message queue; and acquiring a first picture according to the message queue, processing the first picture to obtain a second picture corresponding to the terminal information, and caching the second picture. Therefore, compared with the prior art, the scheme of the embodiment of the application can better display the picture according to the query request of the terminal, reduces the storage space, saves the picture processing time, improves the picture display efficiency, and further improves the use convenience and the use experience of the user.
Fig. 5 shows an interaction schematic diagram of a picture presentation method disclosed in an embodiment of the present application, where the interaction process is based on the network architecture of fig. 1, and in an embodiment of the present application, the picture presentation method includes:
s501, the terminal receives an inquiry request input by a user.
After a user inputs a required query request on a display screen of the terminal, the terminal receives the query request when the terminal detects the query request through the detection device. The query request may be at least one of text information input by a user, voice information input by voice, or picture information input by scanning.
S502, the terminal sends a query request to the server equipment.
After receiving the query request, the terminal sends the query request to the server device through a network communicating with the server device.
S503, the server equipment acquires the query request and the terminal information.
The specific implementation process is as described above, and is not described herein again.
S504, the server device obtains a query result according to the query request, wherein the query result comprises the first picture.
The specific implementation process is as described above, and is not described herein again.
And S505A, the server device judges whether the CDN address of the first picture corresponding to the terminal information is acquired in the server by using the picture storage server according to the information of the first picture.
The specific implementation process is as described above, and is not described herein again.
S505B, when the server device obtains the CDN address of the first picture corresponding to the terminal information in the server, the server device obtains the CDN address to respond to the query request.
The specific implementation process is as described above, and is not described herein again.
And S505C, when the CDN address of the first picture corresponding to the terminal information is not acquired in the server, the server device processes the first picture to obtain a second picture corresponding to the terminal information for responding to the query request.
The specific implementation process is as described above, and is not described herein again.
And S506, the server device caches the second picture, and sends the CDN address to the terminal when the same query request of the terminal is obtained again.
The specific implementation process is as described above, and is not described herein again.
And S507, the terminal accesses the CDN address and displays a picture corresponding to a terminal display screen.
And after receiving the CDN address sent by the server equipment, the terminal accesses the CDN address and displays a picture corresponding to the terminal information on a display screen.
Fig. 6a and 6b show interface diagrams of terminal picture display disclosed in the embodiments of the present application. When the terminal does not receive the CDN address sent by the query server, the terminal display screen is displayed as a query interface, as shown in fig. 6 a. When the terminal receives the CDN address sent by the query server, the terminal may access the CDN address and display a picture corresponding to the terminal information, where a terminal display screen interface is shown in fig. 6 b. For example, the size of the display screen of the terminal a is 6.5 inches, and when the terminal a receives the CDN address of the picture corresponding to the size of the display screen sent by the query server, the terminal a accesses the address, and displays the picture corresponding to the terminal a on the display screen.
According to the technical scheme of the embodiment of the application, the server equipment can obtain the query request and the terminal information, obtain the query result according to the query request, process the first picture according to the terminal information to obtain the second picture corresponding to the terminal information when the CDN address of the first picture corresponding to the terminal information is not obtained in the server, and cache the second picture. Therefore, compared with the prior art, the scheme of the embodiment of the application can combine an online method and an offline method, and the CDN space is stored after the picture triggered by the online user, so that the space waste is reduced; through a trigger mechanism, the first picture is processed in an off-line mode, the second picture is cached after the second picture is obtained, the picture can be better displayed according to the query request of the terminal, CPU resources are guaranteed, storage space is reduced, picture processing time is saved, picture display efficiency is improved, and use convenience and use experience of a user are improved.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the terminal includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the above-described functions. Those of skill in the art will readily appreciate that the present invention can be implemented in hardware or a combination of hardware and computer software, with the exemplary elements and algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiment of the present application, the terminal may be divided into the functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 7 is a schematic structural diagram of a picture displaying apparatus disclosed in an embodiment of the present application, and the picture displaying apparatus shown in fig. 7 can be used for implementing the picture displaying method. As shown in fig. 7, the apparatus 700 for displaying pictures includes a first obtaining unit 701, a second obtaining unit 702, a processing unit 703 and a buffering unit 704, wherein:
a first obtaining unit 701, configured to obtain a query request and terminal information;
a second obtaining unit 702, configured to obtain a query result according to the query request, where the query result includes the first picture;
a processing unit 703, configured to process the first picture when the CDN address of the first picture corresponding to the terminal information is not obtained in the server, to obtain a second picture corresponding to the terminal information, where the second picture is used to respond to the query request;
a buffering unit 704, configured to buffer the second picture.
Optionally, the apparatus 700 for displaying a picture further includes a determining unit 705, configured to determine, according to the information of the first picture, whether a CDN address of the first picture corresponding to the terminal information is acquired in the server by using the picture storage server.
Optionally, the processing unit 703 is further configured to perform at least one of sharpness processing, cutting processing, scaling processing, and format conversion processing on the first picture according to the terminal information.
Optionally, the second obtaining unit 702 is further configured to put the information of the first picture into a message queue; acquiring a first picture according to the message queue; and obtaining a second picture according to the first picture.
Optionally, the caching unit 704 is further configured to provide the second picture to the CDN server; and storing the CDN address of the second picture and the information of the first picture to a picture storage server.
Optionally, the second obtaining unit 702 is further configured to obtain the CDN address to respond to the query request when the server obtains the CDN address of the first picture corresponding to the terminal information.
Optionally, the terminal information of the picture displaying apparatus 700 includes a terminal model and/or display screen information.
According to the technical scheme of the embodiment of the application, the server equipment can obtain the query request and the terminal information, obtain the query result according to the query request, wherein the query result comprises the first picture; through a trigger mechanism, the first picture is processed in an off-line mode, the second picture is cached after the second picture is obtained, the picture can be better displayed according to the query request of the terminal, CPU resources are guaranteed, storage space is reduced, picture processing time is saved, picture display efficiency is improved, and use convenience and use experience of a user are improved.
Fig. 8 shows a schematic structural diagram of a terminal disclosed in an embodiment of the present application. As shown in fig. 8, the terminal 800 includes a processor 801 and a memory 802, wherein the terminal 800 may further include a bus 803, the processor 801 and the memory 802 may be connected to each other through the bus 803, and the bus 803 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 803 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one line is shown in FIG. 8, but this does not represent only one bus or one type of bus. Terminal 800 may further include a display 804, and display 804 may include a display screen, such as a liquid crystal display. The memory 802 is used to store one or more programs containing instructions; the processor 801 is configured to invoke instructions 811 stored in the memory 802 to perform some of the method steps described above in fig. 5.
Fig. 9 is a schematic structural diagram of a terminal disclosed in another embodiment of the present application, which only shows a portion related to the embodiment of the present application for convenience of description, and please refer to the method portion of the embodiment of the present application for details that are not disclosed. The terminal of the present application may be, for example, a device that provides voice and/or data connectivity to a user, a handheld device having a speaker and a handset, or a processing device that can play audio files. The terminal of the present application may be any terminal, such as an interactive smart tablet, a mobile phone, a tablet computer, a personal computer, a notebook computer, a desktop computer, a Personal Digital Assistant (PDA), a Point of Sales (POS), and a vehicle-mounted computer, but is not limited thereto.
Taking a terminal as a mobile phone as an example:
fig. 9 is a block diagram illustrating a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. As shown in fig. 9, the mobile phone includes: a Radio Frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a Wireless Fidelity (WiFi) module 970, a processor 980, and a power supply 990. Those skilled in the art will appreciate that the handset configuration shown in fig. 9 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 9:
RF circuitry 910 may be used for the reception and transmission of information. In general, the RF circuit 910 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 910 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like. Further, the memory 920 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 930 may include a fingerprint recognition module 931 and other input devices 932. The fingerprint recognition module 931 and the input unit 930 may further include other input devices 932. In particular, other input devices 932 may include, but are not limited to, one or more of a touch screen, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The Display unit 940 may include a Display screen 941, and optionally, the Display screen 941 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The handset may also include at least one sensor 950, such as a light sensor, motion sensor, pressure sensor, temperature sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor (also referred to as a light sensor) that can adjust the backlight brightness of the mobile phone according to the brightness of ambient light, and thus adjust the brightness of the display screen 941, and a proximity sensor that can turn off the display screen 941 and/or the backlight when the mobile phone is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of a mobile phone; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 960, speaker 961, microphone 962 may provide an audio interface between a user and a cell phone. The audio circuit 960 may transmit the electrical signal converted from the received audio data to the speaker 961, and the audio signal is converted by the speaker 961 to be played; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 960, and then processes the audio data by the audio data playing processor 980, and then sends the audio data to, for example, another mobile phone through the RF circuit 910, or plays the audio data to the memory 920 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 970, and provides wireless broadband Internet access for the user. Although fig. 9 shows the WiFi module 970, it is understood that it does not belong to the essential constitution of the handset, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 980 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. Alternatively, processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 980.
The handset also includes a power supply 990 (e.g., a battery) for supplying power to the various components, which may preferably be logically connected to the processor 980 via a power management system, thereby providing management of charging, discharging, and power consumption via the power management system.
The mobile phone may further include a camera 9100, and the camera 9100 is used for shooting images and videos and transmitting the shot images and videos to the processor 980 for processing.
The mobile phone may further include a bluetooth module, etc., which will not be described herein.
In the embodiments shown in fig. 2 to fig. 4, the method flows can be implemented based on the structure of the mobile phone.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the virtual object position identification methods as set forth in the above method embodiments.
It is clear to a person skilled in the art that the solution of the present application can be implemented by means of software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, a Field-ProgrammaBLE Gate Array (FPGA), an Integrated Circuit (IC), or the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing embodiments of the present invention have been described in detail, and the principles and embodiments of the present invention are explained herein by using specific examples, which are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for displaying pictures, comprising:
the server equipment acquires the query request and the terminal information;
acquiring query results related to the query request from different webpages according to the query request, wherein the query results comprise a first picture;
when the CDN address of the first picture corresponding to the terminal information is not acquired in a picture storage server, processing the first picture to obtain a second picture corresponding to the terminal information for responding to the query request;
and caching the second picture.
2. The method of claim 1, further comprising:
and judging whether the CDN address of the first picture corresponding to the terminal information is acquired in server equipment or not by using a picture storage server according to the information of the first picture.
3. The method of claim 1, wherein the processing the first picture comprises:
and performing at least one of definition processing, cutting processing, zooming processing and format conversion processing on the first picture according to the terminal information.
4. The method of claim 1, wherein the processing the first picture comprises:
putting the information of the first picture into a message queue;
acquiring the first picture according to the message queue;
and obtaining the second picture according to the first picture.
5. The method of claim 2, wherein the caching the second picture comprises:
providing the second picture to a CDN server;
and storing the CDN address of the second picture and the information of the first picture to the picture storage server.
6. The method of claim 2, wherein the method comprises:
and when a CDN address of the first picture corresponding to the terminal information is acquired in server equipment, the CDN address is acquired to respond to the query request.
7. The method according to any one of claims 1 to 3, characterized in that:
the terminal information includes a terminal model and/or display screen information.
8. The picture display device is a server device, and comprises:
the first acquisition unit is used for acquiring the query request and the terminal information;
the second acquisition unit is used for acquiring query results related to the query request in different webpages according to the query request, wherein the query results comprise a first picture;
the processing unit is used for processing the first picture when the CDN address of the first picture corresponding to the terminal information is not acquired in the picture storage server, and acquiring a second picture corresponding to the terminal information to be used for responding to the query request;
and the caching unit is used for caching the second picture.
9. A server device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of the preceding claims 1 to 7.
CN201910129617.6A 2019-02-21 2019-02-21 Picture display method and device, server equipment and storage medium Active CN109936504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910129617.6A CN109936504B (en) 2019-02-21 2019-02-21 Picture display method and device, server equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910129617.6A CN109936504B (en) 2019-02-21 2019-02-21 Picture display method and device, server equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109936504A CN109936504A (en) 2019-06-25
CN109936504B true CN109936504B (en) 2021-10-26

Family

ID=66985739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910129617.6A Active CN109936504B (en) 2019-02-21 2019-02-21 Picture display method and device, server equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109936504B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110619193B (en) * 2019-08-20 2022-02-15 许遥 Method, device, server and storage medium for providing network pictures
CN111444143B (en) * 2020-02-26 2024-02-23 车智互联(北京)科技有限公司 Picture display method and device in picture set and mobile terminal
CN112256993B (en) * 2020-09-22 2023-06-27 恒鸿达科技有限公司 Picture acceleration display method, system, equipment and medium
CN112615973B (en) * 2020-12-24 2023-04-21 深圳市优必选科技股份有限公司 Picture display method, device, server and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707748A (en) * 2009-11-24 2010-05-12 中兴通讯股份有限公司 Picture adapting method and server
CN103412827A (en) * 2013-08-05 2013-11-27 广州唯品会信息科技有限公司 Picture caching method and picture caching system
CN104601534A (en) * 2014-04-28 2015-05-06 贵州格安科技有限公司 Method and system for processing CDN system images
CN105450837A (en) * 2014-08-29 2016-03-30 阿里巴巴集团控股有限公司 Method and apparatus for displaying CDN image adaptively on terminal device
CN108153761A (en) * 2016-12-05 2018-06-12 阿里巴巴集团控股有限公司 Access the method, apparatus of network picture and response to network picture access
CN108243215A (en) * 2016-12-26 2018-07-03 中兴通讯股份有限公司 The dispatching method and dispatching device of content delivery network service device
CN108933814A (en) * 2018-05-31 2018-12-04 康键信息技术(深圳)有限公司 electronic device, image processing method and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707748A (en) * 2009-11-24 2010-05-12 中兴通讯股份有限公司 Picture adapting method and server
CN103412827A (en) * 2013-08-05 2013-11-27 广州唯品会信息科技有限公司 Picture caching method and picture caching system
CN104601534A (en) * 2014-04-28 2015-05-06 贵州格安科技有限公司 Method and system for processing CDN system images
CN105450837A (en) * 2014-08-29 2016-03-30 阿里巴巴集团控股有限公司 Method and apparatus for displaying CDN image adaptively on terminal device
CN108153761A (en) * 2016-12-05 2018-06-12 阿里巴巴集团控股有限公司 Access the method, apparatus of network picture and response to network picture access
CN108243215A (en) * 2016-12-26 2018-07-03 中兴通讯股份有限公司 The dispatching method and dispatching device of content delivery network service device
CN108933814A (en) * 2018-05-31 2018-12-04 康键信息技术(深圳)有限公司 electronic device, image processing method and storage medium

Also Published As

Publication number Publication date
CN109936504A (en) 2019-06-25

Similar Documents

Publication Publication Date Title
CN109936504B (en) Picture display method and device, server equipment and storage medium
CN108241703B (en) Webpage data transmission method and device
CN108156508B (en) Barrage information processing method and device, mobile terminal, server and system
CN107329985B (en) Page collection method and device and mobile terminal
CN106303070B (en) notification message prompting method and device and mobile terminal
CN109948090B (en) Webpage loading method and device
US10824901B2 (en) Image processing of face sets utilizing an image recognition method
CN110020293B (en) Multimedia data display method, device and storage medium
US10956653B2 (en) Method and apparatus for displaying page and a computer storage medium
WO2021238837A1 (en) Information display method and apparatus, electronic device, medium and program product
CN107992615B (en) Website recommendation method, server and terminal
JP6915074B2 (en) Message notification method and terminal
CN110008184B (en) File processing method and electronic equipment
CN109902092B (en) Operation method and device of data storage system and mobile terminal
WO2019137470A1 (en) Data processing method, electronic device, and computer-readable storage medium
CN110032430B (en) Application program processing method and device, electronic equipment and computer readable storage medium
EP3550790A1 (en) Streaming media data processing method and mobile terminal
CN109889613B (en) Message pushing method and device and mobile terminal
CN110888572A (en) Message display method and terminal equipment
CN113268179B (en) Session message processing method, device, equipment and storage medium
CN114416254A (en) Business card display method, intelligent terminal and storage medium
US11327845B2 (en) Image synchronization method and device, and server
CN110381341B (en) Data processing method and related equipment
CN107562317B (en) Display method and terminal
CN107798008A (en) Content push system, method and device

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