CN111368219A - Information recommendation method and device, computer equipment and storage medium - Google Patents

Information recommendation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111368219A
CN111368219A CN202010124665.9A CN202010124665A CN111368219A CN 111368219 A CN111368219 A CN 111368219A CN 202010124665 A CN202010124665 A CN 202010124665A CN 111368219 A CN111368219 A CN 111368219A
Authority
CN
China
Prior art keywords
user
portrait
feature
target
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010124665.9A
Other languages
Chinese (zh)
Other versions
CN111368219B (en
Inventor
李岩
王汉杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Tencent Technology Co Ltd
Original Assignee
Guangzhou Tencent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Tencent Technology Co Ltd filed Critical Guangzhou Tencent Technology Co Ltd
Priority to CN202010124665.9A priority Critical patent/CN111368219B/en
Publication of CN111368219A publication Critical patent/CN111368219A/en
Application granted granted Critical
Publication of CN111368219B publication Critical patent/CN111368219B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses an information recommendation method, an information recommendation device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring query characteristics of a first user according to input information of the first user; acquiring a user portrait feature set, wherein the user portrait feature set comprises portrait features of a plurality of second users, and the portrait feature of any second user is obtained by converting social tags of any second user; acquiring target portrait characteristics matched with the query characteristics from the user portrait characteristic set, and acquiring recommendation information of a target second user corresponding to the target portrait characteristics; and outputting the recommendation information of the target second user. By the aid of the method and the device, recommendation accuracy of information recommendation can be improved.

Description

Information recommendation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information recommendation method and apparatus, a computer device, and a storage medium.
Background
The social software can greatly expand the social range of people, and users can construct personal relationship networks in the social software, so that more convenient online communication and information sharing are realized. Recommending friends for a user in social software is an important function, more strangers can become friends of the user, the contact depth of the user can be enhanced, the communication range of the user is expanded, and the information dissemination efficiency is improved, so that the method has an important significance for accurately recommending friends for the user.
Currently, a method for recommending friends to a user is a distance-based method, that is, a current location of a target user is obtained, and other users near the current location of the target user are recommended to the target user, so as to expand a friend range of the target user.
The information provided by the distance is single, and two strange users are difficult to become social friends, so the recommendation accuracy of a friend recommendation mode based on the distance is low.
Disclosure of Invention
The embodiment of the application provides an information recommendation method, an information recommendation device, a computing device and a storage medium, which can improve the recommendation accuracy of information recommendation.
An embodiment of the present application provides an information recommendation method, including:
acquiring query characteristics of a first user according to input information of the first user;
acquiring a user portrait feature set, wherein the user portrait feature set comprises portrait features of a plurality of second users, and the portrait feature of any second user is obtained by converting social tags of any second user;
acquiring target portrait characteristics matched with the query characteristics from the user portrait characteristic set, and acquiring recommendation information of a target second user corresponding to the target portrait characteristics;
and outputting the recommendation information of the target second user.
An embodiment of the present application provides an information recommendation apparatus in one aspect, including:
the first acquisition module is used for acquiring the query characteristics of the first user according to the input information of the first user;
the second acquisition module is used for acquiring a user portrait feature set, wherein the user portrait feature set comprises portrait features of a plurality of second users, and the portrait feature of any second user is obtained by converting the social label of any second user;
the query module is used for acquiring target portrait characteristics matched with the query characteristics from the user portrait characteristic set;
the third acquisition module is used for acquiring recommendation information of a target second user corresponding to the target portrait characteristics;
and the output module is used for outputting the recommendation information of the target second user.
The input information is an identity of a first user; the user representation feature set further comprises representation features of the first user;
a first acquisition module comprising:
the query unit is used for searching the portrait characteristics of the first user in the user portrait characteristic set according to the identity of the first user;
a first determination unit to use the portrait feature of the first user as a query feature.
Wherein the input information is an input text;
a first acquisition module comprising:
the dividing unit is used for dividing the input text into a plurality of phrases and calling a word vector model to determine a word vector of each phrase;
and the second determining unit is used for fusing a plurality of word vectors of the input text into the query feature.
Wherein the input information is an input image;
a first acquisition module comprising:
the first calling unit is used for calling the image classification model to determine a plurality of image content labels of the input image and calling the word vector model to determine a word vector of each image content label of the input image;
and the third determining unit is used for fusing a plurality of word vectors of the input image into the query feature.
Wherein, the second acquisition module includes:
an acquisition unit configured to acquire a plurality of user-associated images of a second user;
the second calling unit is used for calling the image classification model to determine a plurality of image content labels of each user-associated image;
the acquiring unit is further used for selecting the social label of the second user from the plurality of image content labels of the second user according to the occurrence frequency of each image content label of the second user;
the third calling unit is used for calling the word vector model to determine a word vector of the social label of the second user;
the obtaining unit is further used for fusing the word vectors of the social labels of the second user into portrait features of the second user.
The image classification model comprises a feature extractor and a label discriminator;
the second calling unit is specifically used for calling the feature extractor to extract the image features of the user-associated image, calling the label discriminator to identify the matching probabilities between the image features and the image content labels in the image classification model, and selecting the image content labels of the user-associated image from the image content labels in the image classification model according to the matching probabilities.
The third calling unit is specifically configured to search a target hot code corresponding to the social label of the second user in the word group hot code table, and determine a word vector of the social label of the second user based on the hidden layer weight matrix and the target hot code in the word vector model.
The query module is specifically used for clustering the portrait features of the second users into a plurality of unit feature clusters, wherein each unit feature cluster comprises a central portrait feature; determining a first feature distance between the query feature and each central portrait feature, taking a unit feature cluster to which the central portrait feature with the smallest first feature distance belongs as a target unit feature cluster in the plurality of first feature distances, determining a second feature distance between the query feature and the portrait feature of each second user in the target unit feature cluster, and selecting a target portrait feature matched with the query feature from the target unit feature cluster according to the second feature distance.
Wherein, output module includes:
the selection unit is used for acquiring recommendation conditions input by a first user and selecting recommendation information meeting the recommendation conditions from recommendation information of a target second user;
and the output unit is used for outputting the recommendation information meeting the recommendation condition.
Wherein, still include:
the reading module is used for acquiring a service block chain, wherein the service block chain comprises a first service block, and the first service block is used for storing input information of a first user; acquiring a first service block from a service block chain, and reading input information from a block body of the first service block;
an output module comprising:
and the adding unit is used for generating a second service block according to the recommendation information of the target second user and adding the second service block to the service block chain.
An aspect of the embodiments of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to execute the method in the foregoing embodiments.
An aspect of the embodiments of the present application provides a computer storage medium, in which a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed by a processor, the method in the foregoing embodiments is performed.
According to the method and the device, query characteristics are determined by obtaining input information input by a first user, portrait characteristics similar to the query characteristics are searched in a user portrait characteristic set, portrait characteristics in the user portrait characteristic set are obtained after social tags of a second user are converted, the target second user corresponding to the searched portrait characteristics is used as a user to be recommended of the first user, and recommendation information of the target second user is output. Therefore, the target second user found from the plurality of second users can meet the recommendation requirement of the first user based on the social label of the second user, and the recommendation accuracy rate of recommending information to the first user can be improved; further, from the aspect of recommendation, the first user actively searches for the friend to be recommended, and compared with the passive recommendation of the system, the active participation of the first user can further improve the accuracy rate of recommending information to the first user.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a system architecture diagram of information recommendation provided by an embodiment of the present application;
2-4 are schematic views of a scene of information recommendation provided by an embodiment of the present application;
FIG. 5 is a schematic flow chart of information recommendation provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of information recommendation provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of an exemplary method for characterizing an image according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a method for determining recommended users according to an embodiment of the present disclosure;
fig. 9 is a system architecture diagram of a blockchain according to an embodiment of the present application;
FIG. 10 is a schematic flow chart of information recommendation provided by an embodiment of the present application;
fig. 11 is a schematic structural diagram of an information recommendation device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The scheme provided by the embodiment of the application belongs to Machine Learning (ML), Natural Language Processing (NLP) and Computer Vision technology (CV) belonging to the field of artificial intelligence.
Machine learning is a multi-field cross discipline, and relates to a plurality of disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and the like. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. In the present application, specific technical means relate to techniques such as an artificial neural network in machine learning.
Natural language processing is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that enable efficient communication between humans and computers using natural language. Natural language processing is a science integrating linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language that people use everyday, so it is closely related to the research of linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic question and answer, knowledge mapping, and the like. In this application, a particular technical approach involves converting user input text into a real number vector (also referred to as a word vector).
The computer vision technology is a science for researching how to make a machine "see", and in particular, it refers to that a camera and a computer are used to replace human eyes to make machine vision of identifying, tracking and measuring target, and further make image processing, so that the computer processing becomes an image more suitable for human eye observation or transmitted to an instrument for detection. In the present application, training involving an image classification model and a trained image classification model may automatically identify image content labels of a current image.
The specific process of the technical means is illustrated by the following examples:
fig. 1 is a system architecture diagram of information recommendation according to an embodiment of the present application. The application relates to a server 10d and a terminal device cluster, and the terminal device cluster may include: terminal device 10a, terminal device 10 b.
Taking the terminal device 10a as an example, the terminal device 10a is a terminal device where the first user is located. The terminal device 10a acquires input information of the first user, and transmits the input information to the server 10 d. The server 10d converts the input information into query features, the server 10d obtains a user portrait feature set, the user portrait feature set comprises portrait features of a plurality of second users, and any portrait feature of the second users is obtained by performing word vector conversion on social tags of the second users. The server 10d searches the target portrait characteristics matched with the query characteristics from the user portrait characteristic set, and obtains recommendation information of the target second user corresponding to the target portrait characteristics, wherein the recommendation information may be user attributes such as a user name, a gender, an age and the like of the target second user. The server 10d may issue the recommendation information of the target second user to the terminal device 10a, and the terminal device 10a displays the recommendation information in the screen.
Of course, the steps executed by the server 10d may also be executed by the terminal device 10a, that is, after the terminal device 10a obtains the input information of the first user, the terminal device 10a converts the input information into the query feature, and searches the target portrait feature similar to the query feature in the user portrait feature set, so as to obtain the recommendation information of the target second user corresponding to the target portrait feature.
The server 10d shown in fig. 1 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.
The terminal device 10a, the terminal device 10b, the terminal device 10c, and the like shown in fig. 1 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like, but are not limited thereto. The terminal device cluster and the server 10d may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
Fig. 2 to fig. 4 described below illustrate how the terminal device 10a and the server 10d recommend friends to the first user in a friend recommendation scenario.
Please refer to fig. 2 to fig. 4, which are schematic views of a scenario of information recommendation provided in an embodiment of the present application, where the information recommendation related to the present application may be applied to a social communication client and a social communication server, and an application scenario of the present application is as follows: the first user inputs a recommendation mode through the social communication client side, and the social communication client side obtains input information of the first user based on the recommendation mode and sends the input information to the social communication server. And the social communication server searches a target second user which can be matched with the input information from the plurality of second users according to the input information, outputs the user information of the target second user and returns the user information to the social communication client so as to recommend the target second user to the first user and expand the friend range of the first user.
As shown in fig. 2, a terminal device 10a is a terminal device where a first user is located, and when the first user wants to expand a friend range and obtain more strange users who may become friends, the first user may access a friend recommendation page (e.g., a page 20a, a page 20b, and a page 20c in fig. 2), where the friend recommendation page includes 3 recommendation modes, which are a user account mode, a text mode, and an image mode, respectively; the user account mode is to search for a user to be recommended based on the social label of the user; the text mode is to search for a user to be recommended based on the text input by the user; the image mode is to search for the user to be recommended based on the image input by the user.
The first user selects a user account mode in the friend recommendation page (as shown in a page 20a in fig. 2), and the terminal device 10a sends the user account of the first user to the server 10d, that is, the user that the first user wishes to recommend is related to the social tag of the user. The user account is the unique identification of the user and has uniqueness and exclusivity.
Alternatively, the first user selects a text mode in the friend recommendation page (as shown in page 20b in fig. 2), and the first user enters a recommendation keyword in a text entry page 20 c: nail art, i.e. the user that the first user wishes to recommend, is nail art. The terminal device 10a may transmit the recommendation keyword "nail art" to the server 10 d.
Alternatively, the first user selects the image mode in the friend recommendation page (as shown in page 20c in fig. 2), and the first user takes the image 20h, i.e., the user that the first user wishes to recommend is associated with the image 20 h.
Here, the first user may take a picture/video as the image 20h in real time, or may read the picture/video as the image 20h from the album file of the terminal device 10 a. The terminal device 10a may transmit the image 20h to the server 10 d.
In this way, the first user can acquire the recommended user through 3 recommendation modes.
When the terminal device 10a sends a user account of the first user (assuming that the user account of the first user is the user account 1) to the server, that is, the user account mode is selected by the first user, as shown in fig. 3a, the server 10d obtains a portrait feature set 20f, where the portrait feature set 20f includes portrait features of a plurality of user accounts, each portrait feature is obtained by performing word vector conversion on a social tag of the user account, the social tag of each user account is selected from image content tags of images published by the user account, and the portrait feature of the first user is also in the portrait feature set 20 f. The server 10d searches the portrait feature 1 corresponding to the portrait feature set 20f based on the user account 1 of the first user. The server 10d calculates the feature distance between the portrait feature 1 and the rest of the portrait features in the portrait feature set 20f, and sets the user accounts corresponding to the k (k is assumed to be 2) portrait features with the closest feature distance as the user accounts to be recommended, as shown in fig. 3a, it is assumed that the user accounts to be recommended are user account 2 and user account 3.
When the terminal device 10a sends the recommended keyword "nail art" to the server, that is, the first user selects the text mode, as shown in fig. 3b, the server 10d invokes the word vector model to determine the word vector corresponding to the recommended keyword "nail art", that is, converts the recommended keyword "nail art" into the word vector corresponding to the recommended keyword "nail art". The server 10d calculates the feature distance between the word vector of the recommended keyword "nail art" and all the portrait features in the portrait feature set 20f, and sets the user accounts corresponding to the k portrait features with the closest feature distance (assuming that k here is 2) as the user accounts to be recommended, as shown in fig. 3b, it is assumed that the user accounts to be recommended are user account 2 and user account 3.
When the terminal device 10a sends the image 20h to the server, that is, the first user selects the image mode, as shown in fig. 3c, the server 10d calls the image classification model to determine the image content tag corresponding to the image 20h sent by the terminal device 10a, where the image content tag may be an animal type, a plant type, a vehicle or an emotion type. The server 10d calls the word vector model to convert the image content tags into corresponding word vectors. The server 10d calculates the feature distance between the word vector of the image content tag and all the portrait features in the portrait feature set 20f, and sets the user account corresponding to the k portrait features with the closest feature distance (assuming that k here is 2) as the user account to be recommended, as shown in fig. 3c, it is assumed that the user accounts to be recommended are user account 2 and user account 3.
As can be seen from the above, the first user selects different recommendation modes, and the server 10d correspondingly executes different recommendation processes. As shown in fig. 4, the current user accounts to be recommended are the user account 2 and the user account 3, and the server 10d may obtain the user information of the user account 2 and the user information of the user account 3, where the user information may include a user name, an age, a gender, and the like.
The server 10d may send the acquired user information of the user account 2 and the acquired user information of the user account 3 to the terminal device 10a, as shown in a page 20g in fig. 4, and the terminal device 10a may display the user information.
Therefore, based on the social tags of the users, the recommended users found out from the multiple users can meet the current recommendation requirements of the first user, so that the probability that the recommended users become social friends of the first user can be improved, the friend range of the first user is expanded, and the user stickiness of the first user in the social communication software is increased.
For a specific process of acquiring input information (such as the user account 1 in the above embodiment, or the recommended keyword "nail", or the image 20h), acquiring a user portrait feature set (such as the portrait feature set 20f in the above embodiment), and searching for a target portrait feature (such as the portrait feature corresponding to the user account 2 and the portrait feature corresponding to the user account 3 in the above embodiment), reference may be made to the following embodiments corresponding to fig. 5 to 10.
Please refer to fig. 5, which is a schematic flow diagram of information recommendation provided in an embodiment of the present application, and the scheme of the present application may be applied to a social communication server, and the social communication server may determine recommendation information matched with input information of a current user according to the input information of the current user, so as to meet a current recommendation demand and improve accuracy of information recommendation.
Further, the scheme of the application can also be applied to the social communication client, or the social communication client calls the cloud server to execute the technical scheme related to the application through a cloud computing technology, and the cloud server returns the recommendation information output after the scheme is executed to the social communication client.
The following embodiments are described with a server as an execution subject, and information recommendation may include the following steps:
step S101, acquiring the query characteristics of the first user according to the input information of the first user.
Specifically, a current user is referred to as a first user, the first user selects a recommendation mode in the terminal device, and if the selected recommendation mode is the first mode (e.g., the user account mode in the embodiment corresponding to fig. 2 to 4), a server (e.g., the server 10d in the embodiment corresponding to fig. 2 to 4) acquires an identity of the first user (e.g., the user account 1 in the embodiment corresponding to fig. 2 to 4), and uses the identity as input information of the first user.
If the selected recommendation mode is the second mode (e.g., the text mode in the embodiment corresponding to fig. 2-4), the terminal device obtains a text (referred to as an input text, e.g., the recommendation keyword "nail" in the embodiment corresponding to fig. 2-4) input by the first user, the terminal device sends the input text to the server, and the server takes the input text as input information of the first user.
If the selected recommended mode is the third mode (e.g., the image mode in the embodiment corresponding to fig. 2-4), the terminal device obtains an image (referred to as an input image, e.g., the image 20h in the embodiment corresponding to fig. 2-4) input by the first user, the terminal device sends the input image to the server, and the server takes the input image as input information of the first user.
It should be noted that, if the recommended mode selected by the first user is the third mode, the terminal device may further obtain a video input by the first user, the terminal device sends the video to the server, the server splits the video into a plurality of video frame images, and the plurality of video frame images are all used as input images, where the input information of the first user is the plurality of input images.
In general, the input information of the first user may be manually input by the first user or determined according to a recommendation mode selected by the first user.
The server determines the query feature of the first user according to the input information, wherein the query feature is a vector, and the vector dimension of the query feature can be 200 dimensions.
As can be seen from the above, the input information may be an identification of the first user, may be input text, or may be input images. These 3 cases will be described below.
First, how to determine the query feature when the input information is the identity of the first user is described:
when the input information is the identity of the first user, the server acquires a user portrait feature set (such as the portrait feature set 20f in the embodiment corresponding to fig. 2-4), wherein the user portrait feature set includes portrait features of a plurality of second users and portrait features of the first user, and any portrait feature of the second user is obtained by performing word vector conversion on a social tag of the second user; the portrait characteristics of the first user are obtained by performing word vector conversion on the social label of the first user. That is, the portrait features of the first user and the portrait features of the second user are vectors, and the vector dimension of the query feature and the vector dimension of the portrait features are the same, and may be 200-dimensional.
The social label of the first user (or the second user) is selected from image content labels of user-associated images of the first user (or the second user), and the user-associated images can be images published by the users, images which are marked in favor of or shared images, and the like.
The server searches the image characteristics of the first user from the user image characteristic set according to the identity of the first user, and takes the image characteristics of the first user as query characteristics.
Furthermore, the user portrait feature set may not include portrait features of the first user, at this time, the server may obtain the social tags of the first user in real time, the server invokes the word vector model to determine word vectors of the social tags of the first user, and determines query features of the first user according to the word vectors.
Then, how to determine the query feature when the input information is the input text is explained:
when the input information is an input text, the server performs word segmentation processing on the input text so as to divide the input text into a plurality of word groups. For example, the input text is: "want to participate in marathon", the input text can be divided into the following 3 phrases: "want to, participate in" and "marathon".
The server calls a word vector model to determine a word vector of each phrase, carries out weighted average on the word vectors to obtain a vector which is called as the query characteristic of the first user, and the weight of each word vector is in direct proportion to the occurrence frequency of the phrase corresponding to the word vector in the input text.
The following describes how to determine a word vector of a phrase based on a word vector model, taking the phrase as an example:
the server searches the thermal code corresponding to the phrase in the phrase thermal code table, the thermal code is a vector, and only one of a plurality of numerical values contained in the vector is 1, and the rest are 0. The word vector model comprises a hidden layer and an output layer, and the hidden layer and the output layer are involved in training the word vector model; when using the word vector model, only the hidden layer participates. The hidden layer weight matrix of the hot coding and word vector model (the hidden layer weight matrix is the weight matrix of the hidden layer) is subjected to matrix multiplication, and the obtained vector is called the word vector of the phrase.
When the number of the phrases divided from the input text is multiple, the word vector of each phrase can be determined by adopting the above method.
Finally, how to determine the query feature when the input information is an input image is described:
the server calls an image classification model to determine a plurality of image content labels of the input image, wherein the image content labels are used for representing image content, and the image content labels can be animal types, plant types, vehicle or emotion types and the like.
The server calls the word vector model to determine the word vector of each image content label of the input image, and the process of determining the word vector of each image content label can refer to the process of determining the word vector of each word group.
If the number of the input images is only one, the server may perform weighted average on word vectors of a plurality of image content tags of the input images, and the obtained vector is referred to as a query feature of the first user, where the weights of the word vectors of each image content tag may be the same.
If the number of the input images is multiple, the server can call an image classification model to determine the image content label of each input image, count the occurrence frequency of each image content label, determine the weight of each image content label according to the occurrence frequency, and the occurrence frequency is in direct proportion to the weight. The server may perform weighted average on word vectors of a plurality of image content tags of a plurality of input images, and the obtained vector is referred to as a query feature of the first user, where the weight of the word vector of each image content tag is proportional to the frequency of occurrence of the image content tag.
The following describes how to determine the image content label of an input image based on an image classification model, taking the input image as an example:
the image classification model comprises a feature extractor and a label discriminator, the server calls the feature extractor to extract the image features of the input image, the calling label discriminator identifies the matching probability between the image features and a plurality of image content labels in the image classification model, the k image content labels with the maximum matching probability are used as the image content labels of the input image, and k can be equal to 10.
Step S102, a user portrait feature set is obtained, the user portrait feature set comprises portrait features of a plurality of second users, and portrait features of any second user are obtained by converting social tags of any second user.
Specifically, the server obtains a user portrait feature set (such as portrait feature set 20f in the embodiment corresponding to fig. 2 to 4 described above), where the user portrait feature set includes portrait features of a plurality of second users, and any portrait feature of a second user is obtained by performing word vector conversion on a social tag of the second user. The social label of the second user is selected from image content labels of user-associated images of the second user, and the user-associated images may be images posted by the user, images that are praised to mark, or images that are shared.
The following description is given by way of example of how to obtain a portrait feature of a second user:
the server acquires an image (referred to as a user-associated image) associated with the second user, where the image associated with the user is an image issued by the user, a favorite image, a shared image, or the like.
Calling an image classification model to determine the image content tags of the images associated with each user, counting the occurrence frequency of each image content tag, and selecting k image content tags with the maximum occurrence frequency from the image content tags as the social tags of the second user.
And calling a word vector model to determine a word vector of each social label, taking a vector obtained by carrying out weighted average on a plurality of word vectors as the portrait characteristics of the second user, wherein the weight of the word vector is in direct proportion to the occurrence frequency of the image content label corresponding to the word vector.
For example, there are 2 user-associated images of the second user, and the image content tag of the user-associated image 1 is: cat appetizers, british shorthair cats and egyptian cats; the image content labels of the user-associated image 2 are: cat appetizers, bos cats and egyptian cats. Counting the occurrence frequency of the image content labels, wherein the occurrence frequency of the cat sucking fans is 2, the occurrence frequency of Egypt cats is 2, the occurrence frequency of British short-haired cats is 1, and the occurrence frequency of Persian cats is 1. If the 2 image content tags with the largest frequency of occurrence are selected as the social tags of the second user, the social tags of the second user are: sucking cat fans and egyptian cats.
Calling a word vector model to respectively convert the social label 'cat attracting lovers' into a word vector 1 and convert the social label 'egyptian cats' into a word vector 2, and weighting and averaging the word vector 1 and the word vector 2 to obtain the portrait characteristics of the second user, wherein the weight of the word vector 1 is 1/2, and the weight of the word vector 2 is 1/2, because the frequency of occurrence of the social labels corresponding to the two word vectors is 2.
The following describes how to determine the image content label of a user-associated image based on an image classification model, taking the user-associated image as an example:
the image classification model comprises a feature extractor and a label discriminator, wherein the feature extractor is called to extract the image features of the user-associated image, the label discriminator is called to identify the matching probability between the image features and a plurality of image content labels in the image classification model, k image content labels with the maximum matching probability are used as the image content labels of the user-associated image, and k can be equal to 10.
The following takes a social tag as an example, and describes how to determine a word vector of the social tag based on a word vector model:
the server searches a hot code (called a target hot code) corresponding to the social label in the phrase hot code table, wherein the hot code is a vector, only one of a plurality of values contained in the vector is 1, and the rest values are 0. The word vector model comprises a hidden layer and an output layer, and the hidden layer and the output layer are involved in training the word vector model; when using the word vector model, only the hidden layer participates. And performing matrix multiplication on the target hot code and a hidden layer weight matrix (the hidden layer weight matrix is the weight matrix of the hidden layer) of the word vector model to obtain a vector, which is called the word vector of the social label.
The word vector model may be a fasttext model or a cbow model, and the training process of the fasttext model is described as follows: dividing the sample text into a plurality of phrases, coding each phrase into thermal codes, and establishing a phrase thermal code table. For a target phrase, firstly, obtaining the thermal coding of the context phrase of the target phrase in the sample text, respectively multiplying the thermal coding of the context phrase by the hidden layer weight matrix (the hidden layer weight matrix at this time can be a random matrix), and adding and averaging the obtained vectors to obtain the output vector of the hidden layer. And then multiplying the output vector of the hidden layer by an output layer weight matrix (the output layer weight matrix at this time can also be a random matrix) to obtain the output vector of the output layer. The dimensionality of the output vector of the output layer is the same as the number of phrases contained in the sample text, and each component in the output vector of the output layer represents the probability that a target phrase is a certain phrase. And in the output vector of the output layer, taking the phrase indicated by the component with the maximum probability as a prediction phrase, searching the thermal coding of the prediction phrase, and reversely transmitting the error between the thermal coding of the prediction phrase and the thermal coding of the target phrase so as to update the weight matrix of the hidden layer and the weight matrix of the output layer. And continuously circulating and continuously training the hidden layer weight matrix and the output layer weight matrix until the model converges.
It should be further noted that training of the word vector model and training of the image classification model may be completed offline, and further, after the training of the word vector model is completed, the trained word vector model may be called to determine word vectors corresponding to all word groups in the sample text, and all the word vectors are combined into a dictionary. Subsequently, when a word vector of a certain word group needs to be determined, the word vector model does not need to be called, and the word vector model can be directly searched in a dictionary, so that the time consumption for calculating the word vector is shortened.
Step S103, acquiring target portrait characteristics matched with the query characteristics from the user portrait characteristic set.
Specifically, as can be seen from the foregoing, the portrait features and the query features in the user portrait feature set are vectors, and the vector dimension may be 200, and is the same. The server may calculate a feature distance between the query feature and the portrait feature of each second user in the user portrait feature set, regard k portrait features with the smallest feature distance as target portrait features, and regard the second user corresponding to the target portrait features as the target second user.
Because the user portrait feature set contains a large number of portrait features, if the method is adopted, the feature distance needs to be calculated for many times, and the calculation time is long. In order to shorten the calculation time, a Faiss algorithm may be used to determine the target image features, and the following specific process for determining the target image features based on the Faiss algorithm is described:
the Faiss algorithm is to perform clustering and similarity search, and cluster the portrait features of all the second users in the user portrait feature set into a plurality of unit feature clusters by using a clustering algorithm (for example, a k clustering algorithm), wherein each unit feature cluster comprises a clustering center (called a central portrait feature), that is, the rest portrait features in the same unit feature cluster are distributed around by using the central portrait feature as the center. And clustering the portrait features of the second users into a plurality of unit feature clusters can be completed offline.
The server calculates a feature distance (referred to as a first feature distance) between the query feature and each central portrait feature, and sets a unit feature cluster to which the central portrait feature having the smallest first feature distance belongs as a target unit feature cluster. The server calculates the distance (called second feature distance) between the query feature and the image feature of the second user included in the target unit feature cluster, and selects the image features corresponding to the smallest k second feature distances as the target image features.
And step S104, acquiring the recommendation information of the target second user corresponding to the target portrait characteristics, and outputting the recommendation information of the target second user.
Specifically, a second user corresponding to the target portrait feature is taken as a target second user, and the server obtains recommendation information of the target second user, where the recommendation information may include: at least one of an identity, a username, a social tag, a gender, an age, and a similarity of the user.
Wherein the similarity is determined according to a second feature distance between the portrait feature of the target second user and the query feature, and the similarity and the second feature distance are in inverse proportion.
The server can output the recommendation information of the target second user, and subsequently, the server can send the recommendation information of the target second user to the terminal equipment where the first user is located so as to recommend the user to the first user and expand the friend range of the first user.
Further, the terminal device where the first user is located obtains a recommendation condition input by the first user, where the recommendation condition may be: age range, gender, etc. And the terminal equipment sends the recommendation condition to the server, the server selects recommendation information meeting the recommendation condition from the recommendation information of the target second user after acquiring the recommendation condition, and the server outputs the selected recommendation information and returns the selected recommendation information to the terminal equipment. The recommendation information selected in the way can further meet the recommendation requirement of the first user, the probability that the target second user corresponding to the selected recommendation information becomes a social friend of the first user is further improved, and the accuracy of information recommendation is improved.
Please refer to fig. 6, which is a schematic diagram of information recommendation provided in an embodiment of the present application, as can be seen from the foregoing, there are 3 recommendation modes, and the first user may select any one of the recommendation modes according to the current recommendation requirement. These 3 recommendation patterns may correspond to query type 1, query type 2, and query type 3 in FIG. 6.
When the query type is query type 1, the server reads a user account (the user account is assumed to be 123456) of a current first user, searches an image feature corresponding to a user account "123456" from an image feature set constructed according to a massive user group, and assumes that the image feature corresponding to the user account "123456" is: [ x-u1, x-u 2. The server determines a feature distance between the image feature "[ x-u1, x-u 2.. x-un ]" and each image feature in the image feature set (which may correspond to the user image feature set), and determines the similarity between the recommended user and the current first user according to the feature distance by taking the user corresponding to the k image features with the smallest distance as the recommended user. The server may return user information of the recommended user to the first user, where the user information may include information such as a similarity, a user name, and a gender between the recommended user and the current first user.
When the query type is query type 2, the server obtains an input text input by a first user (assuming that the input text is: wanting to participate in Beijing marathon), and divides the input text into 4 phrases, which are respectively: "Haoxiang", "participating", "Beijing", "Malathion". Calling a word vector model, and converting the phrase 'good thinking' into a word vector 1: x1n, [ x11, x12,.. x1, converts the phrase "join" into a word vector 2: x21, x 22.. x2n ], converts the phrase "beijing" into word vector 3: x3n, [ x31, x32,. ]. x3 ], converts the phrase "marathon" into a word vector 4: [ x41, x 42.. x4n ]. And carrying out weighted average on the 4 word vectors to obtain a vector representation of an input text 'wishing to participate in Beijing Marathon': x-t1, x-t 2.. x-tn ], where the 4 word vectors are all weighted the same. The server determines a feature distance between a vector representation of the input text and each portrait feature in the portrait feature set, wherein the vector representation of the input text is 'x-t 1, x-t 2.. x-tn', a user corresponding to k portrait features with the smallest distance is used as a recommended user, and the similarity between the recommended user and the current first user is determined according to the feature distance. The server may return user information of the recommended user to the first user, where the user information may include information such as a similarity, a user name, and a gender between the recommended user and the current first user.
When the query type is query type 3, the server acquires an input image input by a first user, calls an image classification model to determine an image content label of the input image, and assumes that the image content label is: marathon, half-way, marathon, start, end, race, run, cross-country, and running bar, in fig. 6, the value following each image content label represents the probability of a match between the input image and that image content label. Calling a word vector model, respectively converting the 10 image content labels into 10 word vectors, and performing weighted average on the 10 word vectors to obtain vector representation of the input image: x-i1, x-i 2.. x-in ], when the weight of 10 word vectors is proportional to the matching probability of the image content tag corresponding to the word vector, or when the weight of 10 word vectors is the same. The server determines a feature distance between a vector representation of the input image and each portrait feature in the portrait feature set, wherein the vector representation of the input image is 'x-i 1, x-i 2.. x-in', and a user corresponding to k portrait features with the smallest distance serves as a recommended user to determine the similarity between the recommended user and the current first user according to the feature distance. The server may return user information of the recommended user to the first user, where the user information may include information such as a similarity, a user name, and a gender between the recommended user and the current first user.
In the following, how to construct the image feature set in fig. 6 is described in detail, since the image feature set is a set formed by image features of a plurality of users, one user (user a) is taken as an example, and the other users can respectively identify image features corresponding to the user.
Referring to fig. 7, which is a schematic diagram of determining image characteristics provided in the embodiment of the present application, the server pulls the user-associated images of the user a (assume that the user-associated images of the user a are image 1, image 2, image 3, and image 4), where the user-associated images may be images published by the user a in a friend-making community, images approved by friends, or images shared by friends.
Calling an image classification model to determine image content labels of the image 1, the image 2, the image 3 and the image 4 respectively, wherein each image can determine 10 image content labels and the matching probability between the image content labels and the images. The server may count the occurrence frequency of each image content tag, and take k (assuming that k is 10) image content tags with the highest occurrence frequency as the social tags of the user a, as shown in fig. 7, where the social tags of the user a are: marathon, horse race, running bar, start, finish.
Invoking the word vector model to determine word vectors of 10 social tags of the user a, respectively, as shown in fig. 7, word vector f of social tag "marathon" [ x, x,..,. x1 ], word vector f of social tag "run" [ x, x,. x2 ], word vector f of social tag "marathon race" [ x, x,. x, x3 ], word vector f of social tag "horse race" [ x, x,. x, x.,. x4 ], word vector f of social tag "half-way" [ x, x,. x5 ], word vector f of social tag "marathon" [ x,. x, x6 ], word vector f of social tag "run" [ x, x,. x, x7 ], word vector f of social tag "run" [ x,. x, x7 ], word vector f of social tag "run" [ x,. 8 ], and "run" [ x,. x, x92,., x9n ], word vector f10 for the social tag "run" [ x101, x 102., x10n ].
The server performs weighted average on the word vectors of the social tags of 10 to obtain the portrait characteristics of the user A: f ═ x1, x 2.., xn ] ═ 1/10(w1f1+ w2f2+. and + w10f10), where the weight wi of the word vector for each social tag is proportional to the frequency of occurrence of that social tag.
Further, the first user may input recommendation conditions, such as age range, gender, address, etc., in addition to selecting the recommendation mode, to further filter the recommended users. Please refer to fig. 8, which is a schematic diagram of determining a recommended user according to an embodiment of the present application, where a recommended mode selected by a first user is a second mode (also referred to as a text mode, or query type 2 in fig. 6), and an input text is: to participate in the Beijing marathon, the input recommendation conditions are as follows: the age was in the interval 30-40 and the gender was male. And the server determines the recommended users based on the recommended mode selected by the first user and the input text, and further screens out the recommended users meeting the recommended conditions according to the ages and sexes of the recommended users. Suppose that the last selected recommended user is: a recommending user A, a recommending user B, a recommending user C and a recommending user D. And the server acquires the nicknames, ages, sexes, social labels and similarity of the 4 recommended users, and sends the information to the terminal equipment where the first user is located so as to display the information to the first user. As shown in fig. 8, the nickname, age, gender, social label and similarity between the recommending user a and the first user are shown; the nickname, age, gender and social label of the recommended user B and the similarity between the recommended user B and the first user; the nickname, age, gender and social label of the recommended user C and the similarity between the recommended user C and the first user; the nickname, age, gender, social label of the recommending user D and the similarity between the recommending user D and the first user.
Therefore, based on the social tags of the second users, the target second users found from the plurality of second users can meet the recommendation requirements of the first user, and the probability that the target second users corresponding to the recommendation information become social friends of the first user is improved; from the aspect of recommendation, the first user actively searches for the friend to be recommended, and compared with the passive recommendation of the system, the active participation of the first user can further improve the recommendation accuracy rate of recommending information to the first user.
The input information and the recommendation information in the application can be stored in a Block chain, so that the application can be applied to a Block chain (Block chain) scene. The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission (P2P, Peer to Peer), a consensus mechanism, an encryption algorithm and the like. The blockchain is essentially a decentralized database, which is a string of data blocks associated using cryptography, each data block containing one or more transaction messages for verifying the validity (anti-counterfeiting) of the message and generating the next block.
Fig. 9 is a system architecture diagram of a block chain according to an embodiment of the present application. The terminal device and the server where the first user is located in the foregoing embodiments may be node 1, or node 2, or node 3, or node 4 in fig. 9, all the nodes may be combined into a blockchain system, and each node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer. As can be seen from fig. 9, the blockchain data stored by each node in the blockchain system is the same. It will be appreciated that the nodes may comprise computer devices. The following embodiments are described with a target blockchain node as an execution subject, where the target blockchain node is any one of a plurality of nodes in a blockchain system, and the target blockchain node may correspond to the server in the foregoing:
please refer to fig. 10, which is a schematic flow chart of information recommendation provided in an embodiment of the present application, where the information recommendation method includes the following steps:
step S201, obtaining a service block chain; the service block chain comprises a first service block, and the first service block is used for storing input information of a first user.
Specifically, the target block link point obtains a service block chain, where the service block chain includes a plurality of service blocks, and a service block may be generated by a node where a user is located according to input information of the user and added to the service block chain. The plurality of service blocks in the service block chain include a first service block, and the first service block is used for storing input information of a first user.
As can be seen from the foregoing, the input information may be an identification of the first user, an input text of the first user, or an input image of the first user.
By means of the complete attribute and the non-tampering attribute of the block chain, the input information acquired by the link point of the target block can be guaranteed to be credible and not tampered, and therefore the trust degree of the user is increased.
Step S202, a first service block is obtained from the service block chain, and input information is read from a block body of the target service block.
Specifically, the target block link point reads a first service block from the service block chain, and reads the input information of the first user from the block body of the first service block.
Step S203, obtaining the query feature of the first user according to the input information of the first user.
Step S204, a user portrait feature set is obtained, the user portrait feature set comprises portrait features of a plurality of second users, and portrait features of any second user are obtained by converting social tags of any second user.
Step S205, target portrait characteristics matched with the query characteristics are obtained from the user portrait characteristic set, and recommendation information of a target second user corresponding to the target portrait characteristics is obtained.
For the specific process of step S203 to step S205, refer to step S101 to step S103 in the embodiment corresponding to fig. 5, and the execution subject is adjusted to the target blockchain node by the server.
Step S206, generating a second service block according to the recommendation information of the target second user, and adding the second service block to the service block chain.
Specifically, the target block link point stores recommendation information of a target second user in a block body, calculates a tacher root of the recommendation information, acquires a hash value of a last service block in a current service block chain, stores the tacher root of the recommendation information, the hash value of the last service block in the current service block chain and a current timestamp in a block head, combines the block head and the block body in which the recommendation information is stored into a second service block, adds the second service block to a local service block chain, and broadcasts the second service block to other nodes, so that the other nodes add the second service block to the service block chains maintained by the nodes respectively, and the service block chains maintained by the nodes are synchronized.
Subsequently, the block link point where the first user is located may read the second service block from the service block link node, read the recommendation information of the target second user from the second service block, and show the recommendation information to the first user.
Therefore, the social label can accurately reflect the interest type and the social information of the user and depends on the complete attribute and the non-falsification attribute of the block chain, so that the target second user searched from a plurality of second users can accurately meet the recommendation requirement of the first user based on the social label of the second user, and the recommendation accuracy rate of recommending information to the first user can be improved; further, from the aspect of recommendation, the first user actively searches for the friend to be recommended, and compared with the passive recommendation of the system, the active participation of the first user can further improve the accuracy rate of recommending information to the first user.
Further, please refer to fig. 11, which is a schematic structural diagram of an information recommendation device according to an embodiment of the present application. As shown in fig. 11, the information recommendation apparatus 1 may be applied to the server and the target blockchain node in the embodiments corresponding to fig. 5 to 10. The information recommendation device may be a computer program (including program code) running in a computer apparatus, for example, the information recommendation device is an application software; the apparatus may be used to perform the corresponding steps in the methods provided by the embodiments of the present application.
The information recommendation device 1 may include: a first obtaining module 11, a second obtaining module 12, an inquiring module 13, a third obtaining module 14 and an output module 15.
The first obtaining module 11 is configured to obtain a query feature of a first user according to input information of the first user;
the second acquisition module 12 is configured to acquire a user portrait feature set, where the user portrait feature set includes portrait features of multiple second users, and the portrait feature of any second user is obtained by performing conversion processing on a social tag of any second user;
a query module 13, configured to obtain a target portrait feature matching the query feature from the user portrait feature set;
a third obtaining module 14, configured to obtain recommendation information of a target second user corresponding to the target portrait feature;
an output module 15, configured to output recommendation information of the target second user;
the query module 13 is specifically configured to cluster the portrait features of the plurality of second users into a plurality of unit feature clusters, where each unit feature cluster includes a central portrait feature; determining a first feature distance between the query feature and each central portrait feature, taking a unit feature cluster to which the central portrait feature with the smallest first feature distance belongs as a target unit feature cluster in the plurality of first feature distances, determining a second feature distance between the query feature and the portrait feature of each second user in the target unit feature cluster, and selecting a target portrait feature matched with the query feature from the target unit feature cluster according to the second feature distance.
For specific functional implementation manners of the first obtaining module 11, the second obtaining module 12, the query module 13, the third obtaining module 14, and the output module 15, reference may be made to steps S101 to S104 in the embodiment corresponding to fig. 5, which is not described herein again.
Referring to fig. 11, the input information is the identity of the first user; the user representation feature set further comprises representation features of the first user;
the first obtaining module 11 may include: an inquiring unit 111 and a first determining unit 112.
The query unit 111 is configured to search a portrait feature of the first user in the user portrait feature set according to the identity of the first user;
a first determining unit 112, configured to use the portrait characteristics of the first user as query characteristics.
The specific processes of the querying unit 111 and the first determining unit 112 may refer to step S101 in the embodiment corresponding to fig. 5.
Referring to fig. 11, the input information is an input text;
the first obtaining module 11 may include: a dividing unit 113 and a second determining unit 114.
A dividing unit 113, configured to divide an input text into multiple word groups, and invoke a word vector model to determine a word vector of each word group;
a second determining unit 114, configured to fuse the plurality of word vectors of the input text into the query feature.
The specific processes of the dividing unit 113 and the second determining unit 114 can refer to step S101 in the embodiment corresponding to fig. 5.
Referring to fig. 11, the input information is an input image;
the first obtaining module 11 may include: a first calling unit 115 and a third determining unit 116.
A first calling unit 115, configured to call an image classification model to determine a plurality of image content tags of the input image, and call a word vector model to determine a word vector of each image content tag of the input image;
a third determining unit 116, configured to fuse the plurality of word vectors of the input image into the query feature.
The specific processes of the dividing unit 113 and the second determining unit 114 can refer to step S101 in the embodiment corresponding to fig. 5.
It can be known that, when the query unit 111 and the first determination unit 112 determine the query features, the dividing unit 113, the second determination unit 114, the first calling unit 115, and the third determination unit 116 no longer perform the corresponding steps; when the dividing unit 113 and the second determining unit 114 determine the query features, the querying unit 111, the first determining unit 112, the first invoking unit 115, and the third determining unit 116 do not execute corresponding steps any more; when the first calling unit 115 and the third determining unit 116 determine the query features, the query unit 111, the first determining unit 112, the dividing unit 113, and the second determining unit 114 do not execute the corresponding steps.
Referring to fig. 11, the second obtaining module 12 may include: a dividing unit 131, a first determining unit 132, and a second determining unit 133.
An acquiring unit 121 configured to acquire a plurality of user-associated images of a second user;
a second calling unit 122, configured to call the image classification model to determine a plurality of image content tags of each user-associated image;
the obtaining unit 121 is further configured to select, according to the occurrence frequency of each image content tag of the second user, a social tag of the second user from a plurality of image content tags of the second user;
a third calling unit 123, configured to call the word vector model to determine a word vector of the social tag of the second user;
the obtaining unit 121 is further configured to fuse word vectors of social tags of the second user into portrait features of the second user;
the image classification model comprises a feature extractor and a label discriminator;
a second calling unit 122, specifically configured to call the feature extractor to extract image features of the user-associated image, call the tag discriminator to identify matching probabilities between the image features and the plurality of image content tags in the image classification model, and select an image content tag of the user-associated image from the plurality of image content tags in the image classification model according to the plurality of matching probabilities;
the third invoking unit 123 is specifically configured to search for a target hot code corresponding to the social tag of the second user in the word group hot code table, and determine a word vector of the social tag of the second user based on the hidden layer weight matrix and the target hot code in the word vector model.
The specific processes of the dividing unit 131, the first determining unit 132, and the second determining unit 133 may refer to step S102 in the embodiment corresponding to fig. 4.
Referring to fig. 11, the output module 14 may include: a selection unit 141 and an output unit 142.
A selecting unit 141, configured to acquire recommendation conditions input by a first user, and select recommendation information that meets the recommendation conditions from recommendation information of a target second user;
and an output unit 142, configured to output recommendation information that satisfies the recommendation condition.
The specific processes of the selection unit 141 and the output unit 142 can be referred to step S104 in the embodiment corresponding to fig. 4.
Referring again to fig. 11, the information recommendation apparatus may include: a first obtaining module 11, a second obtaining module 12, a query module 13, a third obtaining module 14 and an output module 15; the method can also comprise the following steps: a reading module 16.
A reading module 16, configured to acquire a service block chain, where the service block chain includes a first service block, and the first service block is used to store input information of a first user; acquiring a first service block from a service block chain, and reading input information from a block body of the first service block;
the output module 14 may include: an adding unit 143.
The adding unit 143 is configured to generate a second service block according to the recommendation information of the target second user, and add the second service block to the service block chain.
The specific process of the reading module 16 may refer to steps S201 to S202 in the embodiment corresponding to fig. 10; the specific process of adding the unit 143 can be referred to step S206 in the corresponding embodiment of fig. 10.
Further, please refer to fig. 12, which is a schematic structural diagram of a computer device according to an embodiment of the present invention. The server and the target block link point in the embodiments corresponding to fig. 5 to 10 may be a computer device 1000, and as shown in fig. 12, the computer device 1000 may include: a user interface 1002, a processor 1004, an encoder 1006, and a memory 1008. Signal receiver 1016 is used to receive or transmit data via cellular interface 1010, WIFI interface 1012. The encoder 1006 encodes the received data into a computer-processed data format. The memory 1008 has stored therein a computer program by which the processor 1004 is arranged to perform the steps of any of the method embodiments described above. The memory 1008 may include volatile memory (e.g., dynamic random access memory DRAM) and may also include non-volatile memory (e.g., one time programmable read only memory OTPROM). In some instances, the memory 1008 can further include memory located remotely from the processor 1004, which can be connected to the computer device 1000 via a network. The user interface 1002 may include: a keyboard 1018, and a display 1020.
In the computer device 1000 shown in fig. 12, the processor 1004 may be configured to call the memory 1008 to store a computer program to implement:
acquiring query characteristics of a first user according to input information of the first user;
acquiring a user portrait feature set, wherein the user portrait feature set comprises portrait features of a plurality of second users, and the portrait feature of any second user is obtained by converting social tags of any second user;
acquiring target portrait characteristics matched with the query characteristics from the user portrait characteristic set, and acquiring recommendation information of a target second user corresponding to the target portrait characteristics;
and outputting the recommendation information of the target second user.
It should be understood that the computer device 1000 described in the embodiment of the present invention may perform the description of the information recommendation method in the embodiment corresponding to fig. 4 to fig. 10, and may also perform the description of the information recommendation apparatus 1 in the embodiment corresponding to fig. 11, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores the aforementioned computer program executed by the information recommendation apparatus 1, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the information recommendation method in the embodiment corresponding to fig. 5 to 10 can be performed, so that details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer storage medium to which the present invention relates, reference is made to the description of the method embodiments of the present invention. By way of example, program instructions may be deployed to be executed on one computer device or on multiple computer devices at one site or distributed across multiple sites and interconnected by a communication network, which may comprise a block chain system.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (13)

