Group recommendation method, device, readable storage medium and electronic device

The whale algorithm optimizes the topics that users care about in the knowledge community, solves the problem of difficulty in obtaining group knowledge recommendations for new users, achieves fast and efficient group recommendations, and improves the accuracy and efficiency of recommendations.

CN109753604BActive Publication Date: 2024-10-25NEUSOFT CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201811564474.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-20
Publication Date
2024-10-25
Estimated Expiration
2038-12-20

AI Technical Summary

Technical Problem

In knowledge communities, it is difficult for new users to obtain group knowledge recommendations because they have not joined any groups, and it takes a long time to find interesting groups in huge groups.

Method used

The whale algorithm is used to generate the initial population by obtaining the topics that users pay attention to, determining the number of occurrences and degree of attention of the topics, and using the fitness function to optimize the topic weight vector and recommend the optimal group.

Benefits of technology

It can quickly and accurately recommend groups of interest to new users, save selection time, improve recommendation efficiency, and ensure the objectivity and authenticity of recommendations through iterative optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109753604B_ABST
    Figure CN109753604B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a group recommendation method, device, readable storage medium and electronic device. The method includes: obtaining topics that multiple users in a knowledge community are concerned about; determining the number of occurrences and the degree of attention of each topic; generating an initial population; using the whale algorithm to determine the target optimal individual based on the initial population, the number of occurrences of each topic and the degree of attention, and the fitness function, wherein the fitness function represents the functional relationship between the number of topic occurrences, the degree of attention of the topic, and the fitness value of the individual, and the target optimal individual is used to represent an optimal weight vector corresponding to the topic; determining the target topic based on the target optimal individual; and determining the group to be recommended based on the target topic. In this way, intelligent group recommendation for users in the knowledge community can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the computer field, and in particular, to a group recommendation method, device, readable storage medium and electronic device. Background Art

[0002] The purpose of establishing a knowledge community is to facilitate the sharing of knowledge and experience. Multiple groups can be established in a knowledge community. Users in the same group are considered to be interested in the topic corresponding to the group. In addition, for user A who has joined the group, the system can also recommend knowledge to user A based on the knowledge that other users in the same group are interested in. This knowledge recommendation technology can be called group knowledge recommendation technology. However, for new users who join the knowledge community, since they have not joined any group yet, the system cannot make group knowledge recommendations for them. If you want to make group knowledge recommendations for the new user, you require the new user to first choose to join one or more groups. However, there will be a large number of groups in a large knowledge community, and users may need to spend a long time to find the group they are interested in, which brings inconvenience to the user's group selection. Summary of the invention

[0003] The purpose of the present disclosure is to provide a group recommendation method, device, readable storage medium and electronic device to realize intelligent group recommendation for users in a knowledge community.

[0004] In order to achieve the above object, the present disclosure provides a group recommendation method, comprising:

[0005] Get topics that multiple users in the knowledge community are interested in;

[0006] Determine the number of times each topic appears and the level of attention it receives;

[0007] Generate an initial population, wherein the initial population includes a plurality of initial individuals, each of the initial individuals is used to represent an initial weight vector corresponding to a topic;

[0008] According to the initial population, the number of occurrences and the degree of attention of each topic, and the fitness function, the whale algorithm is used to determine the target optimal individual, wherein the fitness function represents the functional relationship between the number of occurrences of a topic, the degree of attention of a topic, and the fitness value of the individual, and the target optimal individual is used to represent an optimal weight vector corresponding to the topic;

[0009] Determining a target topic according to the target optimal individual;

[0010] According to the target topic, a group to be recommended is determined.

[0011] Optionally, determining the optimal target individual using a whale algorithm according to the initial population, the number of occurrences and the degree of attention of each topic, and a fitness function includes:

[0012] According to the initial population, the number of occurrences of each topic and the degree of attention, the fitness value of each initial individual in the initial population is calculated using the fitness function, and the current optimal individual X is determined according to the fitness value. * (t);

[0013] Each individual in the current population is sequentially used as the current individual X(t), and an update process is performed for each current individual X(t) to obtain an updated individual X(t+1), wherein the updated individual X(t+1) of each current individual X(t) constitutes an updated population, and the update process includes:

[0014] Update A, C, l and p in the whale algorithm, where A and C are coefficient vectors, l is a random quantity between [-1, 1], and p is a random number between [0, 1];

[0015] If p>0.5, remove the current best individual X from the current population * Select one individual from the individuals other than (t) as the elite individual X elite (t);

[0016] The current individual X(t) is updated according to the following iterative formula to obtain the updated individual X(t+1):

[0017] X(t+1)=X * (t)+ε·X elite (t)+D'·e bl ·cos(2πl)

[0018] Where D' represents the current individual X(t) and the current optimal individual X * (t) and D'=|X * (t)-X(t)|, b represents a constant defining the shape of the logarithmic spiral, and ε is a random number that obeys a normal distribution with a variance of 1 and a mean of 0; according to the updated population, the number of occurrences of each topic and the degree of attention, the fitness value of each individual in the updated population is calculated using the fitness function;

[0019] If, according to the calculated fitness value of each individual in the updated population, it is determined that there is a better individual X in the updated population than the current best individual X, * (t) A better individual, then the best individual in the updated population is determined as the new current best individual X *(t), otherwise keep the current optimal individual X * (t) unchanged;

[0020] If the current number of iterations t has not reached the preset total number of iterations T, then t=t+1, and after determining the updated population as the current population, return to the step of taking each individual in the current population as the current individual X(t) in turn, and performing the update process for each current individual X(t) to obtain the updated individual X(t+1);

[0021] If the current number of iterations t reaches the preset total number of iterations T, the final current optimal individual X * (t) determining the optimal individual for the target.

[0022] Optionally, the updating process further includes:

[0023] If p≤0.5 and |A|≤1, remove the current best individual X from the current population. * Select one individual from the individuals other than (t) as the elite individual X elite (t);

[0024] The current individual X(t) is updated according to the following iterative formula to obtain the updated individual X(t+1):

[0025] X(t+1)=X * (t)+ε·X elite (t)-A * D

[0026] Where D represents the current individual X(t) and the current optimal individual X * (t), and D = |C*X * (t)-X(t)|.

[0027] Optionally, the current best individual X is removed from the current population. * Select one individual from the individuals other than (t) as the elite individual X elite (t), including:

[0028] Calculate the current population except the current best individual X * The average fitness value of the remaining individuals except (t);

[0029] Delete the individuals whose fitness values ​​are greater than the average value from the remaining individuals, and use the remaining individuals as candidate individuals;

[0030] The remaining quantity remainder_Num is determined according to the following formula:

[0031] remainder_Num=round(m-μ·(m-1))

[0032] If the total number of candidate individuals is greater than the remaining number, a portion of the candidate individuals is randomly deleted so that the number of remaining candidate individuals is equal to the remaining number;

[0033] If the total number of candidate individuals is not greater than the remaining number, or after randomly deleting a portion of the candidate individuals, a candidate individual is randomly selected from the current candidate individuals as the elite individual X elite (t), wherein m represents the total number of individuals in the current population, μ represents the coefficient, and μ=t / T.

[0034] Optionally, the updating process further includes:

[0035] If p≤0.5 and |A|>1, then randomly select an individual from the current population as the random individual X rand (t), and determine the average fitness value of all individuals in the current population fit avg ;

[0036] The current individual X(t) is updated according to the following iterative formula to obtain the updated individual X(t+1):

[0037]

[0038] Where D represents the current individual X(t) and the random individual X rand (t), and D = |C*X(t)-X rand (t)|, fit(X(t)) represents the fitness value of the current individual X(t), ω l o w represents the first inertia weight, ω up represents the second inertia weight, and ω low <ω up ,ω low +ω up =1.

[0039] Optionally, determining the level of attention received by each topic includes:

[0040] The degree of attention paid to each topic is determined by the following formula:

[0041]

[0042] Among them, user k represents the kth user, topic i represents the i-th topic, Indicates the degree of attention paid to the ith topic; affect(user k ,topic i ) indicates the degree of attention paid to the i-th topic by the k-th user, K indicates the total number of users, and affect(user k ,topic i )According to read(user k ,topic i )、publish(user k ,topic i )、comment(user k ,topic i ) and thumbs_up(user k ,topic i ), wherein:

[0043]

[0044]

[0045]

[0046]

[0047] Among them, read(user k ,topic i ) indicates whether the article read by the kth user contains the ith topic, publish(user k ,topic i ) indicates whether the article published by the kth user contains the ith topic, comment(user k ,topic i ) indicates whether the kth user has commented on the article containing the i-th topic, thumbs_up(user k ,topic i ) indicates whether the k-th user likes the article containing the i-th topic.

[0048] Optionally, affect(user k ,topic i ) is read(user k ,topic i )、publish(user k ,topic i )、comment(user k ,topic i) and thumbs_up(user k ,topic i ) and.

[0049] Optionally, the fitness calculation function is:

[0050]

[0051] Among them, fit(X) represents the fitness value of individual X, Indicates the degree of attention paid to the i-th topic, count i represents the number of occurrences of the ith topic, x i Represents the weight value corresponding to the i-th topic in individual X.

[0052] Optionally, the target optimal individual determines the target topic, including:

[0053] In descending order of weight values, topics corresponding to the H weight values ​​with the highest ranking among the target optimal individuals are determined as target topics, where H is a positive integer greater than or equal to 1.

[0054] The present disclosure also provides a group recommendation device, comprising:

[0055] The acquisition module is used to obtain topics that multiple users in the knowledge community are interested in;

[0056] The first determination module is used to determine the number of occurrences and the degree of attention of each topic;

[0057] A generation module, used to generate an initial population, wherein the initial population includes a plurality of initial individuals, each of which is used to represent an initial weight vector corresponding to a topic;

[0058] A second determination module is used to determine the target optimal individual using the whale algorithm according to the initial population, the number of occurrences and the degree of attention of each topic, and the fitness function, wherein the fitness function represents the functional relationship between the number of topic occurrences, the degree of attention of the topic, and the fitness value of the individual, and the target optimal individual is used to represent an optimal weight vector corresponding to the topic;

[0059] A third determination module is used to determine a target topic according to the target optimal individual;

[0060] The fourth determination module is used to determine the group to be recommended according to the target topic.

[0061] Optionally, the second determining module includes:

[0062] The first determination submodule is used to calculate the fitness value of each of the initial individuals in the initial population according to the initial population, the number of occurrences of each topic and the degree of attention received by each topic using the fitness function, and determine the current optimal individual X according to the fitness value. * (t);

[0063] An updating submodule is used to take each individual in the current population as the current individual X(t) in turn, and perform the above updating process for each current individual X(t) to obtain an updated individual X(t+1), wherein the updated individual X(t+1) of each current individual X(t) constitutes an updated population;

[0064] A calculation submodule, configured to calculate the fitness value of each individual in the updated population using the fitness function according to the updated population, the number of occurrences of each topic and the degree of attention;

[0065] The second determination submodule is used to determine whether there is a better individual X in the updated population than the current best individual X according to the calculated fitness value of each individual in the updated population. * (t) A better individual, then the best individual in the updated population is determined as the new current best individual X * (t), otherwise keep the current optimal individual X * (t) unchanged;

[0066] The third determination submodule is used for, if the current number of iterations t has not reached the preset total number of iterations T, then after t=t+1 and the updated population is determined as the current population, triggering the update submodule to re-execute the operation of taking each individual in the current population as the current individual X(t) in turn, and performing the update process for each current individual X(t) to obtain the updated individual X(t+1);

[0067] The fourth determination submodule is used to determine the current optimal individual X if the current iteration number t reaches the preset total iteration number T. * (t) determining the optimal individual for the target.

[0068] Optionally, the first determining module is used to determine the degree of attention of each topic by using the following formula:

[0069]

[0070] Optionally, the third determination module is used to determine the topics corresponding to the H highest weight values ​​among the target optimal individuals as target topics in descending order of weight values, where H is a positive integer greater than or equal to 1.

[0071] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the above-mentioned group recommendation method provided by the present disclosure are implemented.

[0072] The present disclosure also provides an electronic device, comprising:

[0073] a memory having a computer program stored thereon;

[0074] The processor is used to execute the computer program in the memory to implement the steps of the above-mentioned group recommendation method provided by the present disclosure.

[0075] In the above technical solution, the recommended group can be determined based on the topics that users have already followed in the knowledge community. Since the topics that users have already followed can reflect the preferences of most users in the knowledge community, the artificial intelligence algorithm can be used to quickly determine the groups that new users may be interested in based on the number of appearances and the degree of attention of the topics that users have already followed, thereby saving user selection time and improving recommendation efficiency. In addition, the above technical solution uses a swarm intelligence algorithm, the whale algorithm, to continuously optimize the recommendation scheme. During the iteration process, the number of appearances and the degree of attention of the topic are taken into account when calculating the fitness value of the individual. In this way, the optimal individual determined based on the fitness value can more objectively and truly reflect the current hot topics. The algorithm can generate the optimal recommendation scheme at the end of the iteration, thereby achieving high-precision group recommendation.

[0076] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0078] Figure 1 is a flowchart of a group recommendation method according to an exemplary embodiment of the present disclosure.

[0079] Figure 2 is a block diagram of a group recommendation device according to an exemplary embodiment of the present disclosure.

[0080] Figure 3 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0081] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0082] Figure 1 FIG. 1 is a flow chart of a group recommendation method according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the method may include steps 101 to 106.

[0083] In step 101, topics that are of interest to multiple users in a knowledge community are obtained.

[0084] The key to group generation and recommendation is the naming of the group, because most users judge whether the group naming is what they are interested in, and then decide whether to join the group. In the present disclosure, the keywords constituting the group naming are extracted and combined from the topics of interest of the users. Therefore, the method first obtains the topics of interest of multiple users in the knowledge community through step 101. Optionally, in step 101, the topics of interest of all users in the knowledge community can be obtained.

[0085] In step 102, the number of occurrences and the degree of attention received by each topic are determined.

[0086] The number of times a topic appears and the level of attention it receives can reflect the popularity of the topic.

[0087] In step 103, an initial population is generated, wherein the initial population includes a plurality of initial individuals, and each initial individual is used to represent an initial weight vector corresponding to a topic.

[0088] In step 104, the whale algorithm is used to determine the target optimal individual based on the initial population, the number of occurrences and the degree of attention of each topic, and the fitness function, wherein the fitness function represents the functional relationship between the number of topic occurrences, the degree of topic attention, and the fitness value of the individual, and the target optimal individual is used to represent an optimal weight vector corresponding to the topic.

[0089] In step 105, a target topic is determined according to the target optimal individual, wherein the target topic may be a topic corresponding to a larger weight value in the optimal weight vector represented by the target optimal individual.

[0090] In step 106, a group to be recommended is determined according to the target topic.

[0091] Through the above technical solution, the recommended group can be determined based on the topics that users have already followed in the knowledge community. Since the topics that users have already followed can reflect the preferences of most users in the knowledge community, the artificial intelligence algorithm can be used to quickly determine the groups that new users may be interested in based on the number of appearances and the degree of attention of the topics that users have already followed, saving user selection time and improving recommendation efficiency. In addition, the above technical solution uses the swarm intelligence algorithm - the whale algorithm to continuously optimize the recommendation scheme. During the iteration process, the number of appearances and the degree of attention of the topic are considered when calculating the fitness value of the individual. In this way, the optimal individual determined based on the fitness value can more objectively and truly reflect the current hot topics. The algorithm can generate the optimal recommendation scheme at the end of the iteration, thereby achieving high-precision group recommendation.

[0092] The following example describes the implementation process of the above method.

[0093] In step 101, the topics that multiple users in the knowledge community are concerned about can be expressed as Topic = (topic1, topic2, topic3, ..., topic i ,…,topic n ), where Topic represents a collection of topics of interest. i Indicates the i-th topic of interest, i is a positive integer, and 1≤i≤n, and n represents the total number of topics of interest.

[0094] Next, determine the number of occurrences and the degree of attention of each topic. The number of occurrences of a topic can be expressed as Count = (count1, count2, count3, ..., count i ,…,count n ), where Count represents the number of times a topic appears, count i Indicates the number of occurrences of the i-th topic.

[0095] When determining the degree of attention of a topic, it can be determined based on the user behavior corresponding to the topic. In the present disclosure, the following four user behavior influencing factors are defined: user reading behavior, user posting behavior, user commenting behavior, and user liking behavior. Therefore, in the present disclosure, one or more of the above four user behavior influencing factors can be considered to determine the degree of attention of a topic.

[0096] For example, assuming that the total number of users targeted when counting topics that users pay attention to is K, in this way, in one embodiment, for each topic, the degree of attention of each user to the topic can be determined based on the above four user behaviors of each user on the topic, and then the overall degree of attention of the topic can be determined. For example, the degree of attention of each topic can be determined by the following equation (1):

[0097]

[0098] Among them, user k represents the kth user; Indicates the degree of attention paid to the ith topic; affect(user k ,topic i ) represents the degree of attention paid to the i-th topic by the k-th user, k is a positive integer, and 1≤k≤K, and K represents the total number of users.

[0099] In one embodiment, affect(user k ,topic i ) is read(user k ,topic i )、publish(user k ,topic i )、comment(user k ,topic i ) and thumbs_up(user k ,topic i ), that is, affect(user k ,topic i )=read(user k ,topic i )+publish(user k ,topic i )+comment(user k ,topic i )+thumbs_up(user k ,topic i )

[0100] in,

[0101]

[0102]

[0103]

[0104] Among them, read(user k ,topic i ) indicates whether the article read by the kth user contains the ith topic, reflecting the user's reading behavior on the topic; publish(user k ,topic i ) indicates whether the article published by the kth user contains the ith topic, reflecting the user's publishing behavior on the topic; comment(user k ,topic i ) indicates whether the kth user has commented on the article containing the i-th topic, reflecting the user's comment behavior on the topic; thumbs_up(user k ,topic i ) indicates whether the k-th user likes the article containing the i-th topic, reflecting the user's like behavior on the topic.

[0105] Although the above embodiment describes the process of determining the degree of interest of the i-th topic to the k-th user (user k ,topic i ), taking into account read(user k ,topic i )、publish(user k ,topic i )、comment(user k ,topic i ) and thumbs_up(user k ,topic i ) these four factors, but the present disclosure is not limited thereto. In other embodiments, when determining affect (user k ,topic i ), you can also consider only read(user k ,topic i )、publish(user k ,topic i )、comment(user k ,topic i ) and thumbs_up(user k ,topic i ) one, two or three of these four factors. When only one of these factors is considered, affect(user k ,topic i) can be equal to the factor value. When two or three of these factors are considered, affect(user k ,topic i ) can be the sum of the values ​​of these two or three factors.

[0106] Next, in step 103, an initial population W is generated. For example, assuming that the population size is m, that is, the total number of individuals in the population is m, then m random weight vectors can be generated to form the initial population W:

[0107] W1=(w 11 ,w 12 ,...,w 1i ,...,w 1n ),

[0108] W2=(w 21 ,w 22 ,...,w 2i ,...,w 2n ),

[0109] W m =(w m1 ,w m2 ,...,w mi ,...,w mn )

[0110] Among them, W1~W m There are m randomly generated weight vectors, each representing an initial weight vector corresponding to a topic. The number of columns of the vector is equal to the total number of topics. The elements in each weight vector represent the weight value of the i-th topic, and the sum of the weight values ​​in a weight vector is equal to 1.

[0111] After the initial population W is generated, during the iteration process of the whale algorithm, they will be continuously updated according to the evaluation of the fitness function fit(), and finally produce an optimal solution that gives different weights to each topic, that is, the target optimal individual, which represents the optimal weight vector corresponding to the topic.

[0112] In the iterative process of the whale algorithm, the fitness function fit() is used to calculate the fitness value of the individual to determine the optimal individual in this iteration until the entire iterative process ends and the final target optimal individual is obtained. In the present disclosure, the two influencing factors of the number of topic appearances and the degree of attention are considered when calculating the individual fitness value. In this way, it can be ensured that the calculated individual fitness value can more objectively and truly reflect the rationality of the weight value allocation of the topic in the individual, so that the optimal individual finally determined can more objectively and truly reflect the current hot topics.

[0113] For example, in the present disclosure, the fitness function may be as shown in formula (2):

[0114]

[0115] Among them, fit(X) represents the fitness value of individual X; Indicates the degree of attention paid to the i-th topic; count i represents the number of occurrences of the i-th topic; x i It represents the weight value corresponding to the i-th topic in individual X. The smaller the value of fit(X), the better the adaptability of individual X, that is, the weights assigned to these topics of concern are more reasonable.

[0116] For example, assuming that for individual W1 in the initial population W, the fitness value of the individual W1 calculated using formula (2) is expressed as

[0117] In this way, after step 104, a target optimal individual can be obtained. Afterwards, in step 105, a target topic can be determined based on the target optimal individual. In the present disclosure, one way to determine the target topic may be: in descending order of weight values, topics corresponding to the H weight values ​​with the highest weight values ​​in the target optimal individual are determined as target topics, where H is a positive integer greater than or equal to 1. Alternatively, another way to determine the target topic may be: topics corresponding to weight values ​​greater than a preset weight threshold in the target optimal individual are determined as target topics. The determined target topic represents the current hot topic in the knowledge community.

[0118] Afterwards, in step 106, a group to be recommended is determined based on the determined target topic. As described above, the keywords constituting the group name are extracted and combined from the user's topics of interest. Therefore, after the target topic is determined, a group whose name matches the target topic can be determined based on the target topic and the names of existing groups in the knowledge community. The matching of the group name and the topic can be: the group name includes the topic, or the similarity between the text vector of the group name and the text vector of the topic (for example, cosine distance, Euclidean distance, etc.) characterizes that the group name is similar to the topic. After finding a group that matches the target topic, the matching group can be determined as a group to be recommended and recommended to the user.

[0119] For example, several users have already paid attention to the following topics: microservices, blockchain, Ethereum, deep learning, computer vision, data analysis, data mining, big data, Hadoop, Spark, Docker. After the algorithm iteration, the optimal weights corresponding to the target topics are: big data, deep learning, computer vision and blockchain. Then, according to the target topics, the groups to be recommended can be "big data exchange group", "deep learning exchange group", "computer vision interest group" and "blockchain forum". By recommending these groups to users, users can learn about the current popular groups in the knowledge community, which is convenient for users to join the group to participate in interactive learning, strengthen mutual communication, and facilitate group knowledge recommendation to users later.

[0120] As described above, the whale algorithm is used in the present disclosure to find the optimal target individual to obtain the target topic. The whale algorithm is a novel swarm intelligence optimization algorithm proposed in 2016. The mathematical model of the algorithm is based on the foraging behavior of a whale in the ocean. The algorithm has the general advantages of swarm intelligence algorithms and has been applied in many fields such as energy, transportation, economy, management, marine engineering, basic mathematics, etc. The algorithm is better than some algorithms in terms of search accuracy and convergence speed, but the algorithm still has the problem of low optimization accuracy and easy to fall into local optimality when solving complex, high-dimensional, multi-peak functions.

[0121] In this regard, the inventors focus on improving these problems from both global and local aspects. In the global search process, an update method based on fitness value classification is used, and two inertia weights are introduced for individual classification to make the global search more refined and improve the search accuracy. In the local update stage, a local update strategy based on an elite team is used, and elite individuals are introduced from the elite team to disturb the optimal individual, thereby reducing the possibility of falling into a local optimum in the later stage of optimization. The present invention applies the improved whale algorithm to the generation of the group to be recommended, which reduces the complexity of modeling and calculation and improves the accuracy of recommendation.

[0122] The iterative process of the whale algorithm is described in detail below.

[0123] First, after the initial population is generated, the fitness value of each initial individual in the initial population is calculated using the fitness function. In the present disclosure, the fitness value of each initial individual in the initial population can be calculated using the fitness function provided by the present disclosure (as shown in formula (2)) based on the generated initial population, the number of occurrences of each topic and the degree of attention.

[0124] Next, the current optimal individual X is determined based on the calculated fitness value. * (t). In the present disclosure, the individual with the smallest fitness value can be taken as the current optimal individual X *(t).

[0125] Next, each individual in the current population is taken as the current individual X(t) in turn, and the update process is performed for each current individual X(t) to obtain the updated individual X(t+1), wherein the updated individual X(t+1) of each current individual X(t) constitutes the updated population. For example, assuming that the individuals in the current population are individuals X1 and X2, then individual X1 is taken as the current individual X1(t), the above update process is performed to obtain the updated individual X1(t+1), and individual X2 is taken as the current individual X2(t), the above update process is performed to obtain the updated individual X2(t+1), at this time, individual X1(t+1) and individual X2(t+1) constitute the updated population.

[0126] The above update process specifically includes the following steps:

[0127] Step (1), update A, C, l and p in the whale algorithm, where A and C are coefficient vectors, l is a random quantity between [-1, 1], and p is a random number between [0, 1]. The calculation formulas for A and C are as follows:

[0128] A=2a·r a -a (3)

[0129] C=2·r c (4)

[0130] Among them, r a 、r c is a random vector between [0,1], the symbol “·” is element-by-element multiplication, a is the coefficient, and it decreases linearly from 2 to 0 during the iteration.

[0131] Step (2): According to the size of the p value and the size of |A|, determine which iteration method to choose to obtain the updated individual X(t+1).

[0132] First, when p>0.5, the bubble predation behavior in the local update operation is used to obtain the updated individual X(t+1).

[0133] In the original whale algorithm, the mathematical model of bubbling predation behavior is:

[0134] X(t+1)=X * (t)+D'·e bl ·cos(2πl) (5)

[0135] D'=|X * (t)-X(t)| (6)

[0136] Where D' represents the current individual X(t) and the current optimal individual X *(t), and b is a constant that defines the shape of the logarithmic spiral.

[0137] In addition, when p≤0.5 and |A|≤1, the encirclement and predation behavior in the local update operation is used to obtain the updated individual X(t+1).

[0138] In the original whale algorithm, the mathematical model of the encirclement predation behavior is:

[0139] X(t+1)=X * (t)-A * D (7)

[0140] D=|C*X * (t)-X(t)| (8)

[0141] D represents the current individual X(t) and the current optimal individual X * (t) The distance between them.

[0142] It can be seen that whether in the bubbling predation behavior or the encirclement predation behavior, the local update process of the original whale algorithm refers to the current global optimal individual X * (t), in the later stage of iteration, other individuals in the population will tend to the optimal individual, so that the diversity of the entire population is reduced, which is easy to lead to local optimality. In this regard, the present disclosure provides a local update strategy based on an elite team, and an elite team is constructed in each iteration.

[0143] Specifically, if p>0.5, or if p≤0.5 and |A|≤1, remove the current best individual X from the current population. * Select one individual from the individuals other than (t) as the elite individual X elite (t).

[0144] Next, if p>0.5, the current individual X(t) is updated according to the following iterative formula (9) to obtain the updated individual X(t+1):

[0145] X(t+1)=X * (t)+ε·X elite (t)+D'·e bl ·cos(2πl) (9)

[0146] Here, ε is a random number that follows a normal distribution with a variance of 1 and a mean of 0, so that the local random search is better.

[0147] If p≤0.5 and |A|≤1, update the current individual X(t) according to the following iterative formula (10) to obtain the updated individual X(t+1):

[0148] X(t+1)=X *(t)+ε·X elite (t)-A*D (10)

[0149] By comparing formula (9) with formula (5), and by comparing formula (10) with formula (7), it can be seen that the present disclosure adds the elite individual X to the iterative calculation formulas of the bubbling predation behavior and the encirclement predation behavior. elite (t), so that the elite individual X elite (t) After participating in the local update, the optimal individual is disturbed by a certain amount, which expands the local search area, provides a wider search range for feasible solutions, improves the diversity of the population, and reduces the possibility of premature convergence and falling into the local optimum.

[0150] It should be understood that although the above describes the introduction of elite individuals in both the encirclement predation behavior and the bubble predation behavior in the local update operation to reduce the possibility of premature convergence and falling into the local optimum, the present disclosure is not limited to this. In other embodiments, elite individuals may be introduced only in the encirclement predation behavior or only in the bubble predation behavior.

[0151] The following describes the method for selecting elite individuals.

[0152] Method 1: You can remove the current best individual X from the current population * One individual is randomly selected from the remaining individuals except (t) as the elite individual.

[0153] Method 2: First, calculate the current population except the current best individual X * (t), then remove the individuals whose fitness values ​​are greater than the average value, and the remaining individuals are used as candidate individuals; next, determine the remaining number remainder_Num according to the following formula (11):

[0154] remainder_Num=round(m-μ·(m-1)) (11)

[0155] If the total number of candidate individuals is greater than the remaining number, a portion of the candidate individuals are randomly deleted so that the number of remaining candidate individuals is equal to the remaining number.

[0156] If the total number of candidate individuals is not greater than the remaining number, or after randomly deleting a portion of the candidate individuals, a candidate individual is randomly selected from the current candidate individuals (the current candidate individuals are regarded as the elite team) as the elite individual X elite (t), where m represents the total number of individuals in the current population, μ represents the coefficient, and μ = t / T, t represents the current iteration number, and T represents the preset total number of iterations.

[0157] The elite individuals determined by method 2 can exclude individuals with poor adaptability, which can further improve the search accuracy while increasing the diversity of the population.

[0158] In addition, when p≤0.5 and |A|>1, a global search process is performed, and its mathematical formula is as follows:

[0159] X(t+1)=X rand (t)-A * D (12)

[0160] D=|C * X rand (t)-X(t)| (13)

[0161] Where D represents the current individual X(t) and the random individual X rand (t) The distance between rand (t) is an individual randomly selected from the current population.

[0162] It can be seen that in the original algorithm, when this global update formula is used to update the population individuals, the randomness will be greater because this formula is centered on random individuals. The present disclosure changes the strategy centered on random individuals to a strategy centered on iterative individuals. In this way, the mathematical formula of the original global search process is improved to:

[0163] X(t+1)=X(t)-A * D (14)

[0164] D=|C*X(t)-X rand (t)| (15)

[0165] In the process of global search, individuals can fully explore the search space, but the range of individual movement should depend on the individual's own conditions. Most problems in actual engineering are minimization problems, and for minimization problems, the smaller the fitness, the better. Some individuals have relatively good fitness, so in order to fully explore the neighborhood space, the range of their global search movement should not be too large. Some individuals have slightly poor fitness, so the range of their global search movement can be slightly larger. Doing so can make the global search more subtle, thereby improving the accuracy of the global search.

[0166] For this reason, in the present disclosure, two inertia weights, one large and one small, are used to update the individuals with smaller and larger fitness values, respectively. Since the global search process is to be improved rather than to balance the global search and the local search, the present disclosure does not use a linearly decreasing dynamic inertia weight like in the related art, but uses two static inertia weights, that is, these two inertia weights are constants and remain unchanged during the iteration process. In this way, the algorithm complexity can be reduced to a certain extent and the calculation efficiency can be improved.

[0167] After introducing two inertia weights, the mathematical formula of the global search process is further improved as follows:

[0168]

[0169] Wherein, fit(X(t)) represents the fitness value of the current individual X(t); ω low represents the first inertia weight, ω up represents the second inertia weight, and ω low <ω up ,ω low +ω up =1; fit avg Represents the average fitness value of all individuals in the current population.

[0170] If fit(X(t)) <fit avg If it holds, it means that the fitness value of X(t) is good and the feasible solution is good, then a smaller ω should be used for it. low As an inertia weight, it makes the global search performed by it more localized. If fit(X(t))≥fit avg If the fitness value of X(t) is relatively poor, the feasible solution is also poor, so a larger ω is used for it. up As an inertia weight, the feasible solution is searched in a larger range. The calculation method of the modified global update formula D remains unchanged and is still calculated according to formula (15).

[0171] The improved global search method provided by the present disclosure can perform different search actions according to the relative merits of individuals. The introduction of two inertia weights plays a regulatory role in the global search process, thereby improving the accuracy of the global search.

[0172] It should be understood by those skilled in the art that the present disclosure is not limited to the simultaneous use of the above three improved iterative formulas. In other embodiments, the iterative formula of the original algorithm may still be used for individual updates, or one or two of the improved iterative formulas may be used for individual updates while the others may still be used for individual updates. For example, for bubble predation behavior, the corresponding improved iterative formula may be used, while for encirclement predation behavior and global search, the corresponding iterative formula in the original algorithm may still be used. Of course, in order to simultaneously achieve the purpose of improving the accuracy of global search and preventing falling into local optimum, the three improved iterative formulas may be used simultaneously, that is, for bubble predation behavior, the corresponding improved iterative formula (9) may be used, for encirclement predation behavior, the corresponding improved iterative formula (10) may be used, and for global search, the corresponding improved iterative formula (16) may be used.

[0173] After performing the above update process on each current individual X(t) and obtaining the updated individual X(t+1), an updated population consisting of the updated individual X(t+1) of each current individual X(t) can be obtained. Next, based on the updated population, the number of occurrences of each topic and the degree of attention, the fitness value of each individual in the updated population is calculated using the fitness function.

[0174] Next, based on the calculated fitness value of each individual in the updated population, determine whether there is an individual X in the updated population that is better than the current optimal individual X. * (t) A better individual. As mentioned above, the smaller the fitness value, the better the individual adaptability. Therefore, it is determined whether there is a better individual X in the updated population than the current best individual X. * (t) The better individual can be: Determine whether there is a better fitness value than the current best individual X in the updated population * (t) has a smaller fitness value.

[0175] If it is determined that there is an individual X in the updated population that is better than the current best individual X * (t) A better individual, then the best individual in the updated population is determined as the new current best individual X * (t), otherwise keep the current optimal individual X * (t) remains unchanged. The best individual in the updated population is the individual with the smallest fitness value in the updated population.

[0176] Next, determine whether the iteration has reached the preset total number of iterations. If the current number of iterations t has not reached the preset total number of iterations T, then set t = t + 1, and determine the updated population as the new current population, return to the above steps of taking each individual in the current population as the current individual X(t), and performing the update process for each current individual X(t) to obtain the updated individual X(t+1), so as to perform the next round of iterative calculations.

[0177] If the current number of iterations t reaches the preset total number of iterations T, the current optimal individual X * (t) Determine the optimal individual for the target.

[0178] Based on the same inventive concept, the present disclosure also provides a group recommendation device. Figure 2 is a block diagram of a group recommendation device according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the device 200 may include:

[0179] An acquisition module 201 is used to acquire topics that multiple users in the knowledge community are interested in;

[0180] The first determination module 202 is used to determine the number of occurrences and the degree of attention of each topic;

[0181] A generating module 203 is used to generate an initial population, wherein the initial population includes a plurality of initial individuals, each of which is used to represent an initial weight vector corresponding to a topic;

[0182] The second determination module 204 is used to determine the target optimal individual using the whale algorithm according to the initial population, the number of occurrences and the degree of attention of each topic, and the fitness function, wherein the fitness function represents the functional relationship between the number of occurrences of a topic, the degree of attention of a topic, and the fitness value of the individual, and the target optimal individual is used to represent an optimal weight vector corresponding to the topic;

[0183] The third determination module 205 is used to determine a target topic according to the target optimal individual;

[0184] The fourth determination module 206 is used to determine a group to be recommended according to the target topic.

[0185] In the above-mentioned group recommendation device, the group to be recommended can be determined based on the topics that users have already followed in the knowledge community. Since the topics that users have already followed can reflect the preferences of most users in the knowledge community, the artificial intelligence algorithm can be used to quickly determine the groups that new users may be interested in based on the number of appearances and the degree of attention of the topics that users have already followed, thereby saving user selection time and improving recommendation efficiency. In addition, the above-mentioned technical solution uses a swarm intelligence algorithm, the whale algorithm, to continuously optimize the recommendation scheme. During the iteration process, the number of appearances and the degree of attention of the topic are taken into account when calculating the fitness value of the individual. In this way, the optimal individual determined based on the fitness value can more objectively and truly reflect the current hot topics. The algorithm can generate the optimal recommendation scheme at the end of the iteration, thereby achieving high-precision group recommendation.

[0186] Optionally, the second determining module 204 includes:

[0187] The first determination submodule is used to calculate the fitness value of each of the initial individuals in the initial population according to the initial population, the number of occurrences of each topic and the degree of attention received by each topic using the fitness function, and determine the current optimal individual X according to the fitness value. * (t);

[0188] An updating submodule is used to take each individual in the current population as the current individual X(t) in turn, and perform the above updating process for each current individual X(t) to obtain an updated individual X(t+1), wherein the updated individual X(t+1) of each current individual X(t) constitutes an updated population;

[0189] A calculation submodule, configured to calculate the fitness value of each individual in the updated population using the fitness function according to the updated population, the number of occurrences of each topic and the degree of attention;

[0190] The second determination submodule is used to determine whether there is a better individual X in the updated population than the current best individual X according to the calculated fitness value of each individual in the updated population. * (t) A better individual, then the best individual in the updated population is determined as the new current best individual X * (t), otherwise keep the current optimal individual X * (t) unchanged;

[0191] The third determination submodule is used for, if the current number of iterations t has not reached the preset total number of iterations T, then after t=t+1 and the updated population is determined as the current population, triggering the update submodule to re-execute the operation of taking each individual in the current population as the current individual X(t) in turn, and performing the update process for each current individual X(t) to obtain the updated individual X(t+1);

[0192] The fourth determination submodule is used to determine the final current optimal individual X if the current iteration number t reaches the preset total iteration number T. * (t) determining the optimal individual for the target.

[0193] Optionally, the first determination module 202 is used to determine the degree of attention received by each topic through the above formula (1).

[0194] Optionally, the third determination module 205 is used to determine the topics corresponding to the H highest weight values ​​among the target optimal individuals as target topics in descending order of weight values, where H is a positive integer greater than or equal to 1.

[0195] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0196] Figure 3 3 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 300 may be provided as a server. Figure 3 The electronic device 300 includes a processor 322, which may be one or more, and a memory 332 for storing a computer program executable by the processor 322. The computer program stored in the memory 332 may include one or more modules each corresponding to a set of instructions. In addition, the processor 322 may be configured to execute the computer program to perform the above-mentioned group recommendation method.

[0197] In addition, the electronic device 300 may further include a power supply component 326 and a communication component 350, wherein the power supply component 326 may be configured to perform power management of the electronic device 300, and the communication component 350 may be configured to implement communication of the electronic device 300, for example, wired or wireless communication. In addition, the electronic device 300 may further include an input / output (I / O) interface 358. The electronic device 300 may operate based on an operating system stored in the memory 332, such as Windows ServerTM, Mac OSXTM, UnixTM, LinuxTM, etc.

[0198] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned group recommendation method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 332 including program instructions, and the above-mentioned program instructions can be executed by the processor 322 of the electronic device 300 to complete the above-mentioned group recommendation method.

[0199] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0200] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0201] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A group recommendation method, It is characterized in that include: Get topics that multiple users in the knowledge community are interested in; Determine the number of times each topic appears and the level of attention it receives; Generate an initial population, wherein the initial population includes a plurality of initial individuals, each of the initial individuals is used to represent an initial weight vector corresponding to a topic; According to the initial population, the number of occurrences and the degree of attention of each topic, and the fitness function, the whale algorithm is used to determine the target optimal individual, wherein the fitness function represents the functional relationship between the number of occurrences of a topic, the degree of attention of a topic, and the fitness value of the individual, and the target optimal individual is used to represent an optimal weight vector corresponding to the topic; Determining a target topic according to the target optimal individual; Determining a group to be recommended according to the target topic; Determine the level of interest in each topic, including: The degree of attention paid to each topic is determined by the following formula: in, Indicates k Users, Indicates i Topic, Indicates i The level of attention a topic receives; Indicates i The topic is k The level of attention of each user, K represents the total number of users, and according to , , and One or more of the following are determined, where: in, Indicates k Whether the article read by the user contains i Topic, Indicates k Does the article published by a user contain i Topic, Indicates k Whether the user has i Comment on articles on this topic. Indicates k Whether the user has i Like the articles on this topic; Wherein, the fitness function is: in, Represents an individual X The fitness value of Indicates i The level of attention a topic receives, Indicates i The number of times a topic appears, Represents an individual X Corresponding to i The weight of a topic.

2. The method according to claim 1, It is characterized in that Determining the optimal target individual by using the whale algorithm according to the initial population, the number of occurrences of each topic and the degree of attention, and the fitness function, includes: According to the initial population, the number of occurrences of each topic and the degree of attention, the fitness value of each initial individual in the initial population is calculated using the fitness function, and the current optimal individual is determined according to the fitness value. ; Take each individual in the current population as the current individual , and for each of the current individuals Execute the update process to obtain the updated individual , where each of the current individuals The updated individual The updated population is formed, and the updating process includes: Update the whale algorithm A , C , l and p ,in, A and C is the coefficient vector, l is a random quantity between [-1,1], p is a random number between [0,1]; like , then remove the current best individual from the current population Select one individual from the rest as the elite individual ; Update the current individual according to the following iterative formula , get the updated individual : in, Indicates the current individual With the current optimal individual The distance between , b represents the constants that define the shape of the logarithmic spiral, is a random number that follows a normal distribution with a variance of 1 and a mean of 0; Calculating the fitness value of each individual in the updated population using the fitness function according to the updated population, the number of occurrences of each topic and the degree of attention; If, according to the calculated fitness value of each individual in the updated population, it is determined that there is an individual in the updated population that is better than the current optimal individual, If a better individual is found, the best individual in the updated population is determined as the new current best individual. , otherwise keep the current optimal individual constant; If the current number of iterations t The preset total number of iterations has not yet been reached T , then , and after determining the updated population as the current population, returning to the method of taking each individual in the current population as the current individual in turn , and for each of the current individuals Execute the update process to obtain the updated individual Steps; If the current number of iterations t The total number of iterations to reach the preset value T , then the final current optimal individual Determine the optimal individual for the target.

3. The method according to claim 2, It is characterized in that The updating process also includes: like and , then remove the current best individual from the current population Select one individual from the rest as the elite individual ; Update the current individual according to the following iterative formula , get the updated individual : in, Indicates the current individual With the current optimal individual The distance between .

4. The method according to claim 2 or 3, It is characterized in that The current best individual is removed from the current population. Select one individual from the rest as the elite individual ,include: Calculate the current population except the current best individual The average fitness value of the remaining individuals; Delete the individuals whose fitness values ​​are greater than the average value from the remaining individuals, and use the remaining individuals as candidate individuals; The remaining quantity is determined according to the following formula : If the total number of candidate individuals is greater than the remaining number, a portion of the candidate individuals is randomly deleted so that the number of remaining candidate individuals is equal to the remaining number; If the total number of candidate individuals is not greater than the remaining number, or after randomly deleting a portion of the candidate individuals, a candidate individual is randomly selected from the current candidate individuals as the elite individual ,in, m represents the total number of individuals in the current population, represents the coefficient, and .

5. The method according to claim 2 or 3, It is characterized in that The updating process also includes: like and , then randomly select an individual from the current population as a random individual , and determine the average fitness value of all individuals in the current population ; Update the current individual according to the following iterative formula , get the updated individual : in, Indicates the current individual With the random individual The distance between , Indicates the current individual The fitness value of represents the first inertia weight, represents the second inertia weight, and < , .

6. A group recommendation device, It is characterized in that include: The acquisition module is used to obtain topics that multiple users in the knowledge community are interested in; The first determination module is used to determine the number of occurrences and the degree of attention of each topic; A generation module, used to generate an initial population, wherein the initial population includes a plurality of initial individuals, each of which is used to represent an initial weight vector corresponding to a topic; A second determination module is used to determine the target optimal individual using the whale algorithm according to the initial population, the number of occurrences and the degree of attention of each topic, and the fitness function, wherein the fitness function represents the functional relationship between the number of topic occurrences, the degree of attention of the topic, and the fitness value of the individual, and the target optimal individual is used to represent an optimal weight vector corresponding to the topic; A third determination module is used to determine a target topic according to the target optimal individual; A fourth determination module, used to determine a group to be recommended according to the target topic; The first determination module is used to determine the attention level of each topic by using the following formula: in, Indicates k Users, Indicates i Topic, Indicates i The level of attention a topic receives; Indicates i The topic is k The level of attention of each user, K represents the total number of users, and according to , , and One or more of the following are determined, where: in, Indicates k Whether the article read by the user contains i Topic, Indicates k Does the article published by the user contain i Topic, Indicates k Is the user interested in the content containing i Comment on articles on this topic. Indicates k Is the user interested in the content containing i Like the articles on this topic; Wherein, the fitness function is: in, Represents an individual X The fitness value of Indicates i The level of attention a topic receives, Indicates i The number of times a topic appears, Represents an individual X Corresponding to i The weight of a topic.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps of the method described in any one of claims 1 to 5 are implemented.

8. An electronic device, It is characterized in that include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 5.