Image recommendation methods, devices, electronic devices and storage media

By receiving image selection input, obtaining image parameters and semantic information, determining image weight information, and recommending relevant images based on relevance, the system solves the problem of cumbersome operation when users share multiple images and improves the user experience.

CN116010637BActive Publication Date: 2026-03-06VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-09
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

When sharing multiple images, the user experience is cumbersome and poor, especially when there are many images in the album, making it difficult to quickly find the desired image.

Method used

By receiving image selection input, image parameters and semantic information are obtained, image weight information is determined, and relevant images are recommended based on relevance, reducing the user's search operations in the photo album.

Benefits of technology

It simplifies the process of selecting images in the album, improves the user experience, and increases the efficiency of image sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010637B_ABST
    Figure CN116010637B_ABST
Patent Text Reader

Abstract

This application discloses an image recommendation method, apparatus, electronic device, and storage medium, belonging to the field of artificial intelligence related technology. The method includes: receiving a first selection input for a first image in an image set; responding to the first selection input, acquiring first image information of the first image, the first image information including image parameter information and image semantic information; determining first weight information of the first image based on the first image information; determining the correlation between the second image and the first image based on the first weight information and the second image information of a second image, or based on the first weight information, third weight information, and the second image information of the second image, wherein the second image is an image in the image set other than the first image, the third weight information is related to a second selection input, and the second selection input is an input for a third image in the image set; and recommending corresponding images to the user based on the correlation between the second image and the first image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence-related technology, specifically relating to an image recommendation method, apparatus, electronic device, and storage medium. Background Technology

[0002] Currently, with the development of internet technology, people are increasingly inclined to communicate through various applications on mobile phones or other devices. When communicating through these applications, people often need to share multiple images from their phones, such as during chats, posting on social media, or meetings.

[0003] Currently, the main approach is for users to manually select the images they want to share during chats, posting on social media, or meetings. However, when there are many images to share, users need to constantly flip through pages in their albums to find the relevant images. When there are many images in the album, the user's operation is very cumbersome, and it is not easy to find the image they want to share among many images, resulting in a poor user experience. Summary of the Invention

[0004] The purpose of this application is to provide an image recommendation method, apparatus, electronic device, and storage medium that can solve the problem of cumbersome user operations and poor user experience when sharing multiple images.

[0005] In a first aspect, embodiments of this application provide an image recommendation method, the method comprising: receiving a first selection input for a first image in an image set; in response to the first selection input, acquiring first image information of the first image, the first image information including image parameter information and image semantic information; determining first weight information of the first image based on the first image information; determining the relevance between the second image and the first image based on the first weight information and second image information of a second image, or based on the first weight information, third weight information and second image information of the second image, wherein the second image is an image in the image set other than the first image, the third weight information is related to a second selection input, the second selection input being an input for a third image in the image set; and recommending corresponding images to a user based on the relevance between the second image and the first image.

[0006] Secondly, embodiments of this application provide an image recommendation device, comprising: a first receiving module for receiving a first selection input for a first image in an image set; a first response module for acquiring first image information of the first image in response to the first selection input, the first image information including image parameter information and image semantic information; a first determining module for determining first weight information of the first image based on the first image information; a second determining module for determining the relevance between the second image and the first image based on the first weight information and second image information of the second image, or based on the first weight information, third weight information, and second image information of the second image, wherein the second image is an image in the image set other than the first image, the third weight information is related to a second selection input, and the second selection input is an input for a third image in the image set; and a third determining module for recommending corresponding images to the user based on the relevance between the second image and the first image.

[0007] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0009] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.

[0010] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.

[0011] In this embodiment, in response to the selection input of a first image, a first weight information of the first image is determined based on the image information of the first image. Then, based on the first weight information and the second image information of other unselected second images in the image set, or the first weight information, the second image information, and the determined relevance between the unselected images and the selected multiple images, an image is determined to be recommended to the user based on this relevance. In this way, when selecting an image, the user does not need to search through their photo album; other images with high relevance to the selected image are automatically recommended, simplifying the user's operation and improving the user experience. Attached Figure Description