1. An information recommendation method, comprising:
acquiring query characteristics of a first user according to input information of the first user;
acquiring a user portrait feature set, wherein the user portrait feature set comprises portrait features of a plurality of second users, and the portrait feature of any second user is obtained by converting the social label of any second user;
acquiring target portrait characteristics matched with the query characteristics from the user portrait characteristic set, and acquiring recommendation information of a target second user corresponding to the target portrait characteristics;
and outputting the recommendation information of the target second user.
2. The method of claim 1, wherein the input information is an identity of the first user; the set of user portrait features further includes portrait features of the first user;
the obtaining of the query feature of the first user according to the input information of the first user includes:
searching the portrait characteristics of the first user in the user portrait characteristic set according to the identity of the first user;
and taking the portrait characteristics of the first user as the query characteristics.
3. The method of claim 1, wherein the input information is input text;
the obtaining of the query feature of the first user according to the input information of the first user includes:
dividing the input text into a plurality of phrases, and calling a word vector model to determine a word vector of each phrase;
fusing the plurality of word vectors of the input text into the query feature.
4. The method of claim 1, wherein the input information is an input image;
the obtaining of the query feature of the first user according to the input information of the first user includes:
calling an image classification model to determine a plurality of image content labels of the input image;
calling a word vector model to determine a word vector of each image content label of the input image;
fusing the plurality of word vectors of the input image into the query feature.
5. The method of claim 1, wherein obtaining a set of user representation features comprises:
acquiring a plurality of user associated images of a second user;
calling an image classification model to determine a plurality of image content labels of each user-associated image;
selecting a social tag of the second user from a plurality of image content tags of the second user according to the frequency of occurrence of each image content tag of the second user;
determining a word vector of the social label of the second user by calling a word vector model;
fusing word vectors of the social tags of the second user into portrait features of the second user.
6. The method of claim 5, wherein the image classification model comprises a feature extractor and a label discriminator;
the invoking the image classification model to determine a plurality of image content tags for each user-associated image includes:
calling the feature extractor to extract the image features of the user-associated image;
calling the label discriminator to identify matching probabilities between the image features and a plurality of image content labels in the image classification model;
selecting an image content label of the user-associated image from a plurality of image content labels in the image classification model according to a plurality of matching probabilities.
7. The method of claim 5, wherein said invoking the word vector model to determine a word vector for the social tag of the second user comprises:
searching a target hot code corresponding to the social label of the second user in a phrase hot code table;
determining a word vector for the social tag of the second user based on a hidden layer weight matrix in the word vector model and the target hot code.
8. The method of claim 1, wherein obtaining target representation features from the user representation feature set that match the query features comprises:
clustering portrait features of the plurality of second users into a plurality of unit feature clusters; each unit feature cluster includes a center portrait feature;
determining a first feature distance between the query feature and each central portrait feature;
taking a unit feature cluster to which the central image feature with the minimum first feature distance belongs as a target unit feature cluster in the plurality of first feature distances;
determining a second feature distance between the query feature and the portrait feature of each second user in the target unit feature cluster;
and selecting the target portrait characteristics matched with the query characteristics from the target unit characteristic clusters according to the second characteristic distance.
9. The method of claim 1, wherein the outputting recommendation information for the target second user comprises:
acquiring a recommendation condition input by the first user;
selecting recommendation information meeting the recommendation condition from the recommendation information of the target second user;
and outputting recommendation information meeting the recommendation condition.
10. The method of claim 1, further comprising:
acquiring a service block chain; the service block chain comprises a first service block, and the first service block is used for storing the input information of the first user;
acquiring the first service block from the service block chain, and reading the input information from the block body of the first service block;
the outputting of the recommendation information of the target second user includes:
and generating a second service block according to the recommendation information of the target second user, and adding the second service block to the service block chain.
11. An information recommendation apparatus, comprising:
the first acquisition module is used for acquiring the query characteristics of a first user according to the input information of the first user;
the second acquisition module is used for acquiring a user portrait feature set, wherein the user portrait feature set comprises portrait features of a plurality of second users, and the portrait feature of any second user is obtained by converting the social label of any second user;
the query module is used for acquiring target portrait characteristics matched with the query characteristics from the user portrait characteristic set;
the third acquisition module is used for acquiring recommendation information of a target second user corresponding to the target portrait characteristics;
and the output module is used for outputting the recommendation information of the target second user.
12. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1-10.
13. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method according to any one of claims 1-10.
CN202010124665.9A 2020-02-27 2020-02-27 Information recommendation method, device, computer equipment and storage medium Active CN111368219B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010124665.9A CN111368219B (en) 2020-02-27 2020-02-27 Information recommendation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010124665.9A CN111368219B (en) 2020-02-27 2020-02-27 Information recommendation method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111368219A true CN111368219A (en) 2020-07-03
CN111368219B CN111368219B (en) 2024-04-26

Family

ID=71206504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010124665.9A Active CN111368219B (en) 2020-02-27 2020-02-27 Information recommendation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111368219B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111931049A (en) * 2020-08-02 2020-11-13 吕维东 Business processing method based on big data and artificial intelligence and block chain financial platform
CN111988215A (en) * 2020-08-11 2020-11-24 上海连尚网络科技有限公司 Method and equipment for pushing user
CN112035756A (en) * 2020-08-27 2020-12-04 中国建设银行股份有限公司 Method and device for recommending friends of old people, electronic equipment and storage medium
CN112035611A (en) * 2020-08-28 2020-12-04 康键信息技术(深圳)有限公司 Target user recommendation method and device, computer equipment and storage medium
CN112035743A (en) * 2020-08-28 2020-12-04 腾讯科技(深圳)有限公司 Data recommendation method and device, computer equipment and storage medium
CN112507214A (en) * 2020-11-30 2021-03-16 百果园技术(新加坡)有限公司 Data processing method, device, equipment and medium based on user name
CN112632279A (en) * 2020-12-21 2021-04-09 北京搜狗科技发展有限公司 Method and related device for determining user label
CN113641901A (en) * 2021-08-05 2021-11-12 腾讯科技(深圳)有限公司 Information recommendation method and device, computer readable medium and electronic equipment
CN113704617A (en) * 2021-08-30 2021-11-26 康键信息技术(深圳)有限公司 Article recommendation method, system, electronic device and storage medium
CN113905024A (en) * 2020-11-19 2022-01-07 苏州燎原网络科技有限公司 Live broadcast tape cargo pushing method and system based on big data
CN114357280A (en) * 2021-11-29 2022-04-15 泰康保险集团股份有限公司 Information pushing method and device, electronic equipment and computer readable medium
US20220342939A1 (en) * 2021-04-23 2022-10-27 EMC IP Holding Company LLC Method for processing data, an electronic device, and a computer program product
CN117333203A (en) * 2023-12-01 2024-01-02 广东付惠吧数据服务有限公司 Member marketing platform combined with business marketing solution
CN117934122A (en) * 2024-03-22 2024-04-26 中电科大数据研究院有限公司 Intelligent recommendation method and system based on deep learning

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120087214A (en) * 2010-11-23 2012-08-07 한국과학기술원 Friend recommendation method for SNS user, recording medium for the same, and SNS and server using the same
US20130251201A1 (en) * 2012-03-22 2013-09-26 Samsung Electronics Co., Ltd. System and method for recommending buddies in social network
CN104268171A (en) * 2014-09-11 2015-01-07 东北大学 Activity similarity and social trust based social networking website friend recommendation system and method
CN104462325A (en) * 2014-12-02 2015-03-25 百度在线网络技术(北京)有限公司 Search recommendation method and device
CN104601438A (en) * 2014-04-28 2015-05-06 腾讯科技(深圳)有限公司 Friend recommendation method and device
CN106407412A (en) * 2016-09-23 2017-02-15 英华达(上海)科技有限公司 A friend recommendation method
US20170098165A1 (en) * 2014-06-20 2017-04-06 Huawei Technologies Co., Ltd. Method and Apparatus for Establishing and Using User Recommendation Model in Social Network
CN107679249A (en) * 2017-10-27 2018-02-09 上海掌门科技有限公司 Friend recommendation method and apparatus
CN108305180A (en) * 2017-01-13 2018-07-20 ***通信有限公司研究院 A kind of friend recommendation method and device
CN109062914A (en) * 2017-06-12 2018-12-21 东软集团股份有限公司 User's recommended method and device, storage medium and server
CN109544396A (en) * 2019-01-10 2019-03-29 腾讯科技(深圳)有限公司 Account recommended method, device, server, terminal and storage medium
CN109543111A (en) * 2018-11-28 2019-03-29 广州虎牙信息科技有限公司 Recommendation information screening technique, device, storage medium and server
CN109902753A (en) * 2019-03-06 2019-06-18 深圳市珍爱捷云信息技术有限公司 User's recommended models training method, device, computer equipment and storage medium
CN110298029A (en) * 2019-05-22 2019-10-01 平安科技(深圳)有限公司 Friend recommendation method, apparatus, equipment and medium based on user's corpus
WO2019227560A1 (en) * 2018-05-29 2019-12-05 科大讯飞股份有限公司 Information recommendation method, apparatus, system and device, and readable storage medium
US20200034656A1 (en) * 2017-09-08 2020-01-30 Tencent Technology (Shenzhen) Company Limited Information recommendation method, computer device, and storage medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120087214A (en) * 2010-11-23 2012-08-07 한국과학기술원 Friend recommendation method for SNS user, recording medium for the same, and SNS and server using the same
US20130251201A1 (en) * 2012-03-22 2013-09-26 Samsung Electronics Co., Ltd. System and method for recommending buddies in social network
CN104601438A (en) * 2014-04-28 2015-05-06 腾讯科技(深圳)有限公司 Friend recommendation method and device
US20170098165A1 (en) * 2014-06-20 2017-04-06 Huawei Technologies Co., Ltd. Method and Apparatus for Establishing and Using User Recommendation Model in Social Network
CN104268171A (en) * 2014-09-11 2015-01-07 东北大学 Activity similarity and social trust based social networking website friend recommendation system and method
CN104462325A (en) * 2014-12-02 2015-03-25 百度在线网络技术(北京)有限公司 Search recommendation method and device
CN106407412A (en) * 2016-09-23 2017-02-15 英华达(上海)科技有限公司 A friend recommendation method
CN108305180A (en) * 2017-01-13 2018-07-20 ***通信有限公司研究院 A kind of friend recommendation method and device
CN109062914A (en) * 2017-06-12 2018-12-21 东软集团股份有限公司 User's recommended method and device, storage medium and server
US20200034656A1 (en) * 2017-09-08 2020-01-30 Tencent Technology (Shenzhen) Company Limited Information recommendation method, computer device, and storage medium
CN107679249A (en) * 2017-10-27 2018-02-09 上海掌门科技有限公司 Friend recommendation method and apparatus
WO2019080637A1 (en) * 2017-10-27 2019-05-02 上海掌门科技有限公司 Friend recommendation method and device
WO2019227560A1 (en) * 2018-05-29 2019-12-05 科大讯飞股份有限公司 Information recommendation method, apparatus, system and device, and readable storage medium
CN109543111A (en) * 2018-11-28 2019-03-29 广州虎牙信息科技有限公司 Recommendation information screening technique, device, storage medium and server
CN109544396A (en) * 2019-01-10 2019-03-29 腾讯科技(深圳)有限公司 Account recommended method, device, server, terminal and storage medium
CN109902753A (en) * 2019-03-06 2019-06-18 深圳市珍爱捷云信息技术有限公司 User's recommended models training method, device, computer equipment and storage medium
CN110298029A (en) * 2019-05-22 2019-10-01 平安科技(深圳)有限公司 Friend recommendation method, apparatus, equipment and medium based on user's corpus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曲昭伟;杨凯翔;王晓茹;李百威;: "基于语义行为和社交关联的好友推荐模型", 南京大学学报(自然科学), no. 06, 30 November 2018 (2018-11-30) *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111931049A (en) * 2020-08-02 2020-11-13 吕维东 Business processing method based on big data and artificial intelligence and block chain financial platform
CN111988215A (en) * 2020-08-11 2020-11-24 上海连尚网络科技有限公司 Method and equipment for pushing user
CN112035756A (en) * 2020-08-27 2020-12-04 中国建设银行股份有限公司 Method and device for recommending friends of old people, electronic equipment and storage medium
CN112035611A (en) * 2020-08-28 2020-12-04 康键信息技术(深圳)有限公司 Target user recommendation method and device, computer equipment and storage medium
CN112035743A (en) * 2020-08-28 2020-12-04 腾讯科技(深圳)有限公司 Data recommendation method and device, computer equipment and storage medium
CN112035611B (en) * 2020-08-28 2023-05-30 康键信息技术(深圳)有限公司 Target user recommendation method, device, computer equipment and storage medium
WO2022041982A1 (en) * 2020-08-28 2022-03-03 腾讯科技(深圳)有限公司 Data recommendation method and apparatus, computer device, and storage medium
CN113905024A (en) * 2020-11-19 2022-01-07 苏州燎原网络科技有限公司 Live broadcast tape cargo pushing method and system based on big data
CN112507214A (en) * 2020-11-30 2021-03-16 百果园技术(新加坡)有限公司 Data processing method, device, equipment and medium based on user name
CN112507214B (en) * 2020-11-30 2024-04-05 百果园技术(新加坡)有限公司 User name-based data processing method, device, equipment and medium
CN112632279A (en) * 2020-12-21 2021-04-09 北京搜狗科技发展有限公司 Method and related device for determining user label
CN112632279B (en) * 2020-12-21 2024-06-07 北京搜狗科技发展有限公司 Method and related device for determining user tag
US20220342939A1 (en) * 2021-04-23 2022-10-27 EMC IP Holding Company LLC Method for processing data, an electronic device, and a computer program product
CN113641901A (en) * 2021-08-05 2021-11-12 腾讯科技(深圳)有限公司 Information recommendation method and device, computer readable medium and electronic equipment
CN113641901B (en) * 2021-08-05 2024-02-02 腾讯科技(深圳)有限公司 Information recommendation method, information recommendation device, computer readable medium and electronic equipment
CN113704617A (en) * 2021-08-30 2021-11-26 康键信息技术(深圳)有限公司 Article recommendation method, system, electronic device and storage medium
CN114357280A (en) * 2021-11-29 2022-04-15 泰康保险集团股份有限公司 Information pushing method and device, electronic equipment and computer readable medium
CN117333203A (en) * 2023-12-01 2024-01-02 广东付惠吧数据服务有限公司 Member marketing platform combined with business marketing solution
CN117333203B (en) * 2023-12-01 2024-04-16 广东付惠吧数据服务有限公司 Member marketing platform combined with business marketing solution
CN117934122A (en) * 2024-03-22 2024-04-26 中电科大数据研究院有限公司 Intelligent recommendation method and system based on deep learning

