Method and device for generating thumbnail

By splitting and judging images, multiple thumbnails that meet preset conditions are generated, which solves the problem of insufficient number of thumbnails in the information flow and improves user experience.

CN112308074BActive Publication Date: 2024-09-24BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202010022114.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-09
Publication Date
2024-09-24
Estimated Expiration
2040-01-09

AI Technical Summary

Technical Problem

In the information flow display, in some cases, the number of thumbnails matching the information is small or there are no matching thumbnails at all, resulting in users being unable to understand the information from many aspects and affecting the user experience.

Method used

By splitting the image, determine whether the split sub-images reach the preset number threshold. If it reaches the preset number threshold, select the sub-images that meet the conditions to generate thumbnails. If not, continue splitting until the threshold is reached or it cannot be split anymore. to generate multiple thumbnails that meet the preset conditions.

Benefits of technology

It effectively increases the number of thumbnails, avoids user experience problems caused by too few thumbnails, and ensures that users can understand information from multiple angles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112308074B
    Figure CN112308074B
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a method and device for generating thumbnails. A specific implementation of the method includes: acquiring an image; determining a split number set corresponding to the image; selecting a minimum value from the split number set as a target split number, and performing the following processing steps: splitting the image into a target split number of sub-images to obtain a sub-image set; determining whether the number of sub-images in the sub-image set that meet the preset conditions is less than a preset number threshold; in response to determining that the number of sub-images in the sub-image set that meet the preset conditions is not less than a preset number threshold, selecting a number threshold of sub-images from the sub-image set that meet the preset conditions; and generating thumbnails of the image using the selected sub-images respectively. This implementation can effectively generate a certain number of thumbnails that meet the preset conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method and device for generating thumbnails. Background Art

[0002] At present, there are more and more terminal applications that use information streams to display various information to users, and the specific display methods of information streams are also diverse. For example, a list page can be displayed to users first, and users can browse the details page of the clicked information by clicking on the information in the list page. Among them, the list page can display part of the content of each information in the form of list items, etc., and the details page can display more content of the information.

[0003] Generally, in order to allow users to understand the displayed information more intuitively, for each information, text description information and several matching thumbnails are usually displayed together. Of course, users can view the corresponding original images by clicking on thumbnails. For example, the text description of an item and several thumbnails of the item can be displayed to users at the same time, so that users can understand the relevant information of the item from multiple aspects.

[0004] In some cases, the number of thumbnails that match the information may be less or there may be no matching thumbnails at all. At this time, usually only fewer thumbnails can be shown to the user or only text description information can be shown to the user. Summary of the invention

[0005] Embodiments of the present disclosure provide a method and apparatus for generating thumbnails.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for generating thumbnails, the method comprising: acquiring an image; determining a split number set corresponding to the image; selecting a minimum value from the split number set as a target split number, and performing the following processing steps: splitting the image into a target split number of sub-images to obtain a sub-image set; determining whether the number of sub-images in the sub-image set that meet a preset condition is less than a preset number threshold; in response to determining that the number of sub-images in the sub-image set that meet the preset condition is not less than a preset number threshold, selecting a number threshold of sub-images from the sub-images in the sub-image set that meet the preset condition; and generating thumbnails of the image using the selected sub-images respectively.

[0007] In some embodiments, the above processing steps also include: in response to determining that the number of sub-graphs in the sub-graph set that meet preset conditions is less than a preset number threshold, determining whether the number of unselected split numbers in the split number set is zero; in response to determining that the number of unselected split numbers in the split number set is not zero, re-selecting the minimum value from the unselected split numbers in the split number set, and using the re-selected minimum value as the target split number, and continuing to execute the above processing steps.

[0008] In some embodiments, the processing step further includes: in response to determining that the number of unselected split numbers in the split number set is zero, splitting the image to obtain a threshold number of sub-images, and generating thumbnails of the image using the obtained sub-images respectively.

