CN112615911B - Picture loading method, picture loading device and electronic equipment - Google Patents

Picture loading method, picture loading device and electronic equipment Download PDF

Info

Publication number
CN112615911B
CN112615911B CN202011436265.8A CN202011436265A CN112615911B CN 112615911 B CN112615911 B CN 112615911B CN 202011436265 A CN202011436265 A CN 202011436265A CN 112615911 B CN112615911 B CN 112615911B
Authority
CN
China
Prior art keywords
picture
missing
client
storage position
request
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
CN202011436265.8A
Other languages
Chinese (zh)
Other versions
CN112615911A (en
Inventor
蒋演
彭飞
邓竹立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202011436265.8A priority Critical patent/CN112615911B/en
Publication of CN112615911A publication Critical patent/CN112615911A/en
Application granted granted Critical
Publication of CN112615911B publication Critical patent/CN112615911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • 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/53Querying
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a picture loading method, a picture loading device and electronic equipment, wherein the picture loading method is applied to a client and comprises the following steps: under the condition that the client side is not loaded to the target picture from a first local storage position, searching the target picture in a second local storage position; the first storage position is used for storing pictures which need to be loaded from the local by the client; the second storage position is used for storing a missing picture which is acquired by the client from the server according to the missing picture information, wherein the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position; and loading the target picture under the condition that the target picture is found in the second storage position. Under the condition that the local picture of the client is deleted by mistake, searching the picture deleted by mistake from the second storage position, and avoiding the problems that the picture cannot be displayed and the client crashes because the corresponding picture cannot be loaded in the first storage position.

Description

Picture loading method, picture loading device and electronic equipment
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to a picture loading method, a picture loading device, and an electronic device.
Background
The client side is related to the deletion of redundant pictures in the processes of resource slimming and service migration. In the whole process, a manual mode can be adopted to manually search for the redundant pictures for deletion. Of course, the redundant picture can be automatically identified, and the identified redundant picture can be deleted.
However, in either way, the problem of misdeletion of the picture resource may be caused, that is, the local picture that needs to be loaded in the use process of the client is misdeleted. Under the condition of deleting the local picture by mistake, when the business scene triggers loading of the deleted picture, the picture cannot be displayed by light weight, and the client crashes because the picture does not exist.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention are provided to provide a picture loading method, a picture loading device, and an electronic device that overcome or at least partially solve the foregoing problems.
In a first aspect, an embodiment of the present invention provides a picture loading method, applied to a client, where the method includes:
searching a target picture in a local second storage position under the condition that the client side is not loaded to the target picture from the local first storage position; the first storage position is used for storing pictures which need to be loaded from the local side by the client; the second storage position is used for storing a missing picture which is acquired by the client from the server according to missing picture information, and the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position;
And loading the target picture under the condition that the target picture is found in the second storage position.
Optionally, in a case that the client is not loaded to the target picture from the local first storage location, before the step of searching the target picture in the local second storage location, the method further includes:
when the client is started, a first request is sent to the server;
receiving missing picture information returned by the server according to the first request;
sending a second request for requesting the missing picture indicated by the missing picture information to the server;
receiving a missing picture returned by the server according to the second request;
and storing the missing picture to the second storage position.
Optionally, in a case that the client is not loaded to the target picture from the local first storage location, searching the target picture in the local second storage location includes:
sending a first request to the server when the client is not loaded to the target picture from a local first storage position;
receiving missing picture information returned by the server according to the first request;
Sending a second request for requesting the missing picture indicated by the missing picture information to the server;
receiving a missing picture returned by the server according to the second request;
storing the missing pictures to the second storage position;
and searching the target picture in the second storage position.
Optionally, the sending, to the server, a second request for requesting the missing picture indicated by the missing picture information includes:
sending a second request for requesting the target missing picture to the server; the target missing picture is a missing picture which is not stored in the second storage position in all the missing pictures indicated by the missing picture information.
Optionally, the method further comprises:
and sending the picture information of the target picture to the server under the condition that the target picture is not found in the second storage position.
In a second aspect, an embodiment of the present invention further provides a picture loading method, applied to a server, where the method includes:
receiving a second request sent by the client according to the missing picture information;
according to the second request, sending a missing picture indicated by the missing picture information to the client, so that the client searches a target picture in a second storage position under the condition that the target picture is not loaded in the first storage position, and loads the target picture under the condition that the target picture is found in the second storage position;
The first storage position is used for storing pictures which need to be loaded from the local side by the client; the second storage position is used for storing the missing picture which is acquired by the client from the server according to the missing picture information, and the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position.
Optionally, before the step of receiving the second request sent by the client according to the missing picture information, the method further includes:
receiving a missing picture uploaded by a user and generating a corresponding network address;
determining the name of the missing picture and the corresponding network address as missing picture information;
and when a first request sent when the client is started is received, sending the missing picture information to the client according to the first request.
In a third aspect, an embodiment of the present invention provides a picture loading device, applied to a client, where the device includes:
the searching module is used for searching the target picture in a local second storage position under the condition that the client side is not loaded to the target picture from the local first storage position; the first storage position is used for storing pictures which need to be loaded from the local side by the client; the second storage position is used for storing a missing picture which is acquired by the client from the server according to missing picture information, and the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position;
The loading module is used for loading the target picture under the condition that the target picture is found in the second storage position.
In a fourth aspect, an embodiment of the present invention provides a picture loading device, applied to a server, where the device includes:
the receiving module is used for receiving a second request sent by the client according to the missing picture information;
the sending module is used for sending the missing picture indicated by the missing picture information to the client according to the second request, so that the client searches the target picture in a second storage position under the condition that the client does not load the target picture from a first storage position, and loads the target picture under the condition that the target picture is found in the second storage position;
the first storage position is used for storing pictures which need to be loaded from the local side by the client; the second storage position is used for storing the missing picture which is acquired by the client from the server according to the missing picture information, and the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program is executed by the processor to implement the steps of the picture loading method applied to a client as described in the first aspect or the picture loading method applied to a server as described in the second aspect.
In a sixth aspect, an embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, the computer program implementing the steps in the picture loading method applied to a client as described in the first aspect or the picture loading method applied to a server as described in the second aspect when being executed by a processor.
In the embodiment of the invention, the second storage position of the local client stores the missing picture acquired by the client from the server according to the missing picture information, so that when the first storage position of the local client does not load the target picture, the target picture is continuously searched at the second storage position, and the searched target picture is loaded. According to the method and the device, under the condition that the local picture of the client is deleted by mistake, the picture deleted by mistake is searched from the second storage position, and the problems that the picture cannot be displayed and the client crashes because the corresponding picture cannot be loaded in the first storage position are avoided. Meanwhile, in links such as useless picture deletion, service function migration and the like in the development and maintenance processes of the client, picture resources can be reduced with confidence, and requirements of operators on the links such as useless picture deletion, service function migration and the like are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of steps of a picture loading method applied to a client according to an embodiment of the present invention;
fig. 2 is a flowchart of steps of a picture loading method applied to a server according to an embodiment of the present invention;
fig. 3 is a block diagram of a picture loading device applied to a client according to an embodiment of the present invention;
fig. 4 is a block diagram of a picture loading device applied to a server according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a picture loading method, applied to a client, where the method includes:
step 101: and searching the target picture in the local second storage position under the condition that the client side is not loaded to the target picture from the local first storage position.
It should be noted that the first storage location is used to store pictures that the client needs to load from local. For example, in the installation process, the client side places all the pictures to be loaded from the local place in the same preset file, and the first storage position is the storage position where the preset file is located. Specifically, the process that the client loads the target picture from the first storage position can be understood as a process that the client searches the corresponding picture in the bundle file according to the picture name of the target picture, and loads the searched picture.
The second storage location is used for storing the missing pictures which are acquired by the client from the server according to the missing picture information, wherein the missing pictures comprise pictures which are required to be loaded from the first storage location by the client and are not stored in the first storage location. Here, the second storage location is a local storage location indicated by a preset path, and for the iOS (apple) system, the second storage location is a storage location indicated by a preset path under a sandbox of the client. The missing picture information may include a picture name of the missing picture and a network address of the missing picture, so that the missing picture may be downloaded through the network address of the missing picture. The missing picture, i.e. the erroneously deleted picture, is understood to be a picture that should be stored in the first storage location, but is not stored in the first storage location due to the erroneous deletion. For example, when the client displays a certain page, a target picture needs to be loaded, and then the target picture should be stored in the first storage location. However, due to the erroneous deletion, the target picture is not stored in the first storage location, so that the client cannot load the target picture from the first storage location when the page is displayed, and the target picture may be referred to as a missing picture.
Step 102: and loading the target picture under the condition that the target picture is found in the second storage position.
It should be noted that the search may be performed in the second storage location by the picture name of the target picture.
In the embodiment of the invention, the second storage position of the local client stores the missing picture acquired by the client from the server according to the missing picture information, so that when the first storage position of the local client does not load the target picture, the target picture is continuously searched at the second storage position, and the searched target picture is loaded. According to the method and the device, under the condition that the local picture of the client is deleted by mistake, the picture deleted by mistake is searched from the second storage position, and the problems that the picture cannot be displayed and the client crashes because the corresponding picture cannot be loaded in the first storage position are avoided. Meanwhile, in links such as useless picture deletion, service function migration and the like in the development and maintenance processes of the client, picture resources can be reduced with confidence, and requirements of operators on the links such as useless picture deletion, service function migration and the like are reduced.
Optionally, in the case that the client is not loaded to the target picture from the local first storage location, before the step of searching the target picture in the local second storage location, the method further includes:
At client start-up, a first request is sent to a server.
In this step, the client start refers to the client entering the running state from the non-running state. Specifically, the first request may be sent to the server when the initialization is performed during the client start-up procedure. Here, the first request carries identification information that is negotiated in advance with the server, and the server side is provided with a response to the first request, that is, after the server receives the first request, the server sends data of predefined corresponding identification information to the client according to the identification information carried by the server. Here, the data corresponding to the identification information is missing picture information. The missing picture information may be sent to the client in a list form.
And receiving missing picture information returned by the server according to the first request.
In this step, the missing picture information includes a picture name of the missing picture and a network address of the missing picture.
And sending a second request for requesting the missing picture indicated by the missing picture information to the server.
In this step, the second request may be a request initiated by the client according to the network address of the missing picture. The missing picture information includes information of a plurality of missing pictures, and specifically, the missing picture information includes information of all the missing pictures. Here, all missing pictures may be downloaded to the second storage location, i.e. the second request is a second request for requesting all missing pictures indicated by the missing picture information. Of course, the second storage location may already store a part of the missing pictures, and only the missing pictures not stored in the second storage location need to be downloaded. Specifically, sending a second request for requesting the missing picture indicated by the missing picture information to the server, including: sending a second request for requesting the target missing picture to the server; the target missing picture is a missing picture which is not stored in the second storage position in all the missing pictures indicated by the missing picture information.
And receiving the missing picture returned by the server according to the second request.
And storing the missing pictures to a second storage position.
In the embodiment of the invention, the missing picture is downloaded when the client is started, namely, when the missing picture is not loaded, the missing picture is stored to the second storage position, so that the missing picture is directly loaded from the local when the missing picture needs to be loaded, and the picture loading speed is improved.
Optionally, in the case that the client is not loaded to the target picture from the local first storage location, searching the target picture in the local second storage location includes:
in the event that the client is not loaded to the target picture from a local first storage location, a first request is sent to the server.
In this step, the first request carries identification information that is negotiated in advance with the server, and a response to the first request is set on the server side, that is, after the server receives the first request, the server sends data of predefined corresponding identification information to the client according to the identification information carried by the server. Here, the data corresponding to the identification information is missing picture information. The missing picture information may be sent to the client in a list form.
And receiving missing picture information returned by the server according to the first request.
In this step, the missing picture information includes a picture name of the missing picture and a network address of the missing picture.
And sending a second request for requesting the missing picture indicated by the missing picture information to the server.
In this step, the second request may be a request initiated by the client according to the network address of the missing picture. The missing picture information includes information of a plurality of missing pictures, and specifically, the missing picture information includes information of all the missing pictures. Here, all missing pictures may be downloaded to the second storage location, i.e. the second request is a second request for requesting all missing pictures indicated by the missing picture information. Of course, the second storage location may already store a part of the missing pictures, and only the missing pictures not stored in the second storage location need to be downloaded. Specifically, sending a second request for requesting the missing picture indicated by the missing picture information to the server, including: sending a second request for requesting the target missing picture to the server; the target missing picture is a missing picture which is not stored in the second storage position in all the missing pictures indicated by the missing picture information.
And receiving the missing picture returned by the server according to the second request.
And storing the missing pictures to a second storage position.
And searching the target picture in the second storage position.
In the step, the target picture is searched in the second storage position according to the picture name of the target picture.
In the embodiment of the invention, when the client loads the missing picture, the missing picture is downloaded from the server, the missing picture does not need to be downloaded in advance, and resource waste caused by that the downloaded missing picture is not loaded is avoided.
Optionally, the method further comprises: and sending the picture information of the target picture to the server under the condition that the target picture is not found in the second storage position.
It should be noted that the picture name of the target picture is searched in the second storage location, and thus the picture information transmitted to the server may include only the name of the picture. The server may update missing picture information according to the picture information sent by the client.
In the embodiment of the invention, when the target picture is loaded, if the target picture is not found in the first storage position and the second storage position, the picture information of the target picture is reported to the server, so that the condition of missing pictures is monitored at one side of the server.
Alternatively, hook may be used to implement the above implementation of the present invention, taking iOS clients as an example. When the iOS client loads the picture in the local first storage position through a target system method, for example, a [ UIImage imageNamed ] method, code insertion is carried out on the target system method by using Hook, a self-defined wb-imageNamed method is adopted for replacement, if the corresponding picture is not found in the first storage position in the self-defined wb-imageNamed method, the corresponding picture is continuously found in the second storage position, and if the corresponding picture is found, the found picture is loaded; if not, reporting the information of the picture which is not found to the server.
The picture loading method provided by the embodiment of the invention is introduced by the client side, and the picture loading method of the server side is introduced by combining the drawing.
Referring to fig. 2, an embodiment of the present invention provides a picture loading method, which is applied to a server, and the method includes:
step 201: and receiving a second request sent by the client according to the missing picture information.
It should be noted that the second request is a request sent by the client for requesting a missing picture indicated by the missing picture information.
Step 202: and sending the missing picture indicated by the missing picture information to the client according to the second request, so that the client searches the target picture in the second storage position under the condition that the client does not load the target picture in the first storage position, and loads the target picture under the condition that the target picture is searched in the second storage position.
It should be noted that the first storage location is used for storing a picture that the client needs to load from the local; the second storage location is used for storing the missing pictures which are acquired by the client from the server according to the missing picture information, wherein the missing pictures comprise pictures which are required to be loaded from the first storage location by the client and are not stored in the first storage location.
In the embodiment of the invention, the missing picture indicated by the missing picture information can be sent to the client according to the second request sent by the client, so that the client can continue to search the target picture in the second storage position and load the searched target picture under the condition that the client is not loaded to the target picture from the first storage position. The problems that the pictures cannot be displayed and the client crashes due to the fact that the client cannot load the corresponding pictures in the first storage position are avoided.
Optionally, before the step of receiving the second request sent by the client according to the missing picture information, the method further includes:
and receiving the missing picture uploaded by the user and generating a corresponding network address.
In this step, the user can confirm whether or not there are missing pictures and which one of the missing pictures exists at the client through various channels. After determining that the missing picture exists in the client, uploading the missing picture to a server, and generating a network address for the client to download. The network address here is the address of the missing picture on the client download server via the internet. The user confirming whether the client has missing pictures and which channels the missing pictures have may include: when the client fails to load the pictures in the first storage position and the second storage position, the picture information is reported, and the server displays the picture information reported by the client to the user, so that the user confirms whether the client has missing pictures or which of the missing pictures according to the displayed picture information, but the method is not limited to the method. Or when the user tests the client, whether the missing picture exists or not and which of the missing pictures exist in the client can be confirmed according to the actual situation of the client.
And determining the name of the missing picture and the corresponding network address as missing picture information.
In this step, missing picture information may be stored in the form of a list. And storing the names and the network addresses corresponding to the same missing picture in the same row of the list, and storing the information of different missing pictures in different rows of the list.
And when a first request sent when the client is started is received, the missing picture information is sent to the client according to the first request.
In this step, the first request carries identification information that is negotiated in advance by the client and the server, and a response to the first request is set on the server side, that is, after the server receives the first request, the server sends data of predefined corresponding identification information to the client according to the identification information carried by the server. Here, the data corresponding to the identification information is missing picture information. Of course, the first request may also be sent by the client in other scenarios, and is not limited to the start of the client, for example, when the client does not find the target picture in both the first storage location and the second storage location.
In the embodiment of the invention, the name and the network address of the missing picture of the client are arranged into the missing picture information and sent to the client, so that the client can conveniently download the missing picture to the local according to the missing picture information.
The picture loading method provided by the embodiment of the invention is introduced above, and the picture loading device provided by the embodiment of the invention is introduced below with reference to the accompanying drawings.
Referring to fig. 3, the embodiment of the invention further provides a picture loading device, which is applied to a client, and the device comprises:
a searching module 31, configured to search for the target picture in the local second storage location if the client is not loaded to the target picture from the local first storage location; the first storage position is used for storing pictures which need to be loaded from the local by the client; the second storage position is used for storing a missing picture which is acquired by the client from the server according to the missing picture information, wherein the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position;
the loading module 32 is configured to load the target picture if the target picture is found in the second storage location.
Optionally, the apparatus further comprises:
the first request module is used for sending a first request to the server when the client is started;
the first receiving module is used for receiving missing picture information returned by the server according to the first request;
the second request module is used for sending a second request for requesting the missing picture indicated by the missing picture information to the server;
The second receiving module is used for receiving the missing picture returned by the server according to the second request;
and the storage module is used for storing the missing pictures to the second storage position.
The search module 31 includes:
the first request unit is used for sending a first request to the server under the condition that the client side is not loaded to the target picture from a local first storage position;
the first receiving unit is used for receiving missing picture information returned by the server according to the first request;
a second request unit, configured to send a second request for requesting a missing picture indicated by the missing picture information to the server;
the second receiving unit is used for receiving the missing picture returned by the server according to the second request;
the storage unit is used for storing the missing pictures to the second storage position;
and the searching unit is used for searching the target picture in the second storage position.
Optionally, sending a second request for requesting the missing picture indicated by the missing picture information to the server, including: sending a second request for requesting the target missing picture to the server; the target missing picture is a missing picture which is not stored in the second storage position in all the missing pictures indicated by the missing picture information.
Optionally, the apparatus further comprises:
and the reporting module is used for sending the picture information of the target picture to the server under the condition that the target picture is not found in the second storage position.
The image loading device provided by the embodiment of the invention can realize each process of the image loading method in the method embodiment of fig. 1, and in order to avoid repetition, the description is omitted here.
In the embodiment of the invention, the second storage position of the local client stores the missing picture acquired by the client from the server according to the missing picture information, so that when the first storage position of the local client does not load the target picture, the target picture is continuously searched at the second storage position, and the searched target picture is loaded. According to the method and the device, under the condition that the local picture of the client is deleted by mistake, the picture deleted by mistake is searched from the second storage position, and the problems that the picture cannot be displayed and the client crashes because the corresponding picture cannot be loaded in the first storage position are avoided. Meanwhile, in links such as useless picture deletion, service function migration and the like in the development and maintenance processes of the client, picture resources can be reduced with confidence, and requirements of operators on the links such as useless picture deletion, service function migration and the like are reduced.
Referring to fig. 4, the embodiment of the invention further provides a picture loading device, which is applied to a server, and the device comprises:
a receiving module 41, configured to receive a second request sent by the client according to the missing picture information;
the sending module 42 is configured to send, according to the second request, the missing picture indicated by the missing picture information to the client, so that the client searches for the target picture in the second storage location if the client does not load the target picture in the first storage location, and loads the target picture if the target picture is found in the second storage location;
the first storage position is used for storing pictures which need to be loaded from the local by the client; the second storage location is used for storing the missing pictures which are acquired by the client from the server according to the missing picture information, wherein the missing pictures comprise pictures which are required to be loaded from the first storage location by the client and are not stored in the first storage location.
Optionally, the apparatus further comprises:
the uploading module is used for receiving the missing pictures uploaded by the user and generating corresponding network addresses;
the determining module is used for determining the name of the missing picture and the corresponding network address as missing picture information;
and the response module is used for sending the missing picture information to the client according to the first request when the first request sent when the client is started is received.
The image loading device provided by the embodiment of the invention can realize each process of the image loading method in the method embodiment of fig. 2, and in order to avoid repetition, the description is omitted here.
In the embodiment of the invention, the missing picture indicated by the missing picture information can be sent to the client according to the second request sent by the client, so that the client can continue to search the target picture in the second storage position and load the searched target picture under the condition that the target picture is not loaded in the first storage position. The problems that the pictures cannot be displayed and the client crashes due to the fact that the client cannot load the corresponding pictures in the first storage position are avoided.
On the other hand, the embodiment of the invention also provides an electronic device, which comprises a memory, a processor, a bus and a computer program stored on the memory and capable of running on the processor, wherein the steps in the picture loading method applied to the client or the picture loading method applied to the server are realized when the processor executes the program.
For example, fig. 5 shows a schematic physical structure of an electronic device.
As shown in fig. 5, the electronic device may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform the following method:
Under the condition that the client side is not loaded to the target picture from a first local storage position, searching the target picture in a second local storage position; the first storage position is used for storing pictures which need to be loaded from the local by the client; the second storage position is used for storing a missing picture which is acquired by the client from the server according to the missing picture information, wherein the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position;
and loading the target picture under the condition that the target picture is found in the second storage position.
Or (b)
Receiving a second request sent by the client according to the missing picture information;
according to the second request, the missing picture indicated by the missing picture information is sent to the client, so that the client searches the target picture in the second storage position under the condition that the target picture is not loaded in the first storage position, and loads the target picture under the condition that the target picture is searched in the second storage position;
the first storage position is used for storing pictures which need to be loaded from the local by the client; the second storage location is used for storing the missing pictures which are acquired by the client from the server according to the missing picture information, wherein the missing pictures comprise pictures which are required to be loaded from the first storage location by the client and are not stored in the first storage location.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In still another aspect, an embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program, where the computer program is implemented when executed by a processor to perform the picture loading method provided in the foregoing embodiments, for example, including:
Under the condition that the client side is not loaded to the target picture from a first local storage position, searching the target picture in a second local storage position; the first storage position is used for storing pictures which need to be loaded from the local by the client; the second storage position is used for storing a missing picture which is acquired by the client from the server according to the missing picture information, wherein the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position;
and loading the target picture under the condition that the target picture is found in the second storage position.
Or (b)
Receiving a second request sent by the client according to the missing picture information;
according to the second request, the missing picture indicated by the missing picture information is sent to the client, so that the client searches the target picture in the second storage position under the condition that the target picture is not loaded in the first storage position, and loads the target picture under the condition that the target picture is searched in the second storage position;
the first storage position is used for storing pictures which need to be loaded from the local by the client; the second storage location is used for storing the missing pictures which are acquired by the client from the server according to the missing picture information, wherein the missing pictures comprise pictures which are required to be loaded from the first storage location by the client and are not stored in the first storage location.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A picture loading method applied to a client, the method comprising:
when the client is started, a first request is sent to a server; the first request carries identification information which is negotiated in advance with the server;
the receiving server sends the predefined missing picture information corresponding to the identification information to the client according to the identification information; the missing picture information comprises information of a plurality of missing pictures; the information of the missing picture comprises the name of the missing picture and a corresponding network address;
sending a second request for requesting the missing picture indicated by the missing picture information to the server; the second request is initiated by the client according to the network address of the missing picture;
Receiving a missing picture returned by the server according to the second request;
storing the missing pictures to a second storage position;
searching a target picture in a local second storage position under the condition that the client side is not loaded to the target picture from the local first storage position; the first storage position is used for storing pictures which need to be loaded from the local side by the client; the second storage position is used for storing a missing picture which is acquired from a server by the client according to missing picture information, the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position, and the missing picture is a misdeleted picture;
loading the target picture under the condition that the target picture is found in the second storage position;
the searching the target picture in the local second storage position includes:
and searching the target picture in the second storage position according to the picture name.
2. The method of claim 1, wherein, in the event that the client is not loaded into a target picture from a first local storage location, looking up the target picture in a second local storage location comprises:
Sending a first request to the server when the client is not loaded to the target picture from a local first storage position;
receiving missing picture information returned by the server according to the first request;
sending a second request for requesting the missing picture indicated by the missing picture information to the server;
receiving a missing picture returned by the server according to the second request;
storing the missing pictures to the second storage position;
and searching the target picture in the second storage position.
3. The method of claim 2, wherein the sending a second request to the server for requesting the missing picture indicated by the missing picture information comprises:
sending a second request for requesting the target missing picture to the server; the target missing picture is a missing picture which is not stored in the second storage position in all the missing pictures indicated by the missing picture information.
4. The method according to claim 1, wherein the method further comprises:
and sending the picture information of the target picture to the server under the condition that the target picture is not found in the second storage position.
5. A picture loading method applied to a server, the method comprising:
receiving a missing picture uploaded by a user and generating a corresponding network address;
determining the name of the missing picture and the corresponding network address as missing picture information;
when a first request sent when a client is started is received, sending the missing picture information to the client according to the first request; the missing picture information comprises information of a plurality of missing pictures; the first request carries identification information which is negotiated in advance with the server;
receiving a second request sent by the client according to the missing picture information; the second request is initiated by the client according to the network address of the missing picture;
according to the second request, sending a missing picture indicated by the missing picture information to the client, so that the client searches for the target picture in a second storage position according to the picture name under the condition that the target picture is not loaded in a first storage position, and loads the target picture under the condition that the target picture is found in the second storage position;
The first storage position is used for storing pictures which need to be loaded from the local side by the client; the second storage position is used for storing a missing picture which is acquired from the server by the client according to missing picture information, the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position, and the missing picture is a misdeleted picture.
6. A picture loading device applied to a client, the device comprising:
the first request module is used for sending a first request to the server when the client is started; the first request carries identification information which is negotiated in advance with the server;
the first receiving module is used for receiving the missing picture information, and the server sends the predefined missing picture information corresponding to the identification information to the client according to the identification information; the missing picture information comprises information of a plurality of missing pictures; the information of the missing picture comprises the name of the missing picture and a corresponding network address;
a second request module, configured to send a second request for requesting a missing picture indicated by the missing picture information to the server; the second request is initiated by the client according to the network address of the missing picture;
The second receiving module is used for receiving the missing picture returned by the server according to the second request;
the storage module is used for storing the missing pictures to a second storage position;
the searching module is used for searching the target picture in a local second storage position under the condition that the client side is not loaded to the target picture from the local first storage position; the first storage position is used for storing pictures which need to be loaded from the local side by the client; the second storage position is used for storing a missing picture which is acquired from a server by the client according to missing picture information, the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position, and the missing picture is a misdeleted picture;
the loading module is used for loading the target picture under the condition that the target picture is found in the second storage position;
the searching module is further configured to search the target picture in the second storage location according to the picture name.
7. A picture loading device applied to a server, the device comprising:
The uploading module is used for receiving the missing pictures uploaded by the user and generating corresponding network addresses;
the determining module is used for determining the name of the missing picture and the corresponding network address as missing picture information;
the response module is used for sending missing picture information to the client according to the first request when the first request sent when the client is started is received; the missing picture information comprises information of a plurality of missing pictures; the first request carries identification information which is negotiated in advance with the server;
the receiving module is used for receiving a second request sent by the client according to the missing picture information; the second request is initiated by the client according to the network address of the missing picture;
the sending module is used for sending the missing picture indicated by the missing picture information to the client according to the second request, so that the client searches the target picture in a second storage position according to the picture name under the condition that the target picture is not loaded in the first storage position, and loads the target picture under the condition that the target picture is found in the second storage position;
The first storage position is used for storing pictures which need to be loaded from the local side by the client; the second storage position is used for storing a missing picture which is acquired from the server by the client according to missing picture information, the missing picture comprises a picture which is required to be loaded from the first storage position by the client and is not stored in the first storage position, and the missing picture is a misdeleted picture.
8. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, characterized in that the computer program when executed by the processor implements the picture loading method as claimed in any one of claims 1 to 4 applied to a client or the steps of the picture loading method as claimed in claim 5 applied to a server.
9. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the picture loading method as claimed in any one of claims 1 to 4 applied to a client or the steps of the picture loading method as claimed in claim 5 applied to a server.
CN202011436265.8A 2020-12-10 2020-12-10 Picture loading method, picture loading device and electronic equipment Active CN112615911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011436265.8A CN112615911B (en) 2020-12-10 2020-12-10 Picture loading method, picture loading device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011436265.8A CN112615911B (en) 2020-12-10 2020-12-10 Picture loading method, picture loading device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112615911A CN112615911A (en) 2021-04-06
CN112615911B true CN112615911B (en) 2023-06-16

Family

ID=75233175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011436265.8A Active CN112615911B (en) 2020-12-10 2020-12-10 Picture loading method, picture loading device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112615911B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108256006A (en) * 2018-01-02 2018-07-06 武汉斗鱼网络科技有限公司 A kind of direct broadcasting room badge picture loading method and system
CN109831518A (en) * 2019-03-06 2019-05-31 珠海金山网络游戏科技有限公司 A kind of map datum method for down loading and device calculate equipment and storage medium
CN110096660A (en) * 2019-04-03 2019-08-06 北京字节跳动网络技术有限公司 Method, apparatus and electronic equipment for loading page picture
CN110995779A (en) * 2019-10-28 2020-04-10 武汉华中时讯科技有限责任公司 Method and system for caching network resources at mobile client, server and medium
CN112003893A (en) * 2020-07-17 2020-11-27 北京达佳互联信息技术有限公司 Resource downloading method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108256006A (en) * 2018-01-02 2018-07-06 武汉斗鱼网络科技有限公司 A kind of direct broadcasting room badge picture loading method and system
CN109831518A (en) * 2019-03-06 2019-05-31 珠海金山网络游戏科技有限公司 A kind of map datum method for down loading and device calculate equipment and storage medium
CN110096660A (en) * 2019-04-03 2019-08-06 北京字节跳动网络技术有限公司 Method, apparatus and electronic equipment for loading page picture
CN110995779A (en) * 2019-10-28 2020-04-10 武汉华中时讯科技有限责任公司 Method and system for caching network resources at mobile client, server and medium
CN112003893A (en) * 2020-07-17 2020-11-27 北京达佳互联信息技术有限公司 Resource downloading method and device

Also Published As

Publication number Publication date
CN112615911A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
CN107608701A (en) A kind of method and apparatus of firmware updating
JP2017062792A (en) System and method for updating dataset versions resident on wireless device
CN109451020B (en) Timeout management method, timeout management device, and computer-readable storage medium
CN112799688A (en) Method and device for installing software package in container application, computer equipment and medium
CN111464603A (en) Server capacity expansion method and system
CN112615911B (en) Picture loading method, picture loading device and electronic equipment
CN106843928B (en) Remote restoration method and device for application program
CN112286559A (en) Upgrading method and device for vehicle-mounted intelligent terminal
CN112256295A (en) Application program updating method, device, equipment and storage medium
CN111698281A (en) Resource downloading method and device, electronic equipment and storage medium
CN105975359A (en) Method and device for data cleaning of server and server
CN116781719A (en) Container mirror image preheating method, electronic equipment and storage medium
CN112104513B (en) Visual software load method, device, equipment and storage medium
CN111586438B (en) Method, device and system for processing service data
CN114338584A (en) Message withdrawing method and message transmission system
CN112783522B (en) File loading method, file loading device and electronic equipment
CN113434234A (en) Page jump method, device, computer readable storage medium and processor
CN112165695B (en) Internet of vehicles service management method, platform, equipment and storage medium
CN111917807B (en) Method and system for invoking download client by android system WAP webpage
CN116107603B (en) Firmware upgrading method and device, storage medium and electronic equipment
CN113703866B (en) Configuration center information synchronization method and system
CN114679410B (en) Method and device for reducing occupation of external network resources, electronic equipment and storage medium
CN113064615B (en) Software updating method and device, storage medium and electronic device
CN115905271B (en) Virus library updating method and device and multi-engine detection system
CN113810266B (en) Retry operation method, device, equipment and storage medium for message object

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