CN111400582A - Friend recommendation method and device, storage medium and electronic equipment - Google Patents

Friend recommendation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111400582A
CN111400582A CN202010159147.0A CN202010159147A CN111400582A CN 111400582 A CN111400582 A CN 111400582A CN 202010159147 A CN202010159147 A CN 202010159147A CN 111400582 A CN111400582 A CN 111400582A
Authority
CN
China
Prior art keywords
target user
style
recommended
shooting
friend
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.)
Pending
Application number
CN202010159147.0A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010159147.0A priority Critical patent/CN111400582A/en
Publication of CN111400582A publication Critical patent/CN111400582A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Library & Information Science (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application discloses a friend recommendation method, a friend recommendation device, a storage medium and electronic equipment, wherein a shooting style of a target user is obtained by obtaining a historical image shot by the target user and quantitatively evaluating the shooting style of the target user according to the obtained historical image, then a friend to be recommended of the target user is determined according to the obtained shooting style of the user through evaluation, and the friend to be recommended is recommended to the target user. Therefore, friends interesting to the target user are recommended according to the shooting style, and recommendation of friends of the shooting circle is more accurate.

Description

Friend recommendation method and device, storage medium and electronic equipment
Technical Field
The application relates to the technical field of image processing, in particular to a friend recommendation method and device, a storage medium and electronic equipment.
Background
With the continuous development of the internet, social networks are also rapidly developed. In an open social network, how to efficiently recommend potential friends to a user is a complicated problem. In the related art, a two-degree friend mode is generally adopted when friend recommendation is performed. Information of second degree friends, i.e., friends of a user, such as the same work unit who has a shift or the same job, is commonly used for friend recommendation. However, the recommendation method of the second-degree friends often cannot realize accurate recommendation of friends.
Disclosure of Invention
The embodiment of the application provides a friend recommendation method and device, a storage medium and electronic equipment, friends interesting to a target user are recommended through a shooting style, and friend recommendation for a shooting circle is more accurate.
The embodiment of the application provides a friend recommendation method, which comprises the following steps:
acquiring a history image shot by a target user;
carrying out quantitative evaluation on the shooting style of the target user according to the historical image to obtain the shooting style of the user;
determining a friend to be recommended corresponding to the target user according to the user shooting style;
and recommending the friend to be recommended to the target user.
The friend recommendation device provided by the embodiment of the application comprises:
the image acquisition module is used for acquiring a historical image shot by a target user;
the style evaluation module is used for quantitatively evaluating the shooting style of the target user according to the historical image to obtain the shooting style of the user;
the friend determining module is used for determining a friend to be recommended corresponding to the target user according to the shooting style of the user;
and the friend recommending module is used for recommending the friend to be recommended to the target user.
The storage medium provided by the embodiments of the present application stores a computer program thereon, and when the computer program is loaded by a processor, the friend recommendation method provided by any embodiment of the present application is executed.
The electronic device provided by the embodiment of the application comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used for executing the friend recommendation method provided by any embodiment of the application by loading the computer program.
Compared with the related art, the method and the device have the advantages that the historical image shot by the target user is obtained, the shooting style of the target user is quantitatively evaluated according to the obtained historical image, the shooting style of the user is obtained, the friend to be recommended corresponding to the target user is determined according to the user shooting style obtained through evaluation, and the friend to be recommended is recommended to the target user. Therefore, friends interesting to the target user are recommended according to the shooting style, and recommendation of friends of the shooting circle is more accurate.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flow chart of a friend recommendation method provided in an embodiment of the present application.
Fig. 2 is an exemplary diagram of a friend adding interface in an embodiment of the application.
Fig. 3 is a schematic diagram of a drawing point in the embodiment of the present application.
Fig. 4 is another flowchart illustrating a friend recommendation method according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a friend recommendation device according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that the following description is provided by way of illustrative examples of the present application and should not be construed as limiting the other examples of the present application which are not detailed herein.
It can be understood that the composition method depending on the experience has a high requirement for the user, and requires the user to spend much time and effort to learn the composition and accumulate the experience, which is difficult to get to the hands quickly. It is difficult for a user to capture a high-quality image through an electronic device without relevant experience and guidance.
Therefore, the embodiment of the application provides a friend recommendation method, a friend recommendation device, a storage medium and an electronic device. An execution main body of the friend recommendation method may be the friend recommendation device provided in the embodiment of the present application, or an electronic device integrated with the friend recommendation device, where the friend recommendation device may be implemented in a hardware or software manner. The electronic device may be a smart phone, a tablet computer, a palm computer, a notebook computer, or a desktop computer, a server, or other devices with processing capability and configured with a processor.
Referring to fig. 1, fig. 1 is a schematic flow chart of a friend recommendation method provided in an embodiment of the present application, and a specific flow of the friend recommendation method provided in the embodiment of the present application may be as follows:
in 101, a history image taken by a target user is acquired.
The target user is a user who needs to perform friend recommendation, such as an owner of the electronic device, or a specific user specified by the owner.
For example, when the electronic device has a shooting function, such as a mobile phone, the mobile phone may determine the owner as a user who needs to perform friend recommendation, and correspondingly acquire a history image shot by the owner, where the history image includes a history image shot by the owner according to a shooting instruction of the owner, and also includes a history image shot by another electronic device used by the owner according to a shooting instruction of the owner.
In addition, when the electronic device does not have a shooting function, such as a server, the server may send an image acquisition instruction to another electronic device with a shooting function used by a specified target user, and instruct the other electronic device to return a history image shot by the target user.
It should be noted that the history images acquired above are all history images for which the user has not set privacy authority.
In 102, the shooting style of the target user is quantitatively evaluated according to the historical image, and the shooting style of the user is obtained.
It is understood that the photography enthusiasts have their own unique photography styles, such as portrait preference, food preference, landscape preference, architectural preference, etc., from the perspective of the photography scene. If different users have the same shooting style, the users are more likely to become interesting friends, and then communicate, study, promote together and the like.
Based on the above consideration, the electronic device performs friend recommendation according to the shooting style of the target user. Correspondingly, the electronic equipment quantitatively evaluates the shooting style of the target user according to the acquired historical image and a preset quantitative evaluation strategy to obtain a quantitative user shooting style, namely a digital user shooting style.
In 103, the friend to be recommended corresponding to the target user is determined according to the shooting style of the user.
After the user shooting style is obtained through evaluation, the electronic device further determines the friend to be recommended of the corresponding target user according to the user shooting style, for example, the electronic device determines other users with shooting styles similar to the user shooting style as the friend to be recommended.
At 104, the friend to be recommended is recommended to the target user.
After determining the friends to be recommended corresponding to the target user, the electronic equipment recommends the determined friends to be recommended to the target user. In the embodiment of the application, how to recommend the friend to be recommended to the target user is not specifically limited, and the recommendation method can be configured by a person having ordinary skill in the art according to actual needs.
For example, referring to fig. 2, the electronic device provides a friend recommendation interface, and after determining a friend to be recommended corresponding to the target user, the electronic device displays the friend recommendation interface, where the friend recommendation interface includes an identifier of the determined friend to be recommended (for example, "zhangsan," "liquan," and "wangsi" shown in fig. 2) and an addition control associated with each friend to be recommended. When the adding control is triggered, the electronic equipment initiates a friend adding request to a friend to be recommended associated with the triggered adding control, and when the friend to be recommended agrees to the initiated friend adding request, the establishment of the friend relationship between the target user and the friend to be recommended is completed.
According to the method and the device, the historical image shot by the target user is obtained, the shooting style of the target user is quantitatively evaluated according to the obtained historical image, the shooting style of the user is obtained, the friend to be recommended corresponding to the target user is determined according to the user shooting style obtained through evaluation, and the friend to be recommended is recommended to the target user. Therefore, friends interesting to the target user are recommended according to the shooting style, and recommendation of friends of the shooting circle is more accurate.
In one embodiment, the quantitative evaluation of the shooting style of the target user according to the historical image to obtain the user shooting style comprises the following steps:
and carrying out quantitative evaluation on the shooting style of the target user in different dimensions according to the historical image to obtain the shooting style of the user.
In the embodiment of the application, in order to accurately quantify the shooting style of the target user, the electronic equipment quantifies and evaluates the shooting style of the target user in different style dimensions according to the obtained historical images, and obtains the shooting style of the user fusing a plurality of style dimensions of the target user.
It should be noted that, in the embodiment of the present application, there is no particular limitation on selecting those style dimensions for quantitative evaluation, and the selection may be performed by a person having ordinary skill in the art according to actual needs.
In one embodiment, the method for quantitatively evaluating the shooting style of a target user in different dimensions according to historical images to obtain the shooting style of the user comprises the following steps:
(1) identifying scene frequencies of different scenes shot by a target user according to the historical images, and constructing a scene feature vector representing a scene dimension shooting style according to the scene frequencies;
(2) identifying mode frequencies of different composition modes adopted by a target user during shooting according to the historical images, and constructing composition characteristic vectors representing composition dimension shooting styles according to the mode frequencies;
(3) identifying color frequencies of different colors adopted by a target user during shooting according to the historical image, and constructing a color feature vector representing a color dimension shooting style according to the color frequencies;
(4) and splicing the scene feature vector, the composition feature vector and the color feature vector to obtain a style feature vector representing the shooting style of the user.
The embodiment of the application provides a scheme for carrying out multi-dimensional quantitative evaluation on the shooting style of a target user. The style of three dimensions is respectively a scene dimension, a composition dimension and a color dimension.
For the scene dimension, the electronic equipment identifies the scene frequency of the target user for shooting different scenes according to the acquired historical map, and constructs a scene feature vector representing the shooting style of the scene dimension according to the scene frequency of the different scenes.
And for each acquired historical image, the electronic equipment performs scene recognition on the historical image by using a pre-trained scene recognition model to obtain a scene recognition result describing the scene of the historical image. For example, a deep learning network such as a convolutional neural network may be adopted in advance to train to obtain the scene recognition model. In general, a scene recognition model may include an input layer for receiving an input of an image, a hidden layer for processing the received image, and an output layer for outputting a final result of the image processing, i.e., a scene recognition result of an output image.
The scene of the image may be a landscape, a beach, a blue sky, a green grass, a snow scene, text, a portrait, a baby, a cat, a dog, a food, etc. The classification label of the image refers to a scene classification label of the image. In the embodiment of the application, the scene recognition result of the image can be used as the classification label of the image. For example, when the scene recognition result of the image is a blue sky, the classification label of the image is a blue sky. The electronic equipment can perform scene recognition on the image of the electronic equipment according to the scene recognition model, and determine the classification label of the image according to the scene recognition result.
The background information of the image refers to a scene classification label of the whole image, and may be a label expressing the whole image information, such as a landscape, a beach, a blue sky, a green grass, a snow scene, and the like. The foreground information of the image refers to a label which is positioned at a prominent position of the picture in the image and can be identified by a rectangular frame, and the label can be a label which expresses individual information such as a portrait, a baby, a cat, a dog, a food and the like.
The electronic equipment identifies scenes of all the acquired historical images to obtain the times of shooting each scene by the target user, and the frequency of shooting each scene can be obtained by dividing the times by the total number. And then, the electronic equipment constructs a scene feature vector representing the scene dimension shooting style according to the scene frequencies corresponding to different scenes.
For example, if the photographed scene is a portrait, a blue sky, and a snow scene, where the number of times of appearance of the portrait is 25, the number of times of appearance of the blue sky is 10, and the number of times of appearance of the snow scene is 15, the scene frequency corresponding to the portrait is 25/(25+10+15) 0.5, the scene frequency corresponding to the blue sky is 10/(25+10+15) 0.2, and the scene frequency corresponding to the snow scene is 15/(25+10+15) 0.3. When constructing the scene feature vector, the electronic device constructs the scene feature vector by using the respective scene frequencies of the portrait, the blue sky and the snow scene as a vector dimension, and the vector is represented as [0.5,0.2,0.3 ].
For composition dimension, the electronic equipment identifies mode frequencies of different composition modes adopted by a target user during shooting according to historical images, and constructs composition characteristic vectors representing composition dimension shooting styles according to the mode frequencies of the different composition modes.
And for each acquired historical image, the electronic equipment performs target detection on the historical image by using a pre-trained target detection model, and analyzes the position of a main target in the historical image, so that the composition mode of the historical image is determined according to the position of the main target. For example, the position of the subject object in the history image is the center composition at the center of the screen, and the position of the three-division line in the screen is the trisection composition.
For example, a deep learning network such as a convolutional neural network may be adopted in advance to train the target detection model. The target detection model comprises an input layer, a hidden layer and an output layer, wherein the input layer is used for receiving the input of an image, and the hidden layer is used for processing the received image; the output layer is used for outputting the final result of the image processing, and finally outputting the position and size information of each target in the picture to be displayed in the form of a detection frame.
For a historical image, when a plurality of detection frames are output by a target detection model, the electronic equipment calculates whether each detection frame is overlapped, and if the detection frames are overlapped, the detection frames are combined into a combined detection frame in a mode of a maximum circumscribed rectangle frame. Then, the areas of all the detection frames are calculated, and the detection frame with the largest area is taken as a main target.
Referring to fig. 3, showing three-component map points and a central map point, the electronic device uses a central point of the subject target (corresponding to the detection frame) to represent its position, and determines a map point matching the central point, if the central point matches the central map point, the historical image is the central map, and if the central point matches the three-component map points, the historical image is the three-component map.
The electronic equipment identifies the composition mode of all the acquired historical images to obtain the times of the target user adopting each composition mode, and the mode frequency of each composition mode can be obtained by dividing the times by the total number. And then, the electronic equipment constructs composition feature vectors representing composition dimension shooting styles according to the mode frequencies corresponding to different composition modes.
For example, if the adopted composition pattern is a trisection composition and a center composition, where the number of times of adopting the trisection composition is 40 times and the number of times of adopting the center composition is 60 times, the composition frequency corresponding to the trisection composition is 40/(40+60) ═ 0.4, and the composition frequency corresponding to the center composition is 60/(40+60) ═ 0.6. When constructing the composition feature vector, the electronic device constructs the composition feature vector by using the composition frequencies of the trisection composition and the center composition as a vector dimension, and the composition feature vector is represented as [0.6,0.4 ].
For the color dimension, the electronic device implements a definition of the colors needed for color analysis, such as yellow, green, blue, etc.
Then, the value ranges of these colors in HSB space are defined, such as yellow (30< H <90,0.3< S <1,50< B <230), green (90< H <180,0.3< S <1,50< B <230), blue (180< H <270,0.3< S <1,50< B <230), etc.
Then, the electronic device counts the number of occurrences of the respective colors in each of the history images. And for each pixel point in the historical image, if the pixel value of the pixel point is in the interval, adding one to the statistical value of the corresponding interval, thus completing the statistics of all the historical images.
And finally, the electronic equipment normalizes the statistical result of the color frequency to obtain a color feature vector representing the color dimension shooting style.
After the scene feature vector, the composition feature vector and the color feature vector are obtained, the electronic device further splices the scene feature vector, the composition feature vector and the color feature vector into a vector as a style feature vector representing the user shooting style of the target user.
The vector splicing method is not particularly limited, and a suitable splicing method can be selected by a person skilled in the art according to actual needs.
In one embodiment, determining a friend to be recommended corresponding to a target user according to a shooting style of the user includes:
(1) determining a target style feature vector with the similarity reaching a preset similarity with the style feature vector;
(2) and determining other users corresponding to the target style characteristic vector as friends to be recommended.
As can be seen from the above, each style feature vector may represent a shooting style of a user. The two users can be considered to have similar shooting styles due to the similar distribution of the two style feature vectors, so that the users can be considered as interesting friends, and friend recommendation is carried out based on the similar shooting styles.
Correspondingly, when the electronic equipment determines the friend to be recommended corresponding to the target user according to the shooting style of the user, the similarity between the style characteristic vector and the style characteristic vectors representing the shooting styles of other users can be calculated at first, and the target style characteristic vector with the similarity reaching the preset similarity with the style characteristic vector is determined. And then, determining other users corresponding to the target style characteristic vector as friends to be recommended.
The feature distance may be used to measure the similarity between two style feature vectors, and specifically, a person skilled in the art may select the feature distance used to measure the similarity between two style feature vectors according to actual needs, including but not limited to euclidean distance, manhattan distance, chebyshev distance, cosine distance, and the like.
It should be noted that the preset similarity may be configured by a person skilled in the art according to actual needs, and may be configured as a dynamic value or a static value. For example, the similarity between the style feature vector of the target user and the style feature vectors of other users is calculated, the calculated similarities are sorted in descending order, and the similarity of the K-th order is configured as the preset similarity. And K is an integer and can be set by default of the electronic equipment or manually set by a target user.
In an embodiment, determining other users corresponding to the target style feature vector as friends to be recommended includes:
(1) setting other users corresponding to the target style characteristic vector as candidate recommending friends;
(2) and determining the candidate recommended friends located in the preset distance range of the target user as the friends to be recommended.
In the embodiment of the application, the electronic device does not directly determine other users corresponding to the target style feature vector as the friends to be recommended of the corresponding target user, but first sets the other users corresponding to the target style feature vector as candidate recommended friends. And then, the electronic equipment further determines candidate recommended friends located in the preset distance range of the target user, and determines the candidate recommended friends located in the preset distance range of the target user as the friends to be recommended.
The preset distance range can be set by a person skilled in the art according to actual needs, for example, in the embodiment of the present application, dynamic setting is performed according to a vehicle possessed by a target user, wherein the size of the preset distance range is set to be positively correlated with the traffic capacity of the vehicle possessed by the target user, and for example, the preset distance range corresponding to a car is greater than the preset distance range corresponding to a bicycle.
In an embodiment, before determining that the candidate recommended friends located within the preset distance range of the target user are friends to be recommended, the method further includes:
(1) identifying whether a target user is located in a preset position area;
(2) and when the target user is located in the preset position area, determining the candidate recommended friends located in the preset distance range of the target user as the friends to be recommended.
Considering that a user is not immobile, in order to better recommend friends to the user, in the embodiment of the application, after determining candidate recommended friends corresponding to a target user, the candidate recommended friends located within a preset distance range of the target user are not directly determined as the friends to be recommended, but whether the target user is located within a preset position area is identified first, and when the target user is identified to be located within the preset position area, the candidate recommended friends located within the preset distance range of the target user are determined as the friends to be recommended.
The preset location area may be understood as a living area of the user in a colloquial manner, for example, in the embodiment of the present application, the preset location area is set as an administrative area of a city where the target user is located.
In an embodiment, after identifying whether the target user is located within the preset location area, the method further includes:
(1) when the target user is located outside the preset position area, acquiring a travel plan of the target user;
(2) determining a target position area expected to be reached by a target user according to a travel plan;
(3) and determining the candidate recommended friends located in the target position area as the friends to be recommended.
In the embodiment of the application, when the electronic device identifies that the target user is not located in the preset position area, the electronic device judges that the target user is in a trip state, and at the moment, obtains a travel plan of the target user. After the travel plan of the target user is obtained, the travel plan is analyzed, and a target position area predicted by the target user is determined. And determining the candidate recommended friends located in the target position area as friends to be recommended.
For example, when the target user is on business, the electronic device recognizes that the target user is located outside the preset location area, acquires the travel plan of the target user, analyzes the travel plan to obtain that the target location area expected to be reached by the target user is the place a, and determines the candidate recommended friends located in the place a as the friends to be recommended. Therefore, the user can finish work tasks on business and can also identify more foreign friends.
It should be noted that, in the embodiments of the present application, the parts related to obtaining user data all refer to data for which a user does not set a privacy authority, that is, data disclosed by the user.
Referring to fig. 4, a flow of the friend recommendation method provided by the present application may also be:
in 201, the electronic device acquires a history image captured by a target user.
The target user is a user who needs to perform friend recommendation, such as an owner of the electronic device, or a specific user specified by the owner.
For example, when the electronic device has a shooting function, such as a mobile phone, the mobile phone may determine the owner as a user who needs to perform friend recommendation, and correspondingly acquire a history image shot by the owner, where the history image includes a history image shot by the owner according to a shooting instruction of the owner, and also includes a history image shot by another electronic device used by the owner according to a shooting instruction of the owner.
In addition, when the electronic device does not have a shooting function, such as a server, the server may send an image acquisition instruction to another electronic device with a shooting function used by a specified target user, and instruct the other electronic device to return a history image shot by the target user.
It should be noted that the history images acquired above are all history images for which the user has not set privacy authority.
At 202, the electronic device identifies scene frequencies of different scenes shot by the target user according to the historical images, and constructs scene feature vectors representing the scene dimension shooting style according to the scene frequencies.
The embodiment of the application provides a scheme for carrying out multi-dimensional quantitative evaluation on the shooting style of a target user. The style of three dimensions is respectively a scene dimension, a composition dimension and a color dimension.
For the scene dimension, the electronic equipment identifies the scene frequency of the target user for shooting different scenes according to the acquired historical map, and constructs a scene feature vector representing the shooting style of the scene dimension according to the scene frequency of the different scenes.
And for each acquired historical image, the electronic equipment performs scene recognition on the historical image by using a pre-trained scene recognition model to obtain a scene recognition result describing the scene of the historical image. For example, a deep learning network such as a convolutional neural network may be adopted in advance to train to obtain the scene recognition model. In general, a scene recognition model may include an input layer for receiving an input of an image, a hidden layer for processing the received image, and an output layer for outputting a final result of the image processing, i.e., a scene recognition result of an output image.
The scene of the image may be a landscape, a beach, a blue sky, a green grass, a snow scene, text, a portrait, a baby, a cat, a dog, a food, etc. The classification label of the image refers to a scene classification label of the image. In the embodiment of the application, the scene recognition result of the image can be used as the classification label of the image. For example, when the scene recognition result of the image is a blue sky, the classification label of the image is a blue sky. The electronic equipment can perform scene recognition on the image of the electronic equipment according to the scene recognition model, and determine the classification label of the image according to the scene recognition result.
The background information of the image refers to a scene classification label of the whole image, and may be a label expressing the whole image information, such as a landscape, a beach, a blue sky, a green grass, a snow scene, and the like. The foreground information of the image refers to a label which is positioned at a prominent position of the picture in the image and can be identified by a rectangular frame, and the label can be a label which expresses individual information such as a portrait, a baby, a cat, a dog, a food and the like.
The electronic equipment identifies scenes of all the acquired historical images to obtain the times of shooting each scene by the target user, and the frequency of shooting each scene can be obtained by dividing the times by the total number. And then, the electronic equipment constructs a scene feature vector representing the scene dimension shooting style according to the scene frequencies corresponding to different scenes.
For example, if the photographed scene is a portrait, a blue sky, and a snow scene, where the number of times of appearance of the portrait is 25, the number of times of appearance of the blue sky is 10, and the number of times of appearance of the snow scene is 15, the scene frequency corresponding to the portrait is 25/(25+10+15) 0.5, the scene frequency corresponding to the blue sky is 10/(25+10+15) 0.2, and the scene frequency corresponding to the snow scene is 15/(25+10+15) 0.3. When constructing the scene feature vector, the electronic device constructs the scene feature vector by using the respective scene frequencies of the portrait, the blue sky and the snow scene as a vector dimension, and the vector is represented as [0.5,0.2,0.3 ].
In 203, the electronic device identifies mode frequencies of different composition modes adopted by the target user during shooting according to the historical images, and constructs composition feature vectors representing composition dimension shooting styles according to the mode frequencies.
For composition dimension, the electronic equipment identifies mode frequencies of different composition modes adopted by a target user during shooting according to historical images, and constructs composition characteristic vectors representing composition dimension shooting styles according to the mode frequencies of the different composition modes.
And for each acquired historical image, the electronic equipment performs target detection on the historical image by using a pre-trained target detection model, and analyzes the position of a main target in the historical image, so that the composition mode of the historical image is determined according to the position of the main target. For example, the position of the subject object in the history image is the center composition at the center of the screen, and the position of the three-division line in the screen is the trisection composition.
For example, a deep learning network such as a convolutional neural network may be adopted in advance to train the target detection model. The target detection model comprises an input layer, a hidden layer and an output layer, wherein the input layer is used for receiving the input of an image, and the hidden layer is used for processing the received image; the output layer is used for outputting the final result of the image processing, and finally outputting the position and size information of each target in the picture to be displayed in the form of a detection frame.
For a historical image, when a plurality of detection frames are output by a target detection model, the electronic equipment calculates whether each detection frame is overlapped, and if the detection frames are overlapped, the detection frames are combined into a combined detection frame in a mode of a maximum circumscribed rectangle frame. Then, the areas of all the detection frames are calculated, and the detection frame with the largest area is taken as a main target.
Referring to fig. 3, showing three-component map points and a central map point, the electronic device uses a central point of the subject target (corresponding to the detection frame) to represent its position, and determines a map point matching the central point, if the central point matches the central map point, the historical image is the central map, and if the central point matches the three-component map points, the historical image is the three-component map.
The electronic equipment identifies the composition mode of all the acquired historical images to obtain the times of the target user adopting each composition mode, and the mode frequency of each composition mode can be obtained by dividing the times by the total number. And then, the electronic equipment constructs composition feature vectors representing composition dimension shooting styles according to the mode frequencies corresponding to different composition modes.
For example, if the adopted composition pattern is a trisection composition and a center composition, where the number of times of adopting the trisection composition is 40 times and the number of times of adopting the center composition is 60 times, the composition frequency corresponding to the trisection composition is 40/(40+60) ═ 0.4, and the composition frequency corresponding to the center composition is 60/(40+60) ═ 0.6. When constructing the composition feature vector, the electronic device constructs the composition feature vector by using the composition frequencies of the trisection composition and the center composition as a vector dimension, and the composition feature vector is represented as [0.6,0.4 ].
At 204, the electronic device identifies color frequencies of different colors used by the target user during shooting according to the historical images, and constructs a color feature vector representing a color dimension shooting style according to the color frequencies.
For the color dimension, the electronic device implements a definition of the colors needed for color analysis, such as yellow, green, blue, etc.
Then, the value ranges of these colors in HSB space are defined, such as yellow (30< H <90,0.3< S <1,50< B <230), green (90< H <180,0.3< S <1,50< B <230), blue (180< H <270,0.3< S <1,50< B <230), etc.
Then, the electronic device counts the number of occurrences of the respective colors in each of the history images. And for each pixel point in the historical image, if the pixel value of the pixel point is in the interval, adding one to the statistical value of the corresponding interval, thus completing the statistics of all the historical images.
And finally, the electronic equipment normalizes the statistical result of the color frequency to obtain a color feature vector representing the color dimension shooting style.
It should be noted that the execution sequence of the above 202, 203 and 204 is not affected by the size of the sequence number.
In 205, the electronic device splices the scene feature vector, the composition feature vector, and the color feature vector to obtain a style feature vector representing the shooting style of the user.
After the scene feature vector, the composition feature vector and the color feature vector are obtained, the electronic equipment further splices the scene feature vector, the composition feature vector and the color feature vector into a vector which is used as a style feature vector for representing the shooting style of the target user.
The vector splicing method is not particularly limited, and a suitable splicing method can be selected by a person skilled in the art according to actual needs.
In 206, the electronic device determines a target style feature vector with a similarity to the style feature vector reaching a preset similarity, and recommends other users corresponding to the target style feature vector to the target user as friends to be recommended.
As can be seen from the above, each style feature vector may represent a shooting style of a user. The two users can be considered to have similar shooting styles due to the similar distribution of the two style feature vectors, so that the users can be considered as interesting friends, and friend recommendation is carried out based on the similar shooting styles.
Correspondingly, when the electronic equipment determines the friend to be recommended corresponding to the target user according to the shooting style of the user, the similarity between the style characteristic vector and the style characteristic vectors representing the shooting styles of other users can be calculated at first, and the target style characteristic vector with the similarity reaching the preset similarity with the style characteristic vector is determined. And then, determining other users corresponding to the target style characteristic vector as friends to be recommended.
The feature distance may be used to measure the similarity between two style feature vectors, and specifically, a person skilled in the art may select the feature distance used to measure the similarity between two style feature vectors according to actual needs, including but not limited to euclidean distance, manhattan distance, chebyshev distance, cosine distance, and the like.
It should be noted that the preset similarity may be configured by a person skilled in the art according to actual needs, and may be configured as a dynamic value or a static value. For example, the similarity between the style feature vector of the target user and the style feature vectors of other users is calculated, the calculated similarities are sorted in descending order, and the similarity of the K-th order is configured as the preset similarity. And K is an integer and can be set by default of the electronic equipment or manually set by a target user.
After determining the friends to be recommended corresponding to the target user, the electronic equipment recommends the determined friends to be recommended to the target user. In the embodiment of the application, how to recommend the friend to be recommended to the target user is not specifically limited, and the recommendation method can be configured by a person having ordinary skill in the art according to actual needs.
For example, referring to fig. 2, the electronic device provides a friend recommendation interface, and after determining a friend to be recommended corresponding to the target user, the electronic device displays the friend recommendation interface, where the friend recommendation interface includes an identifier of the determined friend to be recommended (for example, "zhangsan," "liquan," and "wangsi" shown in fig. 2) and an addition control associated with each friend to be recommended. When the adding control is triggered, the electronic equipment initiates a friend adding request to a friend to be recommended associated with the triggered adding control, and when the friend to be recommended agrees to the initiated friend adding request, the establishment of the friend relationship between the target user and the friend to be recommended is completed.
In an embodiment, a friend recommendation device is also provided. Referring to fig. 5, fig. 5 is a schematic structural diagram of a friend recommendation device according to an embodiment of the present disclosure. The friend recommendation device is applied to electronic equipment, and comprises an image acquisition module 301, a style evaluation module 302, a friend determination module 303 and a friend recommendation module 304, and the following steps are performed:
an image acquisition module 301, configured to acquire a history image captured by a target user;
the style evaluation module 302 is used for quantitatively evaluating the shooting style of a target user according to the historical image to obtain the shooting style of the user;
the friend determining module 303 is configured to determine a friend to be recommended, which corresponds to the target user, according to the user shooting style;
and the friend recommending module 304 is configured to recommend a friend to be recommended to the target user.
In an embodiment, when the photographing style of the target user is quantitatively evaluated according to the historical image, and the user photographing style is obtained, the style evaluation module 302 is configured to:
and carrying out quantitative evaluation on the shooting style of the target user in different dimensions according to the historical image to obtain the shooting style of the user.
In an embodiment, when the shooting style of the target user is quantitatively evaluated in different dimensions according to the historical images to obtain the user shooting style, the style evaluation module 302 is configured to:
identifying scene frequencies of different scenes shot by a target user according to the historical images, and constructing a scene feature vector representing a scene dimension shooting style according to the scene frequencies;
identifying mode frequencies of different composition modes adopted by a target user during shooting according to the historical images, and constructing composition characteristic vectors representing composition dimension shooting styles according to the mode frequencies;
identifying color frequencies of different colors adopted by a target user during shooting according to the historical image, and constructing a color feature vector representing a color dimension shooting style according to the color frequencies;
and splicing the scene feature vector, the composition feature vector and the color feature vector to obtain a style feature vector representing the shooting style of the user.
In an embodiment, when determining a friend to be recommended corresponding to a target user according to a user shooting style, the friend determining module 303 is configured to:
determining a target style feature vector with the similarity reaching a preset similarity with the style feature vector;
and determining other users corresponding to the target style characteristic vector as friends to be recommended.
In an embodiment, when determining other users corresponding to the target style feature vector as friends to be recommended, the friend determining module 303 is configured to:
setting other users corresponding to the target style characteristic vector as candidate recommending friends;
and determining the candidate recommended friends located in the preset distance range of the target user as the friends to be recommended.
In an embodiment, before determining that the candidate recommended friends located within the preset distance range of the target user are the friends to be recommended, the friend determining module 303 is further configured to:
identifying whether a target user is located in a preset position area;
and when the target user is located in the preset position area, determining the candidate recommended friends located in the preset distance range of the target user as the friends to be recommended.
In an embodiment, after identifying whether the target user is located in the preset location area, the friend determining module 303 is further configured to:
when the target user is located outside the preset position area, acquiring a travel plan of the target user;
determining a target position area expected to be reached by a target user according to a travel plan;
and determining the candidate recommended friends located in the target position area as the friends to be recommended.
It should be noted that the friend recommendation device provided in the embodiment of the present application and the friend recommendation method in the foregoing embodiments belong to the same concept, and any method provided in the friend recommendation method embodiment may be run on the friend recommendation device, and the specific implementation process thereof is detailed in the foregoing embodiments and is not described herein again.
In an embodiment, an electronic device is further provided, and referring to fig. 6, the electronic device includes a processor 401 and a memory 402.
The processor 401 in the embodiment of the present application is a general-purpose processor, such as an ARM architecture processor.
The memory 402 stores a computer program, which may be a high speed random access memory, but also may be a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the computer programs in the memory 402 to implement the following functions:
acquiring a history image shot by a target user;
carrying out quantitative evaluation on the shooting style of a target user according to the historical image to obtain the shooting style of the user;
determining friends to be recommended corresponding to target users according to the shooting styles of the users;
and recommending the friends to be recommended to the target user.
In an embodiment, when the photographing style of the target user is quantitatively evaluated according to the historical image, and the user photographing style is obtained, the processor 401 is configured to perform:
and carrying out quantitative evaluation on the shooting style of the target user in different dimensions according to the historical image to obtain the shooting style of the user.
In an embodiment, when the photographing style of the target user is quantitatively evaluated in different dimensions according to the historical images, and the user photographing style is obtained, the processor 401 is configured to perform:
identifying scene frequencies of different scenes shot by a target user according to the historical images, and constructing a scene feature vector representing a scene dimension shooting style according to the scene frequencies;
identifying mode frequencies of different composition modes adopted by a target user during shooting according to the historical images, and constructing composition characteristic vectors representing composition dimension shooting styles according to the mode frequencies;
identifying color frequencies of different colors adopted by a target user during shooting according to the historical image, and constructing a color feature vector representing a color dimension shooting style according to the color frequencies;
and splicing the scene feature vector, the composition feature vector and the color feature vector to obtain a style feature vector representing the shooting style of the user.
In an embodiment, when determining a friend to be recommended corresponding to a target user according to a user shooting style, the processor 401 is configured to:
determining a target style feature vector with the similarity reaching a preset similarity with the style feature vector;
and determining other users corresponding to the target style characteristic vector as friends to be recommended.
In an embodiment, when determining other users corresponding to the target style feature vector as friends to be recommended, the processor 401 is configured to:
setting other users corresponding to the target style characteristic vector as candidate recommending friends;
and determining the candidate recommended friends located in the preset distance range of the target user as the friends to be recommended.
In an embodiment, before determining that the candidate recommended friends located within the preset distance range of the target user are friends to be recommended, the processor 401 is further configured to perform:
identifying whether a target user is located in a preset position area;
and when the target user is located in the preset position area, determining the candidate recommended friends located in the preset distance range of the target user as the friends to be recommended.
In an embodiment, after identifying whether the target user is located in the preset location area, the processor 401 is further configured to:
when the target user is located outside the preset position area, acquiring a travel plan of the target user;
determining a target position area expected to be reached by a target user according to a travel plan;
and determining the candidate recommended friends located in the target position area as the friends to be recommended.
It should be noted that the electronic device provided in the embodiment of the present application and the friend recommendation method in the foregoing embodiments belong to the same concept, and any method provided in the friend recommendation method embodiment may be run on the electronic device, and a specific implementation process thereof is described in detail in the feature extraction method embodiment, and is not described herein again.
It should be noted that, for the friend recommendation method in the embodiment of the present application, it may be understood by a person skilled in the art that all or part of the process for implementing the friend recommendation method in the embodiment of the present application may be completed by controlling related hardware through a computer program, where the computer program may be stored in a computer-readable storage medium, such as a memory of an electronic device, and executed by a processor and/or a dedicated voice recognition chip in the electronic device, and the process of executing the process may include the process of the embodiment of the friend recommendation method. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.
The method, the device, the storage medium and the electronic device for friend recommendation provided by the embodiments of the present application are described in detail above, a specific example is applied in the description to explain the principle and the implementation of the present application, and the description of the embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A friend recommendation method is characterized by comprising the following steps:
acquiring a history image shot by a target user;
carrying out quantitative evaluation on the shooting style of the target user according to the historical image to obtain the shooting style of the user;
determining a friend to be recommended corresponding to the target user according to the user shooting style;
and recommending the friend to be recommended to the target user.
2. The friend recommendation method according to claim 1, wherein the quantitatively evaluating a shooting style of the target user according to the historical image to obtain a user shooting style comprises:
and carrying out quantitative evaluation on the shooting style of the target user in different dimensions according to the historical image to obtain the shooting style of the user.
3. The friend recommendation method according to claim 2, wherein the quantitatively evaluating the shooting style of the target user in different dimensions according to the historical image to obtain the shooting style of the user comprises:
identifying scene frequencies of different scenes shot by the target user according to the historical images, and constructing a scene feature vector representing a scene dimension shooting style according to the scene frequencies;
identifying mode frequencies of different composition modes adopted by the target user during shooting according to the historical images, and constructing composition characteristic vectors representing composition dimension shooting styles according to the mode frequencies;
identifying color frequencies of different colors adopted by the target user during shooting according to the historical images, and constructing a color feature vector representing a color dimension shooting style according to the color frequencies;
and splicing the scene feature vector, the composition feature vector and the color feature vector to obtain a style feature vector representing the shooting style of the user.
4. The friend recommendation method according to claim 3, wherein the determining of the friend to be recommended corresponding to the target user according to the user shooting style comprises:
determining a target style feature vector with the similarity reaching a preset similarity with the style feature vector;
and determining other users corresponding to the target style characteristic vector as the friends to be recommended.
5. The friend recommendation method according to claim 4, wherein the determining other users corresponding to the target style feature vector as the friend to be recommended includes:
setting other users corresponding to the target style characteristic vector as candidate recommending friends;
and determining the candidate recommended friends located in the preset distance range of the target user as the friends to be recommended.
6. The friend recommendation method according to claim 5, wherein before determining the candidate recommended friends located within the preset distance range of the target user as the friends to be recommended, the method further comprises:
identifying whether the target user is located in a preset position area;
and when the target user is located in the preset position area, determining the candidate recommended friends located in the preset distance range of the target user as the friends to be recommended.
7. The friend recommendation method according to claim 6, wherein after identifying whether the target user is located within a preset location area, the method further comprises:
when the target user is located outside the preset position area, acquiring a travel plan of the target user;
determining a target position area expected to be reached by the target user according to the travel plan;
and determining the candidate recommended friends located in the target position area as the friends to be recommended.
8. A friend recommendation apparatus, comprising:
the image acquisition module is used for acquiring a historical image shot by a target user;
the style evaluation module is used for quantitatively evaluating the shooting style of the target user according to the historical image to obtain the shooting style of the user;
the friend determining module is used for determining a friend to be recommended corresponding to the target user according to the shooting style of the user;
and the friend recommending module is used for recommending the friend to be recommended to the target user.
9. A storage medium having stored thereon a computer program for performing the friend recommendation method of any one of claims 1 to 7 when the computer program is loaded by a processor.
10. An electronic device comprising a processor and a memory, the memory storing a computer program, wherein the processor is configured to execute the friend recommendation method of any one of claims 1-7 by loading the computer program.
CN202010159147.0A 2020-03-09 2020-03-09 Friend recommendation method and device, storage medium and electronic equipment Pending CN111400582A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010159147.0A CN111400582A (en) 2020-03-09 2020-03-09 Friend recommendation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010159147.0A CN111400582A (en) 2020-03-09 2020-03-09 Friend recommendation method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111400582A true CN111400582A (en) 2020-07-10

Family

ID=71428662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010159147.0A Pending CN111400582A (en) 2020-03-09 2020-03-09 Friend recommendation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111400582A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013165040A1 (en) * 2012-05-04 2013-11-07 (주)비즈텍 Composition-setting imaging apparatus
CN104572937A (en) * 2014-12-30 2015-04-29 杭州云象网络技术有限公司 Offline friend recommendation method based on indoor living circle
CN107248116A (en) * 2017-06-07 2017-10-13 维沃移动通信有限公司 A kind of activity recommendation method and mobile terminal
WO2019047672A1 (en) * 2017-09-08 2019-03-14 腾讯科技(深圳)有限公司 Information recommendation method, computer device, and storage medium
CN109960763A (en) * 2019-03-21 2019-07-02 湖南大学 A kind of photography community personalization friend recommendation method based on user's fine granularity photography preference

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013165040A1 (en) * 2012-05-04 2013-11-07 (주)비즈텍 Composition-setting imaging apparatus
CN104572937A (en) * 2014-12-30 2015-04-29 杭州云象网络技术有限公司 Offline friend recommendation method based on indoor living circle
CN107248116A (en) * 2017-06-07 2017-10-13 维沃移动通信有限公司 A kind of activity recommendation method and mobile terminal
WO2019047672A1 (en) * 2017-09-08 2019-03-14 腾讯科技(深圳)有限公司 Information recommendation method, computer device, and storage medium
CN109960763A (en) * 2019-03-21 2019-07-02 湖南大学 A kind of photography community personalization friend recommendation method based on user's fine granularity photography preference

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘峰 等: "《数字摄影技艺》", 28 February 2018, 苏州大学出版社 *

Similar Documents

Publication Publication Date Title
Wan et al. Automated colorization of a grayscale image with seed points propagation
US20200320726A1 (en) Method, device and non-transitory computer storage medium for processing image
US20210174146A1 (en) Training set sufficiency for image analysis
US10110868B2 (en) Image processing to determine center of balance in a digital image
CN109889724B (en) Image blurring method and device, electronic equipment and readable storage medium
WO2019137131A1 (en) Image processing method, apparatus, storage medium, and electronic device
CN106204435A (en) Image processing method and device
CN111445486B (en) Image processing method, device, equipment and computer readable storage medium
CN110222686B (en) Object detection method, object detection device, computer equipment and storage medium
JP2019016114A (en) Image processing device, learning device, focus controlling device, exposure controlling device, image processing method, learning method and program
CN111800569B (en) Photographing processing method and device, storage medium and electronic equipment
CN114511041B (en) Model training method, image processing method, device, equipment and storage medium
US11468571B2 (en) Apparatus and method for generating image
CN106031148A (en) Imaging device and method for automatic focus in an imaging device as well as a corresponding computer program
CN114390201A (en) Focusing method and device thereof
CN112036209A (en) Portrait photo processing method and terminal
CN104933145A (en) Photograph processing method and device and mobile terminal
CN112800978A (en) Attribute recognition method, and training method and device for part attribute extraction network
CN114267041A (en) Method and device for identifying object in scene
CN111242176A (en) Computer vision task processing method and device and electronic system
US11250542B2 (en) Mosaic generation apparatus and method
CN112084876B (en) Target object tracking method, system, device and medium
CN113283319A (en) Method and device for evaluating face ambiguity, medium and electronic equipment
CN111080748A (en) Automatic picture synthesis system based on Internet
CN111611836A (en) Ship detection model training and ship tracking method based on background elimination method

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