Graph structure-based dialogue recommendation method, device and equipment and storage medium

By employing a graph-based dialogue recommendation method that combines semantic recognition and user profiling, the problem of balancing short-term and long-term user preferences in online medical consultations is solved, resulting in more accurate product recommendations that meet users' health needs.

CN116467516BActive Publication Date: 2026-06-19PING AN TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2023-04-17
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies struggle to balance users' short-term and long-term preferences when recommending medical products, resulting in inaccurate recommendations, especially in rigorous fields such as online consultations. A single product recommendation method cannot meet users' health and well-being needs.

Method used

By employing a graph-based dialogue recommendation method, combining semantic recognition models to identify user intent and user profiles, and utilizing relevance recall and clustering algorithms, a set of recommended content is constructed. The recommended content is then sorted and filtered using a distance recognition model, enabling parallel recommendation of short- and long-term preferences.

🎯Benefits of technology

This improves the accuracy of product recommendations, enabling better fulfillment of users' short- and long-term preferences in smart healthcare areas such as online consultations, while ensuring the safety and effectiveness of the recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116467516B_ABST
    Figure CN116467516B_ABST
Patent Text Reader

Abstract

This invention relates to the fields of artificial intelligence technology and digital healthcare, disclosing a graph-based dialogue recommendation method, apparatus, device, and storage medium. The method includes: recognizing user-input dialogue text to obtain user intent; querying a recommendation content database based on the user intent to obtain a first set of recommended content; identifying a second set of recommended content corresponding to a pre-constructed user profile from the recommendation content database using a preset relevance recall algorithm; merging the first and second sets of recommended content to obtain a candidate set of recommended content; and using a pre-trained recommendation content distance recognition model to identify the graph distance values ​​between the user profile and each candidate recommended content in the candidate set, performing sorting and filtering operations to obtain the final set of recommended content. This invention can improve the accuracy of product recommendations in smart healthcare fields such as online consultations by using parallel recommendations based on user intent and user profiles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a graph-based dialogue recommendation method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] With the development of information technology, big data has been applied to all walks of life. In the field of product sales, user profiling and recommendation has become an indispensable tool. Enterprises can use user profiles to recommend products to users in a targeted manner. For example, by building profiles based on users' personal health records, medical and dietary recommendation plans for patients can be changed over time.

[0003] Currently, product recommendations are mainly divided into two categories: one uses machine learning models to identify user intent for recommendations, and the other uses clustering algorithms to obtain user profiles for recommendations. While recommendations based on user profiles satisfy long-term user preferences, short-term preferences are ignored. Recommendations based on user dialogue intent, while meeting basic user needs, cannot best align with the user's individual characteristics and behavioral habits. In more rigorous fields such as medical products, recommended products must be responsible for the user's health and well-being, and a single product recommendation method is insufficiently accurate. For example, when a user simply requests recommendations on diets for diabetic patients, the profile indicates the user has type 2 diabetes, and the dietary recommendations should be more stringent or different. Summary of the Invention

[0004] This invention provides a graph-based dialogue recommendation method, apparatus, device, and storage medium. Its main purpose is to achieve accurate product recommendations in the field of smart healthcare, such as online consultations, by combining user intent and user profiles in parallel, taking into account both short-term and long-term user preferences.

[0005] To achieve the above objectives, the present invention provides a graph-based dialogue recommendation method, comprising:

[0006] Using a pre-built semantic recognition model, the user's input dialogue text is identified to obtain the user's intent, and the pre-built recommendation content database is queried based on the user's intent to obtain a first set of recommendation content;

[0007] Obtain the user profile of the user, and identify the second set of recommended content corresponding to the user profile from the recommended content database according to the preset relevance recall algorithm;

[0008] According to a preset clustering algorithm, the first set of recommended content and the second set of recommended content are merged to obtain a set of candidate recommended content.

[0009] Obtain a recommendation content distance recognition model trained from a pre-built set of recommendation flowcharts, and use the recommendation content distance recognition model to identify the graph structure distance value between the user profile and each candidate recommendation content in the candidate recommendation content set;

[0010] The graph distance values ​​of each candidate recommended content are sorted and filtered to obtain a set of recommended content.

[0011] Optionally, obtaining the recommendation content distance recognition model trained from the pre-built recommendation flowchart set includes:

