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

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

Info

Publication number
CN111368219B
CN111368219B CN202010124665.9A CN202010124665A CN111368219B CN 111368219 B CN111368219 B CN 111368219B CN 202010124665 A CN202010124665 A CN 202010124665A CN 111368219 B CN111368219 B CN 111368219B
Authority
CN
China
Prior art keywords
user
portrait
feature
image
input
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.)
Active
Application number
CN202010124665.9A
Other languages
Chinese (zh)
Other versions
CN111368219A (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

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; the method comprises the steps of obtaining a user portrait feature set, wherein 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 labels of any second user; acquiring target portrait features matched with the query features from the user portrait feature set, and acquiring recommendation information of a target second user corresponding to the target portrait features; and outputting the recommendation information of the target second user. By adopting the method and the device, the recommendation accuracy of information recommendation can be improved.

Description

Information recommendation method, 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, an information recommendation device, 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 users in social software is an important function, so that more strangers become friends of the users, the depth of user connection can be enhanced, the communication breadth of the users is enlarged, and the information transmission efficiency is improved, so that the method has important significance for accurately recommending friends for the users.
At present, a friend recommending mode for a user is a distance-based mode, namely, the current position of the target user is obtained, and other users nearby the current position of the target user are recommended to the target user so as to enlarge the 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 that the recommendation accuracy of the 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.
In one aspect, 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;
The method comprises the steps of obtaining a user portrait feature set, wherein 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 labels of any second user;
Acquiring target portrait features matched with the query features from the user portrait feature set, and acquiring recommendation information of a target second user corresponding to the target portrait features;
and outputting the recommendation information of the target second user.
An aspect of an embodiment of the present application provides an information recommendation apparatus, 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 features of any second user are obtained by converting social tags of any second user;
The query module is used for acquiring target portrait features matched with the query features from the user portrait feature set;
The third acquisition module is used for acquiring recommendation information of a target second user corresponding to the target portrait characteristic;
and the output module is used for outputting the recommendation information of the target second user.
The input information is the identity of the first user; the user portrayal feature set further comprises a portrayal feature of the first user;
The first acquisition module comprises:
The query unit is used for searching the portrait features of the first user in the portrait feature set of the user according to the identity of the first user;
The first determining unit is used for taking the portrait characteristic of the first user as a query characteristic.
Wherein the input information is an input text;
The first acquisition module comprises:
the dividing unit is used for dividing the input text into a plurality of word groups, and calling a word vector model to determine the word vector of each word group;
And the second determining unit is used for fusing a plurality of word vectors of the input text into query features.
Wherein the input information is an input image;
The first acquisition module comprises:
A first calling unit for calling the image classification model to determine a plurality of image content tags of the input image, and calling the word vector model to determine a word vector of each image content tag of the input image;
and the third determining unit is used for fusing a plurality of word vectors of the input image into query features.
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 acquisition unit is further used for selecting a social label of the second user from a 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 the word vector of the social label of the second user;
the acquisition unit is also used for fusing the word vector of the social label 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 invoking unit is specifically configured to invoke the feature extractor to extract image features of the user-associated image, invoke the tag discriminator to identify matching probabilities between the image features and a plurality of image content tags in the image classification model, and select the 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 is specifically configured to find a target thermal code corresponding to the social label of the second user in the phrase thermal 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 thermal code in the word vector model.
The query module is specifically configured to cluster portrait features of a 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 image feature, wherein among the first feature distances, a unit feature cluster with the smallest first feature distance and the central image feature is taken as a target unit feature cluster, determining a second feature distance between the query feature and the image feature of each second user in the target unit feature cluster, and selecting a target image feature matched with the query feature from the target unit feature clusters according to the second feature distance.
Wherein, output module includes:
the selection unit is used for acquiring the recommendation conditions input by the first user and selecting recommendation information meeting the recommendation conditions from the recommendation information of the target second user;
and the output unit is used for outputting the recommendation information meeting the recommendation condition.
Wherein, still include:
The system comprises a reading module, a processing module and a processing module, wherein the reading module is used for acquiring 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; 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 includes:
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.
In one aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program when executed by the processor causes the processor to perform the method in the foregoing embodiments.
An aspect of an embodiment of the present application provides a computer storage medium storing a computer program comprising program instructions which, when executed by a processor, perform the method of the above embodiments.
According to the method, the query characteristics are determined by acquiring the input information input by the first user, the portrait characteristics similar to the query characteristics are searched in the portrait characteristics set of the user, the portrait characteristics in the portrait characteristics set of the user are obtained by converting the social labels of the second user, the target second user corresponding to the searched portrait characteristics is used as the user to be recommended of the first user, and the recommendation information of the target second user is output. According to the social label, the interest types and social information of the users can be accurately reflected, so that the target second users found from the plurality of second users can meet the recommendation requirements of the first users based on the social labels of the second users, and the recommendation accuracy of recommending information to the first users can be improved; further, from the aspect of recommendation, the method adopts the first user to actively search friends to be recommended, and compared with passive recommendation of a system, the recommendation accuracy of information recommended to the first user can be further improved by the first user to actively participate.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a system architecture diagram for information recommendation according to an embodiment of the present application;
fig. 2 to fig. 4 are schematic diagrams of a scenario of information recommendation provided in an embodiment of the present application;
FIG. 5 is a schematic flow chart of information recommendation according to an embodiment of the present application;
FIG. 6 is a schematic diagram of information recommendation according to an embodiment of the present application;
FIG. 7 is a schematic diagram of determining image characteristics according to an embodiment of the present application;
FIG. 8 is a schematic diagram of determining recommended users according to an embodiment of the present application;
FIG. 9 is a system architecture diagram of a blockchain provided by an embodiment of the present application;
FIG. 10 is a schematic flow chart of information recommendation according to 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 following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that simulates, extends, and extends human intelligence using a digital computer or a machine controlled by a digital computer, perceives the environment, obtains knowledge, and uses the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include 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 other directions.
The solution provided by the embodiment of the application belongs to machine learning (MACHINE LEARNING, ML), natural language processing (Nature Language processing, NLP) and Computer Vision (CV) technology which belong to the field of artificial intelligence.
Machine learning is a multi-domain interdisciplinary, involving multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and the like. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. In the application, a specific technical means relates to artificial neural networks and other technologies in machine learning.
Natural language processing is an important direction in the fields of computer science and artificial intelligence. It is studying various theories and methods that enable effective communication between a person and a computer in natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Thus, the research in this field will involve natural language, i.e. language that people use daily, so it has a close relationship with the research in linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic questions and answers, knowledge graph techniques, and the like. In the present application, a specific technical means relates to converting user input text into a real number vector (also referred to as word vector).
The computer vision technology is a science for researching how to make a machine "see", and further means that a camera and a computer are used for replacing human eyes to perform machine vision such as recognition, tracking and measurement on a target, and further performing graphic processing, so that the computer is processed into an image which is more suitable for human eyes to observe or transmit to an instrument to detect. In the application, the training of the image classification model is related, and the trained image classification model can automatically identify the image content label of the current image.
The specific process of the technical means is illustrated by the following examples:
Fig. 1 is a system architecture diagram for information recommendation according to an embodiment of the present application. The present application relates to a server 10d and a terminal device cluster, which may comprise: terminal device 10a, terminal device 10b, terminal device 10c, etc.
Taking terminal device 10a as an example, terminal device 10a is the 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 10d. The server 10d converts the input information into query features, and the server 10d acquires a user portrait feature set including portrait features of a plurality of second users, any one of which is obtained by performing word vector conversion on social tags of the second users. The server 10d searches the user portrait feature set for the target portrait feature matched with the query feature, and obtains the recommendation information of the target second user corresponding to the target portrait feature, where the recommendation information may be the user attribute such as the user name, gender, age, etc. 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 performed by the server 10d may be performed 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, searches the user portrait feature set for the target portrait feature similar to the query feature, and further obtains 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 may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), and basic cloud computing services such as big data and artificial intelligence platforms.
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, which is not limited herein.
In the friend recommendation scenario, the following fig. 2-4 illustrate how the terminal device 10a and the server 10d recommend friends to the first user.
Fig. 2 to fig. 4 are schematic diagrams of a scenario of information recommendation provided by the 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 the application scenario of the present application is as follows: the method comprises the steps that a first user inputs a recommendation mode through a social communication client, and the social communication client obtains input information of the first user based on the recommendation mode and sends the input information to a social communication server. The social communication server searches target second users which can be matched with the input information from the plurality of second users according to the input information, outputs user information of the target second users, and returns the user information to the social communication client so as to recommend the target second users to the first user and expand the friend range of the first user.
As shown in fig. 2, the terminal device 10a is a terminal device where the first user is located, and when the first user wants to enlarge the range of friends and obtain more stranger users that may become friends, the first user may access friend recommendation pages (such as the page 20a, the page 20b and the page 20c in fig. 2), where the friend recommendation pages include 3 recommendation modes, namely a user account mode, a text mode and an image mode; the user account mode is to search the 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 a 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 page 20a in fig. 2), and the terminal device 10a sends the user account of the first user to the server 10d, i.e. the user that the first user wishes to recommend is related to his social label. The user account is a unique identity of the user and has uniqueness and exclusivity.
Or the first user selects a text mode in the friend recommendation page (as shown by page 20b in fig. 2), and the first user inputs recommendation keywords in the text input page 20 c: nail art, i.e. the user that the first user wishes to recommend, is associated with nail art. The terminal device 10a may transmit the recommended keyword "nail art" to the server 10d.
Or the first user selects an image mode in the buddy recommendation page (as shown by page 20c in fig. 2), the first user captures an image 20h, i.e., the user the first user wishes to recommend is associated with image 20 h.
The first user may take photos/videos in real time as the image 20h, or may read photos/videos from the album file of the terminal apparatus 10a as the image 20h. The terminal device 10a may send the image 20h to the server 10d.
As can be seen from the above, the first user can obtain the recommended user through 3 recommendation modes.
When the terminal device 10a sends the user account of the first user to the server (assuming that the user account of the first user is user account 1), that is, the first user selects the user account mode, 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, where each portrait feature is obtained by converting a word vector of 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 characteristics 1 corresponding to the portrait characteristics set 20f based on the user account 1 of the first user. The server 10d calculates feature distances between the portrait feature 1 and the remaining portrait features in the portrait feature set 20f, and uses the user accounts corresponding to k (assuming that k is 2 here) portrait features with the nearest feature distances as user accounts to be recommended, and as shown in fig. 3a, assume 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 a word vector corresponding to the recommended keyword "nail art", that is, converts the recommended keyword "nail art" into a word vector corresponding thereto. The server 10d calculates feature distances between the word vector of the recommended keyword "nail art" and all the portrait features in the portrait feature set 20f, and takes the user account corresponding to k (assuming that k is 2 here) portrait features with the nearest feature distances as the user account to be recommended, as shown in fig. 3b, and assuming that the user account to be recommended is user account 2 and user account 3.
When the terminal device 10a transmits the image 20h to the server, that is, the first user selects the image mode, as shown in fig. 3c, the server 10d invokes the image classification model to determine an image content tag corresponding to the image 20h transmitted by the terminal device 10a, and the image content tag may be an animal type, a plant type, a vehicle or emotion type, or the like. The server 10d invokes the word vector model to convert the image content tags into word vectors corresponding thereto. The server 10d calculates feature distances between the word vector of the image content tag and all the image features in the image feature set 20f, and takes the user accounts corresponding to k (assuming that k is 2 here) image features with the nearest feature distances as the user accounts to be recommended, and as shown in fig. 3c, the user accounts to be recommended are assumed to be 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 user account 2 and user account 3, and the server 10d may obtain user information of the user account 2 and obtain 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 obtained user information of the user account 2 and the obtained 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.
According to the social label of the user, the recommendation user searched from the plurality of users can meet the current recommendation requirement of the first user, so that the probability that the recommendation user becomes a social friend of the first user can be improved, the friend range of the first user is enlarged, and the user viscosity of the first user in social communication software is increased.
The specific process of obtaining the input information (such as the user account 1 in the above embodiment, or the recommended keyword "nail art", or the image 20 h), obtaining the user portrait feature set (such as the portrait feature set 20f in the above embodiment), and searching the 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) may refer to the embodiments corresponding to fig. 5-10 below.
Referring to fig. 5, a flow chart of information recommendation provided by the embodiment of the application is shown, and the scheme of the application can be applied to a social communication server, and the social communication server can determine recommendation information matched with the current user according to the input information of the current user so as to meet the current recommendation requirement and improve the accuracy of information recommendation.
Further, the scheme of the application can also be applied to a social communication client, or the social communication client invokes a cloud server to execute the technical scheme related by the application through a cloud computing technology, and the cloud server returns the recommendation information output after executing the scheme to the social communication client.
The following embodiments describe the server as an execution subject, and the information recommendation may include the following steps:
step S101, acquiring query characteristics of a first user according to input information of the first user.
Specifically, the 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 corresponding embodiment of fig. 2-4), the server (e.g., the server 10d in the corresponding embodiment of fig. 2-4) obtains the identity of the first user (e.g., the user account 1 in the corresponding embodiment of fig. 2-4), and uses the identity as the input information of the first user.
If the selected recommended mode is the second mode (such as the text mode in the embodiment corresponding to fig. 2-4), the terminal device obtains the text input by the first user (called as the input text, such as the recommended keyword "nail art" in the embodiment corresponding to fig. 2-4), and the terminal device sends the input text to the server, and the server uses the input text as the input information of the first user.
If the selected recommended mode is the third mode (such as the image mode in the embodiment corresponding to fig. 2-4), the terminal device acquires the image input by the first user (referred to as the input image, such as the image 20h in the embodiment corresponding to fig. 2-4), and the terminal device sends the input image to the server, and the server uses the input image as the input information of the first user.
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 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 may be determined according to a recommended 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.
The input information may be the identity of the first user, the input text, or the input image. These 3 cases are each described below.
Firstly, explaining how to determine the query characteristics when the input information is the identity of the first user:
when the input information is the identity of the first user, the server acquires a user portrait feature set (such as portrait feature set 20f in the corresponding embodiment of fig. 2-4), where the user portrait feature set includes portrait features of a plurality of second users, and portrait features of the first user, where any portrait feature of the second user is obtained by performing word vector conversion on social tags of the second user; the portrait features of the first user are obtained by performing word vector conversion on the social labels 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 dimensions of the query feature and the vector dimensions of the portrait features are the same, and may be 200 dimensions.
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 user, marked images or shared images and the like.
And the server searches the portrait features of the first user from the portrait feature set of the user according to the identity of the first user, and takes the portrait features of the first user as query features.
Further, the portrait feature set of the first user may not include portrait features of the first user, and at this time, the server may obtain social tags of the first user in real time, and call a word vector model to determine a word vector of the social tags of the first user, and determine query features of the first user according to the word vector.
Then, how to determine the query feature when the input information is the input text will be described:
When the input information is an input text, the server performs word segmentation processing on the input text to divide the input text into a plurality of phrases. For example, the input text is: "good to participate in marathon", the input text may be divided into the following 3 phrases: "good thinking", "attended" and "marathon".
The server calls a word vector model to determine the word vector of each phrase, and performs weighted average on the plurality of word vectors, wherein the obtained vector is called the query feature 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.
Taking a phrase as an example, how to determine the word vector of the phrase based on the word vector model is described as follows:
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 1 in a plurality of numerical values contained in the vector is 0, and the rest of numerical values are all 0. The word vector model comprises a hiding layer and an output layer, and the hiding layer and the output layer are involved when the word vector model is trained; when using the word vector model, only the hidden layer participates. The above thermal encoding and the hidden layer weight matrix of the word vector model (the hidden layer weight matrix is the weight matrix of the hidden layer) are subjected to matrix multiplication, and the obtained vector is called the word vector of the phrase.
When the number of the word groups divided by the input text is plural, the word vector of each word group can be determined by adopting the above manner.
Finally, how to determine the query feature when the input information is the input image is described:
the server invokes the image classification model to determine a plurality of image content tags for the input image, the image content tags being used to represent image content, the image content tags being of an animal type, a plant type, a vehicle or a mood type, etc.
The server invokes the word vector model to determine the word vector for each image content tag of the input image, and the process of determining the word vector for each image content tag can be referred to above for determining the word vector for each phrase.
If the number of the input images is only one, the server may perform weighted average on the word vectors of the plurality of image content tags of the input images, and the obtained vector is called a query feature of the first user, where the weight of the word vector of each image content tag may be the same.
If the number of the input images is multiple, the server can call the image classification model to determine the image content label of each input image, count the occurrence frequency of each image content label, and determine the weight of each image content label according to the occurrence frequency, wherein the occurrence frequency is in direct proportion to the weight. The server may weight average the word vectors of the plurality of image content tags of the plurality of input images, the resulting vector being referred to as the 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.
Taking an input image as an example, how to determine an image content label of the input image based on an image classification model is described as follows:
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, calls the label discriminator to identify the matching probability between the image features and a plurality of image content labels in the image classification model, and takes k image content labels with the largest matching probability as the image content labels of the input image, wherein k can be equal to 10.
Step S102, a user portrait feature set is obtained, wherein the user portrait feature set comprises portrait features of a plurality of second users, and the portrait features of any second user are obtained by converting social labels of any second user.
Specifically, the server obtains a user portrait feature set (such as portrait feature set 20f in the corresponding embodiment of fig. 2-4) that includes portrait features of a plurality of second users, where any portrait feature of a second user is obtained by performing word vector conversion on a social label 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 can be images published by the user, praise marked images or shared images and the like.
The following describes how to obtain the portrait characteristics of a second user.
The server acquires an image (referred to as a user-associated image) having an association with the second user, the image having an association with the user being an image issued by the user, a praise-marked image, a shared image, or the like.
And calling an image classification model to determine the image content label of each user associated image, counting the occurrence frequency of each image content label, and selecting k image content labels with the largest occurrence frequency from a plurality of image content labels as social labels 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 characteristic 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, the second user has 2 user-associated images, and the image content label of the user-associated image 1 is: cat sucking lovers, british short haired cats and Egyptian cats; the image content labels of the user-associated image 2 are: cat sucking fans, bos cats and Egypt cats. Counting the occurrence frequency of the image content labels, wherein the occurrence frequency of the cat sucking fan is 2, the occurrence frequency of the Egyptian cat is 2, the occurrence frequency of the British short haired cat is 1, and the occurrence frequency of the Persian cat is 1. If the 2 image content labels with the largest occurrence frequency are selected as the social labels of the second user, the social labels of the second user are: cat sucking fan and Egypt cat.
Invoking a word vector model to respectively convert a social label of 'cat sucking fan' into a word vector 1 and convert a social label of 'Egyptian cat' into a word vector 2, and weighting and averaging the word vector 1 and the word vector 2 into portrait features of a second user, wherein the weight of the word vector 1 is 1/2, and the weight of the word vector 2 is also 1/2, because the occurrence frequency of the social labels corresponding to the two word vectors is 2.
Taking a user-associated image as an example, how to determine the image content label of the user-associated image based on the image classification model is described as follows:
The image classification model comprises a feature extractor and a label discriminator, the feature extractor is called to extract image features of the user associated image, the label discriminator is called to identify matching probability between the image features and a plurality of image content labels in the image classification model, k image content labels with the largest matching probability are taken as the image content labels of the user associated image, and k can be equal to 10.
Taking a social tag as an example, how to determine a word vector of the social tag based on a word vector model is described as follows:
The server searches the phrase hot code table for the hot code corresponding to the social label (called target hot code), the hot code is a vector, and the vector contains only one 1 in a plurality of numerical values, and the rest are all 0. The word vector model comprises a hiding layer and an output layer, and the hiding layer and the output layer are involved when the word vector model is trained; when using the word vector model, only the hidden layer participates. And (3) carrying out matrix multiplication on the target thermal code and a hidden layer weight matrix (the hidden layer weight matrix is a hidden layer weight matrix) of the word vector model, wherein the obtained vector is called a word vector of the social label.
The word vector model may be fasttext model or cbow model, and the training process of fasttext model is described below: dividing the sample text into a plurality of word groups, encoding each word group into thermal codes, and establishing a word group thermal encoding table. For a target phrase, firstly, obtaining the thermal codes of the context phrase of the target phrase in the sample text, multiplying the thermal codes of the context phrase by the hidden layer weight matrix (the hidden layer weight matrix at the moment can be a random matrix), and adding and averaging the obtained vectors to obtain the output vector of the hidden layer. And multiplying the output vector of the hidden layer by an output layer weight matrix (the output layer weight matrix at the moment can also be a random matrix) to obtain the output vector of the output layer. The dimension 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 the target phrase is a certain phrase. In the output vector of the output layer, the phrase indicated by the component with the highest probability is used as a predicted phrase, the thermal coding of the predicted phrase is searched, and the error between the thermal coding of the predicted phrase and the thermal coding of the target phrase is reversely transferred so as to update the hidden layer weight matrix and the output layer weight matrix. And continuously cycling, and continuously training the hidden layer weight matrix and the output layer weight matrix until the model converges.
It should be noted that training of the word vector model and training of the image classification model may be accomplished offline, and further, after training of the word vector model is completed, the trained word vector model may be invoked to determine word vectors corresponding to all phrases in the sample text, and combine all word vectors into a dictionary. Subsequently, when the word vector of a certain phrase needs to be determined, the word vector model is not required to be called, but the word vector model can be directly searched in the dictionary, so that the time consumption for calculating the word vector is shortened.
Step S103, obtaining target portrait features matched with the query features from the portrait feature set of the user.
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 dimensions are the same, and may be 200. The server may calculate a feature distance between the query feature and the portrayal feature of each second user in the user portrayal feature set, and use k portrayal features having the smallest feature distance as target portrayal features and use the second user corresponding to the target portrayal features as target second users.
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 a plurality of 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 feature, and a specific process for determining the target image feature based on the Faiss algorithm is described below:
The Faiss algorithm is to cluster all the portrait features of the second user in the portrait feature set of the user into a plurality of unit feature clusters by adopting a clustering algorithm (for example, a k clustering algorithm) aiming at clustering and similarity searching, wherein each unit feature cluster comprises a clustering center (called a center portrait feature), namely the rest portrait features in the same unit feature cluster are distributed around by taking the center portrait feature as the center. The clustering of the portrait features of the plurality of second users into the plurality of unit feature clusters may be accomplished offline.
The server calculates a feature distance (referred to as a first feature distance) between the query feature and each of the center portrait features, and uses a unit feature cluster to which the center portrait feature having the smallest first feature distance belongs as a target unit feature cluster. The server calculates distances (called second feature distances) between the query feature and the portrait features of the second user included in the target unit feature cluster, and selects, as target portrait features, portrait features corresponding to the k minimum second feature distances.
Step S104, acquiring recommendation information of a target second user corresponding to the target portrait features, and outputting the recommendation information of the target second user.
Specifically, taking the second user corresponding to the target portrait characteristic as a target second user, and the server acquires recommendation information of the target second user, where the recommendation information may include: at least one of identity, user name, social label, gender, age, and similarity of the user.
Wherein the similarity is determined based on a second feature distance between the portrait features of the target second user and the query features, and the similarity is inversely proportional to the second feature distance.
The server can output the recommendation information of the target second user, and then the server can send the recommendation information of the target second user to the terminal equipment where the first user is located, so that the user is recommended to the first user, and the friend range of the first user is enlarged.
Further, the terminal device where the first user is located acquires a recommendation condition input by the first user, where the recommendation condition may be: age range, gender, etc. The terminal equipment sends the recommendation condition to the server, after the server obtains the recommendation condition, the server selects the recommendation information meeting the recommendation condition from the recommendation information of the target second user, the server outputs the selected recommendation information, and the selected recommendation information is returned to the terminal equipment. The selected recommendation information can further meet the recommendation requirement of the first user, the probability that a 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.
Referring to fig. 6, a schematic diagram of information recommendation is provided in the embodiment of the present application, and as can be seen from the foregoing, there are 3 recommendation modes, and a first user can select any one mode according to the current recommendation requirement. These 3 recommended 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 the user account of the current first user (assuming that the user account is 123456), and searches the portrait characteristic corresponding to the user account "123456" from the portrait characteristic set constructed according to the massive user group, assuming that the portrait characteristic corresponding to the user account "123456" is: [ x-u1, x-u2, ]. The server determines the feature distance between the portrait features "[ x-u1, x-u2, ]. X-un ]" and each portrait feature in the portrait feature set (which can correspond to the user portrait feature set in the foregoing), takes the user corresponding to k portrait features with the smallest distance as the recommended user, and determines 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 similarity, user name, gender, etc. between the recommended user and the current first user.
When the query type is query type 2, the server acquires an input text input by the first user (assuming that the input text is that the user wants to participate in Beijing Malarch), and divides the input text into 4 phrases, which are respectively: "good thinking", "take part", "Beijing", "marathon". Calling a word vector model to convert the phrase 'good idea' into a word vector 1: [ x11, x12,..x1n ], converting the phrase "join" into a word vector 2: [ x21, x22,..x 2n ], converting the phrase "beijing" into a word vector 3: [ x31, x32,..x3n ], converts the phrase "marathon" into a word vector 4: [ x41, x42,..x 4n ]. The 4 word vectors are weighted and averaged to obtain the vector representation of the input text "good want to participate in Beijing Marasulam": [ x-t1, x-t2,..x-tn ], where the weights of the 4 word vectors are all the same. The server determines the feature distance between the vector representation of the input text, "[ x-t1, x-t2, ], x-tn ]" and each portrait feature in the portrait feature set, takes the user corresponding to k portrait features with the smallest distance as a recommended user, and determines 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 similarity, user name, gender, etc. 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, invokes an image classification model to determine an image content label of the input image, and presumes that the image content label is: marathons, marathons racing, ending, racing, running, cross-racing, and running bars, in fig. 6, the values following each image content tab represent the probability of a match between the input image and the image content tab. Invoking a word vector model, respectively converting the 10 image content labels into 10 word vectors, and carrying out weighted average on the 10 word vectors to obtain vector representation of an input image: [ x-i1, x-i2,..x-in ], where the weight of the 10 word vectors is proportional to the probability of matching the image content tag to which the word vector corresponds, or where the weights of the 10 word vectors are all the same. The server determines the feature distance between the vector representation of the input image, "[ x-i1, x-i2, ], x-in ] and each portrait feature in the portrait 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 k portrait 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 similarity, user name, gender, etc. between the recommended user and the current first user.
In the following, a specific explanation will be given of how to construct the portrait feature set in fig. 6, and since the portrait feature set is a set made up of portrait features of a plurality of users, one user (user a) will be given as an example, and the remaining users can refer to this to determine the portrait features corresponding to them, respectively.
Referring to fig. 7, a schematic diagram of determining portrait features is provided in an embodiment of the present application, and a server pulls a user-associated image of a user a (assume that the user-associated image of the user a is image 1, image 2, image 3, and image 4), where the user-associated image may be an image that the user a published in a friend-making community, a praise image, a shared image, or the like.
Invoking the image classification model determines image content tags for image 1, image 2, image 3, and image 4, respectively, each of which can determine 10 image content tags, and the probability of a match between the image content tags and the image. The server may count the occurrence frequency of each image content tag, and take k (assuming k=10) image content tags with the highest occurrence frequency as social tags of the user a, as shown in fig. 7, where the social tags of the user a are: marathons, marathons racing, horse race, running bar, running, ending.
The word vector model is invoked to determine word vectors of 10 social labels of the user a, respectively, as shown in fig. 7, word vector f1= [ x11, x12,., x1n ] of the social label "marathon", word vector f2= [ x21, x22,., x2n ] of the social label "marathon game", word vector f3= [ x31, x32,., x3n ], word vector f4= [ x41, x42,..x 4n ] of the social label "running horse", word vector f5= [ x51, x52,., x5n ], word vector f6= [ x61, x62,..x 6n ] of the social label "marathon", word vector f7= [ x71, x72,..x 7n ], word vector f 8.= [ x 9.=, word vector f 8.= [ x 9..x 10, [ x 9...
The server performs weighted average on the word vectors of the social labels 10 to obtain portrait features of the user A: f= [ x1, x2, ], xn=1/10 (w1f1+w2f2+, +w10f10), where the weight wi of the word vector of each social label is proportional to the frequency of occurrence of that social label.
Further, the first user may input a recommendation condition, such as an age range, a gender, an address, etc., in addition to selecting the recommendation mode, to further screen the recommended user. Referring to fig. 8, a schematic diagram of determining a recommended user according to an embodiment of the present application is shown, 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: the user wants to participate in Beijing Marathon, and the input recommended conditions are as follows: the age is in the range of 30-40 and the sex is male. The server determines the recommended user based on the recommended mode selected by the first user and the input text, and further screens out the recommended user meeting the recommended conditions according to the age and sex of the recommended user. 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. The server acquires nicknames, ages, sexes, social labels and similarity of the 4 recommended users, and sends the information to 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 the similarity between the recommended user a and the first user are displayed; a nickname, age, gender, social label and similarity between the recommended user B and the first user; a nickname, age, gender, social label of the recommending user C and similarity between the recommending 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.
According to the social label, the interest type and social information of the user can be accurately reflected, so that the target second user searched from the plurality of second users can meet the recommendation requirement of the first user based on the social labels of the second users, and the probability that the target second user corresponding to the recommendation information becomes a social friend of the first user is improved; from the aspect of recommendation, the method and the system adopt the first user to actively search friends to be recommended, and compared with passive recommendation of a system, the method and the system can further improve the recommendation accuracy of information recommended to the first user by the first user.
The input information and the recommendation information in the application can be stored on the blockchain, so the application can be applied to a blockchain (blockchain) scene. Blockchains are novel application modes of computer technologies such as distributed data storage, point-To-point transmission (P2P), consensus mechanisms, encryption algorithms, and the like. A blockchain is essentially a de-centralized database, which is a series of data blocks that are generated in association using cryptographic methods, each of which contains one or more transaction information for verifying the validity (anti-counterfeiting) of its information and generating the next block.
Referring to fig. 9, a system architecture diagram of a blockchain is provided in an embodiment of the present application. In the foregoing embodiment, the terminal device and the server where the first user is located may be node 1, node 2, node 3, or node 4 in fig. 9, and all the nodes may be combined into a blockchain system, where each node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer. As can be seen in 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 describe a target blockchain node as an execution body, where the target blockchain node is any node of a plurality of nodes in a blockchain system, and the target blockchain node may correspond to a server in the foregoing:
fig. 10 is a schematic flow chart of information recommendation according to an embodiment of the present application, and the information recommendation method includes the following steps:
Step S201, obtaining a service block chain; the traffic blockchain includes a first traffic block for storing input information of a first user.
Specifically, the target block chain link point acquires a service block chain, the service block chain comprises a plurality of service blocks, and the service blocks can 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 includes a first service block for storing input information of a first user.
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-tamperable attribute of the block chain, the input information obtained by the link point of the target block can be ensured to be credible and not tampered, so that the trust degree of a user is increased.
Step S202, the first service block is obtained from the service block chain, and the input information is read from the block body of the target service block.
Specifically, the target block link point reads the 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 characteristics of the first user according to the input information of the first user.
Step S204, a user portrait feature set is obtained, wherein the user portrait feature set comprises portrait features of a plurality of second users, and the portrait features of any second user are obtained by converting social labels of any second user.
Step S205, the target portrait features matched with the query features are obtained from the user portrait feature set, and the recommendation information of the target second user corresponding to the target portrait features is obtained.
The specific process of step S203 to step S205 may refer to step S101 to step S103 in the corresponding embodiment of fig. 5, where the execution body 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 the recommended information of the target second user to the block, calculates the merck root of the recommended information, acquires the hash value of the last service block in the current service block chain, stores the merck root of the recommended information, the hash value of the last service block in the current service block chain and the current timestamp to the block head, combines the block head and the block body storing the recommended information into a second service block, adds the second service block to the 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 each node, and the service block chains maintained by each node achieve synchronization.
Subsequently, the blockchain node where the first user is located may read the second service block from the service blockchain node, and read the recommendation information of the target second user from the second service block, and display the recommendation information to the first user.
According to the social label, the interest type and social information of the user can be accurately reflected, and the social label is based on the complete attribute and the non-falsifiable attribute of the blockchain, so that the recommendation accuracy of recommending information to the first user can be improved because the target second user found 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; further, from the aspect of recommendation, the method adopts the first user to actively search friends to be recommended, and compared with passive recommendation of a system, the recommendation accuracy of information recommended to the first user can be further improved by the first user to actively participate.
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 means may be a computer program (comprising program code) running in the computer device, for example the information recommendation means is an application software; the device can be used for executing corresponding steps in the method provided by the embodiment of the application.
The information recommendation device 1 may include: the first acquisition module 11, the second acquisition module 12, the query module 13, the third acquisition module 14 and the output module 15.
A first obtaining module 11, configured to obtain a query feature of a first user according to input information of the first user;
a second obtaining module 12, configured to obtain a user portrait feature set, where the user portrait feature set includes portrait features of a plurality of second users, and portrait features of any one second user are obtained by converting social tags of any one second user;
A query module 13, configured to obtain target portrait features matched with the query features 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;
A query module 13, specifically configured to cluster portrait features of a 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 image feature, wherein among the first feature distances, a unit feature cluster with the smallest first feature distance and the central image feature is taken as a target unit feature cluster, determining a second feature distance between the query feature and the image feature of each second user in the target unit feature cluster, and selecting a target image feature matched with the query feature from the target unit feature clusters according to the second feature distance.
The specific functional implementation manners of the first acquiring module 11, the second acquiring module 12, the query module 13, the third acquiring module 14, and the output module 15 may be referred to step S101-step S104 in the corresponding embodiment of fig. 5, and will not be described herein.
Referring to fig. 11, the input information is an identity of the first user; the user portrayal feature set further comprises a portrayal feature of the first user;
The first acquisition module 11 may include: the query unit 111 and the first determination unit 112.
A query unit 111, configured to search the portrait feature of the first user in the portrait feature set of the user according to the identity of the first user;
The first determining unit 112 is configured to use the portrait characteristic of the first user as a query characteristic.
The specific process of the query unit 111 and the first determining unit 112 may refer to step S101 in the corresponding embodiment of fig. 5.
Referring to fig. 11, the input information is an input text;
the first acquisition module 11 may include: the dividing unit 113 and the second determining unit 114.
A dividing unit 113, configured to divide an input text into a plurality of phrases, and invoke a word vector model to determine a word vector of each phrase;
the second determining unit 114 is configured to fuse a plurality of word vectors of the input text into a query feature.
The specific process of the dividing unit 113 and the second determining unit 114 may be referred to as step S101 in the corresponding embodiment of fig. 5.
Referring to fig. 11, the input information is an input image;
the first acquisition module 11 may include: the first invoking unit 115 and the third determining unit 116.
A first calling unit 115 for calling the image classification model to determine a plurality of image content tags of the input image, and calling the word vector model to determine a word vector of each image content tag of the input image;
The third determining unit 116 is configured to fuse a plurality of word vectors of the input image into a query feature.
The specific process of the dividing unit 113 and the second determining unit 114 may be referred to as step S101 in the corresponding embodiment of fig. 5.
It is known that when the query unit 111 and the first determination unit 112 determine the query feature, 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 feature, the query unit 111, the first determining unit 112, the first calling unit 115, and the third determining unit 116 no longer perform the corresponding steps; when the first invoking unit 115 and the third determining unit 116 determine the query feature, the query unit 111, the first determining unit 112, the dividing unit 113 and the second determining unit 114 no longer perform the corresponding steps.
Referring to fig. 11, the second acquisition module 12 may include: a dividing unit 131, a first determining unit 132, and a second determining unit 133.
An acquisition unit 121 for acquiring a plurality of user-associated images of a second user;
A second calling unit 122 for calling 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 a social label of the second user from a plurality of image content labels of the second user according to occurrence frequency of each image content label of the second user;
A third invoking unit 123, configured to invoke 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 the word vector of the social label of the second user into the portrait feature of the second user;
the image classification model comprises a feature extractor and a label discriminator;
The second invoking unit 122 is specifically configured to invoke the feature extractor to extract image features of the user-associated image, invoke the tag identifier to identify matching probabilities between the image features and a 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 find a target thermal code corresponding to the social label of the second user in the phrase thermal 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 thermal 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 be referred to as step S102 in the corresponding embodiment of fig. 4.
Referring to fig. 11, the output module 14 may include: the selection unit 141 and the output unit 142.
A selecting unit 141, configured to obtain a recommendation condition input by a first user, and select recommendation information that meets the recommendation condition from recommendation information of a target second user;
And an output unit 142 for outputting recommendation information satisfying the recommendation condition.
The specific process of the selecting unit 141 and the output unit 142 may be referred to step S104 in the corresponding embodiment of fig. 4.
Referring back to fig. 11, the information recommendation apparatus may include: a first acquisition module 11, a second acquisition module 12, a query module 13, a third acquisition module 14, and an output module 15; may further include: a reading module 16.
A reading module 16, configured to obtain a service block chain, where the service block chain includes a first service block, and the first service block is configured 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.
And an adding unit 143, 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 be referred to steps S201-202 in the corresponding embodiment of fig. 10; the specific process of the adding unit 143 may be referred to step S206 in the corresponding embodiment of fig. 10 described above.
Further, please refer to fig. 12, which is a schematic diagram of a computer device according to an embodiment of the present invention. The server and the target blockchain node in the corresponding embodiments of fig. 5-10 may be the computer device 1000, as shown in fig. 12, where 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, a. 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 examples, memory 1008 may further include memory located remotely from processor 1004, which may be connected to 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 invoke the storage of a computer program in the memory 1008 to implement:
acquiring query characteristics of a first user according to input information of the first user;
The method comprises the steps of obtaining a user portrait feature set, wherein 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 labels of any second user;
Acquiring target portrait features matched with the query features from the user portrait feature set, and acquiring recommendation information of a target second user corresponding to the target portrait features;
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 recommending method in the embodiment corresponding to fig. 4 to 10, and may also perform the description of the information recommending apparatus 1 in the embodiment corresponding to fig. 11, which is not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiment of the present invention further provides a computer storage medium, in which a computer program executed by the aforementioned information recommendation device 1 is stored, and the computer program includes program instructions, when executed by a processor, can execute the description of the information recommendation method in the embodiment corresponding to fig. 5 to 10, and therefore, a description thereof will not be repeated here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer storage medium according to the present invention, please refer to the description of the method embodiments of the present invention. As an example, the program instructions may be deployed on one computer device or executed on multiple computer devices at one site or distributed across multiple sites and interconnected by a communication network, where the multiple computer devices distributed across multiple sites and interconnected by a communication network may constitute a blockchain system.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of computer programs, which may be stored on a computer-readable storage medium, and which, when executed, may comprise the steps 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 (Random Access Memory, RAM), or the like.
The foregoing disclosure is illustrative of the present invention and is not to be construed as limiting the scope of the invention, which is defined by the appended claims.

Claims (12)

1. An information recommendation method, comprising:
Acquiring input information input by a first user at a client according to a recommended mode selected by the first user; when the recommended mode is a text mode, the input information is an input text input by the first user; when the recommended mode is an image mode, the input information is an input image input by the first user;
acquiring query characteristics of the first user according to the input information of the first user;
the method comprises the steps of obtaining a user portrait feature set, wherein the user portrait feature set comprises portrait features of a plurality of second users, and the portrait features of any second user are obtained by converting social labels of any second user; the portrait characteristic acquisition process of any second user comprises the following steps: acquiring a plurality of user associated images of any second user, and calling an image classification model to determine a plurality of image content labels of each user associated image in the plurality of user associated images; selecting a social label of any one of the second users from a plurality of image content labels of the any one of the second users according to the occurrence frequency of each image content label of the any one of the second users; invoking a word vector model to determine word vectors of the social labels of any one of the second users, and fusing the word vectors of the social labels of any one of the second users into portrait features of any one of the second users;
Acquiring target portrait features matched with the query features from the user portrait feature set, and acquiring recommendation information of a target second user corresponding to the target portrait features;
Outputting recommendation information of the target second user; the recommendation information is recommendation information meeting recommendation conditions in the recommendation information of the target second user, and the recommendation conditions are input by the first user.
2. The method of claim 1, wherein the input information is an identity of the first user; the user portrayal feature set further comprises a portrayal feature of the first user;
the obtaining the query feature of the first user according to the input information of the first user includes:
Searching the portrait features of the first user in the portrait feature set of the user according to the identity of the first user;
And taking the portrait characteristic of the first user as the query characteristic.
3. The method of claim 1, wherein the input information is input text;
the obtaining 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 word groups, and calling a word vector model to determine the word vector of each word group;
And fusing a 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 the query feature of the first user according to the input information of the first user includes:
invoking an image classification model to determine a plurality of image content tags for the input image;
Invoking a word vector model to determine a word vector for each image content tag of the input image;
and fusing a plurality of word vectors of the input image into the query feature.
5. The method of claim 1, wherein the image classification model comprises a feature extractor and a tag discriminator;
The invoking the image classification model to determine a plurality of image content tags for each of the plurality of user-associated images includes:
Invoking the feature extractor to extract image features of the user-associated image;
invoking the tag discriminator to identify a probability of matching between the image feature and a plurality of image content tags in the image classification model;
And selecting the image content labels of the user associated images from a plurality of image content labels in the image classification model according to a plurality of matching probabilities.
6. The method of claim 1, wherein the invoking the word vector model to determine the word vector for the social tag of the any one of the second users comprises:
Searching a target thermal code corresponding to the social label of any second user in a phrase thermal code table;
And determining word vectors of the social labels of any second user based on the hidden layer weight matrix in the word vector model and the target thermal codes.
7. The method of claim 1, wherein the obtaining the target portrait features from the set of user portrait features that match the query features comprises:
clustering the portrait features of the plurality of second users into a plurality of unit feature clusters; each unit feature cluster comprises a center portrait feature;
determining a first feature distance between the query feature and each center image feature;
Among the plurality of first feature distances, taking a unit feature cluster to which a center portrait feature having the smallest first feature distance belongs as a target unit feature cluster;
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 features matched with the query features from the target unit feature clusters according to the second feature distance.
8. The method of claim 1, wherein the outputting the recommendation information for the target second user comprises:
acquiring recommended conditions input by the first user;
Selecting recommendation information meeting the recommendation conditions from the recommendation information of the target second user;
and outputting recommendation information meeting the recommendation conditions.
9. The method as recited in claim 1, further comprising:
Acquiring a service block chain; the traffic blockchain includes a first traffic block 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 a 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.
10. An information recommendation device, characterized by comprising:
the first acquisition module is used for acquiring input information input by a first user at a client according to a recommendation mode selected by the first user; when the recommended mode is a text mode, the input information is an input text input by the first user; when the recommended mode is an image mode, the input information is an input image input by the first user; acquiring 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 features of any second user are obtained by converting social labels of any second user; the portrait characteristic acquisition process of any second user comprises the following steps: acquiring a plurality of user associated images of any second user, and calling an image classification model to determine a plurality of image content labels of each user associated image in the plurality of user associated images; selecting a social label of any one of the second users from a plurality of image content labels of the any one of the second users according to the occurrence frequency of each image content label of the any one of the second users; invoking a word vector model to determine word vectors of the social labels of any one of the second users, and fusing the word vectors of the social labels of any one of the second users into portrait features of any one of the second users;
The query module is used for acquiring target portrait features matched with the query features from the user portrait feature set;
The third acquisition module is used for acquiring recommendation information of a target second user corresponding to the target portrait characteristic;
the output module is used for outputting the recommendation information of the target second user; the recommendation information is recommendation information meeting recommendation conditions in the recommendation information of the target second user, and the recommendation conditions are input by the first user.
11. 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 of any of claims 1-9.
12. 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 of any of claims 1-9.
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 CN111368219A (en) 2020-07-03
CN111368219B true 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)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112948669A (en) * 2020-08-02 2021-06-11 吕维东 Business processing method based on big data and artificial intelligence and block chain financial platform
CN111988215B (en) * 2020-08-11 2022-07-12 上海连尚网络科技有限公司 Method, equipment and computer readable medium 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
CN112035743B (en) * 2020-08-28 2021-10-15 腾讯科技(深圳)有限公司 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
CN113905024A (en) * 2020-11-19 2022-01-07 苏州燎原网络科技有限公司 Live broadcast tape cargo pushing method and system based on big data
CN112507214B (en) * 2020-11-30 2024-04-05 百果园技术(新加坡)有限公司 User name-based data processing method, device, equipment and medium
CN115237944A (en) * 2021-04-23 2022-10-25 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for processing data
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
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

Citations (13)

* 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
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130251201A1 (en) * 2012-03-22 2013-09-26 Samsung Electronics Co., Ltd. System and method for recommending buddies in social network
CN105446973B (en) * 2014-06-20 2019-02-26 华为技术有限公司 The foundation of user's recommended models and application method and device in social networks
CN108304435B (en) * 2017-09-08 2020-08-25 腾讯科技(深圳)有限公司 Information recommendation method and device, computer equipment and storage medium

Patent Citations (14)

* 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
CN104601438A (en) * 2014-04-28 2015-05-06 腾讯科技(深圳)有限公司 Friend recommendation method and device
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
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
基于语义行为和社交关联的好友推荐模型;曲昭伟;杨凯翔;王晓茹;李百威;;南京大学学报(自然科学);20181130(06);全文 *

Also Published As

Publication number Publication date
CN111368219A (en) 2020-07-03

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
CN110472090B (en) Image retrieval method based on semantic tags, related device and storage medium
US20230017667A1 (en) Data recommendation method and apparatus, computer device, and storage medium
CN111737582B (en) Content recommendation method and device
CN113723166A (en) Content identification method and device, computer equipment and storage medium
CN107634897B (en) Group recommendation method and device
CN111783903B (en) Text processing method, text model processing method and device and computer equipment
CN113806588B (en) Method and device for searching video
CN112131261B (en) Community query method and device based on community network and computer equipment
CN112085120B (en) Multimedia data processing method and device, electronic equipment and storage medium
Wang et al. Deep multi-person kinship matching and recognition for family photos
CN116664930A (en) Personalized federal learning image classification method and system based on self-supervision contrast learning
Khurram et al. Dense-captionnet: a sentence generation architecture for fine-grained description of image semantics
CN113935401A (en) Article information processing method, article information processing device, article information processing server and storage medium
US20180239790A1 (en) Provision device, provision method and non-transitory computer readable storage medium
CN110516153B (en) Intelligent video pushing method and device, storage medium and electronic device
CN116956183A (en) Multimedia resource recommendation method, model training method, device and storage medium
Eichinger et al. Affinity: A system for latent user similarity comparison on texting data
CN114329049A (en) Video search method and device, computer equipment and storage medium
CN113010772A (en) Data processing method, related equipment and computer readable storage medium
CN112257517A (en) Scenic spot recommendation system based on scenic spot clustering and group emotion recognition
Wang et al. TASTA: Text‐Assisted Spatial and Temporal Attention Network for Video Question Answering
CN116775980B (en) Cross-modal searching method and related 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