[0012] Figure 1 This is a flowchart of an image recommendation method provided in an embodiment of this application;

[0013] Figure 2 This is a schematic diagram of the structure of an image recommendation device provided in an embodiment of this application;

[0014] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0015] Figure 4 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0017] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0018] The image recommendation method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0019] Please refer to Figure 1This is a flowchart of an image recommendation method provided in an embodiment of this application. Figure 1 As shown, the method may include steps S11 to S15, which will be described in detail below.

[0020] Step S11: Receive the first selection input for the first image in the image set.

[0021] Step S12: In response to the first selection input, first image information of the first image is obtained, the first image information including image parameter information and image semantic information.

[0022] In one example of this embodiment, the image set can be the user's photo album, and the first image is the image selected by the user from the image set. The number of the first images can be one or more.

[0023] In one example of this embodiment, the image information includes image parameter information and image semantic information.

[0024] In one example of this embodiment, the image parameter information may include the image's Exif (Exchangeable image file format) information, where Exif information may include GPS shooting location, shooting time, environmental information, image orientation, resolution information, exposure time, etc.

[0025] In one example of this embodiment, semantic information in an image can be obtained through image classification algorithms, face recognition algorithms, or text recognition algorithms. For example, through image classification algorithms, semantic information in an image can be obtained, including the sky, grass, cat, dog, car, etc., or through face recognition algorithms, the faces in the image can be identified as Zhang San, Li Si, or Wang Wu, etc.

[0026] In one example of this embodiment, image parameter information and image semantic information of the image can be obtained after the image is captured or when the device is charging, and then stored in the database.

[0027] Step S13: Determine the first weight information of the first image based on the first image information.

[0028] In one example of this embodiment, determining the first weight information of the first image based on the first image information includes: determining the weight information of each element in each dimension of the first image information; and using the weight matrix composed of the weight information of each element in each dimension of the first image information as the first weight information of the first image.

[0029] In one example of this embodiment, determining the weight information of each element in each dimension of the first image information includes: using the ratio of the total number of dimensions in the first image information to the number of target dimensions in the first image as the weight information of the target dimension between dimensions, wherein the target dimension is any dimension; using the ratio of the number of target elements in the target dimension to the total number of elements in the target dimension as the weight information of the target element within the target dimension; the target element is any element in the target dimension; and using the product of the weight information of the target dimension between dimensions and the weight information of the target element within the target dimension as the weight information of the target element.

[0030] In one example of this embodiment, the dimensions in the image information of the first image refer to the various types of image information. Specifically, for example, the dimensions in the image information may include the shooting location, shooting date, etc., from the image parameter information. They may also include various categories from the image semantic information, such as people, animals, environment, etc.

[0031] It should be noted that although specific examples of dimensions are provided in the examples, those skilled in the art will understand that this disclosure is not limited thereto, and those skilled in the art can set the dimensions of image information as appropriate according to the actual situation.

[0032] In one example of this embodiment, one dimension of the image information of the first image may contain one or more image elements. For example, in the shooting location dimension, the first image may only contain the same shooting location, such as "Beijing," then this dimension only includes the element "Beijing." In another example, in the shooting location dimension, the first image may contain three different shooting locations, such as "Beijing," "Shanghai," and "Shenzhen," then the elements in this dimension would include "Beijing," "Shanghai," and "Shenzhen."

[0033] In one example of this embodiment, the weight information of each element in each dimension can be determined based on the image information of the first image. Specifically, the formula for the weight information Nm of any element in the image information of the first image is:

[0034] Nm= (num(N) / num(n))*(num(m) / num(M))

[0035] Where num(n) is the number of times dimension n appears in the image information of the first image, and num(N) is the total number of dimensions that appear in the image information of the first image. num(N) / num(n) represents the weight information of dimension n among the dimensions, that is, the importance of dimension n in the dimensions. Generally speaking, the dimension of shooting location appears in almost every photo, so the influence of this dimension on the correlation is relatively low compared to other dimensions. The rarer the dimension, the greater its contribution to the correlation.

