User recommendation method and device, electronic equipment and computer readable storage medium

By calculating the similarity score between user images, and utilizing Siamese convolutional networks and random forest models, combined with the harmonic mean algorithm, the problem of low accuracy in existing user recommendation systems is solved, achieving more efficient user recommendation.

CN115495644BActive Publication Date: 2026-04-17BEIJING QINGSONG YIKANG INFORMATION TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING QINGSONG YIKANG INFORMATION TECHNOLOGY CO LTD
Filing Date
2022-07-25
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing user recommendation systems suffer from low accuracy due to considering only one factor.

Method used

By obtaining the similarity score of users' images, calculating the bidirectional preference score, and using Siamese convolutional networks and random forest models, combined with the harmonic mean algorithm, the degree of bidirectional preference between users is determined, and recommendations are made.

Benefits of technology

It improves the accuracy and efficiency of user recommendations, avoids misrecommendations caused by inaccurate one-way preference scores, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115495644B_ABST
    Figure CN115495644B_ABST
Patent Text Reader

Abstract

This application provides a user recommendation method, apparatus, electronic device, and computer-readable storage medium. The method includes: obtaining n first scores corresponding sequentially to n first image sets, wherein each first image set consists of a portrait image of a second user and a portrait image preferred by the first user, and the portrait images preferred by the first user are different in each of the n first image sets; obtaining m second scores corresponding sequentially to m second image sets, wherein each second image set consists of a portrait image of a first user and a portrait image preferred by the second user, and the portrait images preferred by the second user are different in each of the m second image sets; obtaining a bidirectional preference score between the first user and the second user based on the n first scores and the m second scores; and if the bidirectional preference score is greater than a preset score, then making mutual recommendations to both the first user and the second user. This method can improve the problem of low recommendation accuracy in existing recommendation systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a user recommendation method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] Currently, various user recommendation systems typically match and recommend users a user might like based on their interests, personality, self-description, and preferred images. However, because this recommendation method considers only a limited and incomplete range of factors, it has certain limitations, resulting in low recommendation accuracy. Summary of the Invention

[0003] The purpose of this application is to provide a user recommendation method, apparatus, electronic device, and computer-readable storage medium to improve the problem of "low recommendation efficiency in existing recommendation systems".

[0004] This invention is implemented as follows:

[0005] In a first aspect, embodiments of this application provide a user recommendation method, the method comprising: obtaining n first scores corresponding sequentially to n first image groups, wherein each first image group consists of a portrait image of a second user and a portrait image preferred by the first user, and the portrait images preferred by the first user in the n first image groups are all different; the first score is a similarity score between the portrait image of the second user and the portrait image preferred by the first user, and n is a positive integer; obtaining m second scores corresponding sequentially to m second image groups, wherein each second image group consists of a portrait image of the first user and a portrait image preferred by the second user, and the portrait images preferred by the second user in the m second image groups are all different; the second score is a similarity score between the portrait image of the first user and the portrait image preferred by the second user, and m is a positive integer; obtaining a bidirectional preference score between the first user and the second user based on the n first scores and the m second scores; and if the bidirectional preference score is greater than a preset score, sending mutual recommendation information to the first user and the second user.

[0006] In this embodiment, by obtaining the first scores corresponding sequentially to n first image groups, a similarity score can be obtained between the second user's character image and n different character images favored by the first user, i.e., n preference scores of the first user for the second user can be obtained. Similarly, by obtaining the second scores corresponding sequentially to m second image groups, a similarity score can be obtained between the first user's character image and m different character images favored by the second user, i.e., m preference scores of the second user for the first user can be obtained. Since the above similarity scores are all unilateral preference scores between the two users, a bidirectional preference score between the first user and the second user can be obtained based on the n first scores and m second scores. This bidirectional preference score represents the degree of bidirectional preference between the first user and the second user, and can also be seen as the probability of successful recommendation between the two parties. If the above bidirectional preference score is greater than a preset score, it indicates that the degree of bidirectional preference between the first user and the second user is high, i.e., the probability of successful mutual recommendation is high, and mutual recommendation is then made to the first user and the second user. Using the above method, a two-way preference score between any two users can be calculated. Based on the score, it can be determined whether to recommend the two users to each other, thereby improving recommendation efficiency and accuracy.

[0007] In conjunction with the technical solution provided in the first aspect above, in some possible implementations, obtaining the bidirectional preference score between the first user and the second user based on the n first scores and the m second scores includes: obtaining a first unidirectional preference score of the first user for the second user based on the n first scores; obtaining a second unidirectional preference score of the second user for the first user based on the m second scores; and obtaining the bidirectional preference score based on the first unidirectional preference score and the second unidirectional preference score.

[0008] In this embodiment of the application, based on n first scores and m second scores, the first one-way preference score and the second preference score can be calculated respectively. Based on the first one-way preference score and the second one-way preference score, the two-way preference score between the first user and the second user can be calculated more accurately and quickly.

[0009] In conjunction with the technical solution provided in the first aspect above, in some possible implementations, obtaining the first one-way preference score of the first user for the second user based on the n first scores includes: inputting k first scores into a preset random forest model to obtain the first one-way preference score, where k is a positive integer less than or equal to n.

[0010] In this embodiment, the preset random forest model is constructed based on n obtained first scores. By inputting k first scores into the preset random forest model, the preference score of the first user for the second user can be predicted, i.e., the first one-way preference score is obtained. Furthermore, compared to directly calculating the first one-way preference score from n first scores, the first one-way preference score predicted by the preset random forest model based on k first scores makes the first one-way preference score closer to the degree of preference of the first user for the second user.

[0011] In conjunction with the technical solution provided in the first aspect above, in some possible implementations, obtaining the bidirectional preference score based on the first unidirectional preference score and the second unidirectional preference score includes: aggregating the first unidirectional preference score and the second unidirectional preference score into the bidirectional preference score according to the harmonic mean algorithm.

[0012] In this embodiment, because the harmonic mean algorithm is susceptible to minima, the bidirectional preference score calculated using the harmonic mean algorithm is also easily affected by minima. That is, if either the first or second unidirectional preference score has a smaller unidirectional score, the bidirectional preference score calculated using the harmonic mean algorithm will also be smaller. This means that if one user has a low preference for another user, the probability of a successful mutual recommendation will be lower. By using the above method, the calculated bidirectional preference score can better reflect the actual situation, avoiding the situation where one user has a high unidirectional preference score and the other a low unidirectional preference score, resulting in a higher overall bidirectional preference score after the two unidirectional preference scores are combined.

[0013] In conjunction with the technical solution provided in the first aspect above, in some possible implementations, before inputting the first image group n times into the preset network model, the method further includes: identifying the preferred users of the first user and the second user respectively, and extracting the images of the preferred users.

[0014] In this embodiment of the application, the above method can more conveniently and quickly obtain the images of people preferred by the first user and the second user respectively, thereby improving the recommendation efficiency.

[0015] In conjunction with the technical solution provided in the first aspect above, in some possible implementations, obtaining the n first scores corresponding to the n first graph groups sequentially includes: sequentially inputting the n first graph groups into a preset Siamese convolutional network, and sequentially obtaining the n first scores respectively; obtaining the m second scores corresponding to the m second graph groups sequentially includes: sequentially inputting the m second graph groups into the Siamese convolutional network, and sequentially obtaining the m second scores respectively.

[0016] In this embodiment of the application, the preset twin convolutional network is a network model that has been trained and can calculate the similarity between two human images. By sequentially inputting n first image groups into the twin convolutional network, it is more convenient and faster to obtain n first scores corresponding to the n first image groups, and the accuracy of the obtained first scores can be improved.

[0017] In conjunction with the technical solution provided in the first aspect above, in some possible implementations, the person image is a face image.

[0018] In this embodiment of the application, by setting the person image as a face image, it is possible to calculate the bidirectional preference score for appearance of the first user and the second user based only on their face images, that is, to determine whether to recommend each other based only on their face images.