[0012] Based on the pre-built set of offline profile recommendation results and the preset flowchart construction strategy, construct a set of recommendation flowcharts;

[0013] Based on the set of recommendation flowcharts, a user-content distance matrix is ​​constructed, and a pre-constructed factorization machine is used to perform matrix decomposition on the user-content distance matrix to obtain a set of latent features.

[0014] The potential feature set is quantized and encoded using a pre-constructed one-hot coding algorithm to obtain a quantization result. The quantization result is then linearly transformed to obtain a feature vector of a preset target dimension.

[0015] Based on the preset regression analysis method, the pre-constructed recommendation content distance recognition model is trained using the feature vector to obtain the trained recommendation content distance recognition model.

[0016] Optionally, the step of using a pre-built semantic recognition model to recognize the user-input dialogue text and obtain the user intent includes:

[0017] The semantic recognition model is used to perform word segmentation on the dialogue text to obtain a word segmentation result set. The word segmentation result set and the order position information of each word segmentation result in the word segmentation result set are quantified to obtain a word vector set.

[0018] By utilizing the attention network of the semantic recognition model, attention weights are configured for each word vector in the word vector set to obtain an attention-enhanced word vector set.

[0019] Feature extraction is performed on the attention-enhanced word vector set to obtain a text feature set, and fully connected recognition is performed on the text feature set to obtain the user intent.

[0020] Optionally, obtaining the user profile of the user includes:

[0021] By using a pre-defined data interface, basic user information and user behavior data are obtained to obtain a user dataset;

[0022] The user data is cleaned for anomalies and duplicates to obtain a valid data set, and the valid data set is then clustered and classified to obtain a user tag set.

[0023] A user profile is constructed using a pre-built user profiling tool based on the user tag set.

[0024] Optionally, identifying the second set of recommended content corresponding to the user profile from the recommended content database according to a preset relevance recall algorithm includes:

[0025] Obtain the quantitative features corresponding to the pre-constructed target content to be recommended, and calculate the correlation between each tag type and each quantitative feature in the user profile according to the relevance recall algorithm to obtain the relevance score of each tag type to the target content to be recommended.

[0026] According to the preset weight configuration rules, the relevance scores of each tag type to the target content to be recommended are weighted and summed to obtain the recommendation score of the user profile to the target content to be recommended.

[0027] Calculate the recommendation score of each piece of content to be recommended in the recommended content database, sort the pieces of content to be recommended according to the recommendation scores, and extract a preset number of pieces of content to be recommended with the highest recommendation scores to obtain a second set of recommended content.

[0028] Optionally, the step of merging the first recommended content set and the second recommended content set according to a preset clustering algorithm to obtain a candidate recommended content set includes:

[0029] According to the preset clustering algorithm, the first set of recommended content and the second set of recommended content are merged and deduplicated to obtain a unique set of recommended content;

[0030] Identify the feature vector corresponding to each unique recommended content in the unique recommended content set, perform a spatial mapping operation on each feature vector based on a preset dimension, cluster the spatial mapping results, remove the relatively independent unique recommended content in the spatial mapping results, and obtain a candidate recommended content set.

[0031] Optionally, after sorting and filtering the graph structure distance values ​​of each candidate recommended content to obtain a set of recommended content, the method further includes:

[0032] By using pre-set tracking points, user click and viewing behavior can be obtained;

[0033] Based on a preset frequency, the user profile and the recommendation flowchart set are updated using the user's click-and-watch behavior.

[0034] To address the above problems, the present invention also provides a graph-based dialogue recommendation device, the device comprising:

[0035] The short-term intent recommendation module is used to identify the dialogue text input by the user using a pre-built semantic recognition model, obtain the user intent, and query the pre-built recommendation content database according to the user intent to obtain a first set of recommendation content.

[0036] The long-term profile recommendation module is used to obtain the user profile of the user and identify the second set of recommended content corresponding to the user profile from the recommended content database according to the preset relevance recall algorithm.

[0037] The recommended content clustering module is used to merge the first recommended content set and the second recommended content set according to a preset clustering algorithm to obtain a candidate recommended content set.

[0038] The content distance calculation module is used to obtain the recommended content distance recognition model trained by the pre-built recommendation flowchart set, and use the recommended content distance recognition model to identify the graph structure distance value between the user profile and each candidate recommended content in the candidate recommended content set, and to sort and filter the graph structure distance values ​​of each candidate recommended content to obtain the recommended content set.