[0036] num(m) is the number of elements m in dimension n, num(M) is the total number of all elements in dimension n, and num(m) / num(M) is the weight information of element m in dimension n, that is, the importance of element m. The more identical elements there are, the greater the contribution to the relevance. For example, in the dimension of shooting location, the element "Shenzhen" appears twice and the element "Guangzhou" appears once. Then the weight information of Shenzhen in the dimension is 2 / 3 and that of Guangzhou is 1 / 3.

[0037] Then, the weight information of the target element m is obtained by multiplying the weight information of the target element within the target dimension with the weight information of the target dimension across dimensions. After calculating the weight information of each element in each dimension of the image information of the first image, the weight matrix composed of the weight information of each element in each dimension can be used as the first weight information of the first image.

[0038] Step S14: Determine the correlation between the second image and the first image based on the first weight information and the second image information of the second image, or based on the first weight information, the third weight information and the second image information of the second image. The second image is an image in the image set other than the first image. The third weight information is related to the second selection input, which is the input for the third image in the image set.

[0039] In one example of this embodiment, the second image is the image that was not selected in the user's image set, that is, the image other than the first image. The image information of each unselected image can be specified down to each element and represented in the form of a matrix. After obtaining the matrix of the first weight information, it can be multiplied by the image information matrix of each second image to obtain the correlation between each unselected image and the selected multiple images.

[0040] In one example of this embodiment, determining the correlation between the second image and the first image based on the first weight information, the third weight information, and the second image information of the second image includes: determining fourth weight information based on the third weight information, wherein the fourth weight information is the sum of the first product and the second product, the first product is the product of a preset first reference value and a first ratio, the second product is the product of the third weight information and the first ratio, and the first ratio is the ratio of the preset second reference value to the number of historically selected images; determining the third weight, wherein the third weight is the product of the preset third reference value and the first ratio; and determining the correlation between the second image and the first image based on the first weight information, the fourth weight information, the number of images in the third image, the third weight, and the second image information.

[0041] In one example of this embodiment, the second selection input can be the input from the previous selection of an image in the image set, which is the first selection input. The third image is the image that the user previously selected in the image set, and the number of images can be one or more. The third weight information can be determined based on the image information of the third image. The specific determination method is similar to that of the first weight information. The weight matrix composed of the weight information of each element in each dimension of the image information of the third image can be used as the third weight information.

[0042] In one example of this embodiment, after determining the third weight information, a fourth weight information can also be determined based on the third weight information. The fourth weight information represents the historical weight information when the user selects the third image in the image set using the second selection input.

[0043] In one example of this embodiment, the fourth weight information can be iterated based on the historical weight information from the previous image selection when the third image was selected, and calculated using formula (1):

[0044] = * / ( + )+ / ( + (1)

[0045] in, This is the fourth weighted information. The first reference value can be historical weight information from the previous image selection. In this example, it's the historical reference information from the previous selection of the third image. When selecting an image for the first time, the first reference value can be set to an initial value, such as 0. This serves as a second reference information, which could be the number of images selected in the previous iteration. + The number of images selected in the past, after the current image selection. It will also be updated accordingly. N is the third weight information. / ( + The first ratio is the proportion of the number of images selected in the previous selection to the total number of images in the history of multiple image selections, and N is the third weight information.

[0046] In one example of this embodiment, the third weight is the weight of the fourth weight information, that is, the weight of the historical weight information. The weight of the historical weight information of the selected image can be iterated based on the weight of the historical weight information when the image was selected in the previous time. Specifically, it is calculated by formula (2):

[0047] = / ( + (2)

[0048] in, As the third weight, The third reference value is the weight of the historical weight information from the previous image selection.

[0049] In one example of this embodiment, determining the correlation between the second image and the first image based on the first weight information, the fourth weight information, the number of images in the third image, the third weight, and the second image information includes: determining the second weight information of the first image based on the first weight information, the fourth weight information, and the number of images in the third image; determining the first weight based on the third weight; determining the second weight based on the first weight; determining the correlation parameter of the first image based on the first weight information, the second weight information, the first weight, and the second weight; and determining the correlation between the second image and the first image based on the correlation parameter and the second image information.

[0050] In one example of this embodiment, determining the second weight information of the first image based on the first weight information, the fourth weight information, and the number of images in the third image includes: determining the sum of the third product and the fourth product based on the first weight information and the fourth weight information, wherein the third product is the product of the fourth weight information and the second ratio, the fourth product is the product of the first weight information and the second ratio, and the second ratio is the ratio of the number of images in the third image to the number of images selected in the past; and using the sum of the third product and the fourth product as the second weight information.

[0051] In one example of this embodiment, the method for determining the second weight information is the same as that for determining the fourth weight information; specifically, the fourth weight information is used as historical weight information. The first weight information is taken as N, and the number of the third image is taken as N. Iteratively determined in formula (1).

[0052] In one example of this embodiment, determining the first weight based on the third weight includes: determining the first weight by multiplying the third weight by the second ratio, where the second ratio is the ratio of the number of images in the third image to the number of images selected in the past; determining the second weight based on the first weight includes: determining the second weight by the difference between 1 and the first weight.

[0053] In one example of this embodiment, after determining the second weight information, the weight of the first weight information, i.e., the first weight, can be further determined. Specifically, the third weight can be used as the weight of the historical weight information from the previous image selection. Iteratively determined in formula (2).

[0054] In one example of this embodiment, after determining the first weight, the weight 1 of the second weight information can be determined. That is, the second weight.

[0055] In one example of this embodiment, the correlation parameters of the first image are determined based on the first weight information, the second weight information, the first weight, and the second weight, including: using the sum of the fifth product and the sixth product as the correlation parameters of the first image, where the fifth product is the product of the first weight and the first weight information, and the sixth product is the product of the second weight and the second weight information.

[0056] After determining the first and second weights of the selected images, the correlation parameter S of the selected images can be further determined, which is calculated by formula (3):

[0057] (3)

[0058] in, As the first weight, As the second weight, As the first weighted information, This is the second weighted information.

[0059] After determining the correlation parameters of multiple images Then, the correlation parameters can be multiplied by the image information matrix of each second image to obtain the correlation between each unselected image and the selected multiple images.

[0060] In this example, when determining the relevance of other images to multiple images, the user's historical selection habits when selecting multiple images can also be considered. Based on the second weight information, which reflects the image information of all multiple images that the user has selected in the past, and the corresponding weights, the relevance of the unselected images to the multiple images selected this time can be determined more accurately.

[0061] Step S15: Based on the correlation between the second image and the first image, recommend corresponding images to the user.

[0062] In one example of this embodiment, after determining the relevance of each unselected image to the multiple selected images, it is possible to determine which images to recommend to the user. Specifically, all unselected images can be arranged in descending order of relevance and displayed on the screen for the user to choose from.

[0063] In this example, in response to the input of selecting a first image, a first weight information for the first image is determined based on its image information. Then, based on the first weight information and the second image information of other unselected second images in the image set, or the first weight information, the second image information, and the determined relevance between the unselected images and the selected multiple images, an image is recommended to the user based on this relevance. In this way, when selecting an image, the user does not need to search through their photo album; other images with high relevance to the selected image are automatically recommended, simplifying the user's operation and improving the user experience.

[0064] In one example of this embodiment, determining the correlation between the second image and the first image based on the first weight information and the second image information includes: determining the fifth weight information of all images in the image set based on the image information of all images in the image set; determining the first weight and the second weight of the first image; determining the correlation parameter of the first image based on the first weight information, the fifth weight information, the first weight, and the second weight; and determining the correlation between the second image and the first image based on the correlation parameter and the second image information.

[0065] In one example of this embodiment, image information of all images in the album can be obtained. The image information of the entire image includes first image information and second image information. Specifically, the method for determining the weight information of each element in each dimension of the image information of all images, i.e., the fifth weight information, is the same as the method for determining the first weight information. For reference, see the embodiment for determining the weight information of each element in each dimension of the first image information of the first image selected by the user, which will not be elaborated on here.

[0066] In one example of this embodiment, after determining the fifth weight information, the correlation parameters of multiple images can be determined based on the first weight information, the fifth weight information, the first weight, and the second weight. Specifically, similar to the embodiment of determining the correlation parameters based on the second weight information, the sum of the product of the first weight and the first weight information, and the product of the second weight and the fifth weight information, is taken as the correlation parameter S of the first image, as shown in formula (4):

[0067]

[0068] in, As the first weight, , is the second weight. This is the fifth weighted information.

[0069] In this example, when determining the relevance of other images to multiple images, the user's saving preferences for all saved images in their album can also be considered. Based on the third weight information reflecting the image information of all images saved in the user's album, and the corresponding weights, the relevance of the unselected images to the multiple images selected this time can be determined more accurately.

[0070] The image recommendation method provided in this application can be executed by an image recommendation device. This application uses an image recommendation device executing the image recommendation method as an example to illustrate the image recommendation device provided in this application.

[0071] Corresponding to the above embodiments, see [link to relevant documentation]. Figure 2 This application embodiment also provides an image recommendation device 100, including: a first receiving module 101, configured to receive a first selection input for a first image in an image set; a first response module 102, configured to obtain first image information of the first image in response to the first selection input, the first image information including image parameter information and image semantic information; a first determining module 103, configured to determine first weight information of the first image based on the first image information; a second determining module 104, configured to determine the correlation between the second image and the first image based on the first weight information and the second image information of the second image, or based on the first weight information, the third weight information and the second image information of the second image, wherein the second image is an image in the image set other than the first image, the third weight information is related to the second selection input, and the second selection input is an input for a third image in the image set; and a third determining module 105, configured to recommend corresponding images to the user based on the correlation between the second image and the first image.

[0072] Optionally, the first determining module includes: a first determining submodule, used to determine the weight information of each element in each dimension of the first image information; and a weight information submodule, used to take the weight matrix composed of the weight information of each element in each dimension of the first image information as the first weight information of the first image.

[0073] Optionally, the first determining submodule is specifically used to: take the ratio of the total number of dimensions in the first image information to the number of target dimensions in the first image as the weight information of the target dimension among dimensions, wherein the target dimension is any dimension; take the ratio of the number of target elements in the target dimension to the total number of elements in the target dimension as the weight information of the target element within the target dimension; the target element is any element in the target dimension; and take the product of the weight information of the target dimension among dimensions and the weight information of the target element within the target dimension as the weight information of the target element.

[0074] Optionally, the second determining module includes: a second determining submodule, configured to determine fourth weight information based on third weight information, wherein the fourth weight information is the sum of a first product and a second product, the first product is the product of a preset first reference value and a first ratio, the second product is the product of the third weight information and the first ratio, and the first ratio is the ratio of a preset second reference value to the number of historically selected images; a third determining submodule, configured to determine a third weight, wherein the third weight is the product of a preset third reference value and the first ratio; and a fourth determining submodule, configured to determine the correlation between the second image and the first image based on the first weight information, the fourth weight information, the number of images in the third image, the third weight, and the image information of the second image.

[0075] Optionally, the fourth determining submodule is specifically used to: determine the second weight information of the first image based on the first weight information, the fourth weight information, and the number of images in the third image; determine the first weight based on the third weight; determine the second weight based on the first weight; determine the correlation parameter of the first image based on the first weight information, the second weight information, the first weight, and the second weight; and determine the correlation between the second image and the first image based on the correlation parameter and the second image information.

[0076] Optionally, determining the second weight information of the first image based on the first weight information, the fourth weight information, and the number of images in the third image includes: determining the sum of the third product and the fourth product based on the first weight information and the fourth weight information, wherein the third product is the product of the fourth weight information and the second ratio, the fourth product is the product of the first weight information and the second ratio, and the second ratio is the ratio of the number of images in the third image to the number of images selected in the past; and using the sum of the third product and the fourth product as the second weight information.

[0077] Optionally, determining the first weight based on the third weight includes: determining the first weight by multiplying the third weight by the second ratio, where the second ratio is the ratio of the number of images in the third image to the number of images selected in the past; determining the second weight based on the first weight includes: determining the second weight by the difference between 1 and the first weight.

[0078] Optionally, the correlation parameters of the first image are determined based on the first weight information, the second weight information, the first weight, and the second weight, including: using the sum of the fifth product and the sixth product as the correlation parameters of the first image, where the fifth product is the product of the first weight and the first weight information, and the sixth product is the product of the second weight and the second weight information.

[0079] Optionally, the second determining module includes: a fifth determining submodule, used to determine the fifth weight information of all images in the image set based on the image information of all images in the image set; a sixth determining submodule, used to determine the first weight and the second weight of the first image; a seventh determining submodule, used to determine the correlation parameter of the first image based on the first weight information, the fifth weight information, the first weight, and the second weight; and an eighth determining submodule, used to determine the correlation between the second image and the first image based on the correlation parameter and the second image information.

[0080] In this example, an apparatus is provided that, in response to a selection input of a first image, determines first weight information of the first image based on image information of the first image, and determines the relevance between the unselected images and the selected multiple images based on the first weight information and second image information of other unselected second images in a set of images, or the first weight information, the second image information, and the determined relevance between the unselected images and the selected multiple images, and determines images to recommend to the user based on the relevance. In this way, when selecting an image, the user does not need to search through their photo album; other images with high relevance to the selected image can be automatically recommended to the user, simplifying the user's operation and improving the user experience.

[0081] The image recommendation device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0082] The image recommendation device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0083] The image recommendation device provided in this application embodiment can implement the various processes implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0084] Corresponding to the above embodiments, optionally, as... Figure 3 As shown, this application embodiment also provides an electronic device 800, including a processor 801 and a memory 802. The memory 802 stores a program or instructions that can run on the processor 801. When the program or instructions are executed by the processor 801, they implement the various steps of the above-described image recommendation method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0085] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0086] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0087] The electronic device 900 includes, but is not limited to, components such as: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.

[0088] Those skilled in the art will understand that the electronic device 900 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 910 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0089] The processor 910 is configured to receive a first selection input for a first image in an image set; in response to the first selection input, acquire first image information of the first image, the first image information including image parameter information and image semantic information; determine first weight information of the first image based on the first image information; determine the correlation between the second image and the first image based on the first weight information and the second image information of a second image, or based on the first weight information, the third weight information, and the second image information of the second image, wherein the second image is an image in the image set other than the first image, the third weight information is related to a second selection input, the second selection input being an input for a third image in the image set; and recommend corresponding images to the user based on the correlation between the second image and the first image.

[0090] Optionally, determining the first weight information of the first image based on the first image information includes: determining the weight information of each element in each dimension of the first image information; and using the weight matrix composed of the weight information of each element in each dimension of the first image information as the first weight information of the first image.

[0091] Optionally, determining the weight information of each element in each dimension of the first image information includes: using the ratio of the total number of dimensions in the first image information to the number of target dimensions in the first image as the weight information of the target dimension between dimensions, wherein the target dimension is any dimension; using the ratio of the number of target elements in the target dimension to the total number of elements in the target dimension as the weight information of the target element within the target dimension; wherein the target element is any element in the target dimension; and using the product of the weight information of the target dimension between dimensions and the weight information of the target element within the target dimension as the weight information of the target element.

[0092] Optionally, determining the correlation between the second image and the first image based on the first weight information, the third weight information, and the second image information of the second image includes: determining fourth weight information based on the third weight information, wherein the fourth weight information is the sum of a first product and a second product, the first product is the product of a preset first reference value and a first ratio, the second product is the product of the third weight information and the first ratio, and the first ratio is the ratio of a preset second reference value to the number of historically selected images; determining a third weight, wherein the third weight is the product of a preset third reference value and the first ratio; and determining the correlation between the second image and the first image based on the first weight information, the fourth weight information, the number of images in the third image, the third weight, and the second image information.

[0093] Optionally, determining the correlation between the second image and the first image based on the first weight information, the fourth weight information, the number of images in the third image, the third weight, and the second image information includes: determining second weight information of the first image based on the first weight information, the fourth weight information, and the number of images in the third image; determining a first weight based on the third weight; determining a second weight based on the first weight; determining a correlation parameter of the first image based on the first weight information, the second weight information, the first weight, and the second weight; and determining the correlation between the second image and the first image based on the correlation parameter and the second image information.

[0094] Optionally, determining the second weight information of the first image based on the first weight information, the fourth weight information, and the number of images in the third image includes: determining the sum of a third product and a fourth product based on the first weight information and the fourth weight information, wherein the third product is the product of the fourth weight information and a second ratio, the fourth product is the product of the first weight information and a second ratio, and the second ratio is the ratio of the number of images in the third image to the number of historically selected images; and using the sum of the third product and the fourth product as the second weight information.