[0009] In some embodiments, after splitting the image into a target number of sub-images to obtain a sub-image set, it also includes: performing image recognition on each sub-image in the sub-image set to obtain a recognition result of each sub-image; and determining whether the number of sub-images in the sub-image set that meet preset conditions is less than a preset number threshold, including: determining whether the number of sub-images in the sub-image set whose corresponding recognition results meet the preset conditions is less than a preset number threshold.

[0010] In some embodiments, splitting the image into a target splitting number of sub-images includes: splitting the image into equal parts into the target splitting number of sub-images.

[0011] In some embodiments, determining the number of split sets corresponding to the image includes: determining the number of split sets corresponding to the image based on size information of the image.

[0012] In some embodiments, the above method further includes: obtaining description information of the image; and displaying a thumbnail of the image and the description information, wherein the description information is presented as a context of the thumbnail of the image.

[0013] In a second aspect, an embodiment of the present disclosure provides a device for generating thumbnails, the device comprising: an acquisition unit, configured to acquire an image; a determination unit, configured to determine a split number set corresponding to the image; a processing unit, configured to select a minimum value from the split number set as a target split number, and to perform the following processing steps: split the image into a target split number of sub-images to obtain a sub-image set; determine whether the number of sub-images in the sub-image set that meet a preset condition is less than a preset number threshold; in response to determining that the number of sub-images in the sub-image set that meet the preset condition is not less than a preset number threshold, select a number threshold of sub-images from the sub-images in the sub-image set that meet the preset condition; and generate thumbnails of the image using the selected sub-images respectively.

[0014] In some embodiments, the above processing steps also include: in response to determining that the number of sub-graphs in the sub-graph set that meet preset conditions is less than a preset number threshold, determining whether the number of unselected split numbers in the split number set is zero; in response to determining that the number of unselected split numbers in the split number set is not zero, re-selecting the minimum value from the unselected split numbers in the split number set, and using the re-selected minimum value as the target split number, and continuing to execute the above processing steps.

[0015] In some embodiments, the processing step further includes: in response to determining that the number of unselected split numbers in the split number set is zero, splitting the image to obtain a threshold number of sub-images, and generating thumbnails of the image using the obtained sub-images respectively.

[0016] In some embodiments, the processing unit is further configured to perform image recognition on each sub-image in the sub-image set to obtain recognition results for each sub-image; and determine whether the number of sub-images in the sub-image set whose corresponding recognition results meet preset conditions is less than a preset number threshold.

[0017] In some embodiments, the processing unit is further configured to equally split the image into a target number of sub-images.

[0018] In some embodiments, the processing unit is further configured to determine the number of split sets corresponding to the image according to size information of the image.

[0019] In some embodiments, the acquisition unit is further configured to acquire description information of the image; the apparatus further includes: a display unit configured to display a thumbnail and description information of the image, wherein the description information is presented as a context of the thumbnail of the image.

[0020] In a third aspect, an embodiment of the present disclosure provides a server, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0021] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0022] The method and device for generating thumbnails provided by the embodiments of the present disclosure are to split an image according to a certain number of splits, and then determine whether the number of sub-images that meet the preset conditions obtained by the splitting reaches a preset number threshold. If reached, select the number threshold number of sub-images from the sub-images that meet the preset conditions obtained by the splitting to generate corresponding thumbnails respectively. If not reached, the image is split again to obtain more sub-images than the previous split, and similarly determine whether the number of sub-images that meet the preset conditions obtained by this splitting reaches the preset number threshold, and continue processing according to the judgment result. If the image cannot be split according to each split number to obtain no less than the number threshold number of sub-images that meet the preset conditions, the original image can be directly split into the number threshold number of sub-images to generate corresponding thumbnails. Thus, based on image splitting, multiple thumbnails that meet the preset conditions can be generated according to one image, thereby effectively increasing the number of thumbnails, and thus avoiding various problems caused by too few thumbnails. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0024] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;

[0025] Figure 2 is a flow chart of an embodiment of a method for generating thumbnails according to the present disclosure;