[0039] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0040] At least one processor; and,

[0041] A memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the graph-based dialogue recommendation method described above.

[0043] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the graph-based dialogue recommendation method described above.

[0044] This invention utilizes a semantic recognition model to identify user-input dialogue text, thereby obtaining user intent and a first set of recommended content. This reveals the user's short-term preferences, such as a spontaneous inquiry about diabetes-related diets. Then, using traditional recommendation methods based on user profiling and relevance recall, a second set of recommended content is retrieved to reveal the user's long-term preferences, such as weight loss and hypertension-related health information. This invention then merges the first and second sets of recommended content through clustering to obtain candidate recommended content, further narrowing the recommendation scope and increasing accuracy. Finally, a recommendation content distance recognition model intelligently identifies the proximity scores of each recommended content, ranking them to obtain the final set of recommended content. The recommendation content distance recognition template is a model that constructs a metagraph between candidate recommended content and user profiling, and then identifies the structural distance of the metagraph. Therefore, this invention provides a graph-based dialogue recommendation method, apparatus, device, and storage medium that enables parallel recommendations based on user intent and user profiling in smart healthcare fields such as online consultations, taking into account both short-term and long-term user preferences to achieve accurate product recommendations. Attached Figure Description

[0045] Figure 1 This is a flowchart illustrating a graph-based dialogue recommendation method according to an embodiment of the present invention.

[0046] Figure 2 This is a detailed flowchart illustrating one step of a graph-based dialogue recommendation method according to an embodiment of the present invention.

[0047] Figure 3 This is a detailed flowchart illustrating one step of a graph-based dialogue recommendation method according to an embodiment of the present invention.

[0048] Figure 4 This is a detailed flowchart illustrating one step of a graph-based dialogue recommendation method according to an embodiment of the present invention.

[0049] Figure 5 This is a functional block diagram of a graph-based dialogue recommendation device provided in an embodiment of the present invention;

[0050] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the graph-based dialogue recommendation method according to an embodiment of the present invention.

[0051] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0052] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0053] This application provides a graph-based dialogue recommendation method. In this application, the execution entity of the graph-based dialogue recommendation method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the graph-based dialogue recommendation method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0054] Reference Figure 1 The diagram shown is a flowchart of a graph-based dialogue recommendation method according to an embodiment of the present invention. In this embodiment, the graph-based dialogue recommendation method includes steps S1 to S5:

[0055] S1. Using a pre-built semantic recognition model, identify the dialogue text input by the user to obtain the user intent, and query the pre-built recommendation content database according to the user intent to obtain the first set of recommendation content.

[0056] In this embodiment of the invention, the semantic recognition model is a network model based on the BERT neural network, used to identify the intent of the text.

[0057] Furthermore, the recommended content database is a data resource database compiled and developed by the enterprise, containing content information from various fields such as medical knowledge, medical products, and financial services.

[0058] For details, please refer to the following: Figure 2 As shown in this embodiment of the invention, the step of using a pre-built semantic recognition model to recognize the user's input dialogue text and obtain the user's intent includes steps S11 to S13:

[0059] S11. The semantic recognition model is used to perform word segmentation on the dialogue text to obtain a word segmentation result set, and the word segmentation result set and the order position information of each word segmentation result in the word segmentation result set are quantified to obtain a word vector set.

[0060] S12. Using the attention network of the semantic recognition model, attention weights are configured for each word vector in the word vector set to obtain an attention-enhanced word vector set.

[0061] S13. Perform feature extraction on the attention-enhanced word vector set to obtain a text feature set, and perform fully connected recognition on the text feature set to obtain the user intent.

[0062] In this embodiment of the invention, the word segmentation method commonly used in the semantic recognition model cannot guarantee the order of each word in the sentence. Therefore, it is necessary to quantify the order position information of each word to obtain a set of word vectors containing order information. Then, through the attention weight configuration mechanism in the attention network, the context features in the set of word vectors are extracted to obtain an attention-enhanced word vector set.

[0063] Then, the feature extraction process is achieved by performing convolution, pooling, and flattening on the attention-enhanced word vector set to obtain the text feature set. Finally, the text feature set is identified and classified through a fully connected layer, and the option with the highest recognition score is output to obtain the user intent.