[0019] Secondly, embodiments of this application provide a user recommendation device, the device comprising: an acquisition module, configured to acquire n first scores corresponding sequentially to n first image groups, wherein each first image group consists of a portrait image of a second user and a portrait image preferred by the first user, and the portrait images preferred by the first user in the n first image groups are all different, and the first score is a similarity score between the portrait image of the second user and the portrait image preferred by the first user, where n is a positive integer; an acquisition module, configured to acquire m second scores corresponding sequentially to m second image groups, wherein each second image group consists of a portrait image of the first user and a portrait image preferred by the second user, and the portrait images preferred by the second user in the m second image groups are all different, and the second score is a similarity score between the portrait image of the first user and the portrait image preferred by the second user, where m is a positive integer; a processing module, configured to acquire a bidirectional preference score between the first user and the second user based on the n first scores and the m second scores; and a recommendation module, configured to recommend to the first user and the second user if the bidirectional preference score is greater than a preset score.

[0020] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory, the processor and the memory being connected; the memory being used to store a program; the processor being used to invoke the program stored in the memory to execute the method provided by the embodiments of the first aspect described above and / or some possible implementations of the embodiments of the first aspect described above.

[0021] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, the computer program executing, when run by a processor, the methods provided as described in the first aspect embodiments and / or some possible implementations of the first aspect embodiments. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart illustrating the steps of a user recommendation method provided in this application embodiment.

[0024] Figure 2 A graph showing the effectiveness of a user recommendation method provided in this application embodiment compared with the recommendation results of the existing recommendation system RECON.

[0025] Figure 3 This is a block diagram of a user recommendation device provided in an embodiment of this application.

[0026] Figure 4 This is a module block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0027] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0028] Given that existing recommendation systems have low accuracy, the inventors of this application, through research and exploration, propose the following embodiments to solve the above problems.

[0029] This application provides a user recommendation method that can be applied to a dating service recommendation system or a social networking service recommendation system. The method is used to determine the degree of mutual preference between any two users and, based on the score of the degree of preference, determine whether to recommend the two users to each other.

[0030] The following combination Figure 1 The specific process and steps of a user recommendation method are described. It should be noted that the user recommendation method provided in this embodiment is not based on... Figure 1 The following order is a restriction.

[0031] Step S101: Obtain the n first scores that correspond sequentially to the n first image groups.

[0032] In this system, the first image set consists of one image of a second user and one image of a person preferred by the first user. The images of the person preferred by the first user are all different in the n first image sets. These images can be facial images, full-body images, or body images; there are no restrictions on the type. Furthermore, the aforementioned first score is the similarity score between the second user's image and the image of the person preferred by the first user. In other words, this first score represents the degree of preference the first user has for the second user, where n is a positive integer.

[0033] It is worth noting that the first user and the second user can be two users of the same gender, that is, both of them are male users, or both of them are female users; they can also be two users of different genders, that is, one is a male user and the other is a female user.

[0034] Optionally, before step S101, the preferred users of the first user and the second user are identified respectively, and the images of the preferred users are extracted.

[0035] Specifically, on the social networking sites of the first and second users, the users they follow or their corresponding friends are queried, and then the images of the people in the posts of the aforementioned users or friends are obtained, and these images are used as the images of the preferred users of the first and second users; or, based on the account information of the first and second users and their browsing history, it is queried whether the first and second users have other accounts. If so, the users followed by the found accounts or the friends in the list of those accounts are obtained, and then the images of the people corresponding to the users followed or friends of those accounts are obtained, and these images are used as the images of the preferred users of the first and second users; or, the pictures that the first and second users view or like in their daily lives are obtained, and then the corresponding images of the people in the pictures that the first and second users view or like are extracted as the images of the preferred users of the first and second users.

[0036] This method allows for the convenient and quick acquisition of images of people preferred by the first and second users, thereby improving recommendation efficiency. Furthermore, it ensures the accuracy of the acquired images.

[0037] After obtaining the image of the person preferred by the first user, it is necessary to obtain the similarity score between the image of the person preferred by the second user and the image of the person preferred by the first user, so as to obtain the first user's preference score for the second user. Below, three different implementation methods for obtaining the similarity score between the images of the person preferred by the second user and the image of the person preferred by the first user will be introduced.

