User's similarity calculating method, device, equipment and medium based on user preference
Technical field
The present embodiments relate to internet direct seeding technique field more particularly to a kind of user based on user preference are similar
Spend calculation method, device, equipment and medium.
Background technique
In the application field of big data, an important direction is to carry out personalization to user according to mass data to push away
It recommends.
In live streaming platform, common Generalization bounds are pushed away based on room similar with the room that user watched
It recommends, it is therefore desirable to which the similarity between each room of direct broadcasting room is measured.In addition, being pushed away in some collaborative filterings based on user
It recommends in algorithm, it is also desirable to calculate the similarity of user between any two, the room that one of user likes viewing is recommended
With the higher user of user's similarity.
The common algorithm for calculating user's similarity between any two has Jie Kade Coefficient Algorithm, which is widely used,
But by the algorithm apply direct broadcasting room recommendation in there are some problems.Outstanding person, which blocks German number, to be calculated based on set, then two
Similarity between a user is equal to the direct broadcasting room union that the common direct broadcasting room number of two users viewing is watched divided by two users
Quantity.As it can be seen that the shortcomings that algorithm is only to measure the similarity between two users from the quantity of viewing, do not account for
Even if two users have viewed identical direct broadcasting room, but may be because the problem of difference of viewing duration causes similar sex differernce.
Summary of the invention
The embodiment of the present invention provides a kind of user's similarity calculating method, device, equipment and medium based on user preference,
The accuracy of similarity calculation between user can be improved by the method.
To achieve the above object, the embodiment of the present invention adopts the following technical scheme that
In a first aspect, the embodiment of the invention provides a kind of user's similarity calculating method based on user preference, described
Method includes:
Determine the common direct broadcasting room set that two users watch in the set time period;
Calculate separately happiness of each user to each direct broadcasting room in the common direct broadcasting room set in described two users
Love degree;
Described two users are calculated based on degree of liking of each user to each direct broadcasting room in the common direct broadcasting room set
Between preference difference degree;
According to the preference difference degree between described two users in conjunction with the common direct broadcasting room set and described two use
The direct broadcasting room union that family is watched in the set time period calculates the similarity between described two users.
Further, each user calculated separately in described two users is to every in the common direct broadcasting room set
The degree of liking of a direct broadcasting room, comprising:
Count the total duration and active user's viewing common direct broadcasting room set that active user watches between current live
In each direct broadcasting room the sum of total duration;
Active user is obtained to current straight divided by the sum of described total duration using the total duration between the viewing current live
Degree of liking between broadcasting.
Further, described to be calculated based on degree of liking of each user to each direct broadcasting room in the common direct broadcasting room set
Preference difference degree between described two users, comprising:
Each user is calculated separately to the sum of the degree of liking of each direct broadcasting room in common direct broadcasting room set;
It carries out the sum of degree of liking described in two users to do difference operation, the absolute preference obtained between two users is poor
It is different;
It is calculated based on degree of liking of each user to each direct broadcasting room in common direct broadcasting room set opposite between two users
Preference difference;
The preference calculated between described two users according to the absolute preference difference and the opposite preference difference is poor
Different degree.
Further, described that two use are calculated based on degree of liking of each user to each direct broadcasting room in common direct broadcasting room set
Opposite preference difference between family, comprising:
Degree of liking of each user to each direct broadcasting room in common direct broadcasting room set is normalized, each user couple is obtained
The opposite degree of liking of each direct broadcasting room;
It carries out opposite degree of liking of two users to identical direct broadcasting room to do difference operation, obtains the difference of opposite degree of liking;
Difference of described two users to the opposite degree of liking of each direct broadcasting room in the common direct broadcasting room set is summed
Operation obtains the opposite preference difference between described two users.
Further, described according to the absolute preference difference and described with respect to the described two users of preference difference calculating
Between preference difference degree, comprising:
The preference difference degree between described two users is calculated according to following formula:
Wherein, duvIndicate the preference difference degree between user u and user v, p'urIndicate user u to the normalizing of direct broadcasting room r
Degree of liking after change, p'vrIndicate user v to the degree of liking after the normalization of direct broadcasting room r, RuvIndicate that user u and user v is being set
The common direct broadcasting room set watched in section of fixing time,Indicate that the opposite preference between user u and user v is poor
It is different, purIndicate user u to the degree of liking before the normalization of direct broadcasting room r, pvrIndicate user v to the happiness before the normalization of direct broadcasting room r
Love degree,Indicate the absolute preference difference between user u and user v.
Further, the preference difference degree according between described two users in conjunction with the common direct broadcasting room set with
And the direct broadcasting room union watched in the set time period of described two users calculates the similarity between described two users, packet
It includes:
The similarity between described two users is calculated according to following formula:
Wherein, suvIndicate the similarity between user u and user v, w indicates weight coefficient, duv' indicate after normalizing
Preference difference degree between user u and user v, | Ruv| indicate the common live streaming that user u and user v is watched in the set time period
Between sum, | Ru∪Rv| indicate the direct broadcasting room that user u and user v is watched in the set time period and the quantity for concentrating element.
Further, the common direct broadcasting room set that two users of the determination watch in the set time period, comprising:
Based on customer identification number and direct broadcasting room identification number determine that two users watch in the set time period it is common straight
Gather between broadcasting.
Second aspect, the embodiment of the invention provides a kind of user's similarity calculation device based on user preference are described
Device includes:
Determining module, the common direct broadcasting room set watched in the set time period for determining two users;
Degree of liking computing module, for calculating separately each user in described two users to the common direct broadcasting room collection
The degree of liking of each direct broadcasting room in conjunction;
Preference difference degree computing module, for based on each user to each direct broadcasting room in the common direct broadcasting room set
Degree of liking calculates the preference difference degree between described two users;
Similarity calculation module, for according to the preference difference degree between described two users in conjunction with the common direct broadcasting room
The direct broadcasting room union that set and described two users watch in the set time period calculates similar between described two users
Degree.
The third aspect the embodiment of the invention provides a kind of electronic equipment, including memory, processor and is stored in storage
On device and the computer program that can run on a processor, the processor realizes such as above-mentioned the when executing the computer program
User's similarity calculating method described in one side based on user preference.
Fourth aspect, the embodiment of the invention provides a kind of storage medium comprising computer executable instructions, the meters
Calculation machine executable instruction realizes the use based on user preference as described in above-mentioned first aspect when being executed as computer processor
Family similarity calculating method.
A kind of user's similarity calculating method based on user preference provided in an embodiment of the present invention, by calculating separately two
Each user in a user is based on each user to described common to the degree of liking of each direct broadcasting room in common direct broadcasting room set
The degree of liking of each direct broadcasting room calculates the preference difference degree between described two users in direct broadcasting room set;According to described two use
What the preference difference degree between family was watched in the set time period in conjunction with the common direct broadcasting room set and described two users
Direct broadcasting room union calculates the technological means of the similarity between described two users, and it is accurate to realize raising user's similarity calculation
The purpose of degree, and then can realize and personalized recommendation is carried out based on user's similarity.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, institute in being described below to the embodiment of the present invention
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without creative efforts, can also implement according to the present invention
The content of example and these attached drawings obtain other attached drawings.
Fig. 1 is a kind of user's similarity calculating method process signal based on user preference that the embodiment of the present invention one provides
Figure;
Fig. 2 is a kind of user's similarity calculating method process signal based on user preference provided by Embodiment 2 of the present invention
Figure;
Fig. 3 is a kind of user's similarity calculation apparatus structure signal based on user preference that the embodiment of the present invention three provides
Figure;
Fig. 4 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention four provides.
Specific embodiment
To keep the technical problems solved, the adopted technical scheme and the technical effect achieved by the invention clearer, below
It will the technical scheme of the embodiment of the invention will be described in further detail in conjunction with attached drawing, it is clear that described embodiment is only
It is a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those skilled in the art exist
Every other embodiment obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
Embodiment one
Fig. 1 is a kind of user's similarity calculating method process signal based on user preference that the embodiment of the present invention one provides
Figure.User's similarity calculating method based on user preference disclosed in the present embodiment is applicable to the sight to direct broadcasting room mass users
The case where preference is identified is seen, to realize that the viewing preference based on user pushes suitable programme televised live for it.The method
It can be by being executed based on user's similarity calculation device of user preference, wherein the device can be implemented by software and/or hardware,
And it is typically integrated in terminal, such as server etc..Referring specifically to shown in Fig. 1, this method be may include steps of:
Step 110 determines the common direct broadcasting room set that two users watch in the set time period.
Wherein, the set period of time usually takes the 30 day or 60 day time nearest apart from current time.If user
Some direct broadcasting room was watched, then can save relative recording in the log of the direct broadcasting room client of user, in the relative recording
There are the identification information of user, the direct broadcasting room identification information of viewing and viewing time etc., the viewing time includes opening for viewing
Begin time and end time;The identification information of the user may include that the pet name of user or user are made when watching direct broadcasting room
IP address etc., the identification information of the direct broadcasting room can be number or pet name of direct broadcasting room main broadcaster of direct broadcasting room etc. and be used for
Identify the information of unique direct broadcasting room.Therefore, it can be seen in the set time period by acquiring the log information acquisition user of client
The direct broadcasting room information seen, and then count the common direct broadcasting room set that specific two users watch in the set time period, institute
The common direct broadcasting room set for stating viewing refers to the identical direct broadcasting room set of two users viewing, such as in 2018.9.30-
2018.10.30 between day, user A watched No.1 direct broadcasting room, and user B also watched No.1 direct broadcasting room, then the No.1 direct broadcasting room
The common direct broadcasting room that as user A and user B are watched in period 2018.9.30-2018.10.30, multiple common direct broadcasting rooms
Constitute common direct broadcasting room set.The direct broadcasting room information that user watched can also be obtained from the file system for saving the information, example
It such as is generally stored inside Kafka or HDFS in the direct broadcasting room information that direct broadcasting room field, user information and user watched,
Kafka is that one kind is distributed, and the message system based on publish/subscribe, HDFS is a kind of distributed file system, provides one
The mass data storage solution of kind Error Tolerance and high-throughput.The present embodiment is not to acquisition user information and user
The mode for the direct broadcasting room information watched is defined.
Step 120 calculates separately each user in described two users to each straight in the common direct broadcasting room set
Degree of liking between broadcasting.
Specifically, if user's duration for watching some direct broadcasting room is longer, then it represents that user likes some direct broadcasting room
Degree is higher, therefore, directly can watch the duration of each direct broadcasting room using user to indicate user to the degree of liking of the direct broadcasting room;Also
Can use user watch single direct broadcasting room duration occupy family watch each direct broadcasting room in the common direct broadcasting room set when
The sum of long percentage indicates user to the degree of liking of the single direct broadcasting room.
Preferably, each user calculated separately in two users is to each live streaming in the common direct broadcasting room set
Between degree of liking, comprising:
Count the total duration and active user's viewing common direct broadcasting room set that active user watches between current live
In each direct broadcasting room the sum of total duration;
Active user is obtained to current straight divided by the sum of described total duration using the total duration between the viewing current live
Degree of liking between broadcasting.
For example, it is assumed that the common direct broadcasting room set includes three direct broadcasting rooms, respectively No.1 direct broadcasting room, No. two direct broadcasting rooms
With No. three direct broadcasting rooms, the total duration that user A watches No.1 direct broadcasting room is 10 minutes, and the total duration for watching No. two direct broadcasting rooms is 15 points
Clock, the total duration for watching No. three direct broadcasting rooms is 20 minutes, then user A is 10/ (10+15+20) to the degree of liking of No.1 direct broadcasting room
=10/45=2/9.
Specifically, above-mentioned calculating process is summarised as following calculation formula, formula can be calculated as follows and calculate user couple
The degree of liking of each direct broadcasting room:
Wherein, purIndicate degree of liking of the user u to direct broadcasting room r, wurIndicate that user A watches live streaming in the set time period
Between r total duration, RuIndicate the direct broadcasting room set that user u is watched in the set time period, s indicates set RuIn arbitrary element.
Step 130, based on each user in the common direct broadcasting room set each direct broadcasting room degree of liking calculate described in
Preference difference degree between two users.
Specifically, can directly by two users pass through respectively the degree of liking to each direct broadcasting room that step 120 obtains make it is poor
The preference difference degree that two users are directed to single direct broadcasting room is obtained, then will be asked again for the preference difference degree of single direct broadcasting room
With obtain the preference difference degree between two users;For example, it is assumed that user A and user B watch in the set time period it is common
Direct broadcasting room set includes three direct broadcasting rooms, respectively No.1 direct broadcasting room, No. two direct broadcasting rooms and No. three direct broadcasting rooms, and user A is to No.1
The degree of liking of direct broadcasting room is 0.6, and user B is 0.3 to the degree of liking of No.1 direct broadcasting room;Degree of liking of the user A to No. two direct broadcasting rooms
It is 0.7, user B is 0.7 to the degree of liking of No. two direct broadcasting rooms;User A is 0.2 to the degree of liking of No. three direct broadcasting rooms, and user B is to three
The degree of liking of number direct broadcasting room is 0.4;Then the preference difference degree between user A and user B be (0.6-0.3)+(0.7-0.7)+
(0.4-0.2)=0.5.It should be noted that utilizing happiness when two users of calculating spend for the preference difference of single direct broadcasting room
The value of Ai Dugao subtracts the low value of degree of liking, or obtain two users degree of liking difference after take absolute value again, it is therefore an objective to protect
Demonstrate,proving obtained result is positive number, and obtained result is bigger, indicates that the preference difference between two users is bigger.
Step 140, according to the preference difference degree between described two users in conjunction with the common direct broadcasting room set and institute
It states the direct broadcasting room union that two users watch in the set time period and calculates similarity between described two users.
Specifically, assume the direct broadcasting room watched in the set time period of user A include No.1 direct broadcasting room, No. two direct broadcasting rooms and
No. three direct broadcasting rooms;The direct broadcasting room that user B is watched in the set period of time includes No. two direct broadcasting rooms, No. three direct broadcasting rooms and No. four
Direct broadcasting room, the then common direct broadcasting room collection that user A and user B is watched in the set period of time are combined into { No. two direct broadcasting rooms, No. three
Direct broadcasting room }, the direct broadcasting room union that user A and user B are watched in the set period of time is { No.1 direct broadcasting room, No. two live streamings
Between, No. three direct broadcasting rooms, No. four direct broadcasting rooms;The common direct broadcasting room that then user A and user B are watched in the set period of time accounts for
The 2/4=1/2 for the direct broadcasting room sum that user A and user B are watched in the set period of time.
If the common direct broadcasting room that two users watch in the set time period accounts for described two users in the setting time
The percentage for the direct broadcasting room sum watched in section is higher, then it represents that the preference similarity of described two users is higher.In addition to described
Percentage can characterize except the preference similarity between two users, and the duration difference that user watches each direct broadcasting room can also body
Preference similarity between existing two users, therefore can be respectively that the preference difference degree, the percentage are set according to repetition test
Suitable weight is set, acquires the similarity between two users finally by weighting summation.More specific calculation can be found in
Following embodiments two.
A kind of user's similarity calculating method based on user preference provided in this embodiment, by the way that user is added for every
The difference of the viewing duration of a direct broadcasting room accounts for the percentages of the direct broadcasting room union of viewing in conjunction with the common direct broadcasting room that user watches
The similarity between user is calculated, the accuracy in computation of user's similarity is improved.
Embodiment two
Fig. 2 is a kind of user's similarity calculating method process signal based on user preference provided by Embodiment 2 of the present invention
Figure.On the basis of the above embodiments, the present embodiment is to above-mentioned steps 130 " based on each user to the common direct broadcasting room collection
The degree of liking of each direct broadcasting room calculates the preference difference degree between described two users in conjunction " it is advanced optimized, it is added
Opposite preference difference factors of two users to identical direct broadcasting room, realize further increase two users' similarity calculating it is quasi-
Exactness.Referring specifically to shown in Fig. 2, this method comprises the following steps:
Step 210 determines the common direct broadcasting room set that two users watch in the set time period.
Step 220 calculates separately each user in described two users to each straight in the common direct broadcasting room set
Degree of liking between broadcasting.
Step 230 calculates separately each user to the sum of degree of liking of each direct broadcasting room in common direct broadcasting room set.
Specifically, the common direct broadcasting room collection for assuming that user A and user B is watched in the set period of time is combined into { No. two
Direct broadcasting room, No. three direct broadcasting rooms }, user A is 0.6 to the degree of liking of No. two direct broadcasting rooms, and the degree of liking to No. three direct broadcasting rooms is 0.3,
Then user A is 0.6+0.3=0.9 to the sum of degree of liking of each direct broadcasting room in common direct broadcasting room set;Assuming that user B is straight to No. two
Degree of liking 0.3 between broadcasting, the degree of liking to No. three direct broadcasting rooms are 0.4, then user B is to each direct broadcasting room in common direct broadcasting room set
The sum of degree of liking is 0.3+0.4=0.7.
Step 240 carries out the sum of degree of liking described in two users to do difference operation, obtains absolute between two users
Preference difference.
Step 250, calculated based on degree of liking of each user to each direct broadcasting room in common direct broadcasting room set two users it
Between opposite preference difference.
Illustratively, described that two use are calculated based on degree of liking of each user to each direct broadcasting room in common direct broadcasting room set
Opposite preference difference between family, comprising:
Degree of liking of each user to each direct broadcasting room in common direct broadcasting room set is normalized, each user couple is obtained
The opposite degree of liking of each direct broadcasting room;
It carries out opposite degree of liking of two users to identical direct broadcasting room to do difference operation, obtains the difference of opposite degree of liking;
Difference of described two users to the opposite degree of liking of each direct broadcasting room in the common direct broadcasting room set is summed
Operation obtains the opposite preference difference between described two users.
Specifically, being carried out to each user for the degree of liking of each direct broadcasting room in common direct broadcasting room set according to following formula
Normalization,
Wherein, p 'urUser u is to the degree of liking of direct broadcasting room r, i.e. opposite happiness of the user u to direct broadcasting room r after indicating normalization
Love degree, purIndicate user u to the degree of liking of direct broadcasting room r,Indicate user u to each straight in the common direct broadcasting room set
The sum of degree of liking between broadcasting.
Assuming that the common direct broadcasting room collection that user u and user v are watched in the set period of time is combined into Ruv, then user u and
Opposite preference difference between user v may be expressed as:
Step 260 calculates between described two users according to the absolute preference difference and the opposite preference difference
Preference difference degree.
Specifically, calculating the preference difference degree between described two users according to following formula:
Wherein, duvIndicate the preference difference degree between user u and user v, p'urIndicate user u to the normalizing of direct broadcasting room r
Degree of liking after change, p'vrIndicate user v to the degree of liking after the normalization of direct broadcasting room r, RuvIndicate that user u and user v is being set
The common direct broadcasting room set watched in section of fixing time,Indicate that the opposite preference between user u and user v is poor
It is different, purIndicate user u to the degree of liking before the normalization of direct broadcasting room r, pvrIndicate user v to the happiness before the normalization of direct broadcasting room r
Love degree,Indicate the absolute preference difference between user u and user v.
Step 270, according to the preference difference degree between described two users in conjunction with the common direct broadcasting room set and institute
It states the direct broadcasting room union that two users watch in the set time period and calculates similarity between described two users.
Specifically, calculating the similarity between described two users according to following formula:
Wherein, suvIndicate the similarity between user u and user v, w indicates weight coefficient, duv' indicate after normalizing
Preference difference degree between user u and user v, | Ruv| indicate the common live streaming that user u and user v is watched in the set time period
Between sum, | Ru∪Rv| indicate the direct broadcasting room that user u and user v is watched in the set time period and the quantity for concentrating element.
On the basis of the above embodiments, a kind of user similarity calculation side based on user preference provided in this embodiment
It is poor for the opposite preference of identical direct broadcasting room to calculate separately two users by the duration for watching each direct broadcasting room based on user for method
Different and absolute preference difference, and according to the preference between the opposite preference difference and absolute preference difference two users of calculating
Diversity factor further improves the accuracy in computation of two users' similarity.
Embodiment three
Fig. 3 is that a kind of structure for user's similarity calculation device based on user preference that the embodiment of the present invention three provides is shown
It is intended to.Shown in Figure 3, described device comprises determining that module 310, degree of liking computing module 320, preference difference degree calculate mould
Block 330 and similarity calculation module 340;
Wherein it is determined that module 310, the common direct broadcasting room set watched in the set time period for determining two users;
Degree of liking computing module 320, for calculating separately each user in described two users in the common direct broadcasting room set
The degree of liking of each direct broadcasting room;Preference difference degree computing module 330, for being based on each user to the common direct broadcasting room set
In the degree of liking of each direct broadcasting room calculate the preference difference degree between described two users;Similarity calculation module 340 is used for root
According to the preference difference degree between described two users in conjunction with the common direct broadcasting room set and described two users in setting
Between the direct broadcasting room union watched in section calculate the similarity between described two users.
Further, degree of the liking computing module 320 includes:
Statistic unit, for count active user watch current live between total duration and active user viewing it is described total
With the sum of the total duration of each direct broadcasting room in direct broadcasting room set;
Computing unit, for being obtained currently using the total duration between the viewing current live divided by the sum of described total duration
User is between the degree of liking current live.
Further, preference difference degree computing module 330 includes:
The sum of degree of liking computing unit, for calculating separately happiness of each user to each direct broadcasting room in common direct broadcasting room set
The sum of love degree;
Absolute preference difference computing unit is obtained for carrying out the sum of degree of liking described in two users to do difference operation
Absolute preference difference between two users;
Opposite preference difference computing unit, for being liked based on each user to each direct broadcasting room in common direct broadcasting room set
Degree calculates the opposite preference difference between two users;
Preference difference degree computing unit, for calculating institute according to the absolute preference difference and the opposite preference difference
State the preference difference degree between two users.
Further, the opposite preference difference computing unit includes:
Subelement is normalized, for degree of liking of each user to each direct broadcasting room in common direct broadcasting room set to be carried out normalizing
Change, obtains each user to the opposite degree of liking of each direct broadcasting room;
The difference computation subunit of opposite degree of liking, for doing opposite degree of liking of two users to identical direct broadcasting room
Difference operation obtains the difference of opposite degree of liking;
Opposite preference difference computation subunit, for by described two users to being respectively broadcast live in the common direct broadcasting room set
Between the difference of opposite degree of liking carry out summation operation, obtain the opposite preference difference between described two users.
Further, the preference difference degree computing unit is specifically used for:
The preference difference degree between described two users is calculated according to following formula:
Wherein, duvIndicate the preference difference degree between user u and user v, p'urIndicate user u to the normalizing of direct broadcasting room r
Degree of liking after change, p'vrIndicate user v to the degree of liking after the normalization of direct broadcasting room r, RuvIndicate that user u and user v is being set
The common direct broadcasting room set watched in section of fixing time,Indicate that the opposite preference between user u and user v is poor
It is different, purIndicate user u to the degree of liking before the normalization of direct broadcasting room r, pvrIndicate user v to the happiness before the normalization of direct broadcasting room r
Love degree,Indicate the absolute preference difference between user u and user v.
Further, similarity calculation module 340 is specifically used for:
The similarity between described two users is calculated according to following formula:
Wherein, suvIndicate the similarity between user u and user v, w indicates weight coefficient, duv' indicate after normalizing
Preference difference degree between user u and user v, | Ruv| indicate the common live streaming that user u and user v is watched in the set time period
Between sum, | Ru∪Rv| indicate the direct broadcasting room that user u and user v is watched in the set time period and the quantity for concentrating element.
User's similarity calculation device provided in this embodiment based on user preference, by the way that user is added for each straight
The difference of viewing duration between broadcasting is calculated in conjunction with the percentage that the common direct broadcasting room that user watches accounts for the direct broadcasting room union of viewing and is used
Similarity between family improves the accuracy in computation of user's similarity.
Example IV
Fig. 4 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention four provides.As shown in figure 4, the electronics is set
It is standby to include: processor 670, memory 671 and be stored in the computer journey that run on memory 671 and on processor 670
Sequence;Wherein, the quantity of processor 670 can be one or more, in Fig. 4 by taking a processor 670 as an example;Processor 670 is held
User's similarity calculating method as described in above-described embodiment one based on user preference is realized when the row computer program.
As shown in figure 4, the electronic equipment can also include input unit 672 and output device 673.Processor 670, memory 671,
Input unit 672 can be connected with output device 673 by bus or other modes, in Fig. 4 for being connected by bus.
Memory 671 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer
Sequence and module, if user's similarity calculation device/module in the embodiment of the present invention based on user preference is (for example, based on using
Determining module 310, degree of liking computing module 320, preference difference degree in user's similarity calculation device of family preference calculate mould
Block 330 and similarity calculation module 340 etc.).Processor 670 is by running the software program being stored in memory 671, instruction
And module is realized above-mentioned based on user preference thereby executing the various function application and data processing of electronic equipment
User's similarity calculating method.
Memory 671 can mainly include storing program area and storage data area, wherein storing program area can store operation system
Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This
Outside, memory 671 may include high-speed random access memory, can also include nonvolatile memory, for example, at least one
Disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 671 can be into one
Step includes the memory remotely located relative to processor 670, these remote memories can be set by network connection to electronics
Standby/storage medium.The example of above-mentioned network include but is not limited to internet, intranet, local area network, mobile radio communication and its
Combination.
Input unit 672 can be used for receiving the number or character information of input, and generates and set with the user of electronic equipment
It sets and the related key signals of function control inputs.Output device 673 may include that display screen etc. shows equipment.
Embodiment five
The embodiment of the present invention five also provides a kind of storage medium comprising computer executable instructions, and the computer can be held
Row instruction by computer processor when being executed for executing a kind of user's similarity calculating method based on user preference, the party
Method includes:
Determine the common direct broadcasting room set that two users watch in the set time period;
Calculate separately happiness of each user to each direct broadcasting room in the common direct broadcasting room set in described two users
Love degree;
Described two users are calculated based on degree of liking of each user to each direct broadcasting room in the common direct broadcasting room set
Between preference difference degree;
According to the preference difference degree between described two users in conjunction with the common direct broadcasting room set and described two use
The direct broadcasting room union that family is watched in the set time period calculates the similarity between described two users.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention
The method operation that executable instruction is not limited to the described above can also be performed provided by any embodiment of the invention based on user
User's similarity calculation relevant operation of preference.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention
It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more
Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art
Part can be embodied in the form of software products, which can store in computer readable storage medium
In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer
Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set
Standby (can be personal computer, storage medium or the network equipment etc.) executes described in each embodiment of the present invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.