[0064] In this embodiment of the invention, a database function tool is used to perform a search based on the user's intent to obtain a first set of recommended content.

[0065] Specifically, in this embodiment of the invention, by obtaining the user-input dialogue text "[What foods are best for diabetic patients to eat?]", the user intent "[diabetes, food]" can be obtained through the semantic recognition model. Spend, Approaching The database of recommended content, constructed from numerous data sources such as music and other anchor markets, is used for keyword queries to obtain the first set of recommended content. [Try to choose foods that have a relatively small impact on blood sugar, but grains, tubers, vegetables, fruits, meat, fish, poultry, eggs, milk, beans, and oils are all essential.]

[0066] S2. Obtain the user profile of the user, and identify the second set of recommended content corresponding to the user profile from the recommended content database according to the preset relevance recall algorithm.

[0067] In this embodiment of the invention, the user profile is a labeled user model abstracted from information such as the user's social attributes, lifestyle habits, and consumption behavior. It can be understood as a set of tags containing various information about the user.

[0068] In detail, in this embodiment of the invention, obtaining the user profile of the user includes:

[0069] By using a pre-defined data interface, basic user information and user behavior data are obtained to obtain a user dataset;

[0070] The user data is cleaned for anomalies and duplicates to obtain a valid data set, and the valid data set is then clustered and classified to obtain a user tag set.

[0071] A user profile is constructed using a pre-built user profiling tool based on the user tag set.

[0072] This invention embodiment uses the above method to collect basic user information, such as gender, age, graduation status, marital status, and user behavior information, such as clicks. Watch minutes, watch frequency, The data is categorized into content types, and then divided using common clustering methods such as k-means, BIRCH, or DBSCAN to obtain a user dataset. Common open-source user profiling tools, such as ER diagrams and Freedgo, are then used to automatically construct user profiles for each user.

[0073] Furthermore, the aforementioned relevance recall algorithm is a traditional method that calculates the feature vectors of all articles offline, builds an index, and then, during online recommendation, inputs the user's feature vector to calculate the relevance between the user and each piece of content to be recommended.

[0074] For details, please refer to the following: Figure 3 As shown in this embodiment of the invention, the step of identifying the second set of recommended content corresponding to the user profile from the recommended content database according to a preset relevance recall algorithm includes steps S21 to S23:

[0075] S21. Obtain the quantitative features corresponding to the pre-constructed target content to be recommended, and calculate the correlation between each tag type and each quantitative feature in the user profile according to the relevance recall algorithm to obtain the relevance score of each tag type to the target content to be recommended.

[0076] S22. According to the preset weight configuration rules, the relevance scores of each tag type to the target content to be recommended are weighted and summed to obtain the recommendation score of the user profile to the target content to be recommended.

[0077] S23. Calculate the recommendation score of each content to be recommended in the recommended content database, sort each content to be recommended according to the recommendation score, and extract a preset number of content to be recommended with the highest recommendation score to obtain a second set of recommended content.

[0078] In this embodiment of the invention, based on the relevance recall algorithm, a cosine similarity algorithm can be used to calculate the relevance between each tag type and each quantified feature in the user profile. Then, through preset weight configuration rules, such as age group weight, gender weight, employment status weight, viewing behavior weight, etc., the relevance scores corresponding to each tag are weighted and summed to obtain the total recommendation score. Then, the recommendation scores are ranked, and the top N are selected as the second recommendation score, where N can be 10.

[0079] Specifically, in this embodiment of the invention, if the user profile contains tags such as male, 52 years old, diabetes, obesity, and hypertension, then a second set of recommended content can be obtained based on the relevance recall algorithm, such as keywords like "how diabetic patients lose weight" and "type 2 diabetes".

[0080] S3. According to the preset clustering algorithm, merge the first set of recommended content and the second set of recommended content to obtain a set of candidate recommended content.

[0081] The clustering algorithm used in this embodiment of the invention employs the BIRCH algorithm, which has a relatively fast processing speed. Its speed is generally independent of the number of records in the database, and only depends on the number of units into which the data space is divided. This embodiment of the invention uses the BIRCH algorithm to remove prominent and outlier data, obtaining a set of candidate recommended content.

[0082] In detail, in this embodiment of the invention, the step of merging the first recommended content set and the second recommended content set according to a preset clustering algorithm to obtain a candidate recommended content set includes:

[0083] According to the preset clustering algorithm, the first set of recommended content and the second set of recommended content are merged and deduplicated to obtain a unique set of recommended content;

[0084] Identify the feature vector corresponding to each unique recommended content in the unique recommended content set, perform a spatial mapping operation on each feature vector based on a preset dimension, cluster the spatial mapping results, remove the relatively independent unique recommended content in the spatial mapping results, and obtain a candidate recommended content set.

[0085] In this embodiment of the invention, the number of contents is reduced and the efficiency of subsequent calculations is increased by merging and deduplication operations. Then, spatial mapping is performed using feature vectors to obtain spatial mapping results. A clustering algorithm is then used to distinguish between these results, deleting relatively independent and unique recommended content to obtain candidate recommended content. The preset dimension of the spatial mapping process can be 2D, 3D, or multi-dimensional, determined based on the average dimension of each feature vector.

[0086] In this embodiment of the invention, the first set of recommended content is obtained based on intent detection. For example, dietary restrictions are relatively lenient. However, when user profiles allow for further control over the user, limiting the user to those with type 2 diabetes, the dietary restrictions in the second set of recommended content become more stringent. Furthermore, due to obesity or other reasons, relevant weight loss methods can be recommended. This embodiment of the invention further expands the content and enhances security control by merging the first and second sets of recommended content.

[0087] S4. Obtain the recommendation content distance recognition model trained from the pre-constructed recommendation flowchart set, and use the recommendation content distance recognition model to identify the graph structure distance value between the user profile and each candidate recommendation content in the candidate recommendation content set.

[0088] In this embodiment of the invention, each recommendation flowchart in the recommendation flowchart set refers to a meta-graph structure that starts with the user and ends with the recommended item content. The flowchart construction strategy is, for example, […]. [Indicates user] and I've browsed them all They tend to favor users recommend Viewed .

[0089] Furthermore, the recommended content distance recognition model is used to transform the content recommendation results into a meta-graph of users and recommended content, and then recognize the model of the distance between users and items based on the meta-graph.

[0090] For details, please refer to the following: Figure 4 As shown in this embodiment of the invention, obtaining the recommendation content distance recognition model trained from the pre-built recommendation flowchart set includes steps S41 to S44:

[0091] S41. Based on the pre-built offline profile recommendation result set and the preset flowchart construction strategy, construct a recommendation flowchart set;

[0092] S42. Based on the set of recommendation flowcharts, construct a user-content distance matrix, and use a pre-built factorization machine to perform matrix decomposition on the user-content distance matrix to obtain a set of latent features;

[0093] S43. Using a pre-constructed one-hot coding algorithm, the potential feature set is quantized and encoded to obtain a quantization result, and the quantization result is linearly transformed to obtain a feature vector of a preset target dimension.

[0094] S44. According to the preset regression analysis method, the pre-constructed recommendation content distance recognition model is trained using the feature vector to obtain the trained recommendation content distance recognition model.

[0095] In this embodiment of the invention, after obtaining the recommendation flowchart set, the detailed process of constructing the user-content distance matrix based on the recommendation flowchart set is as follows: Define the user-content distance matrix User-Item, where User-Item refers to the product of all adjacency matrices along the path from User to Item. For example... and The adjacency matrix of this path refers to the adjacency matrix of the path where the i-th user clicked on the j-th article. The Okay, number The elements of the column are Otherwise, it is The same principle applies to other path relationships. For example, consider a metagraph structure graph1: graph2: in = , The This represents element-wise multiplication, which means multiplying elements at corresponding positions.

[0096] Furthermore, the Factorization Machine (FM) is an algorithm whose core idea originates from matrix factorization. Using a pre-constructed Factorization Machine, the user-content distance matrix is ​​decomposed to obtain a set of latent features:

[0097]

[0098] Among them, the The offline profile recommendation result set contains For each meta-graph path, the User-Item matrix obtained from each path is decomposed using MF matrix factorization to obtain a latent feature vector for the User and Item. The path can be obtained Each User feature vector, i.e. ,and Each item's feature vector, i.e. The and Representing users respectively Clicked on the content .

[0099] Furthermore, a pre-built recommendation content distance recognition model is obtained, wherein the algorithm for the recommendation content distance recognition model is as follows:

[0100]

[0101] Among them, the The distance value is the graph structure distance. , , , These are all values ​​that the recommended content distance recognition model needs to train. For users, For content, Indicates the first The feature vector of the nth sample, for example, the nth sample. Each training sample represents a user. Click on the article So, in the image above The expression can be understood as the features of the sample including the user. Feature vectors, and articles The feature vector, since there are N distinct paths, has a... individual users Features and One article User characteristics; the This represents the sum of the eigenvectors used.

[0102] In this embodiment of the invention, through the above training process, values ​​are assigned to each parameter in the above formula to obtain a trained recommendation content distance recognition model. Then, the recommendation content distance recognition model is used to identify the graph structure distance value between the user profile and each candidate recommendation content in the candidate recommendation content set.

[0103] S5. Sort and filter the graph structure distance values ​​of each candidate recommended content to obtain a set of recommended content.

[0104] Finally, in this embodiment of the invention, the distance values ​​of each graph structure in the candidate recommended content set are sorted to obtain the recommended content set.

[0105] Furthermore, in this embodiment of the invention, after sorting and filtering the graph structure distance values ​​of each candidate recommended content to obtain a set of recommended content, the method further includes:

[0106] By using pre-set tracking points, user click and viewing behavior can be obtained;

[0107] Based on a preset frequency, the user profile and the recommendation flowchart set are updated using the user's click-and-watch behavior.

[0108] In this embodiment of the invention, the user profile is the basic data of the recommendation flowchart set, and the offline profile recommendation result set is the sample data of the recommendation content distance recognition model. The accuracy of the recommendation content distance recognition model is ensured by updating the offline profile recommendation result set.

[0109] Specifically, among the various alternative recommended contents of this invention, they can be reordered and filtered according to graph structure distance values. For example, based on profile tags such as obesity, hypertension, and 52 years old, as well as intent keywords related to diabetes and food, the distance value of "How diabetic patients can lose weight" can be greater than the distance value of "What fruits can people with hypertension eat" and so on, and the top N recommended contents, such as 3 to 5, can be output to obtain the recommended content set.

[0110] This invention employs a semantic recognition model to identify user-input dialogue text, thereby obtaining user intent and a first set of recommended content. This reveals the user's short-term preferences, such as a spontaneous inquiry about diabetes-related diets. Then, using traditional recommendation methods based on user profiling and relevance recall, a second set of recommended content is retrieved to reveal the user's long-term preferences, such as weight loss and hypertension-related health information. This invention then merges the first and second sets of recommended content through clustering to obtain candidate recommended content, further narrowing the recommendation scope and increasing accuracy. Finally, a recommendation content distance recognition model intelligently identifies the proximity scores of each recommended item, ranking them to obtain the final set of recommended content. The recommendation content distance recognition template is a model that constructs a metagraph between candidate recommended content and user profiling, and then identifies the structural distance of the metagraph. Therefore, this invention provides a graph-based dialogue recommendation method that can achieve accurate product recommendations in smart healthcare fields such as online consultations by combining user intent and user profiling in parallel, taking into account both short-term and long-term user preferences.

[0111] like Figure 5 The diagram shown is a functional block diagram of a graph-based dialogue recommendation device provided in an embodiment of the present invention.

[0112] The graph-based dialogue recommendation device 100 of this invention can be installed in an electronic device. Depending on the functions implemented, the graph-based dialogue recommendation device 100 may include a short-term intent recommendation module 101, a long-term profile recommendation module 102, a recommended content clustering module 103, and a content distance calculation module 104. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.

[0113] In this embodiment, the functions of each module / unit are as follows:

[0114] The short-term intent recommendation module 101 is used to identify the dialogue text input by the user using a pre-built semantic recognition model, obtain the user intent, and query the pre-built recommendation content database according to the user intent to obtain a first set of recommendation content.

[0115] The long-term profile recommendation module 102 is used to obtain the user profile of the user and identify the second set of recommended content corresponding to the user profile from the recommended content database according to the preset relevance recall algorithm.

[0116] The recommended content clustering module 103 is used to merge the first recommended content set and the second recommended content set according to a preset clustering algorithm to obtain a candidate recommended content set.

[0117] The content distance calculation module 104 is used to obtain a recommended content distance recognition model trained from a pre-built set of recommendation flowcharts, and to use the recommended content distance recognition model to identify the graph structure distance value between the user profile and each candidate recommended content in the candidate recommended content set, and to perform sorting and filtering operations on the graph structure distance values ​​of each candidate recommended content to obtain a set of recommended content.

[0118] In detail, the modules in the graph-based dialogue recommendation device 100 described in this application embodiment adopt the same approach as described above when in use. Figures 1 to 4 The method uses the same techniques as the graph-based dialogue recommendation method described above and can produce the same technical effects, so it will not be repeated here.

[0119] like Figure 6 The diagram shown is a schematic representation of an electronic device 1 that implements a graph-based dialogue recommendation method according to an embodiment of the present invention.

[0120] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13. It may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as a graph-based dialogue recommendation program.

[0121] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device 1, connecting various components of the electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing graph-based dialogue recommendation programs) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.

[0122] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as code for a graph-based dialogue recommendation program, but also to temporarily store data that has been output or will be output.

[0123] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0124] The communication interface 13 is used for communication between the electronic device 1 and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0125] Figure 6 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 6 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0126] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0127] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0128] The graph-based dialogue recommendation program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions, which, when run in the processor 10, can achieve the following:

[0129] Using a pre-built semantic recognition model, the user's input dialogue text is identified to obtain the user's intent, and the pre-built recommendation content database is queried based on the user's intent to obtain a first set of recommendation content;

[0130] Obtain the user profile of the user, and identify the second set of recommended content corresponding to the user profile from the recommended content database according to the preset relevance recall algorithm;

[0131] According to a preset clustering algorithm, the first set of recommended content and the second set of recommended content are merged to obtain a set of candidate recommended content.

[0132] Obtain a recommendation content distance recognition model trained from a pre-built set of recommendation flowcharts, and use the recommendation content distance recognition model to identify the graph structure distance value between the user profile and each candidate recommendation content in the candidate recommendation content set;

[0133] The graph distance values ​​of each candidate recommended content are sorted and filtered to obtain a set of recommended content.

[0134] Specifically, the specific implementation method of the processor 10 for the above instructions can be referred to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, and will not be repeated here.

[0135] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0136] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0137] Using a pre-built semantic recognition model, the user's input dialogue text is identified to obtain the user's intent, and the pre-built recommendation content database is queried based on the user's intent to obtain a first set of recommendation content;

[0138] Obtain the user profile of the user, and identify the second set of recommended content corresponding to the user profile from the recommended content database according to the preset relevance recall algorithm;

[0139] According to a preset clustering algorithm, the first set of recommended content and the second set of recommended content are merged to obtain a set of candidate recommended content.

[0140] Obtain a recommendation content distance recognition model trained from a pre-built set of recommendation flowcharts, and use the recommendation content distance recognition model to identify the graph structure distance value between the user profile and each candidate recommendation content in the candidate recommendation content set;

[0141] The graph distance values ​​of each candidate recommended content are sorted and filtered to obtain a set of recommended content.

[0142] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0143] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0144] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0145] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0146] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0147] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0148] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0149] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A dialogue recommendation method based on graph structure, characterized in that, The method includes: Using a pre-built semantic recognition model, the user's input dialogue text is identified to obtain the user's intent, and the pre-built recommendation content database is queried based on the user's intent to obtain a first set of recommendation content; Obtain the user profile of the user, and identify the second set of recommended content corresponding to the user profile from the recommended content database according to the preset relevance recall algorithm; According to a preset clustering algorithm, the first set of recommended content and the second set of recommended content are merged to obtain a set of candidate recommended content. Obtain a recommendation content distance recognition model trained from a pre-built set of recommendation flowcharts, and use the recommendation content distance recognition model to identify the graph structure distance value between the user profile and each candidate recommendation content in the candidate recommendation content set; The graph structure distance values ​​of each candidate recommended content are sorted and filtered to obtain a set of recommended content; The step of obtaining the recommendation content distance recognition model trained from the pre-built recommendation flowchart set includes: Based on the pre-built set of offline profile recommendation results and the preset flowchart construction strategy, construct a set of recommendation flowcharts; A user-content distance matrix is ​​constructed based on the recommended flowchart set, and a pre-constructed factorization machine is used to perform matrix decomposition on the user-content distance matrix to obtain a latent feature set. The potential feature set is quantized and encoded using a pre-constructed one-hot coding algorithm to obtain the quantization result, and the quantization result is linearly transformed to obtain a feature vector of a preset target dimension. Based on the preset regression analysis method, the pre-constructed recommendation content distance recognition model is trained using the feature vector to obtain the trained recommendation content distance recognition model.