[0038] As a first optional implementation, n first graph groups are sequentially input into a preset twin convolutional network, and n first scores are obtained sequentially for each group.

[0039] The pre-defined twin convolutional network is a trained network model capable of calculating the similarity between two images of people. This twin convolutional network is a model well-known to those skilled in the art, and will not be described in detail here.

[0040] The above method allows for a more convenient and faster acquisition of n first scores corresponding to each of the n first image groups, and also improves the accuracy of the obtained first scores.

[0041] As a second optional implementation, the two person images in the first image group can be converted into a vector. The similarity between the two person images can be determined by calculating the cosine distance between the vectors, that is, the similarity score between the two person images can be calculated. In other words, the person images of the second user and the n person images preferred by the first user are converted into corresponding vectors respectively. Then, the cosine distance between the vectors of the person images of the second user and the n person images preferred by the first user can be calculated respectively, so as to obtain the n first scores corresponding to the n first image groups.

[0042] As a third optional implementation, the two character images in the first image group can be processed to obtain the pixel points of the two character images. Then, the pixel points of the two character images are compared one by one to obtain the similarity score between the two character images. That is, the character image of the second user and the n character images preferred by the first user are processed separately to obtain the pixel points of n+1 character images. Then, the pixel points of the character image of the second user are compared with the corresponding pixel points of the n character images preferred by the first user to obtain the n first scores corresponding to the n first image groups.

[0043] Step S102: Obtain the m second scores that correspond sequentially to the m second figure groups.

[0044] The second image set consists of one image of a person from the first user and one image of a person preferred by the second user. The images of the person preferred by the second user are all different in the m second image sets. These images can be facial images, full-body images, or body images; no specific limitation is imposed here. Furthermore, the second score is the similarity score between the image of the first user and the image of the person preferred by the second user, where m is a positive integer.

[0045] For the method of obtaining m second scores in step S102, please refer to the method of obtaining n first scores in step S101 above, which will not be repeated here.

[0046] It's worth noting that the methods for obtaining n first scores and m second scores can be the same or different. For example, n first image sets can be sequentially input into a pre-defined Siamese convolutional network to obtain n first scores. Then, the first user's portrait image and the m second user's preferred portrait images can be converted into corresponding vectors. The cosine distance between these vectors can be calculated for both the first user's portrait image and the m second user's preferred portrait images to obtain m second scores. Furthermore, obtaining n first scores and m second scores can be performed simultaneously. For example, the n first image sets and m second image sets can be input into two separate pre-defined Siamese convolutional networks to obtain n first scores and m second scores respectively. Alternatively, they can be performed sequentially. For instance, the n first image sets can be sequentially input into the pre-defined Siamese convolutional network to obtain n first scores, and then the m second image sets can be sequentially input into the same network to obtain m second scores.

[0047] After obtaining the m second scores corresponding to the m second graph groups, this method can continue to execute step S103.

[0048] Step S103: Based on the n first scores and m second scores, obtain the bidirectional preference score between the first user and the second user.

[0049] It should be noted that, in the embodiments of this application, the n first scores and m second scores can be processed directly to obtain the bidirectional preference score, or the n first scores and m second scores can be processed separately first, and the bidirectional preference score can be obtained based on the processed results. The values ​​of m and n can be the same or different.

[0050] The following will detail an implementation method that first processes the n first scores and m second scores separately, and then obtains the bidirectional preference score based on the processing results.

[0051] Specifically, based on n first scores, the first one-way preference score of the first user to the second user is obtained; based on m second scores, the second one-way preference score of the second user to the first user is obtained; and based on the first and second one-way preference scores, the two-way preference score is obtained. This method allows for faster and more efficient calculation of the two-way preference score.

[0052] Optionally, k first scores are input into a preset random forest model to obtain the first one-way preference score, where k is a positive integer less than or equal to n. The preset random forest model is constructed based on the obtained n first scores, and its specific construction method is as follows: First, a certain number of samples are randomly selected from the n first scores, and these samples are used as the root node of each tree in the random forest model; then, the scores from 0.0 to 1.0 are split into five distributions of size 0.2, i.e., 0.2, 0.4, 0.6, and 0.8 are used as splitting nodes in the random forest model, thus constructing the random forest model.

[0053] By inputting k first scores into a pre-defined random forest model, the preference score of the first user for the second user can be predicted, i.e., the first one-way preference score can be obtained. The k first scores can be randomly selected from n first scores, or they can be k first scores specified in the order they were obtained from the n first scores. Furthermore, compared to directly calculating the first one-way preference score from the n first scores, the first one-way preference score predicted by the pre-defined random forest model based on the k first scores more closely reflects the actual degree of preference of the first user for the second user.

[0054] For the processing of m second fractions, please refer to the above method for processing n first fractions; it will not be repeated here.

[0055] After obtaining the first one-way preference score and the second one-way preference score based on the n first scores and m second scores respectively, the two-way preference score can be obtained based on the first one-way preference score and the second one-way preference score.

[0056] Optionally, the first one-way preference score and the second one-way preference score can be aggregated into a two-way preference score according to the harmonic mean algorithm.

[0057] Specifically, substituting the first one-way preference score x1 and the second one-way preference score x2 into the harmonic mean formula, i.e. The two-way preference score can then be calculated. Because the harmonic mean algorithm is susceptible to local minima, the two-way preference score calculated using this algorithm is also easily affected by local minima. That is, if either the first or second one-way preference score has a smaller value, the two-way preference score calculated using the harmonic mean algorithm will also be smaller. This means that if one user has a low preference for another user, the probability of a successful mutual recommendation will be lower. Therefore, the above method ensures that the calculated two-way preference score is more realistic, avoiding situations where one user has a high one-way preference score and the other a low one-way preference score, resulting in a higher overall two-way preference score after the two one-way preference scores are combined.

[0058] As an alternative implementation, according to the arithmetic mean algorithm, the first one-way preference score and the second one-way preference score are aggregated into a two-way preference score, that is, the first one-way preference score x1 and the second one-way preference score x2 are substituted into the harmonic mean formula, i.e. The two-way preference score can then be calculated.

[0059] After obtaining the bidirectional preference score, this method can continue to execute step S104.

[0060] Step S104: If the two-way preference score is greater than the preset score, then send mutual recommendation information to the first user and the second user.

[0061] In this embodiment, it is necessary to compare the bidirectional preference score with a preset score. If the bidirectional preference score is greater than the preset score, then the second user is recommended to the first user, and the first user is recommended to the second user. Specifically, corresponding recommendation emails are sent to the accounts of the first user and the second user respectively; or, when the first user and the second user use the software, corresponding recommendation information is sent to both parties.

[0062] Furthermore, the preset scores are numbers greater than 50 and less than 100, such as 50, 60, 70, 80, and 90. This method improves the success rate of recommendations between two users, thus increasing recommendation accuracy and avoiding recommendations between users with low mutual preference scores, thereby improving recommendation efficiency and user experience.

[0063] Please see Figure 2 , Figure 2 This is a graph comparing the effectiveness of the user recommendation method with that of the existing recommendation system RECON. The curved line represents the effectiveness of the user recommendation method, while the curve closest to the reference line (dashed line) represents the effectiveness of the RECON recommendation system. The horizontal axis represents truly positive results, and the vertical axis represents falsely positive results. Figure 2 It can be seen that when users only select users based on images, the user recommendation method in this application embodiment has good recommendation effectiveness.

[0064] Please see Figure 3 Based on the same inventive concept, this application also provides a user recommendation device, which includes: an acquisition module 101, a processing module 102, and a recommendation module 103.

[0065] The acquisition module 101 is used to acquire n first scores corresponding to n first image groups in sequence, wherein each first image group consists of a second user's image and a first user's preferred image, and the first user's preferred image in each of the n first image groups is different. The first score is the similarity score between the second user's image and the first user's preferred image, where n is a positive integer. The module 101 is also used to acquire m second scores corresponding to m second image groups in sequence, wherein each second image group consists of a first user's image and a second user's preferred image, and the second user's preferred image in each of the m second image groups is different. The second score is the similarity score between the first user's image and the second user's preferred image, where m is a positive integer.

[0066] Processing module 102 is used to obtain a bidirectional preference score between a first user and a second user based on n first scores and m second scores.

[0067] The recommendation module 103 is used to send mutual recommendation information to the first user and the second user if the bidirectional preference score is greater than a preset score.

[0068] Optionally, the processing module 102 is specifically used to obtain the first one-way preference score of the first user to the second user based on n first scores; to obtain the second one-way preference score of the second user to the first user based on m second scores; and to obtain the two-way preference score based on the first one-way preference score and the second one-way preference score.

[0069] Optionally, the processing module 102 is specifically used to input k first scores into a preset random forest model to obtain the first one-way preference score, where k is a positive integer less than or equal to n.

[0070] Optionally, the processing module 102 is specifically used to aggregate the first one-way preference score and the second one-way preference score into a two-way preference score according to the harmonic mean algorithm.

[0071] Optionally, the acquisition module 101 is also used to identify the preferred users of the first user and the second user respectively, and extract the images of the preferred users.

[0072] Optionally, the acquisition module 101 is specifically used to sequentially input n first graph groups into a preset Siamese convolutional network and sequentially acquire n first scores; and sequentially input m second graph groups into the Siamese convolutional network and sequentially acquire m second scores.

[0073] Please see Figure 4Based on the same inventive concept, this application provides a schematic structural block diagram of an electronic device 200 used in the aforementioned user recommendation method. In this application embodiment, the electronic device 200 may be, but is not limited to, a personal computer (PC), smartphone, tablet computer, personal digital assistant (PDA), mobile internet device (MID), etc. Structurally, the electronic device 200 may include a processor 210 and a memory 220.

[0074] Processor 210 and memory 220 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. Processor 210 can be an integrated circuit chip with signal processing capabilities. Processor 210 can also be a general-purpose processor, such as a Central Processing Unit (CPU), Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. Furthermore, the general-purpose processor can be a microprocessor or any conventional processor.

[0075] The memory 220 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), and electrically erasable programmable read-only memory (EEPROM). The memory 220 is used to store programs, which the processor 210 executes upon receiving an execution instruction.

[0076] It should be understood that Figure 4 The structure shown is for illustrative purposes only. The electronic device 200 provided in this application embodiment may also have a more advanced design. Figure 4 Fewer or more components, or having the same Figure 4The different configurations shown. Furthermore... Figure 4 The components shown can be implemented through software, hardware, or a combination thereof.

[0077] It should be noted that, as those skilled in the art will clearly understand, for the sake of convenience and brevity, the specific working processes of the systems, devices and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0078] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which executes the methods provided in the above embodiments when the computer program is run.

[0079] The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0080] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interface; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0081] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0082] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0083] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0084] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A user recommendation method characterized by, The method includes: Obtain n first scores corresponding to n first image groups in sequence, wherein the first image group consists of a second user's image and a first user's preferred image, and the first user's preferred image in each of the n first image groups is different. The first score is the similarity score between the second user's image and the first user's preferred image, where n is a positive integer. Obtain m second scores corresponding to m second image groups in sequence, wherein the second image group is a person image of the first user and a person image preferred by the second user, and the person images preferred by the second user in the m second image groups are all different, and the second score is the similarity score between the person image of the first user and the person image preferred by the second user, where m is a positive integer; Based on the n first scores and the m second scores, a bidirectional preference score is obtained between the first user and the second user, wherein the bidirectional preference score characterizes the degree of bidirectional preference between the first user and the second user; If the bidirectional preference score is greater than a preset score, then mutual recommendation information is sent to the first user and the second user; The step of obtaining the n first scores corresponding to the n first image groups in sequence includes: The second user's character image and n character images preferred by the first user are processed respectively to obtain the pixels of n+1 character images; the pixels of the second user's character image are compared with the pixels corresponding to the n character images preferred by the first user to obtain the n first scores corresponding to the first image group. The step of obtaining the bidirectional preference score between the first user and the second user based on the n first scores and the m second scores includes: By inputting k first scores into a preset random forest model, the first one-way preference score of the first user for the second user is predicted. The k first scores belong to the n first scores, where k is a positive integer less than or equal to n. The random forest model is constructed by using a certain number of samples drawn from the n first scores as the root node of each tree in the random forest model, and using 0.2, 0.4, 0.6, and 0.8 as split nodes in the random forest model. By inputting k second scores into a preset random forest model, the second one-way preference score of the second user for the first user is predicted. The k second scores belong to the m second scores, where k is a positive integer less than or equal to n. The random forest model is constructed by using a certain number of samples drawn from the m second scores as the root node of each tree in the random forest model, and using 0.2, 0.4, 0.6, and 0.8 as split nodes in the random forest model. The bidirectional preference score is obtained based on the first unidirectional preference score and the second unidirectional preference score.