[0026] Figure 3 is a schematic diagram of an application scenario of a method for generating thumbnails according to an embodiment of the present disclosure;

[0027] Figure 4 is a flowchart of another embodiment of a method for generating a thumbnail according to the present disclosure;

[0028] Figure 5 is a structural schematic diagram of an embodiment of a device for generating thumbnails according to the present disclosure;

[0029] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION

[0030] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0031] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0032] Figure 1 An exemplary architecture 100 is shown to which an embodiment of a method for generating a thumbnail or an apparatus for generating a thumbnail of the present disclosure can be applied.

[0033] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0034] The terminal devices 101, 102, 103 interact with the server 105 through the network 104 to receive or send messages, etc. Various client applications may be installed on the terminal devices 101, 102, 103, such as browser applications, social platform software, shopping applications, news applications, image applications, etc.

[0035] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0036] The server 105 may be a server that provides various services, such as a backend server that provides backend support for the terminal devices 101, 102, and 103. The server 105 may generate thumbnails of images and then send the thumbnails to the terminal devices for display.

[0037] It should be noted that the method for generating thumbnails provided in the embodiments of the present disclosure is generally executed by the server 105 , and accordingly, the device for generating thumbnails is generally disposed in the server 105 .

[0038] It should also be noted that the terminal devices 101, 102, 103 may also be installed with image processing applications, and the terminal devices 101, 102, 103 may also process images based on the image processing applications. In this case, the method for generating thumbnails may also be executed by the terminal devices 101, 102, 103, and accordingly, the server 105 and the network 104. The apparatus for generating thumbnails may also be set in the terminal devices 101, 102, 103. In this case, the exemplary system architecture 100 may not have the server 105.

[0039] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0041] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a method for generating thumbnails according to the present disclosure. The method for generating thumbnails comprises the following steps:

[0042] Step 201, acquiring an image.