Also Published As

Publication number Publication date
CN111368219B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN111368219B (en) Information recommendation method, device, computer equipment and storage medium
US20220222920A1 (en) Content processing method and apparatus, computer device, and storage medium
Wang et al. Friendbook: a semantic-based friend recommendation system for social networks
JP2019514117A (en) System and method for searching and matching content across social networks associated with an individual
CN114330312B (en) Title text processing method, title text processing device, title text processing program, and recording medium
CN112035743B (en) Data recommendation method and device, computer equipment and storage medium
CN114201516B (en) User portrait construction method, information recommendation method and related devices
CN116664930A (en) Personalized federal learning image classification method and system based on self-supervision contrast learning
CN114741581A (en) Image classification method and device, computer equipment and medium
CN113641797A (en) Data processing method, device, equipment, storage medium and computer program product
CN113128526B (en) Image recognition method and device, electronic equipment and computer-readable storage medium
CN115204436A (en) Method, device, equipment and medium for detecting abnormal reasons of business indexes
CN114398909A (en) Question generation method, device, equipment and storage medium for dialogue training
CN108154165B (en) Marriage and love object matching data processing method and device based on big data and deep learning, computer equipment and storage medium
CN114330476A (en) Model training method for media content recognition and media content recognition method
CN110598127B (en) Group recommendation method and device
CN110516153B (en) Intelligent video pushing method and device, storage medium and electronic device
CN113010772B (en) Data processing method, related equipment and computer readable storage medium
CN114970494A (en) Comment generation method and device, electronic equipment and storage medium
CN112257517A (en) Scenic spot recommendation system based on scenic spot clustering and group emotion recognition
CN116775980B (en) Cross-modal searching method and related equipment
CN118035945B (en) Label recognition model processing method and related device
CN113254597B (en) Model training method, query processing method and related equipment
Alnabhan Location-based clustering and collaborative filtering for mobile learning
CN117372828A (en) Label generation method and device for multimedia information, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40025908

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant