Method, device, electronic device and readable medium for generating placeholder image
By querying and generating placeholder maps of different sizes in mobile applications, the problems of redundant and slow response of placeholder resource files in the prior art are solved, and the fast acquisition and generation of placeholder maps are achieved, and work efficiency is improved.
Patent Information
- Application Number
- CN201910068426.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-24
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2039-01-24
AI Technical Summary
When generating placeholder maps in mobile applications, multiple placeholder resource files of different sizes are required, which increases the workload of design and development, and it is difficult to respond quickly and return placeholder maps of suitable sizes.
By responding to the load request of the image display area, obtain the area size and query the placeholder map of the corresponding size in memory and local disk. If not found, a placeholder map of the corresponding size is generated asynchronously and stored in memory and in local disk.
It realizes rapid acquisition and generation of different sizes of placeholder maps, reduces the workload of design and development, improves work efficiency, and can dynamically support placeholder map requirements of multiple sizes.
Smart Images

Figure CN111475231B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of Internet technology, and in particular, to a method, device, electronic device and readable medium for generating a placeholder image. Background Art
[0002] Currently, a lot of information in mobile applications is conveyed by images (such as product images, etc.). When the user's mobile network is delayed or too slow, the images will load too slowly or fail to load. When the image display view needs to make a network request to load an image, a placeholder image will be loaded by default in the image display area during the short period of time when the network does not return the image.
[0003] However, in order to meet different design and usage requirements, there may be multiple image display areas on the mobile phone interface, and the sizes of these image display areas are often different. Therefore, multiple placeholder images are required accordingly, and a lot of placeholder image resource files are also required, which will increase the workload of design engineers and development engineers to realize the design and import of multiple placeholder images of different sizes.
[0004] Therefore, the technical solutions in the prior art still need to be improved.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The present disclosure provides a method, device, electronic device and readable medium for generating a placeholder map to solve the above technical problems.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to one aspect of the present disclosure, a method for generating a placeholder map is provided, comprising:
[0009] By responding to a request to load a placeholder image in the image display area, obtaining the area size of the image display area;
[0010] Searching the placeholders stored in the memory or the local disk in sequence according to the area size, and if a placeholder with a size corresponding to the area size is found, returning the placeholder to the requester;
[0011] If a placeholder whose size corresponds to the area size is not found, a placeholder whose size corresponds to the area size is asynchronously generated according to the area size, and the placeholder is returned to the requesting party.
[0012] In one embodiment of the present disclosure, querying the placeholders stored in the memory or the local disk in sequence according to the area sizes includes:
[0013] Searching in the memory according to the area size, if a placeholder corresponding to the area size is found in the memory, directly returning the placeholder stored in the memory to the requesting party;
[0014] If a placeholder corresponding to the area size is not found in the memory, a search is performed in the local disk according to the area size. If a placeholder corresponding to the area size is found in the local disk, the placeholder stored in the local disk is returned to the requesting party.
[0015] In one embodiment of the present disclosure, before searching in the memory according to the area size, the method further includes:
[0016] Creating a placeholder manager in the memory;
[0017] The placeholder manager includes a dictionary for storing placeholder nodes and placeholders; the dictionary includes keys and values, the key of the dictionary is a unique identifier of the placeholder, the value of the dictionary is a placeholder node, the unique identifier of the placeholder is named using the control size, and the placeholder node includes: the previous node of the current placeholder node, the next node of the current placeholder node, the placeholder, and the unique identifier of the placeholder.
[0018] In one embodiment of the present disclosure, the placeholder map manager also includes a doubly linked list for cache optimization and management of the placeholder map in the dictionary, and the doubly linked list includes: a head of the doubly linked list, a tail of the doubly linked list, and a maximum value of the memory space allowed to be occupied by the doubly linked list.
[0019] In one embodiment of the present disclosure, the querying in the memory according to the region size includes:
[0020] By comparing the unique identifier of the placeholder in the memory with the size area, if a placeholder corresponding to the size of the area is found in the memory, the placeholder is obtained, and the bidirectional linked list is adjusted so that the most recently used placeholder is located at the head of the bidirectional linked list;
[0021] Wherein said adjusting said bidirectional linked list comprises:
[0022] If the placeholder map node corresponding to the acquired placeholder map is the tail of the bidirectional linked list, assigning the placeholder map node to the head of the bidirectional linked list, and assigning the previous node of the placeholder map node to the tail of the bidirectional linked list;
[0023] If the placeholder map node corresponding to the obtained placeholder map is neither the head of the bidirectional linked list nor the tail of the bidirectional linked list, the placeholder map node is assigned to the head of the bidirectional linked list.
[0024] In one embodiment of the present disclosure, the querying in the local disk according to the region size includes:
[0025] Obtaining a storage path in the sandbox of the local disk through an application programming interface, and concatenating a unique identifier of the placeholder image after the storage path to obtain a query tag;
[0026] The query tag is matched with the area size. If the match is successful, a placeholder corresponding to the area size is queried in the local disk; if the match is unsuccessful, no placeholder corresponding to the area size is queried in the local disk.
[0027] In one embodiment of the present disclosure, if a placeholder image corresponding to the area size is found in the local disk, the method further includes:
[0028] The acquired placeholder map node corresponding to the placeholder map is stored in the memory, and the placeholder map is added to the bidirectional linked list;
[0029] The adding the placeholder map to the bidirectional linked list comprises:
[0030] If the head of the bidirectional linked list is empty, assigning a newly added placeholder graph node to the head of the bidirectional linked list;
[0031] If the head of the bidirectional linked list is not empty and the tail of the bidirectional linked list is empty, the newly added placeholder map node is assigned to the head of the bidirectional linked list, the previous node and the next node of the head of the bidirectional linked list are pointed to the tail of the bidirectional linked list, and the previous node and the next node of the tail of the bidirectional linked list are pointed to the head of the bidirectional linked list;
[0032] If both the head of the bidirectional linked list and the tail of the bidirectional linked list are not empty, assigning the newly added placeholder map node to the head of the bidirectional linked list, and assigning the head of the bidirectional linked list to the node following the newly added placeholder map node;
[0033] If the doubly linked list exceeds the maximum value of the memory space allowed to be occupied by the doubly linked list after the newly added placeholder map node is added, the tail of the doubly linked list is deleted from the dictionary.
[0034] In one embodiment of the present disclosure, asynchronously generating a placeholder image having a size corresponding to the area size according to the area size includes:
[0035] Generate a graphics context using a drawing function according to the area size;
[0036] Scaling the placeholder icon in proportion to the size of the graphics context according to a preset ratio to obtain the size of the placeholder icon;
[0037] The placeholder icon is drawn into the image context according to the size of the placeholder icon, and a placeholder with a size corresponding to the area size is generated.
[0038] In one embodiment of the present disclosure, after generating a placeholder whose size corresponds to the area size, the method further includes:
[0039] The generated placeholder image is stored in the memory and / or the local disk.
[0040] According to another aspect of the present disclosure, a device for generating a placeholder map is provided, comprising:
[0041] A request response module, configured to obtain the area size of the image display area by responding to a request to load a placeholder image in the image display area;
[0042] A query module is configured to query the placeholders stored in the memory or the local disk in sequence according to the area size, and if a placeholder with a size corresponding to the area size is found, the placeholder is returned to the requester;
[0043] The asynchronous generation module is configured to asynchronously generate a placeholder with a size corresponding to the area size according to the area size if a placeholder with a size corresponding to the area size is not found, and return the placeholder to the requester.
[0044] According to yet another aspect of the present disclosure, an electronic device is provided, comprising a processor; and a memory storing instructions for the processor to control the method steps as described above.
[0045] According to another aspect of the present disclosure, a computer-readable medium is provided, on which computer-executable instructions are stored. When the executable instructions are executed by a processor, the method steps described above are implemented.
[0046] According to the method, device, electronic device and computer-readable medium for generating a placeholder provided by the embodiments of the present disclosure, on the one hand, when using a placeholder, firstly query the memory and the disk that can be quickly accessed, and if the query is found, directly use the placeholder found in the memory, so that the placeholder can be quickly obtained, and the efficiency of development and design can be improved. On the other hand, if the corresponding placeholder is not obtained in the fast range, a placeholder of the corresponding size is asynchronously generated, which can meet the needs of placeholders of different sizes.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.
[0049] Figure 1 A flowchart of a method for generating a placeholder image provided in an embodiment of the present disclosure is shown.
[0050] Figure 2 A schematic diagram showing the structure of a bidirectional linked list of a cache placeholder map in a memory in an embodiment of the present disclosure is shown.
[0051] Figure 3 A flowchart of asynchronously generating a placeholder with a size corresponding to the area size according to the area size in step S130 of an embodiment of the present disclosure is shown.
[0052] Figure 4 A schematic diagram showing placeholder images corresponding to several different area sizes in an embodiment of the present disclosure.
[0053] Figure 5 The figure shows an overall flow chart of a method for generating a placeholder image in one embodiment of the present disclosure.
[0054] Figure 6 Pseudo code for defining a dictionary and a bidirectional linked list in a placeholder map manager in one embodiment of the present disclosure is shown.
[0055] Figure 7 The pseudo code of the dictionary in one embodiment of the present disclosure is shown.
[0056] Figure 8 The pseudo code of a doubly linked list in one embodiment of the present disclosure is shown.
[0057] Fig. 9 A schematic diagram of a bidirectional linked list before and after adjustment is shown when the tail of the bidirectional linked list is empty in step S504 of an embodiment of the present disclosure.
[0058] Fig.10 A schematic diagram of a bidirectional linked list before and after adjustment is shown when both the head and the tail of the bidirectional linked list are not empty in step S504 of an embodiment of the present disclosure.
[0059] Fig.11 A schematic diagram of a bidirectional link before and after adjustment when the maximum value of the allowed memory space occupied is exceeded in step S504 of an embodiment of the present disclosure is shown.
[0060] Fig.12 The pseudo code for implementing step S506 in one embodiment of the present disclosure is shown.
[0061] Fig.13 A schematic diagram of a bidirectional linked list before and after adjustment is shown when the placeholder map node is located at the end of the bidirectional linked list in step S507 of an embodiment of the present disclosure.
[0062] Fig.14 A schematic diagram of a bidirectional linked list before and after adjustment is shown when the placeholder map node is located at the end of the bidirectional linked list in step S507 of an embodiment of the present disclosure.
[0063] Fig.15 A schematic diagram of a device for generating a placeholder map provided by another embodiment of the present disclosure is shown.
[0064] Fig.16 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application is shown in yet another embodiment of the present disclosure. DETAILED DESCRIPTION
[0065] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0066] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0067] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0068] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0069] In the relevant embodiments of the present disclosure, in order to meet different requirements, a user interface (UI) design engineer is required to design a plurality of placeholders of different sizes, and when loading the placeholders, the placeholders are replaced with placeholders of corresponding sizes according to the size of the view image area for display. Alternatively, when displaying the placeholders, the development engineer may scale the placeholders of the same size proportionally according to the size of the view image area, and then display them.
[0070] It can be seen that the above method has at least one of the following disadvantages: it increases the UI design work and requires the design of placeholders of different sizes; it increases the development workload and requires the selection of appropriate placeholders according to the view; it cannot dynamically support placeholders of various sizes; it cannot respond and return the placeholder quickly; and proportional scaling will cause distortion or deformation of the placeholder image.
[0071] In view of the above shortcomings, the present disclosure provides a new method for generating placeholder images, which can reduce the work of UI designers, reduce development workload, automatically match suitable placeholder images, and dynamically generate placeholder images of various sizes to improve work efficiency.
[0072] Figure 1 A flowchart of a method for generating a placeholder map provided in an embodiment of the present disclosure is shown, comprising the following steps:
[0073] like Figure 1 As shown, in step S110, the area size of the image display area is obtained by responding to a request to load a placeholder image in the image display area.
[0074] like Figure 1 As shown, in step S120, the placeholders stored in the memory or the local disk are queried in sequence according to the area size. If a placeholder whose size corresponds to the area size is found, the placeholder is returned to the requesting party.
[0075] like Figure 1 As shown, in step S130, if a placeholder whose size corresponds to the area size is not found, a placeholder whose size corresponds to the area size is asynchronously generated according to the area size, and the placeholder is returned to the requesting party.
[0076] The method for generating a placeholder provided by the embodiment of the present disclosure, on the one hand, when using the placeholder, firstly queries the memory and the disk that can be quickly accessed, and if the query is found, directly uses the placeholder found in the memory, which can achieve rapid acquisition of the placeholder and improve the efficiency of development and design. On the other hand, if the corresponding placeholder is not obtained in the fast range, a placeholder of the corresponding size is asynchronously generated, which can meet the needs of placeholders of different sizes.
[0077] It should be noted that the application scenario of the method for generating a placeholder image provided by the present disclosure can be generating a placeholder image corresponding to a product list, a placeholder image for a login interface, and the like.
[0078] The following combination Figure 1 The flowchart shown in the figure introduces in detail the method for generating a placeholder map provided by the present disclosure, which is as follows:
[0079] In step S110, the area size of the image display area is obtained by responding to a request to load a placeholder image in the image display area.
[0080] In one embodiment of the present disclosure, the picture display area of the picture display view placeholder is set based on the iOS UIImageView (picture display view) control, and the third-party class library SDWebImage (a class library for downloading pictures and setting UIImageView placeholders) is usually used to obtain pictures. The pseudo code of the calling process is:
[0081] [imageView sd_setImageWithURL:imageURL placeholderImage:placeholderImage].
[0082] In one embodiment of the present disclosure, UIImageView is used to display pictures and is a commonly used view class in the UIKit framework. UIImageView is mainly used to display two types of pictures, one is a static picture, which is also the most basic usage, and the other is a dynamic picture (animation effect generated by a group of pictures). You can use UIImageView to make a gif animation. In addition to using the animation effects inherited from UIView, UIImageView can also use the animation effects that come with the UIImageView control itself (more commonly used).
[0083] In one embodiment of the present disclosure, the placeholder image (placeholderImage) is searched, generated, returned, deleted, and cached by the placeholder image manager. Therefore, the placeholder image manager can be mainly used for memory storage, local disk storage, child thread generation of placeholders, etc. Figure 3 In this regard, steps S120 and S130 in the following text are also implemented based on the placeholder manager.
[0084] In step S120, the placeholders stored in the memory or the local disk are searched in sequence according to the area size. If a placeholder whose size corresponds to the area size is found, the placeholder is returned to the requesting party.
[0085] In one embodiment of the present disclosure, since the memory provides a small capacity but has high-speed access capabilities, a quick query of the placeholder map is first selected to be performed in the memory. The use of the placeholder map takes into account the actual situation. If it is on a product list page, the display style of the product list is basically the same (that is, the required placeholder size is the same), then it is necessary to save the placeholder map in the memory so that it can be directly retrieved from the memory next time. In addition, considering the problem of memory resources, placeholder maps cannot be added to the memory all the time, and appropriate removal operations are required. Therefore, in this embodiment, the most recently used ones are placed in the front (that is, the head of the bidirectional linked list). If they are not used for a long time, they must be removed from the memory to avoid excessive memory occupation.
[0086] In one embodiment of the present disclosure, in this step, sequentially querying the placeholders stored in the memory or the local disk according to the area sizes includes:
[0087] Searching in the memory according to the area size, if a placeholder corresponding to the area size is found in the memory, directly returning the placeholder stored in the memory to the requesting party;
[0088] If a placeholder corresponding to the area size is not found in the memory, a search is performed in the local disk according to the area size. If a placeholder corresponding to the area size is found in the local disk, the placeholder stored in the local disk is returned to the requesting party.
[0089] In one embodiment of the present disclosure, before searching in the memory according to the area size, the method further includes:
[0090] Creating a placeholder manager in the memory;
[0091] The placeholder manager includes a dictionary for storing placeholder nodes and placeholders; the dictionary includes keys and values, the key of the dictionary is a unique identifier of the placeholder, the value of the dictionary is a placeholder node, the unique identifier of the placeholder is named using the control size, and the placeholder node includes: the previous node of the current placeholder node, the next node of the current placeholder node, the placeholder, and the unique identifier of the placeholder.
[0092] In one embodiment of the present disclosure, the placeholder map manager also includes a doubly linked list for cache optimization and management of the placeholder map in the dictionary, and the doubly linked list includes: a head of the doubly linked list, a tail of the doubly linked list, and a maximum value of the memory space allowed to be occupied by the doubly linked list.
[0093] In one embodiment of the present disclosure, searching in the memory according to the region size includes:
[0094] By comparing the unique identifier of the placeholder in the memory with the size area, if a placeholder corresponding to the size of the area is found in the memory, the placeholder is obtained, and the bidirectional linked list is adjusted so that the most recently used placeholder is located at the head of the bidirectional linked list;
[0095] Wherein said adjusting said bidirectional linked list comprises:
[0096] If the placeholder map node corresponding to the acquired placeholder map is the tail of the bidirectional linked list, assigning the placeholder map node to the head of the bidirectional linked list, and assigning the previous node of the placeholder map node to the tail of the bidirectional linked list;
[0097] If the placeholder map node corresponding to the obtained placeholder map is neither the head of the bidirectional linked list nor the tail of the bidirectional linked list, the placeholder map node is assigned to the head of the bidirectional linked list.
[0098] Figure 2 A schematic diagram showing the structure of a bidirectional linked list of a cache placeholder map in a memory in an embodiment of the present disclosure is shown as follows: Figure 2 As shown, if a placeholder corresponding to the region size is found in the doubly linked list, it is directly obtained from the memory. If a placeholder corresponding to the region size is not found, a placeholder corresponding to the region size is generated from the local disk or through an asynchronous thread, and the newly added placeholder or the most recently accessed placeholder is added to the head of the doubly linked list. Since the maximum value of the memory space allowed to be occupied is set for the doubly linked list, if the addition of the newly added placeholder will exceed the maximum value of the memory space allowed to be occupied by the doubly linked list, the tail of the doubly linked list needs to be removed.
[0099] In step S130, if a placeholder whose size corresponds to the region size is not found, a placeholder whose size corresponds to the region size is asynchronously generated according to the region size, and the placeholder is returned to the requesting party.
[0100] In one embodiment of the present disclosure, the querying in the local disk according to the region size includes:
[0101] Obtaining a storage path in the sandbox of the local disk through an application programming interface, and concatenating a unique identifier of the placeholder image after the storage path to obtain a query tag;
[0102] The query tag is matched with the area size. If the match is successful, a placeholder corresponding to the area size is queried in the local disk; if the match is unsuccessful, no placeholder corresponding to the area size is queried in the local disk.
[0103] In one embodiment of the present disclosure, if a placeholder image corresponding to the area size is found in the local disk, the method further includes:
[0104] The acquired placeholder map node corresponding to the placeholder map is stored in the memory, and the placeholder map is added to the bidirectional linked list;
[0105] The adding the placeholder map to the bidirectional linked list comprises:
[0106] If the head of the bidirectional linked list is empty, assigning a newly added placeholder graph node to the head of the bidirectional linked list;
[0107] If the head of the bidirectional linked list is not empty and the tail of the bidirectional linked list is empty, the newly added placeholder map node is assigned to the head of the bidirectional linked list, the previous node and the next node of the head of the bidirectional linked list are pointed to the tail of the bidirectional linked list, and the previous node and the next node of the tail of the bidirectional linked list are pointed to the head of the bidirectional linked list;
[0108] If both the head of the bidirectional linked list and the tail of the bidirectional linked list are not empty, assigning the newly added placeholder map node to the head of the bidirectional linked list, and assigning the head of the bidirectional linked list to the node following the newly added placeholder map node;
[0109] If the doubly linked list exceeds the maximum value of the memory space allowed to be occupied by the doubly linked list after the newly added placeholder map node is added, the tail of the doubly linked list is deleted from the dictionary.
[0110] Figure 3 A flowchart showing asynchronously generating a placeholder map with a size corresponding to the area size according to the area size in step S130 of an embodiment of the present disclosure is shown, which specifically includes the following steps:
[0111] Step S310, generating a graphics context using a drawing function according to the area size;
[0112] Step S320, scaling the placeholder icon in proportion to the size of the graphic context according to a preset ratio to obtain the size of the placeholder icon;
[0113] Step S330 : drawing the placeholder icon into the image context according to the size of the placeholder icon, and generating a placeholder whose size corresponds to the area size.
[0114] based on Figure 3In steps S310 to S330 shown, if there is no placeholder corresponding to the area size in the memory and the local disk, it is necessary to start a child thread to generate a placeholder of the area size. The thread is mainly implemented using GCD (Grand Central Dispatch) of the class library provided by iOS.
[0115] In one embodiment of the present disclosure, the placeholder image is generated by drawing using the graphics context (CGContext) provided by iOS. The design of the placeholder image can be a company logo plus a background color. The process of generating the placeholder image is described below:
[0116] First, use the drawing function to draw a graphics context according to the size of the area where the image is displayed. Figure 4 A schematic diagram of placeholders corresponding to several different area sizes in an embodiment of the present disclosure is shown, wherein a graphics context is marked with 401 and a placeholder icon is marked with 402 .
[0117] Secondly, fill the background color according to the color value provided by the UI. The color value provided by the UI is a preset value, that is, the background color of the placeholder image, and the background color can be adjusted accordingly as needed. For example, for a page displaying products, if the placeholder image in the page is a placeholder image of spring sports or outing products, the green representing spring can be used as the background color, and if the placeholder image in the page is a placeholder image of Spring Festival or holiday products, the red representing the festive atmosphere can be used as the background color.
[0118] Then, the default placeholder icon provided by the UI is scaled in accordance with the preset ratio in combination with the size of the graphics context, and the placeholder icon is drawn to a suitable position in the graphics context to generate a placeholder. Generally, the company logo is used as the placeholder icon.
[0119] It should be noted that the placeholder icon here can be a square or a rectangle. Since the graphics context, that is, the image display view, can also be a rectangle or a square, the preset ratio can refer to the ratio between the minimum side length of the graphics context and the minimum side length of the placeholder icon. The "minimum side length" here refers to the side length when the graphics context or the placeholder icon is a square, and the width when the graphics context or the placeholder icon is a rectangle. The "appropriate position" for the above-mentioned placeholder icon means that the center coordinates of the placeholder icon coincide with the center coordinates of the graphics context.
[0120] It should also be noted that the present embodiment takes a square as an example. In other embodiments, the shape of the graphic context and the placeholder icon may also be a circle, a polygon or other irregular shapes. In this case, the preset ratio is also calculated according to the ratio of the radius or the minimum side length.
[0121] Finally, the generated placeholder image is returned to the image display view and saved to the local disk and memory.
[0122] In one embodiment of the present disclosure, after generating a placeholder whose size corresponds to the area size, the method further includes:
[0123] The generated placeholder image is stored in the memory and / or the local disk, specifically:
[0124] If a placeholder corresponding to the area size is not found in the memory, but a placeholder corresponding to the area size is found in the local disk, the placeholder corresponding to the area size obtained from the local disk is stored in the memory; if a placeholder corresponding to the area size is not found in both the memory and the local disk, a placeholder corresponding to the area size needs to be asynchronously generated and stored in the memory and the local disk.
[0125] Figure 5 The overall flow chart of the method for generating a placeholder image in one embodiment of the present disclosure is shown, which is described in detail below.
[0126] like Figure 5 As shown, in step S501, a picture display view is obtained, and a placeholder image with an area size that matches the picture display view is obtained using a placeholder image manager.
[0127] like Figure 5 As shown, in step S502, a placeholder image corresponding to the area size is searched in the memory according to the area size.
[0128] like Figure 5 As shown, in step S503, it is determined whether there is a placeholder image corresponding to the area size in the memory. If so, the process goes to step S507; if not, the process goes to step S504.
[0129] like Figure 5 As shown, in step S504, a placeholder map corresponding to the region size is searched in the local disk according to the region size. Since the memory has a high-speed access capability, the purpose of fast query can be achieved.
[0130] like Figure 5 As shown, in step S505, it is determined whether there is a placeholder corresponding to the area size in the local disk. If so, the process proceeds to step S507; if not, the process proceeds to step S506.
[0131] like Figure 5 As shown, in step S506, a child thread is started to generate a placeholder map corresponding to the area size, and the generated placeholder map is cached in the memory and the local disk.
[0132] like Figure 5 As shown, in step S507, a placeholder image corresponding to the area size is obtained and returned to the requesting party, that is, returned to the image display view for displaying the placeholder image.
[0133] When searching the placeholder map in the memory in the above step S502, it is necessary to create a placeholder map memory management class, the representation of which includes a dictionary and a doubly linked list, wherein the dictionary is used to store the placeholder maps in the memory, and the doubly linked list is used to implement cache optimization and management of the placeholder maps in the memory.
[0134] Figure 6 Pseudo code for defining a dictionary and a bidirectional linked list in a placeholder map manager in one embodiment of the present disclosure is shown.
[0135] Figure 7 The pseudo code of the dictionary in one embodiment of the present disclosure is shown, wherein the dictionary is used to store each placeholder map node in the memory, using the unique identifier of the placeholder map node as the key, and the unique identifier uses the control size as the name, so that the placeholder map of the same size can be repeatedly produced (such as: 200*200.png), with the placeholder map node as the value. The placeholder map node includes: the previous node of the node; the next node of the node; the placeholder map; and the unique identifier of the placeholder map.
[0136] Figure 8 The pseudo code of a doubly linked list in one embodiment of the present disclosure is shown, wherein the doubly linked list is used to eliminate memory data to ensure that the memory occupied by the placeholder map is within a reasonable range, and the doubly linked list mainly includes the head of the doubly linked list, the tail of the doubly linked list and the maximum memory allowed to be occupied.
[0137] In this way, in the memory, the unique identifier of the placeholder map can be used to query whether the placeholder map node exists in the dictionary of the placeholder map memory management.
[0138] In the above step S504, if the placeholder corresponding to the area size is not found in the memory, it is necessary to obtain the placeholder from the local disk cache or generate the placeholder asynchronously, and then store the obtained placeholder in the placeholder manager in the memory, as follows:
[0139] 1) First, declare a placeholder map node, and use the value of the node (MemoryMapNode->_value) to store the placeholder map in step 1. The unique identifier of the placeholder map is the key of the node (MemoryMapNode->_key).
[0140] 2) The placeholder map node is stored in the dictionary of the placeholder map memory management (MemoryManagement->_mapNodeDic), with the key (_key) of the placeholder map node as the key in the dictionary and the placeholder map node as the value in the dictionary.
[0141] 3) Add the placeholder map node to the doubly linked list (MemoryManagement->_map) of the placeholder map manager, keep the most recently used placeholder map at the front of the doubly linked list, and move the least recently used placeholder map to the end of the doubly linked list. When the placeholder map in the doubly linked list exceeds the maximum value of the memory space allowed, remove the end of the doubly linked list. The specific adjustments to the doubly linked list include:
[0142] ① If the doubly linked list is empty, the placeholder map node is directly assigned to the head of the doubly linked list.
[0143] ② If the head of the doubly linked list is not empty and the tail of the doubly linked list is empty, assign the head of the doubly linked list to the tail of the linked list, assign the placeholder map node to the head of the doubly linked list, and then point the previous node and the next node of the head of the doubly linked list to the tail of the doubly linked list, and the previous node and the next node of the tail of the doubly linked list to the head of the doubly linked list. Fig. 9 FIG. 4 shows a schematic diagram of a bidirectional linked list before and after adjustment when the tail of the bidirectional linked list is empty in step S504 of an embodiment of the present disclosure. Fig. 9 As shown, the new placeholder map node obtained or asynchronously generated is adjusted to the head of the bidirectional linked list.
[0144] ③If both the head and the tail of the doubly linked list are not empty, the head of the doubly linked list is assigned to the node after the placeholder map node, the tail of the doubly linked list is assigned to the node before the placeholder map node, the placeholder map node is assigned to the node before the head of the doubly linked list and the node after the tail of the doubly linked list, and the placeholder map node is assigned to the head of the doubly linked list. Fig.10 FIG. 4 shows a schematic diagram of a bidirectional linked list before and after adjustment when both the head and the tail of the bidirectional linked list are not empty in step S504 of an embodiment of the present disclosure. Fig.10 As shown, the new placeholder map node obtained or asynchronously generated is adjusted to the head of the bidirectional linked list.
[0145] ④If it is found through step ③ that the maximum value of the memory space allowed is exceeded, the tail of the doubly linked list needs to be removed. The specific steps are: assign the head of the doubly linked list to the node after the node before the tail of the doubly linked list, assign the node before the tail of the doubly linked list to the node before the head of the doubly linked list, assign the previous section of the tail of the doubly linked list to the tail of the doubly linked list, and delete the tail of the doubly linked list to be removed from the dictionary. Fig.11 FIG. 4 is a schematic diagram showing a bidirectional link before and after adjustment when the maximum value of the allowed memory space is exceeded in step S504 of an embodiment of the present disclosure. Fig.11 As shown, delete the tail of the doubly linked list.
[0146] ⑤If after step ④, the maximum memory space allowed is still exceeded, repeat step ④. I will not repeat it here.
[0147] In the above step S505, the cached placeholders in the local disk are read to see if there is a placeholder corresponding to the area size. For the iOS system, the pictures are cached in the sandbox, where the directory Library / Caches in the sandbox is suitable for storing large-volume, non-important data that does not need to be backed up. First, the disk reading application programming interface (Application Programming Interface, referred to as API) provided by the iOS system itself is used to obtain it. If there is a placeholder of the area size, the placeholder is returned and stored in the memory, as described above, and will not be repeated here; if there is no placeholder of the area size, the child thread is required to generate a placeholder and store the placeholder in the memory and the local disk, as follows:
[0148] 1) To determine whether there is a placeholder of the size of the area in the local disk, you need to obtain the Library / Caches path, concatenate the unique identifier of the placeholder after the path, and use NSFileManager's fileExistsAtPath to determine if there is a placeholder of the size of the area, obtain the placeholder through UIImage's initWithContentsOfFile, and return the placeholder to the display image view. In addition, the placeholder needs to be stored in memory for quick access next time, as described above, and will not be repeated here.
[0149] 2) If there is no placeholder of the area size, the child thread needs to generate a placeholder and store it on the local disk, obtain the path of Library / Caches, add the unique identifier of the placeholder to the path, and then store it through writeToFile of UIImageJPEGRepresentation.
[0150] In the above step S506, if the placeholder of the area size does not exist in the memory and the local disk, it is necessary to start a child thread to generate a placeholder of the area size. The thread is mainly implemented using GCD (Grand Central Dispatch) of the class library provided by iOS. Fig.12 The pseudo code for implementing step S506 in one embodiment of the present disclosure is shown as follows: Fig.12 As shown, the graphics context is drawn first, then the background color is filled, and then the placeholder icon is scaled proportionally. Finally, the scaled placeholder icon is drawn to the appropriate position of the graphics context to obtain the placeholder.
[0151] If a placeholder map corresponding to the area size is found in the memory in the above step S507, it is necessary to further adjust the bidirectional linked list appropriately according to the position of the placeholder map node corresponding to the placeholder map in the bidirectional linked list:
[0152] 1) If the obtained placeholder map node is the head of the doubly linked list, there is no need to adjust the doubly linked list.
[0153] 2) If the obtained placeholder map node is the tail of the doubly linked list, the tail of the doubly linked list needs to be assigned to the head of the doubly linked list. After the assignment, the previous node of the head of the doubly linked list needs to be assigned to the tail of the doubly linked list. Fig.13 FIG. 4 shows a schematic diagram of a bidirectional linked list before and after adjustment when the placeholder graph node is located at the end of the bidirectional linked list in step S507 of an embodiment of the present disclosure, as shown in FIG. Fig.13 As shown, the placeholder graph node located at the tail of the bidirectional linked list before the adjustment is adjusted to the head of the bidirectional linked list, and the remaining nodes are moved back one position in sequence.
[0154] 3) If the obtained placeholder map node is neither the head nor the tail of the doubly linked list, the next node of the previous node of the placeholder map node needs to point to the next node of the placeholder map node, the previous node of the next node of the placeholder map node needs to point to the previous node of the placeholder map node, the previous node of the placeholder map node needs to point to the tail of the doubly linked list, and the next node needs to point to the head of the doubly linked list. The previous node of the doubly linked list needs to point to this node, and the next node of the tail of the doubly linked list needs to point to the placeholder map node. The placeholder map node is assigned to the head of the doubly linked list to adjust the doubly linked list. Fig.14 FIG. 4 shows a schematic diagram of a bidirectional linked list before and after adjustment when the placeholder graph node is located at the end of the bidirectional linked list in step S507 of an embodiment of the present disclosure, as shown in FIG. Fig.14 As shown, before the adjustment, the placeholder map node is located in the middle of both sides of the bidirectional list, and after the adjustment, the placeholder map node is located at the head of the bidirectional linked list.
[0155] In summary, the method for generating a placeholder provided by the embodiment of the present disclosure, on the one hand, when using a placeholder, firstly queries the memory and the disk that can be quickly accessed, and if the query is found, directly uses the placeholder found in the memory, so that the placeholder can be quickly obtained, and the efficiency of development and design can be improved. On the other hand, if the corresponding placeholder is not obtained in the fast range, a placeholder of the corresponding size is asynchronously generated, which can meet the needs of placeholders of different sizes.
[0156] In the disclosed embodiment, a bidirectional linked list is used to manage the memory of the placeholder map. By placing the most recently used placeholder map at the head of the bidirectional linked list and eliminating the placeholder map that has not been used for the longest time, the placeholder map can be quickly obtained and the memory usage can be reduced. When a placeholder map that meets the area size is not found in the memory and the local disk, placeholder maps of different sizes are automatically drawn asynchronously through a child thread to meet the needs of each image display view. Finally, the generated placeholder map is stored in the memory and the local disk so that it can be reused later. This solution achieves fast response and reduces memory usage by optimizing the memory algorithm and automatically generating placeholder maps of different area sizes, meeting the image display views of different area sizes, thereby avoiding the problems of traditional placeholder map generation solutions, reducing the workload of design and development, and improving the efficiency of obtaining placeholder maps.
[0157] Fig.15 A schematic diagram of a device for generating a placeholder map provided by another embodiment of the present disclosure is shown. Fig.15 As shown, the device 1500 for generating a placeholder map includes: a request response module 1510, a query module 1520 and an asynchronous generation module 1530.
[0158] The request response module 1510 is configured to obtain the area size of the image display area by responding to a request to load a placeholder in the image display area; the query module 1520 is configured to query the placeholders stored in the memory or local disk in sequence according to the area size, and if a placeholder whose size corresponds to the area size is found, the placeholder is returned to the requester; the asynchronous generation module 1530 is configured to asynchronously generate a placeholder whose size corresponds to the area size according to the area size if a placeholder whose size corresponds to the area size is not found, and return the placeholder to the requester.
[0159] The functions of each module in the device refer to the relevant description in the above method embodiment, which will not be repeated here.
[0160] In summary, the device for generating a placeholder provided by the embodiment of the present disclosure, on the one hand, when using a placeholder, firstly queries the memory and the disk that can be quickly accessed, and if the placeholder is found, directly uses the placeholder found in the memory, so that the placeholder can be quickly obtained, and the efficiency of development and design can be improved. On the other hand, if the corresponding placeholder is not found in the fast range, a placeholder of the corresponding size is asynchronously generated, which can meet the needs of placeholders of different sizes.
[0161] On the other hand, the present disclosure further provides an electronic device, including a processor and a memory, wherein the memory stores an operation instruction for the processor to control the following method:
[0162] By responding to a request to load a placeholder in an image display area, the area size of the image display area is obtained; the placeholders stored in the memory or local disk are queried in sequence according to the area size, and if a placeholder whose size corresponds to the area size is found, the placeholder is returned to the requester; if a placeholder whose size corresponds to the area size is not found, a placeholder whose size corresponds to the area size is asynchronously generated according to the area size, and the placeholder is returned to the requester.
[0163] Reference below Fig.16 , which shows a schematic diagram of the structure of a computer system 1600 suitable for implementing an electronic device of an embodiment of the present application. Fig.16 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0164] like Fig.16 As shown, the computer system 1600 includes a central processing unit (CPU) 1601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1602 or a program loaded from a storage part 1607 to a random access memory (RAM) 1603. In the RAM 1603, various programs and data required for the operation of the system 1600 are also stored. The CPU 1601, the ROM 1602, and the RAM 1603 are connected to each other via a bus 1604. An input / output (I / O) interface 1605 is also connected to the bus 1604.
[0165] The following components are connected to the I / O interface 1605: an input section 1606 including a keyboard, a mouse, etc.; an output section 1607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1608 including a hard disk, etc.; and a communication section 1609 including a network interface card such as a LAN card, a modem, etc. The communication section 1609 performs communication processing via a network such as the Internet. A drive 1610 is also connected to the I / O interface 1605 as needed. A removable medium 1611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1610 as needed, so that a computer program read therefrom is installed into the storage section 1608 as needed.
[0166] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 1609, and / or installed from a removable medium 1611. When the computer program is executed by a central processing unit (CPU) 1601, the above-mentioned functions defined in the system of the present application are executed.
[0167] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0168] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0169] The units involved in the embodiments described in the present application may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a sending unit, an acquisition unit, a determination unit, and a first processing unit. Among them, the names of these units do not constitute a limitation on the units themselves in certain circumstances, for example, the sending unit may also be described as a "unit that sends a picture acquisition request to the connected server".
[0170] On the other hand, the present disclosure also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes the following method steps:
[0171] By responding to a request to load a placeholder in an image display area, the area size of the image display area is obtained; the placeholders stored in the memory or local disk are queried in sequence according to the area size, and if a placeholder whose size corresponds to the area size is found, the placeholder is returned to the requester; if a placeholder whose size corresponds to the area size is not found, a placeholder whose size corresponds to the area size is asynchronously generated according to the area size, and the placeholder is returned to the requester.
[0172] It should be clearly understood that the present disclosure describes how to form and use specific examples, but the principles of the present disclosure are not limited to any details of these examples. On the contrary, based on the teachings of the contents disclosed in the present disclosure, these principles can be applied to many other embodiments.
[0173] The exemplary embodiments of the present disclosure are specifically shown and described above. It should be understood that the present disclosure is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present disclosure is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.
Claims
1. A method for generating a placeholder map, characterized in that: include: By responding to a request to load a placeholder image in the image display area, obtaining the area size of the image display area; Searching the placeholders stored in the memory or the local disk in sequence according to the area size, and if a placeholder with a size corresponding to the area size is found, returning the placeholder to the requester; If a placeholder whose size corresponds to the area size is not found, asynchronously generating a placeholder whose size corresponds to the area size according to the area size, and returning the placeholder to the requester; Before searching in the memory according to the area size, the method further includes: Creating a placeholder manager in the memory; The placeholder manager includes a dictionary for storing placeholder nodes and placeholders; the dictionary includes keys and values, the key of the dictionary is a unique identifier of the placeholder, the value of the dictionary is a placeholder node, the unique identifier of the placeholder is named using the control size, and the placeholder node includes: the previous node of the current placeholder node, the next node of the current placeholder node, the placeholder, and the unique identifier of the placeholder.
2. The method for generating a placeholder map according to claim 1, characterized in that: The step of sequentially querying the placeholders stored in the memory or the local disk according to the area size includes: Searching in the memory according to the area size, if a placeholder corresponding to the area size is found in the memory, directly returning the placeholder stored in the memory to the requesting party; If a placeholder corresponding to the area size is not found in the memory, a search is performed in the local disk according to the area size. If a placeholder corresponding to the area size is found in the local disk, the placeholder stored in the local disk is returned to the requesting party.
3. The method for generating a placeholder map according to claim 2, characterized in that: The placeholder map manager also includes a bidirectional linked list for cache optimization and management of the placeholder map in the dictionary, wherein the bidirectional linked list includes: a head of the bidirectional linked list, a tail of the bidirectional linked list, and a maximum value of the memory space allowed to be occupied by the bidirectional linked list.
4. The method for generating a placeholder map according to claim 3, characterized in that: The searching in the memory according to the area size includes: By comparing the unique identifier of the placeholder in the memory with the area size, if a placeholder corresponding to the area size is found in the memory, the placeholder is obtained, and the bidirectional linked list is adjusted so that the most recently used placeholder is located at the head of the bidirectional linked list; Wherein said adjusting said bidirectional linked list comprises: If the placeholder map node corresponding to the acquired placeholder map is the tail of the bidirectional linked list, assigning the placeholder map node to the head of the bidirectional linked list, and assigning the previous node of the placeholder map node to the tail of the bidirectional linked list; If the placeholder map node corresponding to the obtained placeholder map is neither the head of the bidirectional linked list nor the tail of the bidirectional linked list, the placeholder map node is assigned to the head of the bidirectional linked list.
5. The method for generating a placeholder map according to claim 4, characterized in that: The querying in the local disk according to the region size includes: Obtaining a storage path in the sandbox of the local disk through an application programming interface, and concatenating a unique identifier of the placeholder image after the storage path to obtain a query tag; The query tag is matched with the area size. If the match is successful, a placeholder corresponding to the area size is queried in the local disk; if the match is unsuccessful, a placeholder corresponding to the area size is not queried in the local disk.
6. The method for generating a placeholder map according to claim 5, characterized in that: If a placeholder map corresponding to the area size is found in the local disk, the method further includes: The acquired placeholder map node corresponding to the placeholder map is stored in the memory, and the placeholder map is added to the bidirectional linked list; The adding the placeholder map to the bidirectional linked list comprises: If the head of the bidirectional linked list is empty, assigning a newly added placeholder graph node to the head of the bidirectional linked list; If the head of the bidirectional linked list is not empty and the tail of the bidirectional linked list is empty, the newly added placeholder map node is assigned to the head of the bidirectional linked list, the previous node and the next node of the head of the bidirectional linked list are pointed to the tail of the bidirectional linked list, and the previous node and the next node of the tail of the bidirectional linked list are pointed to the head of the bidirectional linked list; If both the head of the bidirectional linked list and the tail of the bidirectional linked list are not empty, assigning the newly added placeholder map node to the head of the bidirectional linked list, and assigning the head of the bidirectional linked list to the node following the newly added placeholder map node; If the doubly linked list exceeds the maximum value of the memory space allowed to be occupied by the doubly linked list after the newly added placeholder map node is added, the tail of the doubly linked list is deleted from the dictionary.
7. The method for generating a placeholder map according to claim 2, characterized in that: The step of asynchronously generating a placeholder image with a size corresponding to the area size according to the area size includes: Generate a graphics context using a drawing function according to the area size; Scaling the placeholder icon in proportion to the size of the graphics context according to a preset ratio to obtain the size of the placeholder icon; The placeholder icon is drawn into the graphics context according to the size of the placeholder icon, and a placeholder with a size corresponding to the area size is generated.
8. The method for generating a placeholder map according to claim 7, characterized in that: After generating a placeholder image with a size corresponding to the area size, the method further includes: The generated placeholder image is stored in the memory and / or the local disk.
9. A device for generating a placeholder map, characterized in that: include: A request response module, configured to obtain the area size of the image display area by responding to a request to load a placeholder image in the image display area; A query module is configured to query the placeholders stored in the memory or the local disk in sequence according to the area size, and if a placeholder with a size corresponding to the area size is found, the placeholder is returned to the requester; Before querying in the memory according to the area size, the method further includes: creating a placeholder manager in the memory; wherein the placeholder manager includes a dictionary for storing placeholder nodes and placeholders; the dictionary includes keys and values, the key of the dictionary is a unique identifier of the placeholder, the value of the dictionary is a placeholder node, the unique identifier of the placeholder is named by the size of the control, and the placeholder node includes: the previous node of the current placeholder node, the next node of the current placeholder node, the placeholder, and the unique identifier of the placeholder; The asynchronous generation module is configured to asynchronously generate a placeholder with a size corresponding to the area size according to the area size if a placeholder with a size corresponding to the area size is not found, and return the placeholder to the requester.
10. An electronic device, characterized in that: include: processor; A memory storing the method steps for the processor to control the generation of a placeholder image according to any one of claims 1 to 8.
11. A computer-readable medium having computer-executable instructions stored thereon, characterized in that: When the executable instructions are executed by a processor, the method steps for generating a placeholder image according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Large-scale social network service-oriented graph data storage and query method
CN104899156A
Picture loading method and terminal
CN107463627A
Icon processing method and device thereof as well as computer device and storage medium
CN108388463A