[0043] In this embodiment, the execution body of the method for generating thumbnails (such as Figure 1 The server 105 shown in the figure may first download the data from a local or other storage device (such as Figure 1 The terminal devices 101, 102, 103 shown in the figure acquire images. The images may be images specified in advance by a technician, or images determined according to preset screening conditions.

[0044] Step 202: determine the number of splits corresponding to the image.

[0045] In this embodiment, the split number in the split number set can be used to represent the number of sub-images that the image is expected to be split into. The split number set can be composed of several split numbers specified by a technician according to an actual application scenario.

[0046] As an example, in an actual application scenario, if you want to display 3 thumbnails, you can set the minimum value in the split number set to 3. For example, the split number set may include three split numbers: 3, 6, and 9. In this case, they can be used to represent splitting the image into three sub-images, six sub-images, and nine sub-images, respectively.

[0047] Optionally, the splitting numbers in the splitting number set can form a geometric progression in the order from large to small or in the order from small to large. As an example, the splitting number set can include three splitting numbers of 2, 4, and 8. At this time, it can be used to characterize that the image is split into two sub-images, four sub-images, and eight sub-images, respectively.

[0048] Optionally, the split quantity set corresponding to the image may be determined according to size information of the image.

[0049] The size information may refer to various information that can be used to characterize the size of an image. For example, the size information of an image may include at least one of the following: image size, image resolution, image aspect ratio, image area, and the like.

[0050] For example, the correspondence between the image size information and the split number set may be preset. At this time, after acquiring the image, the pre-corresponding split number set may be searched according to the image size information as the split number set corresponding to the image.

[0051] For another example, the expected sub-image size information may be preset according to actual application requirements. In this case, the corresponding split quantity set of the image may be calculated based on the image size information and the sub-image size information.

[0052] Step 203, selecting the minimum value from the split quantity set as the target split quantity, and performing the following processing steps:

[0053] Step 2031, split the image into a target number of sub-images to obtain a sub-image set.

[0054] In this step, for example, if the target number of splits is 4, the image is split into 4 sub-images to obtain a sub-image set including 4 sub-images. The method for splitting the image can be flexibly set according to actual application requirements.

[0055] For example, when the target split number is 2, the image can be split along the length direction of the parallel image to obtain two sub-images, or the image can be split along the width direction of the parallel image to obtain two sub-images.

[0056] Optionally, when splitting an image, the image may be equally split into a target number of sub-images. Thus, it is ensured that the size information of each sub-image in the obtained sub-image set is the same. Based on this, in the subsequent processing of the sub-images, there is no need to consider the problem of different sizes, which helps to improve the convenience of the entire process of generating thumbnails.

[0057] It should be noted that when splitting an image, the sum of the areas of the sub-images in the sub-image set obtained by splitting can be equal to the area of ​​the original image, or can be smaller than the area of ​​the original image. For example, when splitting an image into four sub-images, the four sub-images can be determined starting from the upper left corner of the image according to the areas of the pre-determined sub-images. At this time, the image may have a remaining image area in addition to the four sub-images.

[0058] Step 2032: Determine whether the number of sub-graphs in the sub-graph set that meet a preset condition is less than a preset number threshold.

[0059] In this step, the quantity threshold can be set by the technician according to the actual application requirements. For example, the quantity threshold can be set to the number of thumbnails expected to be generated. The preset conditions can be flexibly set by the technician according to the actual application scenario and application requirements.

[0060] For example, the preset condition may include that the similarity with the original image is not less than a preset similarity threshold. At this time, after splitting the image into the target split number of sub-images and obtaining a sub-image set, the similarity between each sub-image in the sub-image set and the image can be calculated. Then, the sub-image whose corresponding similarity is not less than the similarity threshold is determined as the sub-image that meets the preset condition.

[0061] Optionally, after splitting the image into a target number of sub-images to obtain a sub-image set, image recognition can be performed on each sub-image in the sub-image set to obtain a recognition result of each sub-image, and then it can be determined whether the number of sub-images in the sub-image set whose corresponding recognition results meet the preset conditions is less than a preset number threshold. Among them, various existing image recognition methods can be used to recognize the image.

[0062] At this time, the preset condition may be related to the recognition result of the sub-image. For example, the preset condition may include that the recognition result corresponding to the sub-image belongs to a preset recognition result set. At this time, after obtaining the recognition results of each sub-image, it can be determined whether the recognition results of each sub-image belong to the preset recognition result set. For a sub-image, if the recognition result of the sub-image belongs to the preset recognition result set, it can be determined that the recognition result of the sub-image meets the preset condition. In other words, the sub-image meets the preset condition.

[0063] Therefore, by filtering the subgraphs in the subgraph set under preset conditions, the subgraphs that do not meet the expectations can be filtered out in a timely manner, avoiding the waste of resources and increased processing time caused by subsequent processing of the subgraphs that do not meet the expectations, which helps to improve processing efficiency.

[0064] Step 2033 , in response to determining that the number of sub-graphs in the sub-graph set that meet the preset condition is not less than a preset number threshold, selecting a number threshold number of sub-graphs from the sub-graph set that meet the preset condition.

[0065] In this step, the method of selecting sub-graphs from the sub-graph set that meets the preset conditions can be flexibly set. For example, a threshold number of sub-graphs can be randomly selected from the sub-graphs that meet the preset conditions.

[0066] For another example, the sub-images that meet the conditions can be sorted first to obtain the sorting results. Then, according to the obtained sorting results, the number of sub-images of the threshold value can be selected in sequence. As an example, the sub-images that meet the conditions can be sorted in order of similarity with the original image from large to small, and then the number of sub-images of the threshold value can be selected in order of similarity from large to small.

[0067] Step 2034: Generate thumbnails of the images using the selected sub-images.

[0068] In this step, for each selected sub-image, various existing thumbnail generation methods can be used to generate a thumbnail corresponding to the sub-image, thereby obtaining thumbnails corresponding to each selected sub-image.

[0069] For example, the thumbnail corresponding to the sub-image may be obtained based on the size transformation of the sub-image. For another example, the sub-image may be processed by using some existing applications for generating thumbnails to obtain the thumbnail corresponding to the sub-image.

[0070] Optionally, the above processing steps may also include: in response to determining that the number of sub-graphs that meet preset conditions in the sub-graph set is less than a preset number threshold, determining whether the number of unselected split numbers in the split number set is zero; in response to determining that the number of unselected split numbers in the split number set is not zero, re-selecting the minimum value from the unselected split numbers in the split number set, and using the re-selected minimum value as the target split number, and continuing to execute the above processing steps.

[0071] If the number of sub-images that meet the preset conditions in the current sub-image set is less than the number threshold, it can be indicated that the number threshold sub-images cannot be obtained, and the number threshold thumbnails cannot be generated. At this time, if there are still unselected split numbers in the split number set, the minimum value of the unselected split numbers can be selected as the target split number, and the above processing steps can be continued.

[0072] In other words, the number of splits is selected from the set of split numbers in order from small to large, so as to avoid splitting the image into too many sub-images, thereby making the thumbnail generated later present too partial image content.

[0073] Optionally, each time the image is split, the image may be split into equal parts, which can ensure that the size information of each sub-image in the sub-image set obtained each time is the same, thereby facilitating the subsequent image processing process.

[0074] Optionally, the above processing step may further include: in response to determining that the number of unselected split numbers in the split number set is zero, splitting the image to obtain a threshold number of sub-images, and generating thumbnails of the image using the obtained sub-images respectively.

[0075] If it is determined that the number of unselected split numbers in the split number is zero, it can be represented that the above threshold number of sub-images that meet the preset conditions cannot be obtained by splitting the image according to various split numbers. In this case, the threshold number can be directly used as the split number to split the image, and for each sub-image obtained by splitting, a thumbnail corresponding to the sub-image is generated to ensure the number of thumbnails generated.

[0076] Continue to see Figure 3 , Figure 3 FIG. 3 is an exemplary application scenario 300 of the method for generating thumbnails according to this embodiment. Figure 3 In the application scenario, the preset split number set may include two split numbers of 4 and 9, and the preset number threshold is 3. At this time, after acquiring the image 301, the image 301 may be divided into four equal parts to obtain four sub-images A1, A2, A3, and A4.

[0077] Afterwards, image recognition can be performed on the four sub-images A1, A2, A3, and A4 respectively to obtain the recognition results corresponding to the four sub-images A1, A2, A3, and A4 respectively. Then, it can be judged in turn whether the recognition results corresponding to the four sub-images A1, A2, A3, and A4 respectively meet the preset conditions. As shown in the figure, the recognition results corresponding to the two sub-images A1 and A2 respectively meet the preset conditions, while the recognition results corresponding to A3 and A4 respectively do not meet the preset conditions.

[0078] At this time, since the number of sub-images that meet the preset conditions is less than 3, the image 301 can be further divided into nine equal parts to obtain nine sub-images B1, B2, B3, B4, B5, B6, B7, B8, and B9. Afterwards, image recognition can be performed on the nine sub-images B1, B2, B3, B4, B5, B6, B7, B8, and B9 to obtain recognition results corresponding to each sub-image.

[0079] After that, it can be judged in turn whether the recognition results corresponding to the nine sub-graphs B1, B2, B3, B4, B5, B6, B7, B8, and B9 meet the preset conditions. As shown in the figure, the recognition results corresponding to the four sub-graphs B1, B2, B4, and B7 meet the preset conditions, while the recognition results corresponding to the five sub-graphs B3, B5, B6, B8, and B9 do not meet the preset conditions.

[0080] At this time, since the number of sub-images meeting the preset conditions is greater than 3, three sub-images B1, B2, and B4 can be selected to generate thumbnail B1 corresponding to sub-image B1, thumbnail B2 corresponding to sub-image B2, and thumbnail B4 corresponding to sub-image B4.

[0081] The method provided by the above-mentioned embodiment of the present disclosure splits the image to obtain multiple sub-images, and determines whether the number of sub-images that meet the preset conditions meets the preset quantity threshold. If it meets the requirements, a number threshold of sub-images are selected from the sub-images that meet the conditions to generate a thumbnail corresponding to the sub-image for each sub-image. If it does not meet the requirements, the image is split again to obtain more sub-images than the previous split, so as to select a number threshold of sub-images that meet the preset conditions, and then generate a number threshold of thumbnails. If the number threshold of sub-images that meet the preset conditions cannot be obtained by splitting the image at different scales, the image can be directly split according to the number threshold to obtain the number threshold of sub-images, and generate thumbnails corresponding to each sub-image.

[0082] Thus, a certain number of thumbnails can be obtained based on one image to avoid various problems caused by too few thumbnails. For example, in some application scenarios where thumbnails need to be generated and displayed, a certain number of thumbnails usually need to be displayed. In this case, problems such as page display errors caused by too few thumbnails may occur, and the method provided by the above embodiment of the present disclosure can effectively obtain a certain number of thumbnails that meet the preset conditions, thereby avoiding problems such as page display errors.

[0083] Further references Figure 4 , which shows a process 400 of another embodiment of a method for generating a thumbnail. The process 400 of the method for generating a thumbnail comprises the following steps:

[0084] Step 401, acquiring an image.

[0085] Step 402, determining a set of split quantity corresponding to the image.

[0086] Step 403, selecting the minimum value from the split quantity set as the target split quantity, and performing the following processing steps:

[0087] Step 4031, split the image into a target number of sub-images to obtain a sub-image set.

[0088] Step 4032, determine whether the number of sub-graphs in the sub-graph set that meet the preset conditions is less than a preset number threshold. If the number of sub-graphs in the sub-graph set that meet the preset conditions is not less than the preset number threshold, the following step 4033 may be executed. If the number of sub-graphs in the sub-graph set that meet the preset conditions is less than the preset number threshold, the following step 4035 may be executed.

[0089] Step 4033: Select a threshold number of sub-graphs from the sub-graph set that meet the preset conditions.

[0090] Step 4034, respectively generate thumbnails of the images using the selected sub-images.

[0091] Step 4035, determine whether the number of unselected split numbers in the split number set is zero. If the number of unselected split numbers in the split number set is not zero, the following step 4036 may be executed. If the number of unselected split numbers in the split number set is zero, the following step 4037 may be executed.

[0092] Step 4036, reselect the minimum value from the unselected split numbers in the split number set, and use the reselected minimum value as the target split number, and continue to execute the above processing steps 4031-4037.

[0093] Step 4037, split the image to obtain a threshold number of sub-images, and use the obtained sub-images to generate thumbnails of the image.

[0094] The specific execution process of the above steps 401, 402 and 403 can be referred to Figure 2 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0095] Step 404: Obtain description information of the image.

[0096] In this embodiment, the description information of the image may refer to relevant information used to describe the content presented by the image. The above execution subject may obtain the description information of the image from a local or other storage device.

[0097] The acquired image may be pre-set with corresponding description information. At this time, after acquiring the image, the description information of the image may be acquired according to the image. Of course, in some application scenarios, the description information of the image may be acquired while acquiring the image.

[0098] Step 405: Display the thumbnail and description information of the image.

[0099] In this embodiment, the generated thumbnail and the obtained description information can be displayed to the user. The thumbnail and description information of the image can be displayed by the above-mentioned execution subject, or the above-mentioned execution subject can first send the thumbnail and description information of the image to other terminal devices, so that the other terminal devices can display the received thumbnail and description information of the image.

[0100] Optionally, when displaying the thumbnail and description information of the image, the description information of the image can be presented as the context of the thumbnail of the image. As an example, when the content presented by the image is an item, the description information can be attribute information such as the name of the item. In this case, the description information of the item can be displayed to the user, and the generated thumbnail can be displayed below the description information.

[0101] from Figure 4 It can be seen that Figure 2 Compared with the corresponding embodiments, the method for generating thumbnails in this embodiment can further obtain description information of the image after generating the thumbnail of the image, and display the generated thumbnail and the obtained description information, so that the description information is presented as the context of the generated thumbnail, thereby matching a certain number of thumbnails for the description information of the image, avoiding display problems caused by too few thumbnails.

[0102] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for generating thumbnails, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0103] like Figure 5 As shown, the apparatus 500 for generating thumbnails provided in this embodiment includes an acquisition unit 501, a determination unit 502 and a processing unit 503. The acquisition unit 501 is configured to acquire an image; the determination unit 502 is configured to determine a split number set corresponding to the image; the processing unit 503 is configured to select a minimum value from the split number set as a target split number, and to perform the following processing steps: split the image into a target split number of sub-images to obtain a sub-image set; determine whether the number of sub-images in the sub-image set that meet the preset conditions is less than a preset number threshold; in response to determining that the number of sub-images in the sub-image set that meet the preset conditions is not less than a preset number threshold, select a number threshold of sub-images from the sub-image set that meet the preset conditions; and respectively use the selected sub-images to generate thumbnails of the image.

[0104] In the apparatus 500 for generating thumbnails in this embodiment, the specific processing of the acquisition unit 501, the determination unit 502 and the processing unit 503 and the technical effects thereof can be referred to in Figure 2The relevant descriptions of step 201, step 202 and step 203 in the corresponding embodiment are not repeated here.

[0105] In some optional implementations of the present embodiment, the above processing steps also include: in response to determining that the number of sub-graphs that meet preset conditions in the sub-graph set is less than a preset number threshold, determining whether the number of unselected split numbers in the split number set is zero; in response to determining that the number of unselected split numbers in the split number set is not zero, re-selecting the minimum value from the unselected split numbers in the split number set, and using the re-selected minimum value as the target split number, and continuing to execute the above processing steps.

[0106] In some optional implementations of the present embodiment, the above processing steps also include: in response to determining that the number of unselected splits in the split number set is zero, splitting the image to obtain a threshold number of sub-images, and generating thumbnails of the image using the obtained sub-images respectively.

[0107] In some optional implementations of the present embodiment, the processing unit is further configured to perform image recognition on each sub-image in the sub-image set to obtain a recognition result for each sub-image; and determine whether the number of sub-images in the sub-image set whose corresponding recognition results meet preset conditions is less than a preset number threshold.

[0108] In some optional implementations of this embodiment, the processing unit is further configured to equally split the image into a target number of sub-images.

[0109] In some optional implementations of this embodiment, the processing unit is further configured to determine a set of split quantity corresponding to the image according to size information of the image.

[0110] In some optional implementations of this embodiment, the above-mentioned acquisition unit is further configured to acquire description information of the image; the above-mentioned device also includes: a display unit, configured to display a thumbnail and description information of the image, wherein the description information is presented as the context of the thumbnail of the image.

[0111] The device provided by the above-mentioned embodiment of the present disclosure acquires an image through an acquisition unit; a determination unit determines a split number set corresponding to the image; a processing unit selects a minimum value from the split number set as a target split number, and performs the following processing steps: splits the image into a target split number of sub-images to obtain a sub-image set; determines whether the number of sub-images in the sub-image set that meet the preset conditions is less than a preset number threshold; in response to determining that the number of sub-images in the sub-image set that meet the preset conditions is not less than a preset number threshold, selects a number threshold of sub-images from the sub-image set that meet the preset conditions; and generates thumbnails of the image using the selected sub-images respectively. Thus, based on image splitting, multiple thumbnails that meet the preset conditions can be generated according to one image, thereby effectively increasing the number of thumbnails, and thus avoiding various problems caused by too few thumbnails.

[0112] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of the server in (a) 600. Figure 6 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0113] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0114] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0115] 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 contains 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 device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0116] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage 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 storage 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 embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. 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 storage medium, which may 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 suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0117] The computer-readable medium may be included in the server; or it may exist independently without being assembled into the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: obtains an image; determines a split number set corresponding to the image; selects a minimum value from the split number set as a target split number, and performs the following processing steps: splits the image into a target split number of sub-images to obtain a sub-image set; determines whether the number of sub-images in the sub-image set that meet the preset conditions is less than a preset number threshold; in response to determining that the number of sub-images in the sub-image set that meet the preset conditions is not less than a preset number threshold, selects a number threshold of sub-images from the sub-image set that meet the preset conditions; and generates thumbnails of the image using the selected sub-images.

[0118] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0119] 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 disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / 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.

[0120] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit, a determination unit, and a processing unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit for acquiring an image".

[0121] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.

Claims

1. A method for generating a thumbnail, comprising: Get the image; Determine a split quantity set corresponding to the image; A minimum value is selected from the split number set as the target split number, and the following processing steps are performed: the image is split into the target split number of sub-images to obtain a sub-image set; and the number of sub-images in the sub-image set that meet the preset conditions is determined to be less than a preset number threshold; In response to determining that the number of sub-images in the sub-image set that meet the preset conditions is not less than a preset number threshold, selecting the number threshold number of sub-images from the sub-images in the sub-image set that meet the preset conditions; and generating thumbnails of the image using the selected sub-images respectively.

2. The method according to claim 1, wherein: The processing steps also include: In response to determining that the number of subgraphs meeting a preset condition in the subgraph set is less than a preset number threshold, determining whether the number of unselected split numbers in the split number set is zero; In response to determining that the number of unselected split numbers in the split number set is not zero, reselecting the minimum value from the unselected split numbers in the split number set, and using the reselected minimum value as the target split number, continuing to execute the processing steps.

3. The method according to claim 2, wherein: The processing steps also include: In response to determining that the number of unselected split numbers in the split number set is zero, splitting the image to obtain the threshold number of sub-images, and generating thumbnails of the image using the obtained sub-images respectively.

4. The method according to claim 1, wherein: After splitting the image into a target number of sub-graphs to obtain a sub-graph set, the method further includes: Performing image recognition on each sub-image in the sub-image set to obtain a recognition result of each sub-image; and The determining whether the number of sub-graphs in the sub-graph set that meet the preset condition is less than a preset number threshold comprises: It is determined whether the number of sub-graphs in the sub-graph set whose corresponding recognition results meet the preset conditions is less than a preset number threshold.

5. The method according to claim 1, wherein: The step of splitting the image into a target number of sub-images comprises: The image is equally divided into a target number of sub-images.

6. The method according to claim 1, wherein: The step of determining a split quantity set corresponding to the image comprises: According to the size information of the image, a split quantity set corresponding to the image is determined.

7. The method according to claim 1, wherein: The method further comprises: Obtaining description information of the image; A thumbnail of the image and the description information are displayed, wherein the description information is presented as a context of the thumbnail of the image.

8. A device for generating a thumbnail, comprising: an acquisition unit configured to acquire an image; A determination unit, configured to determine a split quantity set corresponding to the image; The processing unit is configured to select a minimum value from the split number set as a target split number, and perform the following processing steps: split the image into the target split number of sub-images to obtain a sub-image set; determine whether the number of sub-images in the sub-image set that meet the preset conditions is less than a preset number threshold; In response to determining that the number of sub-images in the sub-image set that meet the preset conditions is not less than a preset number threshold, selecting the number threshold number of sub-images from the sub-images in the sub-image set that meet the preset conditions; and generating thumbnails of the image using the selected sub-images respectively.

9. A server, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Thumbnail display method and device

    CN103310005A

  • Method for viewing photos in photo album and mobile terminal

    CN106156313A

  • User terminal and panoramic picture dynamic thumbnail generating method

    CN106485653A

  • Image recording and reproducing device and method, and recording medium

    JP2001298711A

  • Information storage medium, information retrieval method, information recording method, and information retrieval device

    JP4489153B1