[0095] Optionally, determining the first weight based on the third weight includes: determining the first weight by multiplying the third weight by the second ratio, where the second ratio is the ratio of the number of images in the third image to the number of images selected in the past; determining the second weight based on the first weight includes: determining the second weight by the difference between 1 and the first weight.

[0096] Optionally, determining the relevance parameter of the first image based on the first weight information, the second weight information, the first weight, and the second weight includes: using the sum of the fifth product and the sixth product as the relevance parameter of the first image, wherein the fifth product is the product of the first weight and the first weight information, and the sixth product is the product of the second weight and the second weight information.

[0097] Optionally, determining the correlation between the second image and the first image based on the first weight information and the second image information includes: determining the fifth weight information of all images in the image set based on the image information of all images in the image set; determining the first weight and the second weight of the first image; determining the correlation parameter of the first image based on the first weight information, the fifth weight information, the first weight, and the second weight; and determining the correlation between the second image and the first image based on the correlation parameter and the second image information.

[0098] In this example, an electronic device is provided that, in response to a selection input of a first image, determines first weight information of the first image based on the image information of the first image, and determines the relevance between the first weight information and unselected second images in a set of images, or the first weight information, the second image information, and the selected multiple images, based on the determined relevance, and determines images to recommend to the user based on this relevance. In this way, when selecting an image, the user does not need to search through their photo album; other images with high relevance to the selected image can be automatically recommended, simplifying the user's operation and improving the user experience.

[0099] It should be understood that, in this embodiment, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The GPU 9041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 907 includes a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.

[0100] The memory 909 can be used to store software programs and various data. The memory 909 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 909 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 909 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0101] Processor 910 may include one or more processing units; optionally, processor 910 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 910.

[0102] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described image recommendation method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0103] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0104] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described image recommendation method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0105] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0106] This application provides a computer program product stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-described image recommendation method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0107] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0109] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An image recommendation method characterized by, The method comprises: receiving a first selection input for a first image in an image set; in response to the first selection input, obtaining first image information of the first image, the first image information comprising image parameter information and image semantic information; determining first weight information of the first image according to the first image information; determining a relevance between the second image and the first image according to the first weight information and second image information of the second image, or according to the first weight information, third weight information and second image information of the second image, wherein the second image is an image other than the first image in the image set, the third weight information is related to a second selection input, and the second selection input is an input for a third image in the image set; recommending a corresponding image to a user based on the relevance between the second image and the first image. The determining of the first weight information of the first image according to the first image information comprises: taking a ratio of a total number of dimensions in the first image information to a number of target dimensions in the first image as weight information of the target dimensions among the dimensions, wherein the target dimensions are any dimensions; taking a ratio of a number of target elements in the target dimensions to a total number of elements in the target dimensions as weight information of the target elements within the target dimensions, wherein the target elements are any elements in the target dimensions; taking a product of the weight information of the target dimensions among the dimensions and the weight information of the target elements within the target dimensions as weight information of the target elements; and taking a weight matrix composed of weight information of each element in each dimension of the first image information as the first weight information of the first image.

2. The method of claim 1, wherein, The determining of the relevance between the second image and the first image according to the first weight information, third weight information and second image information of the second image comprises: determining fourth weight information according to the third weight information, wherein the fourth weight information is a sum of a first product and a second product, the first product is a product of a preset first reference value and a first ratio, the second product is a product of the third weight information and the first ratio, and the first ratio is a ratio of a preset second reference value to a number of images that have been selected historically; determining a third weight, wherein the third weight is a product of a preset third reference value and the first ratio; determining the relevance between the second image and the first image according to the first weight information, the fourth weight information, a number of images of the third image, the third weight and the second image information.

3. The method of claim 2, wherein, The determining of the relevance between the second image and the first image according to the first weight information, the fourth weight information, a number of images of the third image, the third weight and the second image information comprises: determining second weight information of the first image according to the first weight information, the fourth weight information and the number of images of the third image; determining a first weight according to the third weight; determining a second weight according to the first weight; determining a relevance parameter of the first image according to the first weight information, the second weight information, the first weight and the second weight; determining the relevance of the second image to the first image according to the relevance parameter and the second image information.

4. The method of claim 3, wherein, The determining the second weight information of the first image according to the first weight information, the fourth weight information and the number of images of the third image comprises: determining a sum of a third product and a fourth product according to the first weight information and the fourth weight information, wherein the third product is a product of the fourth weight information and a second ratio, the fourth product is a product of the first weight information and the second ratio, and the second ratio is a ratio of the number of images of the third image to the number of images selected in history; taking the sum of the third product and the fourth product as the second weight information.

5. The method of claim 3, wherein, The determining the first weight according to the third weight comprises: determining a product of the third weight and a second ratio as the first weight, and the second ratio is a ratio of the number of images of the third image to the number of images selected in history. The determining the second weight according to the first weight comprises: determining a difference between 1 and the first weight as the second weight.

6. The method of claim 3, wherein, The determining the relevance parameter of the first image according to the first weight information, the second weight information, the first weight and the second weight comprises: taking a sum of a fifth product and a sixth product as the relevance parameter of the first image, the fifth product is a product of the first weight and the first weight information, and the sixth product is a product of the second weight and the second weight information.

7. The method of claim 1, wherein, The determining the relevance of the second image to the first image according to the first weight information and the second image information comprises: determining fifth weight information of all images in the image set according to image information of all images in the image set; determining a first weight and a second weight of the first image; determining a relevance parameter of the first image according to the first weight information, the fifth weight information, the first weight and the second weight; determining the relevance of the second image to the first image according to the relevance parameter and the second image information.

8. An image recommendation apparatus characterized by comprising: comprises: a first receiving module configured to receive a first selection input for a first image in an image set; a first response module configured to acquire first image information of the first image in response to the first selection input, the first image information comprising image parameter information and image semantic information; a first determining module configured to determine first weight information of the first image according to the first image information; a second determining module configured to determine the relevance of the second image to the first image according to the first weight information and second image information of the second image, or according to the first weight information, third weight information and second image information of the second image, wherein the second image is an image in the image set other than the first image, the third weight information is related to a second selection input, and the second selection input is an input for a third image in the image set; a third determining module configured to recommend a corresponding image to a user based on the relevance of the second image to the first image; wherein the first determining module is configured to take the ratio of the total number of dimensions in the first image information to the number of target dimensions in the first image as the weight information of the target dimensions among the dimensions, wherein the target dimensions are any dimensions; take the ratio of the number of target elements in the target dimensions to the total number of elements in the target dimensions as the weight information of the target elements within the target dimensions, wherein the target elements are any elements in the target dimensions; take the product of the weight information of the target dimensions among the dimensions and the weight information of the target elements within the target dimensions as the weight information of the target elements; and take the weight matrix composed of the weight information of each element in each dimension of the first image information as the first weight information of the first image.

9. An electronic device, comprising: A processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions being executed by the processor to implement the steps of the image recommendation method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The readable storage medium stores programs or instructions, the programs or instructions being executed by the processor to implement the steps of the image recommendation method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Method for selecting image and apparatus therefor

    CN113286040A