CN103714135B - MapReduce recommendation method and system of second-degree interpersonal relationships of massive users - Google Patents

MapReduce recommendation method and system of second-degree interpersonal relationships of massive users Download PDF

Info

Publication number
CN103714135B
CN103714135B CN201310704592.0A CN201310704592A CN103714135B CN 103714135 B CN103714135 B CN 103714135B CN 201310704592 A CN201310704592 A CN 201310704592A CN 103714135 B CN103714135 B CN 103714135B
Authority
CN
China
Prior art keywords
user
described user
users
vermicelli
degree
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
CN201310704592.0A
Other languages
Chinese (zh)
Other versions
CN103714135A (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201310704592.0A priority Critical patent/CN103714135B/en
Publication of CN103714135A publication Critical patent/CN103714135A/en
Application granted granted Critical
Publication of CN103714135B publication Critical patent/CN103714135B/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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

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 invention provides a MapReduce recommendation method and system of second-degree interpersonal relationships of massive users. The method includes the steps that in attention relationships of the massive users, the second-degree interpersonal relationships of the users are worked out through the two-step MapReduce calculation method based on first-degree interpersonal relationships of the users, and then the second-degree interpersonal relationships of the users are recommended. By means of the MapReduce recommendation method and system of the second-degree interpersonal relationships of the massive users, repeated querying can be avoided, and recommendation accuracy and computation efficiency can be improved.

Description

Two degree of relationship among persons mapreduce of mass users recommend method and system
Technical field
The present invention relates to mass users relationship among persons technical field, more specifically, it is related to two degree of a kind of mass users Relationship among persons mapreduce recommends method and system.
Background technology
With sns(social networking services, social network services) rise of community, the use of magnanimity Family concern relation has produced.The mass users concern relation that sns community has, is a valuable data wealth, how It is sns community problems faced that the once human connection of user is converted into value.Simultaneously during the operation of sns community, once human connection Tend towards stability, based on the once relationship among persons of mass users, analyze two degree of relationship among persons of user, vertical in conjunction with sns community Business, develops more competitive application.So both can bring feeling of freshness to user, guiding user deepens to user two The understanding of degree human connection, can extend the viscosity that user uses community again, extend the time that user uses community, be that community brings more Many flows and profit, make user and value be unified and convert.
In the face of the concern relation of user, two degree of human connections of digging user are the problems that community needs to solve, and Fig. 1 shows existing There is the flow process of two degree of human connections processing user, as shown in figure 1,
S110: start;
S120: mass users concern relation, a---b, b---c;
S130: search the user set set1 of user a concern;
S140: inquiry user combines the follower set set2 of set1;
Remove the user that user a has paid close attention in s150:set2;
S160: user a two degree of relationship among persons set are set2;
S170: the indirect recommendation number of times of two degree of human connections of statistics;
S180: terminate.
In the face of the calculating of mass users data volume, the handing technique generally adopting is exactly parallel computation.The process of above-mentioned Fig. 1 The situation that method presence is inquired about repeatedly, such as: user a and user b has paid close attention to user c, is then calculating the two of user a and user b During degree human connection, c is indirect concern, is required for inquiring about the follower of user c.Inquiry repeatedly leads to the efficiency of parallel computation Can not improve parallel, treatment effeciency is also very low.
Sns community, when calculating two degree of relationship among persons, necessary not only for improving the efficiency that big data calculates, is being carried out simultaneously When two degree of relationship among persons are recommended, once human connection needs to consider to recommend weight;If the vermicelli number of once human connection is relatively more, user's ratio More active, then the recommendation weight of once human connection should be correspondingly improved.
Above-mentioned in order to solve the problems, such as, it is desirable to provide a kind of new computational methods, it is to avoid to repeat to inquire about, improve and process effect Rate;Simultaneously when considering once relationship among persons, consider vermicelli number, the liveness of once human connection, give corresponding two Weight is recommended in degree human connection.
Content of the invention
In view of the above problems, it is an object of the invention to provide a kind of the two of mass users degree of relationship among persons mapreduce push away Recommend method and system, to solve the problems, such as to repeat inquiry, recommend accuracy and improve computational efficiency.
According to an aspect of the present invention, two degree of relationship among persons mapreduce providing a kind of mass users recommend method, In the concern relation of mass users, the once relationship among persons according to user are obtained by the computational methods of two steps mapreduce to be used Two degree of relationship among persons at family, and recommended;Wherein,
In the concern relation of mass users, if user a is concern user b, user c pays close attention to user a, then user b is user a Good friend, user c be user a vermicelli;And if, user c pass through user a to recommend concern user b, user b to be user c's Two degree of human connections, user a is the indirect follower between user c and user b;User c passes through in the concern relation of mass users Except user a other users concern user b, then other users be user c and user b indirect follower;And,
In the computational methods of first step mapreduce in the computational methods of two steps mapreduce, in mass users In concern relation, according to the once human connection of user a, the good friend of user a is merged classification with the vermicelli of user a, obtain user a's Good friend set and user a vermicelli set, simultaneously and counting user a vermicelli quantity;Wherein,
, in the good friend of user a gathers, user c is in the vermicelli set of user a for user b;And,
In the concern relation of mass users, according to the once human connection of other users, obtain good friend's set of other users With the vermicelli set of other users, simultaneously and count the vermicelli quantity of other users;
In the computational methods of the second step mapreduce in the computational methods of two steps mapreduce, in mass users In concern relation, good friend's set that user a recommends concern user a is passed through in the vermicelli set of user a, the vermicelli set of user a Two degree of human connections are good friend's set of user a, and wherein, the user c in the vermicelli set for user a for the user a and the good friend of user a collect In user b indirect follower;And,
The quantity of the vermicelli according to user a obtains the recommendation weighted value of user a, and the quantity of the vermicelli according to other users obtains Obtain the recommendation weighted value of other users;
Recommend weighted value and the recommendation weighted value of other users of user a are merged thus obtaining the advowson of maximum The quantity of the indirect follower between weight values, and counting user c and user b, wherein, indirect concern between user c and user b The quantity of person is the quantity sum of user a and other users;
User b is recommended described user c, maximum recommendation weighted value and all indirect followers is recommended simultaneously User c, is recommended with two degree of relationship among persons completing user.
Wherein, during good friend's set that user a recommends concern user a is passed through in the vermicelli set in user a,
If there being user b in the vermicelli set of user a, also there is user b in good friend's set of user a, then user b simultaneously Two degree of human connections can not be user b itself;
If the user c of the vermicelli set of user a paid close attention to user a good friend set in user b, the two of user c Degree human connection can not be user b.
Wherein, user a obtains pushing away of user a according to the vermicelli quantity of user a by the way of lognormal Function Fitting Recommend weighted value;
Lognormal Function Fitting formula is:
f ( x , μ , σ ) = 1 xσ 2 π e - ( ln x ) 2 2 σ 2
Wherein, in lognormal Function Fitting, x is the array note of mass users all vermicellis quantity, and μ is array x The meansigma methodss of logarithm, σ is the data expectation of array x logarithm;The mathematic expectaion of array x and variance are respectively e [x] var [x];
The fitting formula of parameter is:
μ = ln ( e [ x ] ) - 0.5 * ln ( 1 + var [ x ] ( e [ x ] ) 2 )
σ 2 = ln ( 1 + var [ x ] ( e [ x ] ) 2 )
The orientation integrated value of lognormal function is the recommendation weighted value of user a.
On the other hand, the present invention also provide a kind of mass users two degree of relationship among persons mapreduce commending systems it is recommended that System, for, in the concern relation of mass users, being calculated by first step mapreduce according to the once relationship among persons of user Unit and two degree of relationship among persons of second step mapreduce computing unit two acquisition user, and recommended;Wherein,
In the concern relation of mass users, if user a is concern user b, user c pays close attention to user a, then user b is user a Good friend, user c be user a vermicelli;And if, user c pass through user a to recommend concern user b, user b to be user c's Two degree of human connections, user a is the indirect follower between user c and user b;If user c passes through the concern relation in mass users In in addition to user a other users concern user b, then other users be user c and user b indirect follower;
First step mapreduce computing unit, in the concern relation of mass users, according to the once people of user a Arteries and veins, the good friend of user a is merged classification with the vermicelli of user a, obtains good friend's set of user a and the vermicelli set of user a, with When and the vermicelli of counting user a quantity;Wherein, in the good friend of user a gathers, user c is in the powder of described user a for user b In silk set;And,
In the concern relation of mass users, according to the once human connection of other users, obtain good friend's set of other users With the vermicelli set of the user in addition to user a, simultaneously and count the vermicelli quantity of other users;
Second step mapreduce computing unit includes: recommends weighted value acquiring unit and two degree of human connection recommendation unit;Its In,
Recommend weighted value acquiring unit, for obtaining the recommendation weighted value of user;Wherein, in the concern relation of mass users In, good friend's set that user a recommends concern user a, two degree of human connections of the vermicelli set of user a are passed through in the vermicelli set of user a For user a good friend set, wherein, user a be user a vermicelli set in user c and user a good friend concentrate user The indirect follower of b;And,
The quantity of the vermicelli according to user a obtains the recommendation weighted value of user a, and the quantity of the vermicelli according to other users obtains Obtain the recommendation weighted value of other users;
Two degree of human connection recommendation unit, two degree of human connections for completing user are recommended;Wherein, by the recommendation weighted value of user a Merge thus obtaining the recommendation weighted value of maximum with the recommendation weighted value of other users, and counting user c and described user b Between indirect follower quantity, wherein, the quantity of the indirect follower between user c and described user b be user a and its The quantity sum of his user;
Finally user b is recommended user c, maximum recommendation weighted value and all indirect followers are recommended simultaneously User c, is recommended with two degree of human connections completing user.
Knowable to technical scheme above, two degree of relationship among persons mapreduce of the mass users that the present invention provides recommend Method and system, can obtain following beneficial effect:
1) it can be avoided that the problem repeatedly inquired about of process in calculating, improve computational efficiency, wherein, the efficiency of raising and sns The average concern relation number of community is relevant, and concern relation net is more complicated, and efficiency improves more obvious;
2) weight recommended using once human connection, can make recommendation more accurate;
3) if improving the process time calculating or processing more data, horizontal extension can easily be carried out.
In order to realize above-mentioned and related purpose, one or more aspects of the present invention include will be explained in below and The feature particularly pointing out in claim.Description below and accompanying drawing are described in detail some illustrative aspects of the present invention. However, some modes in the various modes of principle that the present invention only can be used of these aspects instruction.Additionally, the present invention It is intended to including all these aspects and their equivalent.
Brief description
By reference to below in conjunction with the explanation of accompanying drawing and the content of claims, and with to the present invention more comprehensively Understand, other purposes of the present invention and result will be more apparent and should be readily appreciated that.In the accompanying drawings:
Fig. 1 is the schematic flow sheet of existing two degree of human connections processing user;
Fig. 2 is two degree of relationship among persons recommendation sides according to single pair of user in the mass users concern relation of the embodiment of the present invention The schematic flow sheet of method;
Fig. 3 is the flow process of two degree of relationship among persons mapreduce recommendation methods of the mass users according to the embodiment of the present invention Schematic diagram;
Fig. 4 is two degree of relationship among persons mapreduce commending system boxes of the mass users according to the embodiment of the present invention Figure.
Identical label indicates similar or corresponding feature or function in all of the figs.
Specific embodiment
In the following description, for purposes of illustration, in order to provide the comprehensive understanding to one or more embodiments, explain Many details are stated.It may be evident, however, that these embodiments can also be realized in the case of not having these details.
In order to solve foregoing problems, the present invention adopts the thought of parallel computation, using mapreduce programming framework, writes Mapreduce program, to analyze and to calculate two degree of relationship among persons of mass users concern relation, and Fig. 2 shows according to the present invention In the mass users concern relation of embodiment, two degree of relationship among persons of single pair of user recommend the flow process of method;As shown in Fig. 2 at it Reason flow process is as follows:
S210: start;
S220: mass users concern relation, if a---b, c---a;
S230: user a as key assignments, and the user c of the user b of user a concern and concern user a does one parallel point Send out;
S240: vermicelli and the good friend of user a, do one and concentrate to merge and sort out;
S250: to the good friend user b of user's c recommended users a of concern user a, user a is indirect follower;By user a Vermicelli user c as key assignments, do one and parallel distribute;
S260: do one according to the key assignments of step s250 and merge and sort out, obtain all two degree of vermicelli user c of user a Human connection;
S270: output obtains two degree of human connections of user, and counts indirect follower and the number of indirect follower;
S280: terminate.
In two degree of above-mentioned relationship among persons flow processs, carried out based on user a concern user b and user c concern user a The recommendation of two degree of human connections.Below with reference to accompanying drawing, the specific embodiment of the present invention is described in detail.
Fig. 3 shows that two degree of relationship among persons mapreduce of mass users according to embodiments of the present invention recommend method Flow process.As shown in figure 3, the present invention provides a kind of two degree of relationship among persons mapreduce of mass users to recommend method, comprising: In the concern relation of mass users, the once relationship among persons according to user are obtained by the computational methods of two steps mapreduce to be used Two degree of relationship among persons at family, and recommended.It should be noted that the method that the present invention adopts parallel computation, utilize Mapreduce programming framework, writes mapreduce program, and two degree of human connections analyzing and to calculate mass users concern relation are closed System, employs two steps mapreduce in the present invention to realize the recommendation of two degree of relationship among persons of user.
In the concern relation of mass users, if user a is concern user b, user c pays close attention to user a, then user b is user a Good friend, user c be user a vermicelli;And if, user c pass through user a to recommend concern user b, user b to be user c's Two degree of human connections, user a is the indirect follower between user c and user b.
And if, user c passes through the other users in addition to user a in mass users and pays close attention to user b, other users Indirect follower for user c and user b;The other users mentioned in the present invention all refer to the indirect concern of user c and user b Person.
In one particular embodiment of the present invention, for the once human connection concern relation of user, such as: user a concern is used Family b, illustrates that user a is user's b vermicelli, user b be user a good friend.
Based on above-mentioned user's concern relation, need the once relationship among persons according to user, to user's two degree of human connections of recommendation: " good friend of this user they all pay close attention to ", mapreduce completes in two steps altogether.
S310: in the computational methods of first step mapreduce in the computational methods of two steps mapreduce, in magnanimity In the concern relation of user, according to the once human connection of user a, the good friend of user a is merged classification with the vermicelli of user a, obtain User a good friend set and user a vermicelli set, simultaneously and counting user a vermicelli quantity;Wherein, user b is in user In good friend's set of a, user c is in the vermicelli set of user a;And,
In the concern relation of mass users, according to the once human connection of other users, obtain good friend's set of other users With the vermicelli set of other users, simultaneously and count the vermicelli quantity of other users.
Specifically, in the computational methods of first step mapreduce in the computational methods of two steps mapreduce, mainly It is that the good friend of user and vermicelli are done a parallel distribution, then the vermicelli to user and good friend do one and concentrate and sort out.In sea In the concern relation of amount user, a---b, c---a;I.e. user a concern user b, user c pay close attention to user a;Then user b is user a Good friend, user c be user a vermicelli.
That is, by the vermicelli of the good friend of user a and user a do one parallel distribute, then the vermicelli to user a and The good friend of user does one and concentrates and sorts out.
The computational methods of first step mapreduce complete in two stages, i.e. map stage and reduce stage.
Wherein, in the map stage of first step mapreduce, by the id of user a, as key assignments, concurrent dispatch user a Good friend and user a vermicelli;That is, by the id of user a, as concurrent dispatch user b of key assignments and user c.
In the reduce stage of first step mapreduce, merge the vermicelli of user a and good friend, output user a good friend and The set of vermicelli;That is, merging user b and user c, export user b and user c.
It should be noted that in the concern relation of mass users, user a, user b and user c are to use as specific Family is illustrated, in fact, also having other a lot of users, user in addition to user b in good friend's set of user a Also have other a lot of users in addition to user c in the vermicelli set of a;And, it is in the concern relation of mass users, permissible Obtain good friend's set and the vermicelli set of any user, therefore, according to the once human connection of the user in addition to user a, acquisition removes Good friend's set of the user outside user a and the vermicelli set of user in addition to user a, simultaneously and count its vermicelli quantity. Statistics vermicelli quantity is that the needs of the computational methods for next step are prepared.
Therefore, while the vermicelli set of the good friend's set obtaining user a and user a, and the vermicelli of counting user a Quantity;And, in the concern relation of mass users, also want other use in addition to user a between counting user c and user b The vermicelli quantity at family.
S320: in the computational methods of the second step mapreduce in the computational methods of two steps mapreduce, in magnanimity In the concern relation of user, good friend's set that user a recommends concern user a, the vermicelli of user a are passed through in the vermicelli set of user a Two degree of human connections of set are good friend's set of user a, and wherein, user a is user c and user a in the vermicelli set of user a The indirect follower of the user b that good friend concentrates;And,
The quantity of the vermicelli according to user a obtains the recommendation weighted value of user a, and the quantity of the vermicelli according to other users obtains Obtain the recommendation weighted value of other users;
Recommend weighted value and the recommendation weighted value of other users of user a are merged thus obtaining the advowson of maximum The quantity of the indirect follower between weight values, and counting user c and user b, wherein, indirect between user c and described user b The quantity of follower is the quantity sum of user a and other users;
User b is recommended user c, the recommendation weighted value of the maximum after merging and all indirect followers is pushed away simultaneously Recommend to user c, recommended with two degree of relationship among persons completing user.
Specifically, in the computational methods of second step mapreduce in the computational methods of two steps mapreduce, user a's Vermicelli is user c as key assignments, the good friend of user a is done with one and parallel distributes;Then two degree of human connections of counting user c and two degree The quantity of the indirect follower of human connection.
It is also classified into two benches in the computational methods of two steps mapreduce in the computational methods of second step mapreduce Complete, as the reduce stage of the map stage of second step mapreduce and second step mapreduce.
In the map stage of second step mapreduce, using the vermicelli of user a as key assignments, the good friend of parallel dispatch user a, use Indirect follower between the good friend of the vermicelli of family a and user a is user a, and obtains the recommendation weighted value of user a.Namely Say, using user c as key assignments, parallel dispatch user b, the indirect follower between user b and user c is user a.
Wherein, between considering during the recommendation weighted value of the indirect follower user a between user c and user b, using indirect The vermicelli quantity segmentation weight of follower user a is considered;The vermicelli quantity of user a has mapping with the recommendation weight of user a Relation, can be according to the frequency probability distribution situation of the vermicelli quantity of user a in sns community mass users, using lognormal letter The mode of number matching, simulates the distribution function figure of vermicelli quantity, the recommendation weighted value of user's a vermicelli quantity is this distribution letter The orientation integrated value of number.
Lognormal Function Fitting formula is:
f ( x , μ , σ ) = 1 xσ 2 π e - ( ln x ) 2 2 σ 2
Wherein, in above-mentioned Function Fitting, if x is the array of the vermicelli quantity of all mass users, μ is described array x Logarithm meansigma methodss, σ be described array x logarithm data expectation.The mathematic expectaion of array x and variance are respectively e [x] var [x];
The fitting formula of parameter is:
μ = ln ( e [ x ] ) - 0.5 * ln ( 1 + var [ x ] ( e [ x ] ) 2 )
σ 2 = ln ( 1 + var [ x ] ( e [ x ] ) 2 )
The orientation integrated value of lognormal function is the recommendation weight of user a.
In the present invention, the weighted value of recommending of all indirect followers all passes through according to the vermicelli quantity of indirect follower Lognormal Function Fitting and obtain.
If that is, user c passes through the other users concern in addition to user a in the concern relation of mass users using Family b, then other users are the indirect follower of user c and user b;In the present invention, the recommendation weighted value also root of other users Obtained by lognormal Function Fitting according to its vermicelli quantity.
In the present invention, the map stage of second step mapreduce, also a critically important duplicate removal task, has following Situation:
During good friend's set that user a recommends concern user a is passed through in the vermicelli set of user a, if user a's There is user b in vermicelli set, also have user b in good friend's set of user a, then the two of user b degree human connection can not be use simultaneously Family b itself;Meanwhile,
If the vermicelli of user a concentrates the user c closing to pay close attention to the user b in good friend's set of user a, user c's Two degree of human connections can not be user b.
Two kinds of scenes of illustration:
Scene one: if if user a and user b pay close attention to mutually, user b be user a vermicelli be also user a good friend; But at this time it is unable to user's b recommended users b.
Scene two: if user a is concern user b, user c pays close attention to user a, and the vermicelli of user a is user c, then to user c When recommending concern b, need to judge that user c does not pay close attention to user b, if user c has paid close attention to user b, not recommended users b.
In the present invention it is considered to the recommendation weighted value of once relationship among persons, it is possible to increase the accuracy that user recommends.
In the reduce stage of second step mapreduce, merge the recommendation weights of user, count the number of indirect follower.
That is, the reduce stage of second step mapreduce, in the recommendation weighted value by user a and other users Merge and sort out, and count indirect follower and its quantity, merge the recommendation weighted value drawing maximum after sorting out, by maximum recommendation Weighted value and all of indirect follower and quantity recommend user c in the lump, and two degree of human connections completing user are recommended.
Last output result is: a w6.898b, d, e, f4
The recommendation of two degree of human connections is explanatory to be: user w is recommended user a it is recommended that weights are 6.898 it is recommended that reason is, Your 4 good friends b, d, e, f of user a have also paid close attention to w.
The all of indirect follower of output user, it is possible to increase the interpretability of two degree of human connections, such rationale for the recommendation User is easier to understand, it is to avoid the information anxiety problem of user, is favorably improved the conversion ratio of recommendation.
The detailed process that above-mentioned two degree of relationship among persons for mass users of the present invention are recommended;Present invention employs parallel computation Method is calculated and is recommended to two degree of relationship among persons, can increase calculate node and carry out level expansion according to the scale of processing data Exhibition;That is, calculating to the once relationship among persons of mass users.
In order to verify computational efficiency, contrasted using two kinds of computational methods, control methods is as follows:
Method one: the once relationship among persons of user are stored in relevant database, using the sql in relevant database Querying method, in the case of not considering that weight is recommended in once human connection, two degree of relationship among persons calculating user are recommended.
Method two: adopt the method for the present invention, the once relationship among persons of user are stored in distributed file system hdfs, adopt Calculated with the method for the mapreduce of the present invention.Consider the recommendation weight of once relationship among persons, reduce number is single-unit The maximum reduce number of point, so be ensure that and is calculated using single node.
From above-mentioned contrast, it is known that the present invention, it can be avoided that the problem repeatedly inquired about of process in calculating, improves and calculates Efficiency, and consider the weight of once human connection recommendation, so that user is recommended more accurate.
Corresponding with said method, the present invention also provides a kind of two degree of relationship among persons mapreduce of mass users to recommend System.Fig. 4 shows two degree of relationship among persons mapreduce commending system logic knots of mass users according to embodiments of the present invention Structure.
As shown in figure 4, two degree of relationship among persons mapreduce commending systems 400 of the mass users of present invention offer are used for In the concern relation of mass users, once relationship among persons according to user pass through first step mapreduce computing unit and the Two step mapreduce computing units obtain two degree of relationship among persons of user, and are recommended;Wherein, first step mapreduce meter Calculate unit and second step mapreduce computing unit and be respectively used in the computational methods execute aforementioned two steps mapreduce the One step and second step.Wherein,
In the concern relation of mass users, if user a is concern user b, user c pays close attention to user a, then user b is user a Good friend, user c be user a vermicelli;And,
If user c pass through user a recommend concern user b, user b be user c two degree human connections, user a be user c with Indirect follower between user b;
If user c passes through the other users in addition to user a in mass users and recommends concern user b, other users Indirect follower for user c and user b.
Commending system 400 includes first step mapreduce computing unit and second step mapreduce computing unit.
Wherein, first step mapreduce computing unit 410, in the computational methods of first step mapreduce, is used in magnanimity In the concern relation at family, according to the once human connection of user a, the good friend of user a is merged classification with the vermicelli of user a, obtain and use Family a good friend set and user a vermicelli set, simultaneously and counting user a vermicelli quantity;Wherein,
, in the good friend of user a gathers, user c is in the vermicelli set of described user a for user b;And,
In the concern relation of mass users, according to the once human connection of other users, obtain good friend's set of other users With the vermicelli set of other users, simultaneously and count the vermicelli quantity of other users.
Second step mapreduce computing unit 420 includes recommending weighted value acquiring unit 421 and two degree of human connection recommendation unit 422.
Weighted value acquiring unit 421 is recommended to be used for obtaining the recommendation weighted value of user;Wherein, the concern in mass users is closed In system, good friend's set that user a recommends concern user a, two degree of people of the vermicelli set of user a are passed through in the vermicelli set of user a Arteries and veins is good friend's set of user a, wherein,
The indirect follower of the user b that the good friend of the user c in the vermicelli set for user a for the user a and user a concentrates; And,
The quantity of the vermicelli according to user a obtains the recommendation weighted value of user a,
The quantity of the vermicelli according to other users obtains the recommendation weighted value of other users.
Two degree of human connection recommendation unit 422, two degree of human connections for completing user are recommended;Wherein, by the recommendation weight of user a The recommendation weighted value of value and other users merges thus obtaining the recommendation weighted value of maximum, and counting user c and described use The quantity of the indirect follower between the b of family, wherein,
The quantity of the indirect follower between user c and user b is the quantity sum of user a and other users;
Finally user b is recommended user c, maximum recommendation weighted value and all indirect followers are recommended simultaneously User c, is recommended with two degree of human connections completing user.
Wherein it is recommended that weighted value acquiring unit 422 passes through the good of user a recommendation concern user a in the vermicelli set of user a During friend's set;
If there being user b in the vermicelli set of user a, also there is described user b in good friend's set of user a, then simultaneously Two degree of human connections of user b can not be user b itself;Meanwhile,
If the vermicelli of user a concentrates the user c closing to pay close attention to the user b in good friend's set of user a, user c's Two degree of human connections can not be user b.
In recommending weighted value acquiring unit 421, user a adopts lognormal function to intend according to the vermicelli quantity of user a The mode closed obtains the recommendation weighted value of user a;
Lognormal Function Fitting formula is:
f ( x , μ , σ ) = 1 xσ 2 π e - ( ln x ) 2 2 σ 2
Wherein, in lognormal Function Fitting, if x is the array of the vermicelli quantity of all mass users, μ is described The meansigma methodss of the logarithm of array x, σ is the data expectation of described array x logarithm.The mathematic expectaion of array x and variance are respectively e [x]var[x];
The fitting formula of parameter is:
μ = ln ( e [ x ] ) - 0.5 * ln ( 1 + var [ x ] ( e [ x ] ) 2 )
σ 2 = ln ( 1 + var [ x ] ( e [ x ] ) 2 )
The orientation integrated value of lognormal function is the recommendation weighted value of user a.
Two degree of relationship among persons mapreduce of the mass users of present invention offer are provided by above-mentioned embodiment Recommend method and system, it can be avoided that the problem that in calculating, process is inquired about repeatedly, improve computational efficiency, the efficiency of raising and sns The average concern relation number of community is relevant, and concern relation net is more complicated, and efficiency improves more obvious;The power recommended using once human connection Weight, makes recommendation more accurate;In mass users, if improving the process time calculating or processing more data, Neng Goufei Often easily carry out horizontal extension.
Describe two degree of relationship among persons according to mass users proposed by the present invention above with reference to accompanying drawing in an illustrative manner Mapreduce recommends method and system.It will be understood by those skilled in the art, however, that the sea that the invention described above is proposed Two degree of relationship among persons mapreduce of amount user recommend method and system, can also be on the basis of without departing from present invention Make various improvement.Therefore, protection scope of the present invention should be determined by the content of appending claims.

Claims (6)

1. a kind of two degree of relationship among persons mapreduce of mass users recommend method, comprising:
In the concern relation of mass users, the once relationship among persons according to user pass through the computational methods of two steps mapreduce Obtain two degree of relationship among persons of user, and recommended;Wherein,
In the concern relation of described mass users, if user a is concern user b, user c pays close attention to user a, then user b is user a Good friend, user c be user a vermicelli;And if, user c pass through user a to recommend concern user b, user b to be user c's Two degree of human connections, user a is the indirect follower between user c and user b;If user c passes through the concern in described mass users Other users concern user b in addition to user a in relation, then other users are the indirect follower of user c and user b;And And,
In the computational methods of first step mapreduce in the computational methods of described two steps mapreduce, use in described magnanimity In the concern relation at family, according to the once human connection of described user a, the good friend of user a is merged classification with the vermicelli of user a, obtains User a good friend set and user a vermicelli set, simultaneously and counting user a vermicelli quantity;
Wherein, in the good friend of described user a gathers, described user c is in the vermicelli set of described user a for described user b;And And, in the concern relation of described mass users, according to the once human connection of described other users, obtain the good of described other users Friend's set and the vermicelli set of described other users, simultaneously and count the vermicelli quantity of described other users;
In the computational methods of the second step mapreduce in the computational methods of described two steps mapreduce, use in described magnanimity In the concern relation at family, good friend's set that described user a recommends to pay close attention to described user a, institute are passed through in the vermicelli set of described user a Two degree of human connections stating the vermicelli set of user a are good friend's set of described user a, and wherein, described user a is described user a The indirect follower of the described user b that the good friend of the described user c in vermicelli set and described user a concentrates;And,
The quantity of the vermicelli according to described user a obtains the recommendation weighted value of described user a, according to the vermicelli of described other users Quantity obtain described other users recommendation weighted value;
Recommend weighted value and the recommendation weighted value of described other users of described user a are merged thus obtaining pushing away of maximum Recommend weighted value, and count the quantity of the indirect follower between described user c and described user b, wherein, described user c and institute The quantity stating the indirect follower between user b is the quantity sum of described user a and described other users;
Described user b is recommended described user c, described maximum recommendation weighted value and all indirect followers is pushed away simultaneously Recommend to described user c, recommended with two degree of relationship among persons completing described user.
2. two degree of relationship among persons mapreduce of mass users as claimed in claim 1 recommend method, wherein, in described use During good friend's set that described user a recommends to pay close attention to described user a is passed through in the vermicelli set of family a,
If there being described user b in the vermicelli set of described user a, also have described in good friend's set of described user a simultaneously User b, then two degree of human connections of described user b can not be described user b itself;
If the described user c of the vermicelli set of described user a has paid close attention to the described user b in good friend's set of described user a, Then two degree of human connections of described user c can not be described user b.
3. two degree of relationship among persons mapreduce of mass users as claimed in claim 1 recommend method, wherein,
Described user a obtains described user a according to the vermicelli quantity of described user a by the way of lognormal Function Fitting Recommendation weighted value;
Described lognormal Function Fitting formula is:
f ( x , μ , σ ) = 1 x σ 2 π e - ( ln x ) 2 2 σ 2
Wherein, in described lognormal Function Fitting, x is the array of the vermicelli quantity of all mass users, and μ is described number The meansigma methodss of the logarithm of group x, σ is the data expectation of described array x logarithm;
The mathematic expectaion of described array x and variance are respectively e [x], vra [x];
The fitting formula of parameter is:
μ = ln ( e [ x ] ) - 0.5 * ln ( 1 + v a r [ x ] ( e [ x ] ) 2 )
σ 2 = l n ( 1 + v a r [ x ] ( e ( [ x ] ) 2 )
The orientation integrated value of described lognormal function is the recommendation weighted value of described user a.
4. two degree of relationship among persons mapreduce commending systems of a kind of mass users,
Described commending system, for, in the concern relation of mass users, the once relationship among persons according to user pass through the first step Mapreduce computing unit and two degree of relationship among persons of second step mapreduce computing unit acquisition user, and recommended; Wherein,
In the concern relation of described mass users, if user a is concern user b, user c pays close attention to user a, then user b is user a Good friend, user c be user a vermicelli;And if, user c pass through user a to recommend concern user b, user b to be user c's Two degree of human connections, user a is the indirect follower between user c and user b;If user c passes through the concern in described mass users In relation, the other users in addition to user a recommend concern user b, then described other users are described user c and described user b Indirect follower;
Described first step mapreduce computing unit, in the concern relation of described mass users, according to described user a Once human connection, the good friend of user a is merged classification with the vermicelli of user a, obtains good friend's set of user a and the powder of user a Silk set, simultaneously and counting user a vermicelli quantity;Wherein,
, in the good friend of described user a gathers, described user c is in the vermicelli set of described user a for described user b;And, In the concern relation of described mass users, according to the once human connection of described other users, obtain good friend's collection of described other users Close and described other users vermicelli set, simultaneously and count the vermicelli quantity of described other users;
Described second step mapreduce computing unit includes recommending weighted value acquiring unit and two degree of human connection recommendation unit;Wherein,
Described recommendation weighted value acquiring unit, for obtaining the recommendation weighted value of user;Wherein, in the concern of described mass users In relation, good friend's set that described user a recommends to pay close attention to described user a, described user a are passed through in the vermicelli set of described user a Vermicelli set two degree of human connections be described user a good friend set, wherein, described user a is the vermicelli set of described user a In described user c and described user a good friend concentrate described user b indirect follower;And,
The quantity of the vermicelli according to described user a obtains the recommendation weighted value of described user a, according to the vermicelli of described other users Quantity obtain described other users recommendation weighted value;
Described two degree of human connection recommendation unit, two degree of human connections for completing user are recommended;Wherein, by the advowson of described user a The recommendation weighted value of weight values and described other users merges thus obtaining the recommendation weighted value of maximum, and counts described user The quantity of the indirect follower between c and described user b, wherein, indirect follower between described user c and described user b Quantity be described user a and described other users quantity sum;
Described user b is recommended described user c, described maximum recommendation weighted value and all indirect followers is pushed away simultaneously Recommend to described user c, recommended with two degree of human connections completing described user.
5. two degree of relationship among persons mapreduce commending systems of mass users as claimed in claim 4, wherein, described recommendation Weighted value acquiring unit is recommended by described user a to pay close attention to good friend's set of described user a in the vermicelli set of described user a During,
If there being described user b in the vermicelli set of described user a, also have described in good friend's set of described user a simultaneously User b, then two degree of human connections of described user b can not be described user b itself;
If the described user c of the vermicelli set of described user a has paid close attention to the described user b in good friend's set of described user a, Then two degree of human connections of described user c can not be described user b.
6. two degree of relationship among persons mapreduce commending systems of mass users as claimed in claim 4, wherein, push away described Recommend in Weight Acquisition unit,
Described user a obtains described user a according to the vermicelli quantity of described user a by the way of lognormal Function Fitting Recommendation weighted value;
Described lognormal Function Fitting formula is:
f ( x , μ , σ ) = 1 x σ 2 π e - ( ln x ) 2 2 σ 2
Wherein, in described lognormal Function Fitting, x is the array note of the vermicelli quantity of all mass users, and μ is described The meansigma methodss of the logarithm of array x, σ is the data expectation of described array x logarithm;The mathematic expectaion of described array x and variance are respectively For e [x], vra [x];
The fitting formula of parameter is:
μ = ln ( e [ x ] ) - 0.5 * ln ( 1 + v a r [ x ] ( e [ x ] ) 2 )
σ 2 = l n ( 1 + v a r [ x ] ( e ( [ x ] ) 2 )
The orientation integrated value of described lognormal function is the recommendation weighted value of described user a.
CN201310704592.0A 2013-12-18 2013-12-18 MapReduce recommendation method and system of second-degree interpersonal relationships of massive users Active CN103714135B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310704592.0A CN103714135B (en) 2013-12-18 2013-12-18 MapReduce recommendation method and system of second-degree interpersonal relationships of massive users

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310704592.0A CN103714135B (en) 2013-12-18 2013-12-18 MapReduce recommendation method and system of second-degree interpersonal relationships of massive users

Publications (2)

Publication Number Publication Date
CN103714135A CN103714135A (en) 2014-04-09
CN103714135B true CN103714135B (en) 2017-02-01

Family

ID=50407110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310704592.0A Active CN103714135B (en) 2013-12-18 2013-12-18 MapReduce recommendation method and system of second-degree interpersonal relationships of massive users

Country Status (1)

Country Link
CN (1) CN103714135B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580385B (en) * 2014-12-16 2018-04-03 腾讯科技(深圳)有限公司 A kind of method and device for expanding customer relationship chain
CN106445948A (en) * 2015-08-06 2017-02-22 中兴通讯股份有限公司 Analysis method and device of potential relationship of people
CN105245435B (en) * 2015-09-28 2018-11-06 广州市百果园网络科技有限公司 A kind of friend recommendation method and system
CN105824921A (en) * 2016-03-16 2016-08-03 广州彩瞳网络技术有限公司 User social relation recognition device and method
CN106548405A (en) * 2016-11-10 2017-03-29 北京锐安科技有限公司 Inter personal contact projectional technique and device
CN108228608B (en) * 2016-12-14 2021-04-30 北大方正集团有限公司 Character recommendation method, system and terminal
CN107657539A (en) * 2017-09-22 2018-02-02 广州土土信息科技有限公司 It is a kind of can multinomial selection human connection resource software management system and method
CN109558465A (en) * 2018-11-22 2019-04-02 北京酷我科技有限公司 Relationship management method and system in a kind of social intercourse system between user
CN112800331A (en) * 2021-02-02 2021-05-14 百果园技术(新加坡)有限公司 User recommendation method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324879A (en) * 2008-07-31 2008-12-17 崔高 Website system and method for implementing share of relationship among persons
CN103379158A (en) * 2012-04-24 2013-10-30 中国移动通信集团公司 Method and system for recommending friend information in social network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324879A (en) * 2008-07-31 2008-12-17 崔高 Website system and method for implementing share of relationship among persons
CN103379158A (en) * 2012-04-24 2013-10-30 中国移动通信集团公司 Method and system for recommending friend information in social network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于用户偏好的社会网络二级人脉推荐研究;于海群等;《计算机应用与软件》;20120415;第39-43页 *

Also Published As

Publication number Publication date
CN103714135A (en) 2014-04-09

Similar Documents

Publication Publication Date Title
CN103714135B (en) MapReduce recommendation method and system of second-degree interpersonal relationships of massive users
CN109408665A (en) A kind of information recommendation method and device, storage medium
CN102571485B (en) Method for identifying robot user on micro-blog platform
CN106506705A (en) Listener clustering method and device based on location-based service
CN104462592B (en) Based on uncertain semantic social network user behavior relation deduction system and method
CN109636481A (en) User's portrait construction method and device towards domestic consumer
CN106650774A (en) Method for obtaining the regression relationship between the dependant variable and the independent variables during data analysis
CN106021329A (en) A user similarity-based sparse data collaborative filtering recommendation method
CN105550275B (en) A kind of microblogging transfer amount prediction technique
CN105469611A (en) Short-term traffic flow prediction model method
CN103268519A (en) Electric power system short-term load forecast method and device based on improved Lyapunov exponent
CN105760649A (en) Big-data-oriented creditability measuring method
CN104077417A (en) Figure tag recommendation method and system in social network
Tkhorikov Technology of municipal public heath service assessment
CN106127594A (en) User room interest-degree computational methods based on principal component analysis and system
CN105678590A (en) topN recommendation method for social network based on cloud model
CN104598648B (en) A kind of microblog users interactive mode gender identification method and device
US20140114974A1 (en) Co-clustering apparatus, co-clustering method, recording medium, and integrated circuit
CN103955580B (en) Parametric Yield of VLSI IC method of estimation based on reliability rule base reasoning
Kaurova et al. Cross-country comparison of statistical indicators
CN115600824B (en) Carbon emission early warning method and device, storage medium and electronic equipment
CN103744918A (en) Vertical domain based micro blog searching ranking method and system
CN103761246B (en) Link network based user domain identifying method and device
CN105138684B (en) A kind of information processing method and information processing unit
CN107247962A (en) A kind of real-time electrical appliance recognition and system based on sliding window

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant