A service matter recommendation method and device, electronic equipment and storage medium
By constructing a public and user co-occurrence matrix, generating a sparse matrix and decomposing it, the problem of sparse user behavior data in traditional recommendation systems is solved, achieving accuracy in service recommendations and a better fit for user needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2026-04-14
AI Technical Summary
In traditional information recommendation systems, the sparse user behavior data leads to insufficient accuracy in recommended items and makes it impossible to accurately locate effective data information.
By constructing a public co-occurrence matrix and a user co-occurrence matrix, a co-occurrence sparse matrix is generated. The co-occurrence sparse matrix is decomposed to determine recommended service items, and the similarity between public behavior and user behavior is used to recommend service items.
It improves the accuracy of service recommendations and provides service push notifications that are more relevant to user needs.
Smart Images

Figure CN116108265B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital service technology, and in particular to a service recommendation method, a service recommendation device, an electronic device, and a storage medium. Background Technology
[0002] In the era of big data, the sheer volume of behavioral data underpins and, through big data analytics, has digitized and intelligentized people's daily lives. With people constantly bombarded by information overload, the accuracy of information acquisition methods becomes paramount. Highly intelligent, refined, and accurate information recommendation algorithms deliver tailored information services to different individual users, representing a significant aspect of a digital lifestyle.
[0003] In the field of government services, for example, many service methods have been released to the public, supplemented by various information technology tools, and a massive amount of business data in the field of government services has been accumulated. However, there is still a situation of over-provisioning services. Faced with a wide variety of information tools, the public still cannot accurately locate effective data information.
[0004] Traditional information recommendation systems mostly employ collaborative filtering, using the idea of "birds of a feather flock together." This involves analyzing users' online behavior and combining it with offline business data to recommend different information to similar user groups, or recommending similar information to different users based on individual user behavior analysis. The drawback of collaborative filtering is that user behavior data is often too sparse, leading to insufficient accuracy in recommendations. Summary of the Invention
[0005] In view of the above problems, embodiments of the present invention are proposed to provide a service recommendation method, a service recommendation device, an electronic device, and a storage medium that overcome or at least partially solve the above problems.
[0006] In a first aspect, embodiments of the present invention disclose a service recommendation method, comprising:
[0007] Obtain public information and user information; wherein, the public information includes public behavior and public service items, and the user information includes user behavior and user service items;
[0008] Construct a public co-occurrence matrix based on the aforementioned public behaviors and public service items;
[0009] Construct a user co-occurrence matrix based on the aforementioned user behaviors and user service items;
[0010] The user co-occurrence matrix is sparsed using the public co-occurrence matrix to generate a co-occurrence sparse matrix;
[0011] Decompose the co-occurrence sparse matrix to determine the recommended service items.
[0012] Optionally, the step of constructing a public co-occurrence matrix based on the public behaviors and public service items includes:
[0013] Based on the aforementioned public behavior, the public service items are categorized into items that have been processed, items that have not been processed, and items that may be processed.
[0014] The completed matters are identified as the first feature value, the uncompleted matters as the second feature value, and the potential matters to be completed as the third feature value, thereby constructing the public co-occurrence matrix.
[0015] Optionally, the step of constructing a user co-occurrence matrix based on the user behavior and user service items includes:
[0016] Based on the user behavior, the user service items are classified into completed items, uncompleted items, and potential completed items;
[0017] The user co-occurrence matrix is constructed by determining the completed items as the first feature value, the uncompleted items as the second feature value, and the potential completed items as the third feature value.
[0018] Optionally, the step of generating a co-occurrence sparse matrix by sparsening the user co-occurrence matrix using the public co-occurrence matrix includes:
[0019] Calculate the cosine similarity between the public co-occurrence matrix and the user co-occurrence matrix;
[0020] Based on the cosine similarity, the row order of the user co-occurrence matrix is adjusted to generate the co-occurrence sparse matrix.
[0021] Optionally, the step of decomposing the co-occurrence sparse matrix to determine the recommended service items includes:
[0022] The co-occurrence sparse matrix is decomposed into at least two matrix products;
[0023] For any of the matrix products, construct a latent vector between the user behavior and the user service item;
[0024] The recommended service item is determined based on the magnitude of the latent vector.
[0025] Optionally, the step of determining the recommended service item based on the magnitude of the latent vector includes:
[0026] The user service items are ordered according to the modulus of the latent vector to generate a service item sequence;
[0027] The first preset element of the service item sequence is determined as the recommended service item.
[0028] Optionally, the method further includes:
[0029] For any of the matrix products, calculate the loss value;
[0030] When the loss value is greater than the preset loss threshold, the step of decomposing the co-occurring sparse matrix into the product of at least two matrices is repeated until the loss value is no greater than the preset loss threshold.
[0031] In a second aspect, embodiments of the present invention disclose a service recommendation device, comprising:
[0032] The acquisition module is used to acquire public information and user information; wherein, the public information includes public behavior and public service items, and the user information includes user behavior and user service items;
[0033] The first construction module is used to construct a public co-occurrence matrix based on the public behaviors and public service items;
[0034] The second construction module is used to construct a user co-occurrence matrix based on the user behavior and user service items;
[0035] The sparse module is used to sparse the user co-occurrence matrix using the public co-occurrence matrix to generate a co-occurrence sparse matrix;
[0036] The decomposition module is used to decompose the co-occurrence sparse matrix to determine the recommended service items.
[0037] In a third aspect, an embodiment of the present invention discloses an electronic device including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the service recommendation method as described above.
[0038] In a fourth aspect, embodiments of the present invention disclose a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the service recommendation method described above.
[0039] The embodiments of the present invention have the following advantages:
[0040] This invention employs the following methods: acquiring public information and user information; wherein the public information includes public behavior and public service items, and the user information includes user behavior and user service items; constructing a public co-occurrence matrix based on the public behavior and public service items; constructing a user co-occurrence matrix based on the user behavior and user service items; sparsening the user co-occurrence matrix using the public co-occurrence matrix to generate a co-occurrence sparse matrix; and decomposing the co-occurrence sparse matrix to determine recommended service items. By sparsening the user co-occurrence matrix using the public co-occurrence matrix, the characteristics of users and service items in the user co-occurrence matrix are made similar to those of users and service items in the public co-occurrence matrix, allowing for preliminary screening of service items; decomposing the co-occurrence sparse matrix to determine recommended service items, recommending service items that are more closely related to user usage; and ensuring the accuracy of service item push notifications. Attached Figure Description
[0041] Figure 1 This is a flowchart illustrating the steps of an embodiment of a service recommendation method according to the present invention;
[0042] Figure 2 This is a flowchart illustrating the steps of another embodiment of the service recommendation method of the present invention;
[0043] Figure 3 This is a schematic diagram illustrating the construction of a public co-occurrence matrix according to the present invention;
[0044] Figure 4 This is a schematic diagram of a public co-occurrence matrix according to the present invention;
[0045] Figure 5 This is a schematic diagram illustrating the construction of a user co-occurrence matrix according to the present invention;
[0046] Figure 6 This is a schematic diagram of the decomposition of a co-occurrence sparse matrix according to the present invention;
[0047] Figure 7 This is a schematic diagram illustrating a service recommendation according to the present invention;
[0048] Figure 8 This is a structural block diagram of an embodiment of a service recommendation device according to the present invention. Detailed Implementation
[0049] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0050] Reference Figure 1 The diagram illustrates a flowchart of an embodiment of a service recommendation method according to the present invention. The service recommendation method may specifically include the following steps:
[0051] Step 101: Obtain public information and user information; wherein, the public information includes public behavior and public service items, and the user information includes user behavior and user service items;
[0052] In this embodiment of the invention, the recommended service items can be public service items such as culture, education, and transportation, or government service items; the specific content of the service items is not specifically limited.
[0053] Public and user information can be obtained from the databases of the entities or organizations providing the services. Public information includes public behavior and public services; user information includes user behavior and user services.
[0054] It should be noted that public information and user information are legal data obtained with the permission of the individual user and the data provider.
[0055] Step 102: Construct a public co-occurrence matrix based on the aforementioned public behaviors and public service items;
[0056] Based on public behavior, we determine the types and identifiers of the public; and construct a public co-occurrence matrix based on the public services that the public is providing or not providing.
[0057] Step 103: Construct a user co-occurrence matrix based on the user behavior and user service items;
[0058] Then, based on user behavior, determine the user type and identifier; and construct a user co-occurrence matrix based on the user service items that the user is performing or has not performed.
[0059] Step 104: Use the public co-occurrence matrix to sparse the user co-occurrence matrix to generate a co-occurrence sparse matrix;
[0060] By employing a public co-occurrence matrix and a sparse user co-occurrence matrix, the data in the user co-occurrence matrix is filtered to generate a sparse co-occurrence matrix. This ensures that the data in the sparse co-occurrence matrix closely matches user needs, reducing the amount of data processed and effectively improving processing efficiency and accuracy.
[0061] Step 105: Decompose the co-occurrence sparse matrix to determine the recommended service items.
[0062] In this embodiment of the invention, after obtaining the co-occurrence sparse matrix, the co-occurrence sparse matrix can be decomposed to obtain the sequence of service items required by the user, and recommended service items can be determined from the sequence of service items and recommended to the user, so that the user can obtain accurate recommended service items.
[0063] This invention employs the following methods: acquiring public information and user information; wherein the public information includes public behavior and public service items, and the user information includes user behavior and user service items; constructing a public co-occurrence matrix based on the public behavior and public service items; constructing a user co-occurrence matrix based on the user behavior and user service items; sparsening the user co-occurrence matrix using the public co-occurrence matrix to generate a co-occurrence sparse matrix; and decomposing the co-occurrence sparse matrix to determine recommended service items. By sparsening the user co-occurrence matrix using the public co-occurrence matrix, the characteristics of users and service items in the user co-occurrence matrix are made similar to those of users and service items in the public co-occurrence matrix, allowing for preliminary screening of service items; decomposing the co-occurrence sparse matrix to determine recommended service items, recommending service items that are more closely related to user usage; and ensuring the accuracy of service item push notifications.
[0064] Reference Figure 2 The diagram illustrates a flowchart of another embodiment of the service recommendation method of the present invention, which specifically includes the following steps:
[0065] Step 201: Obtain public information and user information; wherein, the public information includes public behavior and public service items, and the user information includes user behavior and user service items;
[0066] In this embodiment of the invention, the service item can be a government service item. Public information and user information can be obtained from the database corresponding to the server of the page where the service item is processed, based on online behavioral data such as search and access behavior of the public and the user on the service webpage, combined with offline data of business processing. Public information includes public behavior and public service items, that is, it includes the user behavior and all service items of all users who use the service page to process service items. User information includes user behavior and user service items; that is, it includes the user's user behavior and the service items corresponding to that user.
[0067] Step 202: Construct a public co-occurrence matrix based on the aforementioned public behaviors and public service items;
[0068] In this embodiment of the invention, collaborative filtering can be used to construct a public co-occurrence matrix of public behaviors and public service items. Collaborative filtering can refer to... Figure 3 A public co-occurrence matrix is constructed by associating user behaviors and service items among public users.
[0069] In an optional embodiment of the present invention, the step of constructing a public co-occurrence matrix based on the public behaviors and public service items may specifically include the following sub-steps:
[0070] Sub-step S2021: Based on the public behavior, classify the public service items into completed items, non-completed items, and potential completed items;
[0071] First, based on public behavior, such as user identity and historical processing behavior, each public service item can be categorized to determine its type, including completed items, non-completed items, and potential items. Completed items are those that have already been processed; non-completed items are those that do not require processing; and potential items are those whose necessity needs to be determined.
[0072] Sub-step S2022: Determine the completed matters as the first feature value, determine the uncompleted matters as the second feature value, determine the potential matters to be completed as the third feature value, and construct the public co-occurrence matrix.
[0073] Processed matters are written into the public co-occurrence matrix with a first feature value, unprocessed matters are written into the public co-occurrence matrix with a second feature value, and potentially processed matters are written into the public co-occurrence matrix with a third feature value, thereby constructing the public co-occurrence matrix. The specific values of the first, second, and third feature values can be determined according to actual needs, and this embodiment of the invention does not impose any limitations.
[0074] For example, we can better understand the construction process of the public co-occurrence matrix, such as Figure 4 The following example illustrates this:
[0075] A public co-occurrence matrix is constructed based on public user behavior and government service items. The first characteristic value corresponding to the "√" symbol represents government service items that have been applied for and completed (i.e., processed service items); the second characteristic value corresponding to the "×" symbol represents government service items that do not require application (i.e., unprocessed service items); and the third characteristic value corresponding to the "○" symbol represents uncertain information, i.e., predicting whether government service items need to be recommended (i.e., potential processing items); thus constructing the public co-occurrence matrix.
[0076] Step 203: Construct a user co-occurrence matrix based on the user behavior and user service items;
[0077] Similarly, collaborative filtering can be used to construct a user co-occurrence matrix of user behaviors and user service items.
[0078] In one embodiment of the present invention, the step of constructing a user co-occurrence matrix based on the user behavior and user service items may specifically include the following sub-steps:
[0079] Sub-step S2031: Based on the user behavior, classify the user service items into completed items, uncompleted items, and potential completed items;
[0080] Based on user behavior, such as the user's identity and their actions, each service item can be categorized to determine its type, including completed items, uncompleted items, and potential items. Completed items are those the user has already processed; uncompleted items are those the user does not need to process; and potential items are those whose necessity needs to be determined.
[0081] Sub-step S2032: Determine the completed items as the first feature value, determine the uncompleted items as the second feature value, determine the potential completed items as the third feature value, and construct the user co-occurrence matrix.
[0082] The same first, second, and third eigenvalues as the user co-occurrence matrix can be used. The user's completed transactions are written into the user co-occurrence matrix using the first eigenvalue; the user's uncompleted transactions are written into the user co-occurrence matrix using the second eigenvalue; and potential completed transactions are written into the user co-occurrence matrix using the third eigenvalue, thus constructing the user co-occurrence matrix.
[0083] For example, we can better understand the process of constructing the user co-occurrence matrix, such as Figure 5 The following example illustrates this:
[0084] Based on user behavior, a co-occurrence matrix generated by collaborative filtering is constructed for user service items. "1" represents a service item that has been completed (i.e., a completed item); "-1" represents a service item that does not require processing (i.e., a non-processed item); and "0" represents a government service item that is predicted to require recommendation (i.e., a potential processing item).
[0085] Step 204: Use the public co-occurrence matrix to sparse the user co-occurrence matrix to generate a co-occurrence sparse matrix;
[0086] By using the similarity of elements in the public co-occurrence matrix and the user co-occurrence matrix, the user co-occurrence matrix is sparsified to generate a co-occurrence sparse matrix. Collaborative filtering finds tasks a user might need to perform in a straightforward way—by leveraging user browsing history to find similar users who have viewed the same tasks, and then finding other tasks searched by these similar users and recommending them to the target user. However, by utilizing the sparsity of the user co-occurrence matrix, hidden recommended service items can be discovered, making the recommendations more accurate.
[0087] In an optional embodiment of the present invention, the step of generating a co-occurrence sparse matrix by using the public co-occurrence matrix to sparse the user co-occurrence matrix specifically includes the following sub-steps:
[0088] Sub-step S2041: Calculate the cosine similarity between the public co-occurrence matrix and the user co-occurrence matrix;
[0089] In practical applications, the cosine similarity between the public co-occurrence matrix and the user co-occurrence matrix can be used to calculate user similarity. The smaller the angle between the cosine similarity values, the more similar the users are. The cosine similarity can be calculated using the cosine similarity function; the formula for the cosine similarity function is:
[0090]
[0091] Among them, A i、 B i These represent the components of vectors A and B, respectively. The given similarity range is from -1 to 1. -1 means that the two vectors point in exactly opposite directions, and 1 means that they point in exactly the same direction. When the value approaches 1, it indicates that the users are more similar.
[0092] Sub-step S2042: Based on the cosine similarity, adjust the row order of the user co-occurrence matrix to generate the co-occurrence sparse matrix.
[0093] Since each user only performs specific service actions, cosine similarity is used to determine the service actions performed by similar users. The row order of the user co-occurrence matrix can be adjusted based on cosine similarity to group user behaviors with high similarity together as much as possible, generating a sparse co-occurrence matrix to improve the accuracy of subsequent matrix decomposition.
[0094] Step 205: Decompose the co-occurrence sparse matrix into at least two matrix products;
[0095] In this embodiment of the invention, the co-occurrence sparse matrix factorization algorithm aims to generate a latent vector for each similar user, locate public users and service items in the representation space of the latent vector, and indicate that users and government service items that are close in distance have similar characteristics. In the recommendation process, a recommendation list is generated according to the order of vector distance from closest to farthest, and items that are close in distance are recommended to users.
[0096] The co-occurrence sparse matrix can be decomposed into at least two matrix products; the user task processing matrix obtained from the decomposed matrix products should fit the original matrix better, minimizing the difference between them. Specifically, it can be assumed that the decomposition is P mk× Q kn Its expression is as follows:
[0097] A≈P mk× Q kn =R
[0098] like Figure 6As shown, this decomposes an m x n co-occurrence matrix into the form of multiplying an mk user matrix and a kn event processing matrix.
[0099] It should be noted that the number of decompositions is not limited to two; it can be the product of two or more matrices.
[0100] Step 206: For any of the matrix products, construct the implicit vector between the user behavior and the user service item;
[0101] For any matrix product, i.e., decomposing the lower-order matrices after decomposition, a latent vector is constructed between user behaviors and user service items. This locates users and service items in the representation space of the latent vector, such as... Figure 7 As shown, all users and their corresponding service items are mapped onto latent vectors, and users and items that are close to each other indicate that their processing expectations are similar.
[0102] Step 207: Determine the recommended service item based on the magnitude of the latent vector;
[0103] Based on the magnitude of the latent vector, that is, based on the distance between the user and the corresponding service item, the recommended service item is determined from the user service items.
[0104] In an optional embodiment of the present invention, the step of determining the recommended service item based on the modulus of the latent vector may specifically include the following sub-steps:
[0105] Sub-step S2071: Sort the user service items sequentially according to the modulus of the latent vector to generate a service item sequence;
[0106] When determining recommended service items, the service items can be sorted in reverse order according to the magnitude of the latent vectors, from largest to smallest, to generate a service item sequence. That is, in this service item sequence, the service item with the smallest latent vector magnitude corresponds to the first service item, meaning that this service item is closest to the user's needs; the latent vector magnitudes of subsequent service items gradually increase.
[0107] Sub-step S2072: Determine the first preset element of the service item sequence as the recommended service item.
[0108] Then, based on the required number of recommended service items, a preset position is determined, and the first preset element of the resulting service item sequence is identified as the recommended service item. For example, if three service items need to be recommended, the first three elements of the service item sequence are selected as recommended service items for the user.
[0109] Step 208: Calculate the loss value for any of the matrix products described above;
[0110] In matrix factorization, to improve accuracy, the direction of gradient descent can be verified, and a loss value can be calculated for matrix multiplication. The loss value can be calculated using the loss function f(x) on the gradient. The loss function is:
[0111]
[0112] Where, r ui It represents the processing status of user u for matter i in the co-occurrence matrix, q i It is an event vector, p u Let dT represent the time period. The loss function aims to minimize the squared difference between the product of the item vector and the user vector and the original processing status. This ensures that the product of the user matrix and the item processing matrix is as close as possible to the original co-occurrence matrix.
[0113] Step 209: When the loss value is greater than the preset loss threshold, repeat the step of decomposing the co-occurring sparse matrix into the product of at least two matrices until the loss value is not greater than the preset loss threshold.
[0114] When the loss value exceeds a preset loss threshold, indicating an error in the gradient descent direction, the weights during the descent process can be readjusted. Then, the step of decomposing the co-occurring sparse matrix into the product of at least two matrices is repeated, and the adjusted loss value is calculated again. If this adjusted loss value is not greater than the preset loss threshold, the gradient descent direction is determined to be correct. The product of the decomposed at least two matrices is then further processed. The preset loss threshold can be selected according to actual needs, and this embodiment of the invention does not limit its selection.
[0115] By using a sparse user co-occurrence matrix within a public co-occurrence matrix, the characteristics of users and service items in the user co-occurrence matrix are made similar to those in the public co-occurrence matrix, allowing for initial screening of service items. The co-occurrence sparse matrix is then decomposed to determine recommended service items, providing those that are more relevant to user needs. This ensures the accuracy of service item recommendations. Finally, the correctness of the decomposed co-occurrence sparse matrix is determined by calculating the loss value, further improving the accuracy of service item recommendations.
[0116] To enable those skilled in the art to better understand the embodiments of the present invention, an example is provided below to illustrate the embodiments of the present invention:
[0117] 1. By combining online behavioral data of the public and users searching and accessing the service network with offline data of business processing, construct a public co-occurrence matrix of the relationship between public behavior and public service items, and a user co-occurrence matrix of the relationship between user behavior and service items.
[0118] 2. In the co-occurrence matrix, items that have been processed are represented by "1", "-1" represents items that do not need to be processed, and "0" represents items that are predicted to need to be pushed. Since users' access to service items is deterministic and periodic, the co-occurrence matrix constructed at this time is a sparse matrix, that is, the number of elements with "0" is greater than the number of elements with "-1" and "1".
[0119] 3. Adjust the row order of the user co-occurrence matrix using the cosine similarity between the public co-occurrence matrix and the user co-occurrence matrix to generate a co-occurrence sparse matrix.
[0120] 4. At this point, the co-occurrence sparse matrix is a co-occurrence sparse matrix with user behavior similarity. The co-occurrence sparse matrix can be decomposed into the product of two or more matrices, i.e., a low-order matrix.
[0121] 5. Construct latent vectors for users and items using the decomposed low-order matrices (users, items). Position users and items in the latent vector representation space. Users and items that are close to each other indicate similar processing expectations. During the recommendation process, recommend nearby items to the target user. For example... Figure 7 As shown, if we want to recommend items to user 3, we can find the two item vectors that are closest to user 3's vector, namely item 1 and item n, and then generate the user's recommendation list in order of vector distance from closest to furthest.
[0122] A co-occurrence matrix is constructed based on user behavior and service items. The order of the co-occurrence matrix is adjusted using a cosine similarity function to make users with similar behaviors as close as possible, thereby improving the accuracy of matrix decomposition. Due to the periodicity and determinism of users' handling of government services, the constructed co-occurrence matrix is a sparse matrix. Latent vectors between users and items are calculated using the cosine similarity function. Users and service items with close latent vector distances are the recommended service items.
[0123] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0124] Reference Figure 8 The diagram illustrates a structural block diagram of an embodiment of a service recommendation device according to the present invention. The service recommendation device may specifically include the following modules:
[0125] The acquisition module 801 is used to acquire public information and user information; wherein, the public information includes public behavior and public service items, and the user information includes user behavior and user service items;
[0126] The first construction module 802 is used to construct a public co-occurrence matrix based on the public behaviors and public service items;
[0127] The second construction module 803 is used to construct a user co-occurrence matrix based on the user behavior and user service items;
[0128] Sparse module 804 is used to sparse the user co-occurrence matrix using the public co-occurrence matrix to generate a co-occurrence sparse matrix;
[0129] The decomposition module 805 is used to decompose the co-occurrence sparse matrix to determine the recommended service items.
[0130] In an optional embodiment of the present invention, the first construction module 802 includes:
[0131] The first classification submodule is used to classify the public service items into completed items, non-completed items, and potential completed items based on the public behavior.
[0132] The first construction submodule is used to determine the processed items as the first feature value, the unprocessed items as the second feature value, and the potential processed items as the third feature value, and construct the public co-occurrence matrix.
[0133] In an optional embodiment of the present invention, the second building module 803 includes:
[0134] The second classification submodule is used to classify the user service items into completed items, uncompleted items, and potential completed items based on the user behavior.
[0135] The second construction submodule is used to determine the completed items as the first feature value, the uncompleted items as the second feature value, and the potential completed items as the third feature value, and construct the user co-occurrence matrix.
[0136] In an optional embodiment of the present invention, the sparse module 804 includes:
[0137] The calculation submodule is used to calculate the cosine similarity between the public co-occurrence matrix and the user co-occurrence matrix;
[0138] The adjustment submodule is used to adjust the row order of the user co-occurrence matrix based on the cosine similarity to generate the co-occurrence sparse matrix.
[0139] In an optional embodiment of the present invention, the decomposition module 805 includes:
[0140] A decomposition submodule is used to decompose the co-occurring sparse matrix into at least two matrix products;
[0141] The latent vector determination submodule is used to construct a latent vector between the user behavior and the user service item for any of the matrix products.
[0142] The recommendation submodule is used to determine the recommended service items based on the magnitude of the latent vector.
[0143] In an optional embodiment of the present invention, the latent vector determination submodule includes:
[0144] A sorting unit is used to sort the user service items sequentially according to the modulus of the latent vector to generate a service item sequence;
[0145] The recommendation unit is used to determine the first preset element of the service item sequence as the recommended service item.
[0146] In an optional embodiment of the present invention, the apparatus further includes:
[0147] The loss module is used to calculate the loss value for any of the matrix products described above;
[0148] The parameter tuning module is used to repeatedly execute the step of decomposing the co-occurring sparse matrix into the product of at least two matrices when the loss value is greater than a preset loss threshold, until the loss value is not greater than the preset loss threshold.
[0149] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0150] This invention also provides an electronic device, comprising:
[0151] The device includes a processor and a storage medium, the storage medium storing a computer program executable by the processor. When the electronic device is running, the processor executes the computer program to perform the method described in any of the embodiments of the present invention. The specific implementation and technical effects are similar to those in the method embodiments, and will not be repeated here.
[0152] The storage medium may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the storage medium may also be at least one storage device located remotely from the aforementioned processor.
[0153] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0154] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method described in any one of the embodiments of this invention. The specific implementation and technical effects are similar to those in the method embodiments, and will not be repeated here.
[0155] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0156] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0157] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0158] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0159] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0160] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0161] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0162] The above provides a detailed description of a service recommendation method, apparatus, electronic device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A service recommendation method, characterized in that, include: Obtain public information and user information; wherein, the public information includes public behavior and public service items, and the user information includes user behavior and user service items; Construct a public co-occurrence matrix based on the aforementioned public behaviors and public service items; Construct a user co-occurrence matrix based on the aforementioned user behaviors and user service items; The user co-occurrence matrix is sparsed using the public co-occurrence matrix to generate a co-occurrence sparse matrix; Decompose the co-occurrence sparse matrix to determine the recommended service items; The step of generating a co-occurrence sparse matrix by using the public co-occurrence matrix to sparse the user co-occurrence matrix includes: Calculate the cosine similarity between the public co-occurrence matrix and the user co-occurrence matrix; Based on the cosine similarity, the row order of the user co-occurrence matrix is adjusted to generate the co-occurrence sparse matrix.
2. The method according to claim 1, characterized in that, The steps for constructing a public co-occurrence matrix based on the public behaviors and public service items include: Based on the aforementioned public behavior, the public service items are categorized into items that have been processed, items that have not been processed, and items that may be processed. The completed matters are identified as the first feature value, the uncompleted matters as the second feature value, and the potential matters to be completed as the third feature value, thereby constructing the public co-occurrence matrix.
3. The method according to claim 2, characterized in that, The step of constructing a user co-occurrence matrix based on user behavior and user service items includes: Based on the user behavior, the user service items are classified into completed items, uncompleted items, and potential completed items; The user co-occurrence matrix is constructed by determining the completed items as the first feature value, the uncompleted items as the second feature value, and the potential completed items as the third feature value.
4. The method according to claim 1, characterized in that, The step of decomposing the co-occurrence sparse matrix to determine the recommended service items includes: The co-occurrence sparse matrix is decomposed into at least two matrix products; For any of the matrix products, construct a latent vector between the user behavior and the user service item; The recommended service item is determined based on the magnitude of the latent vector.
5. The method according to claim 4, characterized in that, The step of determining the recommended service item based on the modulus of the latent vector includes: The user service items are ordered according to the modulus of the latent vector to generate a service item sequence; The first preset element of the service item sequence is determined as the recommended service item.
6. The method according to claim 4, characterized in that, The method further includes: For any of the matrix products, calculate the loss value; When the loss value is greater than the preset loss threshold, the step of decomposing the co-occurring sparse matrix into the product of at least two matrices is repeated until the loss value is no greater than the preset loss threshold.
7. A service recommendation device, characterized in that, include: The acquisition module is used to acquire public information and user information; wherein, the public information includes public behavior and public service items, and the user information includes user behavior and user service items; The first construction module is used to construct a public co-occurrence matrix based on the public behaviors and public service items; The second construction module is used to construct a user co-occurrence matrix based on the user behavior and user service items; The sparse module is used to sparse the user co-occurrence matrix using the public co-occurrence matrix to generate a co-occurrence sparse matrix; The decomposition module is used to decompose the co-occurrence sparse matrix to determine the recommended service items. The sparse module includes: The calculation submodule is used to calculate the cosine similarity between the public co-occurrence matrix and the user co-occurrence matrix; The adjustment submodule is used to adjust the row order of the user co-occurrence matrix based on the cosine similarity to generate the co-occurrence sparse matrix.
8. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the service recommendation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the service recommendation method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Service recommendation method and system, and server
CN108563660A
Object recommendation method and device, electronic equipment and storage medium
CN114417153A