Video recommendation method and device based on hybrid collaborative filtering and electronic equipment
Through the hybrid collaborative filtering method, supervised learning and clustering iterative algorithms are used to construct correlation spectral graphs, and combined with user and video feature information, the cold start problem in video recommendation is solved and personalized and high-quality video recommendation is achieved.
Patent Information
- Application Number
- CN202410837517.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-06
AI Technical Summary
The collaborative filtering algorithm based on a single factor has a cold start problem in the field of video recommendation and cannot effectively provide personalized recommendations for new users.
A hybrid collaborative filtering method is adopted, using a supervised learning machine algorithm and a clustering iterative algorithm to construct a correlation spectrum graph, and combining the characteristic information of users and videos to perform personalized recommendation score prediction and video recommendation screening through the collaborative filtering algorithm.
It achieves the establishment of a correlation spectrum between users and videos through spectral clustering based on less feature data, solves the cold start problem, improves the personalization and accuracy of the recommendation algorithm, and ensures the quality of the video recommendation sequence.
Smart Images

Figure CN118606569A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular, relates to a video recommendation method, device and electronic equipment based on hybrid collaborative filtering. Background Art
[0002] With the development of computer technology, a series of excessive information overload problems have been caused by massive disordered information data. Collaborative filtering is a new recommendation algorithm based on clusters and user historical data. It has a high degree of application in the recommendation field, but the collaborative filtering algorithm based on a single factor still has many defects that are difficult to improve, such as cold start, which limits its application in the recommendation field. The video industry is often favored by users due to its intuitiveness and large user base, so it has been a leading industry in the recommendation service field for many years.
[0003] The video recommendation model based on collaborative filtering is mainly to establish group relationships and obtain potential connections between projects or users. It does not need to be based on a large amount of project archives. It only needs to collect data such as user behavior logs to discover similarity information between users and projects, establish user communities or project communities, and complete recommendation services. This model is currently the most widely used model, but when facing new users, due to the lack of historical behavior data, it is impossible to effectively personalize recommendations. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a video recommendation method, device and electronic device based on hybrid collaborative filtering.
[0005] In a first aspect, the present invention provides a video recommendation method based on hybrid collaborative filtering, comprising:
[0006] Using a supervised learning machine algorithm to calculate the association matrix between user nodes and video nodes, and obtain the degree of association between node objects; the node object includes at least one of a user node and a video node;
[0007] The edge of the node object is regarded as the relationship between the node objects, and the association degree is regarded as the weight of the edge of the node object. The clustering iterative algorithm is used to build a cluster partition model, and the cluster partition model is trained to obtain the cluster partition model of the association spectrum of the node object;
[0008] Extract feature information of the node object, construct a sample point set, and use the trained clustering model of the association spectrum to perform sub-graph partitioning on the association spectrum of the node object so that the sample points of the sample point set are clustered to obtain the clusters of the association spectrum of the node object;
[0009] Obtain node object information, and use the user group data in the cluster of the node object's associated spectrum to obtain the user sequence of the same cluster;
[0010] Determine the video recommendation type. If it is a user-oriented recommendation type, then based on the user's viewing history data, use the video group data in the cluster of the node object's associated spectrum graph to obtain a pre-recommended video list; if it is a video-oriented recommendation type, then based on the video feature information, use the video group data in the cluster of the node object's associated spectrum graph to obtain a pre-recommended video list;
[0011] The collaborative filtering algorithm is used to predict the current user's rating behavior for the videos in the pre-recommended video sequence based on the user sequence of the same cluster, and the predicted rating is obtained;
[0012] The predicted scores are sorted and filtered to obtain the final video recommendation sequence.
[0013] In a second aspect, the present invention provides a video recommendation device based on hybrid collaborative filtering, comprising a first processing unit, a model building unit, a second data processing unit, an acquisition unit, a third data processing unit, a prediction unit, and a sorting and screening unit;
[0014] A first processing unit is used to calculate the association matrix between user nodes and video nodes using a supervised learning machine algorithm to obtain the association degree between node objects; the node object includes at least one of a user node and a video node;
[0015] A model building unit is used to use the edge of the node object as the relationship between the node objects, and the association degree as the weight of the edge of the node object, use the clustering iteration algorithm to build a cluster partition model, and train the cluster partition model to obtain the cluster partition model of the association spectrum of the node object;
[0016] The second data processing unit is used to extract feature information of the node object, construct a sample point set, and use the trained clustering model of the association spectrum to perform sub-graph partitioning on the association spectrum of the node object so that the sample points of the sample point set are clustered to obtain the clusters of the association spectrum of the node object;
[0017] An acquisition unit, used to acquire node object information, and obtain a user sequence of the same cluster by using user group data in the cluster of the association spectrum of the node object;
[0018] The third data processing unit is used to determine the video recommendation type. If it is a user-oriented recommendation type, the pre-recommended video list is obtained based on the user's viewing history data and the video group data in the cluster of the associated spectrum of the node object; if it is a video-oriented recommendation type, the pre-recommended video list is obtained based on the video feature information and the video group data in the cluster of the associated spectrum of the node object;
[0019] A prediction unit, used to predict the current user's rating behavior for the videos in the pre-recommended video sequence based on the user sequence of the same cluster by using a collaborative filtering algorithm to obtain a predicted rating;
[0020] The sorting and filtering unit is used to sort and filter the predicted scores to obtain the final video recommendation sequence.
[0021] In a third aspect, the present invention provides an electronic device, comprising:
[0022] Processor and memory;
[0023] The memory is used to store computer operation instructions;
[0024] The processor is used to execute the video recommendation method based on hybrid collaborative filtering by calling the computer operation instruction.
[0025] Based on the above technical solution, the present invention can also be improved as follows.
[0026] Furthermore, supervised learning machine algorithms are used to calculate the association matrix between user nodes and video nodes to obtain the association degree between node objects, including:
[0027] The node object vector is established based on the synonym analysis method of feature information decomposition;
[0028] According to the node object vector, the distance metric is calculated using the Euclidean distance;
[0029] Based on the K-nearest neighbor algorithm, the association matrix between users and videos is calculated to obtain the association degree between node objects.
[0030] Furthermore, a clustering iterative algorithm is used to construct a cluster partitioning model, including:
[0031] S1: Randomly select a sample point as the cluster center;
[0032] S2: Calculate the distance from the remaining sample points to the existing cluster center;
[0033] S3: According to the roulette method, assign probabilities to the remaining sample points and select the next cluster center until K cluster centers are obtained;
[0034] S4: Calculate the distance from the sample point to each cluster center and assign the sample point to the nearest cluster;
[0035] S5: Take a cluster and determine the number of samples. If the number of samples is less than the set minimum number threshold, dissolve the cluster and reallocate the sample points in the cluster. Otherwise, determine whether the number of samples in the next cluster is less than the set minimum number threshold until all clusters are determined.
[0036] S6: Determine whether the number of clusters is less than the first set threshold; if so, take a cluster, calculate the variance of all sample data in each dimension, form the variance vector of the cluster, and go to S7; otherwise, determine whether the number of clusters is greater than the second set threshold, if so, calculate the distance between clusters, and go to S8; otherwise, recalculate the cluster center and go to S9;
[0037] S7:
[0038] S701: Determine whether the variance vector of the cluster is greater than the maximum variance threshold, if so, go to S701, otherwise go to S11;
[0039] S701: Determine whether the number of cluster samples is greater than twice the minimum sample number threshold. If so, divide the cluster into two and calculate the cluster centers of the two sub-clusters respectively. Otherwise, go to S11.
[0040] S702: Determine whether all cluster samples have been obtained. If yes, recalculate the cluster center. Otherwise, go to S9;
[0041] S8: Determine whether there are cluster pairs whose distance is less than the set distance threshold. If so, merge each pair of cluster pairs whose distance is less than the set distance threshold, recalculate the cluster center, calculate the distance between clusters, and repeat S8. Otherwise, recalculate the cluster center and go to S9.
[0042] S9: Determine whether the number of iterations reaches the set number, if so, output the clustering result, otherwise go to S4.
[0043] Furthermore, feature information of the node object is extracted, a sample point set is constructed, and the associated spectrum of the node object is sub-divided using the cluster partitioning model to cluster the sample points of the sample point set into clusters, including:
[0044] Extract the characteristic information of the node object, parse the node object into a characteristic vector composed of the characteristic information, assign a weight to each characteristic vector, calculate the independent correlation degree based on the single-factor characteristic vector, and obtain the comprehensive correlation matrix according to the weight sequence calculation;
[0045] According to the comprehensive correlation matrix, the degree of each node object based on the spectrum is calculated to form a degree vector, and then a diagonal matrix is constructed according to the degree vector to obtain the degree matrix;
[0046] Based on the degree matrix and the correlation matrix, the naive Laplace matrix is calculated, and the naive Laplace matrix is normalized based on symmetry to obtain the standard Laplace matrix;
[0047] Calculate the eigenvalues of the standard Laplace matrix, arrange them from small to large, take the first K eigenvalues, and calculate the corresponding eigenvectors of the first K eigenvalues to form a characteristic matrix;
[0048] Use the feature matrix to construct a set of sample points;
[0049] The sample points of the sample point set are clustered into clusters using a clustering model.
[0050] Furthermore, the collaborative filtering algorithm is the BI-POLAR S 1OPE ONE algorithm.
[0051] Furthermore, the user viewing history data includes the user's viewing history videos and the user's ratings for the viewing history videos.
[0052] The beneficial effects of the present invention are:
[0053] (1) The present invention can calculate the association between node objects based on only a small amount of feature data, introduce social tags, and then establish the association spectrum between users and videos through spectral clustering, and perform personalized recommendation score prediction and video recommendation screening based on the class spectrum network, thereby solving the cold start problem of the recommendation algorithm;
[0054] (2) The cluster partitioning algorithm constructed in the present invention formulates an effective strategy for selecting the initial cluster center, which solves the problem of the clustering results being sometimes good and sometimes bad due to the randomness of the selection of the initial cluster center in the traditional spectral clustering cluster partitioning algorithm; the number of clusters can be dynamically adjusted by dissolving clusters, splitting and merging operations, which solves the problem that the clusters cannot be adaptively adjusted in the traditional spectral clustering cluster partitioning algorithm;
[0055] (3) The present invention adopts a hybrid collaborative filtering approach, which combines user-based collaborative filtering with video-based collaborative filtering to establish a user group around the user and then establish a pre-recommended video sequence. At the same time, social tags are introduced to supplement user and video feature information to improve the accuracy of cluster division of spectral clustering. A hybrid collaborative filtering algorithm is used for rating prediction to ensure the quality of the final video recommendation sequence. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A schematic diagram of a video recommendation method based on hybrid collaborative filtering provided in Example 1 of the present invention;
[0057] Figure 2 The principle block diagram of the video recommendation process;
[0058] Figure 3 A flowchart for building a cluster partitioning model using a clustering iterative algorithm;
[0059] Figure 4 A schematic diagram of a video recommendation device based on hybrid collaborative filtering provided in Embodiment 2 of the present invention;
[0060] Figure 5 This is a schematic diagram of an electronic device provided in Example 3 of the present invention.
[0061] Icon: 50 - electronic device; 510 - processor; 520 - bus; 530 - memory; 540 - transceiver. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0063] Example 1
[0064] As an example, Figure 1 As shown, in order to solve the above technical problems, this embodiment provides a video recommendation method based on hybrid collaborative filtering, including:
[0065] Using a supervised learning machine algorithm to calculate the association matrix between user nodes and video nodes, and obtain the degree of association between node objects; the node object includes at least one of a user node and a video node;
[0066] The edge of the node object is regarded as the relationship between the node objects, and the association degree is regarded as the weight of the edge of the node object. The clustering iterative algorithm is used to build a cluster partition model, and the cluster partition model is trained to obtain the cluster partition model of the association spectrum of the node object;
[0067] Extract feature information of the node object, construct a sample point set, and use the trained clustering model of the association spectrum to perform sub-graph partitioning on the association spectrum of the node object so that the sample points of the sample point set are clustered to obtain the clusters of the association spectrum of the node object;
[0068] Obtain node object information, and use the user group data in the cluster of the node object's associated spectrum to obtain the user sequence of the same cluster;
[0069] Determine the video recommendation type. If it is a user-oriented recommendation type, then based on the user's viewing history data, use the video group data in the cluster of the node object's associated spectrum graph to obtain a pre-recommended video list; if it is a video-oriented recommendation type, then based on the video feature information, use the video group data in the cluster of the node object's associated spectrum graph to obtain a pre-recommended video list;
[0070] The collaborative filtering algorithm is used to predict the current user's rating behavior for the videos in the pre-recommended video sequence based on the user sequence of the same cluster, and the predicted rating is obtained;
[0071] The predicted scores are sorted and filtered to obtain the final video recommendation sequence.
[0072] As attached Figure 2 As shown in the figure, when the collaborative filtering algorithm is used, the acquisition of user clusters and video clusters requires the calculation of correlation and the division of clusters, and the video recommendation process is divided into two parts: general recommendation for users and special recommendation for videos.
[0073] Optionally, a supervised learning machine algorithm is used to calculate the association matrix between user nodes and video nodes to obtain the association degree between node objects, including:
[0074] The node object vector is established based on the synonym analysis method of feature information decomposition;
[0075] According to the node object vector, the distance metric is calculated using the Euclidean distance;
[0076] Based on the K-nearest neighbor algorithm, the association matrix between users and videos is calculated to obtain the association degree between node objects.
[0077] Specifically, the clustering is achieved through spectral clustering by clustering the eigenvectors of the Laplace matrix of the data samples. However, spectral clustering does not have a clustering algorithm. The present invention proposes a clustering algorithm based on K-means++ and iterative self-organizing data analysis method to achieve clustering.
[0078] Optional, as attached Figure 3 As shown in the figure, a cluster partitioning model is constructed using a clustering iterative algorithm, including:
[0079] S1: Randomly select a sample point as the cluster center;
[0080] S2: Calculate the distance from the remaining sample points to the existing cluster center;
[0081] S3: According to the roulette method, assign probabilities to the remaining sample points and select the next cluster center until K cluster centers are obtained;
[0082] S4: Calculate the distance from the sample point to each cluster center and assign the sample point to the nearest cluster;
[0083] S5: Take a cluster and determine the number of samples. If the number of samples is less than the set minimum number threshold, dissolve the cluster and reallocate the sample points in the cluster. Otherwise, determine whether the number of samples in the next cluster is less than the set minimum number threshold until all clusters are determined.
[0084] S6: Determine whether the number of clusters is less than the first set threshold; if so, take a cluster, calculate the variance of all sample data in each dimension, form the variance vector of the cluster, and go to S7; otherwise, determine whether the number of clusters is greater than the second set threshold, if so, calculate the distance between clusters, and go to S8; otherwise, recalculate the cluster center and go to S9; generally, the first set threshold is K / 2, and the second set threshold is 2K; K is the number of cluster centers;
[0085] S7:
[0086] S701: Determine whether the variance vector of the cluster is greater than the maximum variance threshold, if so, go to S701, otherwise go to S11;
[0087] S701: Determine whether the number of cluster samples is greater than twice the minimum sample number threshold. If so, divide the cluster into two and calculate the cluster centers of the two sub-clusters respectively. Otherwise, go to S11.
[0088] S702: Determine whether all cluster samples have been obtained. If yes, recalculate the cluster center. Otherwise, go to S9;
[0089] S8: Determine whether there are cluster pairs whose distance is less than the set distance threshold. If so, merge each pair of cluster pairs whose distance is less than the set distance threshold, recalculate the cluster center, calculate the distance between clusters, and repeat S8. Otherwise, recalculate the cluster center and go to S9.
[0090] S9: Determine whether the number of iterations reaches the set number, if so, output the clustering result, otherwise go to S4.
[0091] Optionally, feature information of the node object is extracted, a sample point set is constructed, and a cluster partitioning model is used to perform sub-graph partitioning on the associated spectrum of the node object to cluster the sample points of the sample point set into clusters, including:
[0092] Extract the characteristic information of the node object, parse the node object into a characteristic vector composed of the characteristic information, assign a weight to each characteristic vector, calculate the independent correlation degree based on the single-factor characteristic vector, and obtain the comprehensive correlation matrix according to the weight sequence calculation;
[0093] According to the comprehensive correlation matrix, the degree of each node object based on the spectrum is calculated to form a degree vector, and then a diagonal matrix is constructed according to the degree vector to obtain the degree matrix;
[0094] Based on the degree matrix and the correlation matrix, the naive Laplace matrix is calculated, and the naive Laplace matrix is normalized based on symmetry to obtain the standard Laplace matrix;
[0095] Calculate the eigenvalues of the standard Laplace matrix, arrange them from small to large, take the first K eigenvalues, and calculate the corresponding eigenvectors of the first K eigenvalues to form a characteristic matrix;
[0096] Use the feature matrix to construct a set of sample points;
[0097] The sample points of the sample point set are clustered into clusters using a clustering model.
[0098] In actual application, the pre-recommended video set for general recommendation is screened based on user historical data, such as viewing history and rating history; special recommendation recommends similar videos for a certain video, so the selection of the pre-recommended video set for special recommendation is based on the feature data of the current video.
[0099] Optionally, the collaborative filtering algorithm is a BI-POLAR S 1OPE ONE algorithm (bipolar collaborative filtering algorithm).
[0100] In the present invention, a good rating prediction system is constructed based on the BI-POLAR S l OPE ONE algorithm, which divides videos into two categories: like and dislike. The corresponding difference matrix is also divided into two types: the matrix corresponding to like and the matrix corresponding to dislike. Different weights are given to videos with two ratings, which can effectively reflect the user's likes and dislikes.
[0101] Optionally, the user viewing history data includes the user's viewing history videos and the user's ratings for the viewing history videos.
[0102] In actual application, the present invention can calculate the association between node objects based on only a small amount of feature data (user feature data such as age, occupation, place of origin, etc., video feature data such as classification, duration, director, etc.), and introduce social tags at the same time, and then establish association spectra between users and videos through spectral clustering, and perform personalized recommendation score prediction and video recommendation screening based on the class spectrum network, thereby solving the cold start problem of the recommendation algorithm.
[0103] The cluster partitioning algorithm constructed in the present invention formulates an effective strategy for selecting the initial cluster center, which solves the problem of the clustering results being sometimes good and sometimes bad due to the randomness in the selection of the initial cluster center points in the traditional spectral clustering cluster partitioning algorithm; the number of clusters can be dynamically adjusted by dissolving clusters, splitting and merging operations, which solves the problem that the clusters cannot be adaptively adjusted in the traditional spectral clustering cluster partitioning algorithm.
[0104] The present invention adopts a hybrid collaborative filtering approach, in which user-based collaborative filtering is supplemented by video-based collaborative filtering, a user group is established around the user, and then a pre-recommended video sequence is established; at the same time, social tags are introduced to supplement user and video feature information to improve the accuracy of cluster division of spectral clustering; the BI-POLAR BI-POLAR SlOPEONE algorithm is used for score prediction to ensure the quality of the final video recommendation sequence.
[0105] Example 2
[0106] Based on the same principle as the method shown in Example 1 of the present invention, as shown in the attached Figure 4 As shown, an embodiment of the present invention also provides a video recommendation device based on hybrid collaborative filtering, including a first processing unit, a model building unit, a second data processing unit, an acquisition unit, a third data processing unit, a prediction unit and a sorting and screening unit;
[0107] A first processing unit is used to calculate the association matrix between user nodes and video nodes using a supervised learning machine algorithm to obtain the association degree between node objects; the node object includes at least one of a user node and a video node;
[0108] A model building unit is used to use the edge of the node object as the relationship between the node objects, and the association degree as the weight of the edge of the node object, use the clustering iteration algorithm to build a cluster partition model, and train the cluster partition model to obtain the cluster partition model of the association spectrum of the node object;
[0109] The second data processing unit is used to extract feature information of the node object, construct a sample point set, and use the trained clustering model of the association spectrum to perform sub-graph partitioning on the association spectrum of the node object so that the sample points of the sample point set are clustered to obtain the clusters of the association spectrum of the node object;
[0110] An acquisition unit, used to acquire node object information, and obtain a user sequence of the same cluster by using user group data in the cluster of the association spectrum of the node object;
[0111] The third data processing unit is used to determine the video recommendation type. If it is a user-oriented recommendation type, the pre-recommended video list is obtained based on the user's viewing history data and the video group data in the cluster of the associated spectrum of the node object; if it is a video-oriented recommendation type, the pre-recommended video list is obtained based on the video feature information and the video group data in the cluster of the associated spectrum of the node object;
[0112] A prediction unit, used to predict the current user's rating behavior for the videos in the pre-recommended video sequence based on the user sequence of the same cluster by using a collaborative filtering algorithm to obtain a predicted rating;
[0113] The sorting and filtering unit is used to sort and filter the predicted scores to obtain the final video recommendation sequence.
[0114] Optionally, a supervised learning machine algorithm is used to calculate the association matrix between user nodes and video nodes to obtain the association degree between node objects, including:
[0115] The node object vector is established based on the synonym analysis method of feature information decomposition;
[0116] According to the node object vector, the distance metric is calculated using the Euclidean distance;
[0117] Based on the K-nearest neighbor algorithm, the association matrix between users and videos is calculated to obtain the association degree between node objects.
[0118] Optionally, a clustering iterative algorithm is used to construct a cluster partitioning model, including:
[0119] S1: Randomly select a sample point as the cluster center;
[0120] S2: Calculate the distance from the remaining sample points to the existing cluster center;
[0121] S3: According to the roulette method, assign probabilities to the remaining sample points and select the next cluster center until K cluster centers are obtained;
[0122] S4: Calculate the distance from the sample point to each cluster center and assign the sample point to the nearest cluster;
[0123] S5: Take a cluster and determine the number of samples. If the number of samples is less than the set minimum number threshold, dissolve the cluster and reallocate the sample points in the cluster. Otherwise, determine whether the number of samples in the next cluster is less than the set minimum number threshold until all clusters are determined.
[0124] S6: Determine whether the number of clusters is less than the first set threshold; if so, take a cluster, calculate the variance of all sample data in each dimension, form the variance vector of the cluster, and go to S7; otherwise, determine whether the number of clusters is greater than the second set threshold, if so, calculate the distance between clusters, and go to S8; otherwise, recalculate the cluster center and go to S9;
[0125] S7:
[0126] S701: Determine whether the variance vector of the cluster is greater than the maximum variance threshold, if so, go to S701, otherwise go to S11;
[0127] S701: Determine whether the number of cluster samples is greater than twice the minimum sample number threshold. If so, divide the cluster into two and calculate the cluster centers of the two sub-clusters respectively. Otherwise, go to S11.
[0128] S702: Determine whether all cluster samples have been obtained. If yes, recalculate the cluster center. Otherwise, go to S9;
[0129] S8: Determine whether there are cluster pairs whose distance is less than the set distance threshold. If so, merge each pair of cluster pairs whose distance is less than the set distance threshold, recalculate the cluster center, calculate the distance between clusters, and repeat S8. Otherwise, recalculate the cluster center and go to S9.
[0130] S9: Determine whether the number of iterations reaches the set number, if so, output the clustering result, otherwise go to S4.
[0131] Optionally, feature information of the node object is extracted, a sample point set is constructed, and a cluster partitioning model is used to perform sub-graph partitioning on the associated spectrum of the node object to cluster the sample points of the sample point set into clusters, including:
[0132] Extract the characteristic information of the node object, parse the node object into a characteristic vector composed of the characteristic information, assign a weight to each characteristic vector, calculate the independent correlation degree based on the single-factor characteristic vector, and obtain the comprehensive correlation matrix according to the weight sequence calculation;
[0133] According to the comprehensive correlation matrix, the degree of each node object based on the spectrum is calculated to form a degree vector, and then a diagonal matrix is constructed according to the degree vector to obtain the degree matrix;
[0134] Based on the degree matrix and the correlation matrix, the naive Laplace matrix is calculated, and the naive Laplace matrix is normalized based on symmetry to obtain the standard Laplace matrix;
[0135] Calculate the eigenvalues of the standard Laplace matrix, arrange them from small to large, take the first K eigenvalues, and calculate the corresponding eigenvectors of the first K eigenvalues to form a characteristic matrix;
[0136] Use the feature matrix to construct a set of sample points;
[0137] The sample points of the sample point set are clustered into clusters using a clustering model.
[0138] Optionally, the collaborative filtering algorithm is a BI-POLAR S 1 OPE ONE algorithm.
[0139] Optionally, the user viewing history data includes the user's viewing history videos and the user's ratings for the viewing history videos.
[0140] Example 3
[0141] Based on the same principle as the method shown in the embodiment of the present invention, an electronic device is also provided in the embodiment of the present invention, as shown in the attached Figure 5 As shown, the electronic device may include but is not limited to: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the video recommendation method based on hybrid collaborative filtering shown in the embodiment of the present invention by calling the computer program.
[0142] In an optional embodiment, an electronic device is provided. Figure 5 The electronic device 50 shown includes: a processor 510 and a memory 530. The processor 510 and the memory 530 are connected, for example, via a bus 520.
[0143] Optionally, the electronic device 50 may further include a transceiver 540, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 540 is not limited to one, and the structure of the electronic device 50 does not constitute a limitation on the embodiments of the present invention.
[0144] Processor 510 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 310 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0145] The bus 520 may include a path to transmit information between the above components. The bus 520 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 520 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0146] The memory 530 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0147] The memory 530 is used to store application code (computer program) for executing the solution of the present invention, and is controlled to be executed by the processor 510. The processor 510 is used to execute the application code stored in the memory 530 to implement the contents shown in the above method embodiment.
[0148] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A video recommendation method based on hybrid collaborative filtering, characterized in that: include: Use supervised learning machine algorithms to calculate the association matrix between user nodes and video nodes, and obtain the degree of association between node objects; The node object includes at least one of a user node and a video node; The edge of the node object is regarded as the relationship between the node objects, and the association degree is regarded as the weight of the edge of the node object. The clustering iterative algorithm is used to build a cluster partition model, and the cluster partition model is trained to obtain the cluster partition model of the association spectrum of the node object; Extract feature information of the node object, construct a sample point set, and use the trained clustering model of the association spectrum to perform sub-graph partitioning on the association spectrum of the node object so that the sample points of the sample point set are clustered to obtain the clusters of the association spectrum of the node object; Obtain node object information, and use the user group data in the cluster of the node object's associated spectrum to obtain the user sequence of the same cluster; Determine the video recommendation type. If it is a user-oriented recommendation type, then based on the user's viewing history data, use the video group data in the cluster of the node object's associated spectrum graph to obtain a pre-recommended video list; if it is a video-oriented recommendation type, then based on the video feature information, use the video group data in the cluster of the node object's associated spectrum graph to obtain a pre-recommended video list; The collaborative filtering algorithm is used to predict the current user's rating behavior for the videos in the pre-recommended video sequence based on the user sequence of the same cluster, and the predicted rating is obtained; The predicted scores are sorted and filtered to obtain the final video recommendation sequence.
2. According to claim 1, the video recommendation method based on hybrid collaborative filtering is characterized in that: The supervised learning machine algorithm is used to calculate the association matrix between user nodes and video nodes to obtain the association degree between node objects, including: The node object vector is established based on the synonym analysis method of feature information decomposition; According to the node object vector, the distance metric is calculated using the Euclidean distance; Based on the K-nearest neighbor algorithm, the association matrix between users and videos is calculated to obtain the association degree between node objects.
3. The video recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: The clustering iterative algorithm is used to build a cluster partitioning model, including: S1: Randomly select a sample point as the cluster center; S2: Calculate the distance from the remaining sample points to the existing cluster center; S3: According to the roulette method, assign probabilities to the remaining sample points and select the next cluster center until K cluster centers are obtained; S4: Calculate the distance from the sample point to each cluster center and assign the sample point to the nearest cluster; S5: Take a cluster and determine the number of samples. If the number of samples is less than the set minimum number threshold, dissolve the cluster and reallocate the sample points in the cluster. Otherwise, determine whether the number of samples in the next cluster is less than the set minimum number threshold until all clusters are determined. S6: Determine whether the number of clusters is less than the first set threshold; if so, take a cluster, calculate the variance of all sample data in each dimension, form the variance vector of the cluster, and go to S7; otherwise, determine whether the number of clusters is greater than the second set threshold, if so, calculate the distance between clusters, and go to S8; otherwise, recalculate the cluster center and go to S9; S7: S701: Determine whether the variance vector of the cluster is greater than the maximum variance threshold, if so, go to S701, otherwise go to S11; S701: Determine whether the number of cluster samples is greater than twice the minimum sample number threshold. If so, divide the cluster into two and calculate the cluster centers of the two sub-clusters respectively. Otherwise, go to S11. S702: Determine whether all cluster samples have been obtained. If yes, recalculate the cluster center. Otherwise, go to S9; S8: Determine whether there are cluster pairs whose distance is less than the set distance threshold. If so, merge each pair of cluster pairs whose distance is less than the set distance threshold, recalculate the cluster center, calculate the distance between clusters, and repeat S8. Otherwise, recalculate the cluster center and go to S9. S9: Determine whether the number of iterations reaches the set number, if so, output the clustering result, otherwise go to S4.
4. The video recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: Extract the characteristic information of the node object, construct a sample point set, and use the cluster partitioning model to perform sub-graph partitioning on the associated spectrum of the node object to cluster the sample points of the sample point set into clusters, including: Extract the characteristic information of the node object, parse the node object into a characteristic vector composed of the characteristic information, assign a weight to each characteristic vector, calculate the independent correlation degree based on the single-factor characteristic vector, and obtain the comprehensive correlation matrix according to the weight sequence calculation; According to the comprehensive correlation matrix, the degree of each node object based on the spectrum is calculated to form a degree vector, and then a diagonal matrix is constructed according to the degree vector to obtain the degree matrix; Based on the degree matrix and the correlation matrix, the naive Laplace matrix is calculated, and the naive Laplace matrix is normalized based on symmetry to obtain the standard Laplace matrix; Calculate the eigenvalues of the standard Laplace matrix, arrange them from small to large, take the first K eigenvalues, and calculate the corresponding eigenvectors of the first K eigenvalues to form a characteristic matrix; Use the feature matrix to construct a set of sample points; The sample points of the sample point set are clustered into clusters using a clustering model.
5. The video recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: The collaborative filtering algorithm is BI-POLAR SlOPE ONE algorithm.
6. The video recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: The user's viewing history data includes the user's viewing history videos and the user's ratings of the viewing history videos.
7. A video recommendation device based on hybrid collaborative filtering, characterized in that: It includes a first processing unit, a model building unit, a second data processing unit, an acquisition unit, a third data processing unit, a prediction unit and a sorting and screening unit; A first processing unit is used to calculate the association matrix between user nodes and video nodes using a supervised learning machine algorithm to obtain the degree of association between node objects; The node object includes at least one of a user node and a video node; A model building unit is used to use the edge of the node object as the relationship between the node objects, and the association degree as the weight of the edge of the node object, use the clustering iteration algorithm to build a cluster partition model, and train the cluster partition model to obtain the cluster partition model of the association spectrum of the node object; The second data processing unit is used to extract feature information of the node object, construct a sample point set, and use the trained clustering model of the association spectrum to perform sub-graph partitioning on the association spectrum of the node object so that the sample points of the sample point set are clustered to obtain the clusters of the association spectrum of the node object; An acquisition unit, used to acquire node object information, and obtain a user sequence of the same cluster by using user group data in the cluster of the association spectrum of the node object; The third data processing unit is used to determine the video recommendation type. If it is a user-oriented recommendation type, the pre-recommended video list is obtained based on the user's viewing history data and the video group data in the cluster of the associated spectrum of the node object; if it is a video-oriented recommendation type, the pre-recommended video list is obtained based on the video feature information and the video group data in the cluster of the associated spectrum of the node object; A prediction unit, used to predict the current user's rating behavior for the videos in the pre-recommended video sequence based on the user sequence of the same cluster by using a collaborative filtering algorithm to obtain a predicted rating; The sorting and filtering unit is used to sort and filter the predicted scores to obtain the final video recommendation sequence.
8. An electronic device, characterized in that: include: Processor and memory; The memory is used to store computer operation instructions; The processor is used to execute the video recommendation method based on hybrid collaborative filtering according to any one of claims 1 to 6 by calling the computer operation instruction.