2. The graph-based dialogue recommendation method as described in claim 1, characterized in that, The process of using a pre-built semantic recognition model to identify user-input dialogue text and obtain user intent includes: The semantic recognition model is used to perform word segmentation on the dialogue text to obtain a word segmentation result set. The word segmentation result set and the order position information of each word segmentation result in the word segmentation result set are quantified to obtain a word vector set. By utilizing the attention network of the semantic recognition model, attention weights are configured for each word vector in the word vector set to obtain an attention-enhanced word vector set. Feature extraction is performed on the attention-enhanced word vector set to obtain a text feature set, and fully connected recognition is performed on the text feature set to obtain the user intent.

3. The graph-based dialogue recommendation method as described in claim 1, characterized in that, The process of obtaining the user profile includes: By using a pre-defined data interface, basic user information and user behavior data are obtained to obtain a user dataset; The user data is cleaned for anomalies and duplicates to obtain a valid data set, and the valid data set is then clustered and classified to obtain a user tag set. A user profile is constructed using a pre-built user profiling tool based on the user tag set.

4. The graph-based dialogue recommendation method as described in claim 1, characterized in that, The step of identifying the second set of recommended content corresponding to the user profile from the recommended content database according to the preset relevance recall algorithm includes: Obtain the quantitative features corresponding to the pre-constructed target content to be recommended, and calculate the correlation between each tag type and each quantitative feature in the user profile according to the relevance recall algorithm to obtain the relevance score of each tag type to the target content to be recommended. According to the preset weight configuration rules, the relevance scores of each tag type to the target content to be recommended are weighted and summed to obtain the recommendation score of the user profile to the target content to be recommended. Calculate the recommendation score of each piece of content to be recommended in the recommended content database, sort the pieces of content to be recommended according to the recommendation scores, and extract a preset number of pieces of content to be recommended with the highest recommendation scores to obtain a second set of recommended content.

5. The graph-based dialogue recommendation method as described in claim 1, characterized in that, The step of merging the first recommended content set and the second recommended content set according to a preset clustering algorithm to obtain a candidate recommended content set includes: According to the preset clustering algorithm, the first set of recommended content and the second set of recommended content are merged and deduplicated to obtain a unique set of recommended content; Identify the feature vector corresponding to each unique recommended content in the unique recommended content set, perform a spatial mapping operation on each feature vector based on a preset dimension, cluster the spatial mapping results, remove the relatively independent unique recommended content in the spatial mapping results, and obtain a candidate recommended content set.

6. The graph-based dialogue recommendation method as described in claim 1, characterized in that, After sorting and filtering the graph structure distance values ​​of each candidate recommended content to obtain a set of recommended content, the method further includes: By using pre-set tracking points, user click and viewing behavior can be obtained; Based on a preset frequency, the user profile and the recommendation flowchart set are updated using the user's click-and-watch behavior.

7. A graph-based dialogue recommendation device, used to implement the graph-based dialogue recommendation method as described in any one of claims 1 to 6, characterized in that, The device includes: The short-term intent recommendation module is used to identify the dialogue text input by the user using a pre-built semantic recognition model, obtain the user intent, and query the pre-built recommendation content database according to the user intent to obtain a first set of recommendation content. The long-term profile recommendation module is used to obtain the user profile of the user and identify the second set of recommended content corresponding to the user profile from the recommended content database according to the preset relevance recall algorithm. The recommended content clustering module is used to merge the first recommended content set and the second recommended content set according to a preset clustering algorithm to obtain a candidate recommended content set. The content distance calculation module is used to obtain the recommended content distance recognition model trained by the pre-built recommendation flowchart set, and use the recommended content distance recognition model to identify the graph structure distance value between the user profile and each candidate recommended content in the candidate recommended content set, and to sort and filter the graph structure distance values ​​of each candidate recommended content to obtain the recommended content set.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the graph-based dialogue recommendation method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the graph-based dialogue recommendation method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Information recommendation method and device based on double portraits, electronic equipment and storage medium

    CN114398557A

  • Dialogue recommendation method and device, electronic equipment and storage medium

    CN115391644A