A kind of setting method and system of website type
[technical field]
The present invention relates to internet application field more particularly to the setting methods and system of a kind of website type.
[background technique]
Web side navigation refers to the more network address of set, and the network address station classified according to certain condition, network address are led
Boat can facilitate user to be quickly found out the websites of needs, and user does not need to remember the network address of all kinds of websites, so that it may directly
Enter required website.It can classify in Web side navigation for each network address, such as comprehensive, discussion bar class, community's class, shopping
Class, game class, reading class, video display class, music class and tool-class etc., it is such as comprehensive for the network address that wherein unclassified is shown
Network address and the network address of discussion bar class etc., user can artificially classify to these network address, for example, for Sina website, some users
Think that Sina website belongs to news category network address, some users think that Sina website belongs to sport category network address;For Baidu's discussion bar, some use
Family thinks that the notice in Baidu's discussion bar belongs to discussion bar class, but Baidu's discussion bar can also be divided into the discussion bar of star, movie and television play comment
Discussion bar, some users think that Baidu's discussion bar belongs to community's class etc..Therefore, the classification for the network address that each user shows unclassified
Difference, if by network address that unclassified is shown it is fixed be classified as one kind, for a user by cannot be in the class that oneself is thought
The network address that needs are found in type, the network address of needs can be found by needing to inquire multiple types, therefore search speed is slower, efficiency compared with
It is low.But at present and without the classification schemes for the aobvious network address of unclassified, there are no the types that normal direction user recommends network address.
[summary of the invention]
The present invention provides a kind of setting method of website type and system, the class that the user of Web side navigation can be collected
Not unconspicuous network address is classified, and network address search efficiency in Web side navigation is improved.
The specific technical solution of the present invention is as follows:
According to one preferred embodiment of the present invention, a kind of setting method of website type, comprising:
Receive user collect network address request when, judgement with the user be the same community other users user's row
For in data, if include the network address;
If so, user's requested for collection is arranged in the type of network address described in user behavior data according to the other users
Network address type;Otherwise, the type that the network address of user's requested for collection is arranged is default type.
In the above method, this method further include:
According to pre-stored user behavior data, two-dimensional matrix is created;The user behavior data include: User ID,
The type of the network address of the network address and user's collection of user's collection;The two-dimensional matrix is each type of User ID and user's collection
Network address number corresponding relationship;
The similarity data between user is calculated according to the user behavior data and the two-dimensional matrix, it will be similar
Property data be greater than preset similarity threshold user be classified as the same community.
It is described that the phase between user is calculated according to the user behavior data and the two-dimensional matrix in the above method
Like property data are as follows:
The similarity data in all users between every two user is successively calculated using following formula:
Wherein, sin (uc,un) indicate user ucWith user unBetween similarity data,Indicate user ucCollection
Type is the number of the network address of i,Indicate user unThe type of collection is the number of the network address of i, { i ∈ Ic∩InIndicate type
Network address for i is user ucWith user unThere is the network address of same type in the network address of collection,Indicate user ucThat collects is each
The average value of the number of the network address of type,Indicate user unThe average value of the number of all types of network address of collection.
In the above method, the judgement is in the user behavior data of other users of the same community with the user,
Before whether including the network address, this method further include:
The type that the network address is determined according to the corresponding relationship of network address and type in preset network address classifying dictionary, judges institute
State whether network address is comprehensive network address;
When the network address is the comprehensive network address in network address classifying dictionary, executing judgement with the user is the same society
In the user behavior data of the other users in area, if the operation comprising the network address.
In the above method, user is arranged in the type of network address described in the user behavior data according to the other users
The type of the network address of requested for collection, specifically:
The type of network address according to user's requested for collection with other users setting, the corresponding use of statistics each type
Amount amount;
Descending sequence is carried out to the corresponding number of users of each type;
The type of the network address of the type setting user requested for collection most according to number of users, wherein when there are two the above classes
When the corresponding number of users of type is identical, user's requested for collection is arranged in the type selected in described two above types according to user
Network address type.
In the above method, the type of the network address of setting user's requested for collection is default type, specifically:
According to the corresponding relationship of network address and type in preset network address classifying dictionary, the network address of user's requested for collection is set
Type.
A kind of setting system of website type, comprising: judging unit, setting unit;Wherein,
Judging unit, when collecting the request of network address for receiving user, judgement and its that the user is the same community
In the user behavior data of his user, if include the network address;
Setting unit, for when judging unit is judged in the user behavior data of other users comprising the network address,
The type of the network address of type setting user's requested for collection of network address described in user behavior data according to the other users;When
When judging unit is judged all not including the network address in the user behavior data of other all users, user's requested for collection is set
Network address type be default type.
In above system, the system further include:
Data processing unit, for creating two-dimensional matrix according to pre-stored user behavior data;The user behavior
Data include: the type of the network address of User ID, the network address of user's collection and user's collection;The two-dimensional matrix is User ID and uses
The corresponding relationship of the network address number of each type of family collection;
Computing unit, it is similar between user for being calculated according to the user behavior data and the two-dimensional matrix
Property data, by similarity data be greater than preset similarity threshold user be classified as the same community.
In above system, user is calculated according to the user behavior data and the two-dimensional matrix in the computing unit
Between similarity data, specifically:
The similarity data in all users between every two user is successively calculated using following formula:
Wherein, sin (uc,un) indicate user ucWith user unBetween similarity data,Indicate user ucCollection
Type is the number of the network address of i,Indicate user unThe type of collection is the number of the network address of i, { i ∈ Ic∩InIndicate class
Type is that the network address of i is user ucWith user unThere is the network address of same type in the network address of collection,Indicate user ucCollection
The average value of the number of all types of network address,Indicate user unThe average value of the number of all types of network address of collection.
In above system, the judging unit is also used to pair according to network address and type in preset network address classifying dictionary
It should be related to the type for determining the network address, judge whether the network address is comprehensive network address;When the network address is network address category words
When comprehensive network address in allusion quotation, executing judgement and the user is in the user behavior data of other users of the same community,
Whether include the network address operation.
In above system, the class of setting unit network address described in the user behavior data according to the other users
When the type of the network address of user's requested for collection is arranged in type, specifically:
The type of network address according to user's requested for collection with other users setting, the corresponding use of statistics each type
Amount amount;
Descending sequence is carried out to the corresponding number of users of each type;
The type of the network address of the type setting user requested for collection most according to number of users, wherein when there are two the above classes
When the corresponding number of users of type is identical, user's requested for collection is arranged in the type selected in described two above types according to user
Network address type.
In above system, the setting unit is when it is default type that the type of network address of user's requested for collection, which is arranged, tool
Body are as follows:
According to the corresponding relationship of network address and type in preset network address classifying dictionary, the network address of user's requested for collection is set
Type.
As can be seen from the above technical solutions, provided by the invention to have the advantages that
In the preferred embodiment of the present invention, according to the classification with the other users of the same community of user to network address, to determine
User collects the type of network address, and the aobvious network address of the unclassified that can be collected to the user of Web side navigation is classified, and improves net
Network address search efficiency in the navigation of location, solves the problems, such as the classification schemes of the network address shown currently without unclassified, makes up existing skill
The deficiency of art.
[Detailed description of the invention]
Fig. 1 is the flow diagram of the preferred embodiment for the setting method that the present invention realizes website type;
Fig. 2 is the structural schematic diagram of the preferred embodiment for the setting system that the present invention realizes website type.
[specific embodiment]
The basic idea of the invention is that: when receiving the request of user's collection network address, judgement and the user are the same societies
In the user behavior data of the other users in area, if include the network address;When the user behavior data for judging other users
In when including the network address, the type setting user requested for collection of network address described in the user behavior data according to other users
The type of network address;When all not including the network address in the user behavior data for judging other all users, setting user is asked
The type for seeking the network address of collection is default type.
To make the objectives, technical solutions, and advantages of the present invention clearer, right in the following with reference to the drawings and specific embodiments
The present invention is described in detail.
The present invention provides a kind of setting method of website type, and Fig. 1 is the setting method that the present invention realizes website type
The flow diagram of preferred embodiment, as shown in Figure 1, the preferred embodiment the following steps are included:
Step 101, according to pre-stored user behavior data, two-dimensional matrix is created, according to user behavior data and two
The similarity data between user is calculated in dimension matrix, the user that similarity data is greater than similarity threshold is classified as same
Community;The user behavior data includes: the type of User ID, the network address of user's collection, the network address of user's collection, the two dimension
Matrix is the corresponding relationship of the network address number of each type of User ID and user's collection.
Specifically, one two-dimensional matrix of creation, which is used to store each type of User ID and user's collection
Network address number corresponding relationship, the data of the horizontal direction of the two-dimensional matrix are User ID, and the data of vertical direction are user
The network address number of each type of collection, in the database by the two-dimensional matrix storage of creation;In this preferred embodiment, the use
Family is the registration user of Web side navigation, and after logging in Web side navigation, user can collect different types of network address according to demand.
According to pre-stored user behavior data in database, the two-dimensional matrix, the user behavior data are filled
It include: the type of User ID, the network address of user's collection, the network address of user's collection;Wherein, user's collection in user behavior data
The type of network address can be the customized type of user, be also possible to according to net in the network address classifying dictionary provided in Web side navigation
The type that the corresponding relationship of location and type determines;According to the type of the network address of user's collection in user behavior data, filling two dimension
The data of vertical direction in matrix;In this preferred embodiment, there can be following kind of network address in the network address classifying dictionary: comprehensive
Close class, discussion bar class, community's class, shopping class, game class, read class, sport category, video display class, music class, financing class, tool-class, its
He etc.;For example, the two-dimensional matrix after filling data can be as shown in table 1:
Table 1
According to the data in the user behavior data and two-dimensional matrix stored in database, and successively using following formula
Calculate the similarity data in all users between every two user:
In above-mentioned formula, sin (uc,un) indicate user ucWith user unBetween similarity data,Indicate user uc's
Vector,Indicate user unVector,Indicate user ucThe type of collection is the weight of the network address of i, by user ucCollection
Type be i the number of network address determine, numerical value can be directly used herein,Indicate user unThe type of collection is i's
The weight of network address, by user unThe type of collection is that the number of the network address of i determines, numerical value, { i can be directly used herein
∈Ic∩InIndicate that the network address that type is i is user ucWith user unThere is the network address of same type in the network address of collection,Table
Show user ucThe weighted mean of all types of network address of collection, can use user ucThe number of all types of network address of collection
Average value,Indicate user unThe weighted mean of all types of network address of collection, can use user unThat collects is all kinds of
The average value of the number of the network address of type.
Similarity data between two users is bigger, indicates that the similarity of the two users is higher, by what is be calculated
Similarity data between two users is compared with preset similarity threshold, and similarity data is greater than similarity threshold
Two users are same class user, and two users that similarity data is greater than similarity threshold are classified as the same community;For example,
Similarity data between user c and user n is greater than similarity threshold 0.5, then user c and user n is same class user, will use
Family c and user n are classified as the same community;Community users data are stored in the database, which includes community's mark
Know, in each community all users User ID, and other of each user and the same community in the community that is calculated
Similarity data between user.
Step 102, when receiving the request of user's collection network address, judge and the user is the other users of the same community
User behavior data in, if include the network address;If in the user behavior data of other users including the network address, according to
The type of the network address of type setting user's requested for collection of network address described in user behavior data according to other users;If other
All do not include the network address in the user data of all users, then the type of the network address of user's requested for collection is set for default class
Type.
Specifically, the interactive interface of front end receives the request that user collects network address, then by the network address of user's requested for collection
Submit to rear end;After rear end receives the network address of user's requested for collection, first according in the network address classifying dictionary provided in Web side navigation
The corresponding relationship of network address and type determines the type of the network address, judges whether the network address is the network address with clear type, for example,
Taobao is exactly class of doing shopping, and Renren Network is exactly social category etc.;If the network address belongs to the non-comprehensive net in network address classifying dictionary
Location, then it represents that the network address is that have the network address of clear type, then the clear type is set by the type of the network address, by this
The type of network address is sent to database, and database is using the type of the network address of user's requested for collection and the network address as user behavior number
According to being stored;If the network address belongs to the comprehensive network address in network address classifying dictionary, then it represents that the network address is not to have to define
The network address of type.
If the network address of user's requested for collection is not to have the network address of clear type, such as Sina, the comprehensive network address of Sohu,
Then rear end obtains community users data first from database, according to User ID in the community users data of acquisition, finds and asks
The community where the user of collection network address is asked, the other users in the community are found, inquires other users described in database
User behavior data finds the type being arranged in the user behavior data of other users for the network address of user's requested for collection, foundation
It is the type of the network address of user's requested for collection of the other users setting of the same community with the user, statistics each type is corresponding
Number of users, descending sequence, the most type of corresponding number of users are carried out to the corresponding number of users of each type
By the type as the network address of user's requested for collection;If there is the corresponding number of users of more than two types is identical, then by these
Type is shown to user, is selected by users, and the class of the network address of user's requested for collection is arranged in the type selected according to user
Type;The network address of determining type and user's requested for collection is sent to database and stored by rear end;For example, for a network address, society
User is most to the number of users that the type that a network address is arranged is shopping class in area, then sets shopping class for a network address.
If being in the network address of other all user's collections of the same community with user all without user's requested for collection
Network address, then can set the type of the network address of user's requested for collection to default type, i.e., according to the network address in Web side navigation
The corresponding relationship of network address and type in classifying dictionary, determines the type of the network address of user's requested for collection, rear end by default type and
The network address of user's requested for collection is sent to database together, and database is using the network address received and default type as user behavior number
According to being stored.
To realize the above method, the present invention also provides a kind of setting system of website type, Fig. 2 is that the present invention realizes network address
The structural schematic diagram of the preferred embodiment of the setting system of type, as shown in Fig. 2, the system is located at rear end, which includes:
Data processing unit 20, for creating two-dimensional matrix according to pre-stored user behavior data;User's row
It include: the type of the network address of User ID, the network address of user's collection and user's collection for data;The two-dimensional matrix be User ID with
The corresponding relationship of the network address number of each type of user's collection.
Computing unit 21, for the phase between user to be calculated according to the user behavior data and the two-dimensional matrix
Like property data, the user that similarity data is greater than preset similarity threshold is classified as the same community.
Judging unit 22, when collecting the request of network address for receiving user, judgement and the user are the same communities
In the user behavior data of other users, if include the network address.
Setting unit 23 is judged in the user behavior data of other users for working as judging unit comprising the network address
When, the type of the network address of type setting user's requested for collection of network address described in the user behavior data according to other users;When
When judging unit is judged all not including the network address in the user behavior data of other all users, user's requested for collection is set
Network address type be default type.
Wherein, the computing unit 21 is calculated between user according to the user behavior data and the two-dimensional matrix
Similarity data, specifically:
The similarity data in all users between every two user is successively calculated using following formula:
Wherein, sin (uc,un) indicate user ucWith user unBetween similarity data,Indicate user ucCollection
Type is the number of the network address of i,Indicate user unThe type of collection is the number of the network address of i, { i ∈ Ic∩InIndicate class
Type is that the network address of i is user ucWith user unThere is the network address of same type in the network address of collection,Indicate user ucCollection
The average value of the number of all types of network address,Indicate user unThe average value of the number of all types of network address of collection.
The judging unit 22 is also used to determine according to the corresponding relationship of network address and type in preset network address classifying dictionary
The type of the network address judges whether the network address is comprehensive network address;When the network address is the synthesis in network address classifying dictionary
When class network address, executing judgement with the user is in the user behavior data of other users of the same community, if includes institute
State the operation of network address.
The type of the network address described in the user behavior data according to the other users of setting unit 23, which is arranged, to be used
When the type of the network address of family requested for collection, specifically:
The type of network address according to user's requested for collection with other users setting, the corresponding use of statistics each type
Amount amount;
Descending sequence is carried out to the corresponding number of users of each type;
The type of the network address of the type setting user requested for collection most according to number of users, wherein when there are two the above classes
When the corresponding number of users of type is identical, user's requested for collection is arranged in the type selected in described two above types according to user
Network address type.
The setting unit 23 be arranged user's requested for collection network address type be default type when, specifically:
According to the corresponding relationship of network address and type in preset network address classifying dictionary, the network address of user's requested for collection is set
Type.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.