2. The method of claim 1, wherein, The step of obtaining the bidirectional preference score based on the first one-way preference score and the second one-way preference score includes: According to the harmonic mean algorithm, the first one-way preference score and the second one-way preference score are aggregated into the two-way preference score.

3. The method of claim 1, wherein, Before inputting the first graph group n times into the preset network model, the method further includes: Identify the preferred users of the first user and the second user respectively, and extract the images of the preferred users.

4. The method according to claim 1, characterized in that, The step of obtaining the n first scores corresponding to the n first image groups in sequence includes: n first graph groups are sequentially input into a preset twin convolutional network, and n first scores are obtained sequentially respectively; The step of obtaining the m second scores corresponding to the m second image groups in sequence includes: m second graph groups are sequentially input into the twin convolution, and m second scores are obtained sequentially.

5. The method according to claim 1, characterized in that, The image of the person is a face image.

6. A user recommendation device, characterized in that, The device includes: The acquisition module is used to acquire n first scores corresponding to n first image groups in sequence, wherein each first image group consists of a second user's portrait image and a portrait image preferred by the first user, and the portrait images preferred by the first user in each of the n first image groups are different. The first score is the similarity score between the portrait image of the second user and the portrait image preferred by the first user, where n is a positive integer. The module also acquires m second scores corresponding to m second image groups in sequence, wherein each second image group consists of a first user's portrait image and a portrait image preferred by the second user, and the portrait images preferred by the second user in each of the m second image groups are different. The second score is the similarity score between the portrait image of the first user and the portrait image preferred by the second user, where m is a positive integer. The processing module is used to obtain a bidirectional preference score between the first user and the second user based on the n first scores and the m second scores, wherein the bidirectional preference score characterizes the degree of bidirectional preference between the first user and the second user; The recommendation module is used to make mutual recommendations to the first user and the second user if the bidirectional preference score is greater than a preset score. The acquisition module is specifically used to process the second user's character image and n character images preferred by the first user respectively to obtain the pixel points of n+1 character images; and to compare the pixel points of the second user's character image with the pixel points corresponding to the n character images preferred by the first user respectively to obtain the n first scores corresponding to the first image group. The processing module is specifically used to predict the first one-way preference score of the first user for the second user by inputting k first scores into a preset random forest model, wherein the k first scores belong to the n first scores, and k is a positive integer less than or equal to n; the random forest model is constructed by using a certain number of samples drawn from the n first scores as the root node of each tree in the random forest model, and using 0.2, 0.4, 0.6, and 0.8 as split nodes in the random forest model; predict the second one-way preference score of the second user for the first user by inputting k second scores into the preset random forest model, wherein the k second scores belong to the m second scores, and k is a positive integer less than or equal to n; the random forest model is constructed by using a certain number of samples drawn from the m second scores as the root node of each tree in the random forest model, and using 0.2, 0.4, 0.6, and 0.8 as split nodes in the random forest model; and obtain the bidirectional preference score based on the first one-way preference score and the second one-way preference score.

7. An electronic device, characterized in that, include: A processor and a memory, wherein the processor and the memory are connected; The memory is used to store programs; The processor is used to run a program stored in the memory and perform the method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a computer, performs the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Bidirectional and clustering mixed friend recommendation method

    CN102662975A

  • Friend recommendation method and system in SNS network

    CN103678323A

  • Social software friend-making request method, server, client device and system

    CN107302492A

  • User matching method

    CN110175298A

  • Friend-making request method and device, computer equipment and storage medium

    CN111949813A