Information recommendation method, device, equipment and storage medium based on user portrait

By receiving and processing human-computer dialogue chat records in real time, extracting keywords using preset word maps, and generating user interest tags and portraits, the problem of low accuracy of user portraits in the prior art is solved, and more accurate information recommendations are achieved.

CN111797210BActive Publication Date: 2025-04-15CHINA PING AN LIFE INSURANCE CO LTD

Patent Information

Application Number
CN202010138636.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-03
Publication Date
2025-04-15
Estimated Expiration
2040-03-03

AI Technical Summary

Technical Problem

In the prior art, the accuracy of user portraits is low, resulting in inaccurate information recommendations.

Method used

Through the log collection system Flume, the human-computer dialogue chat records are received in real time, the desensitization process and the destop word processing are performed, the keywords are extracted using the preset word map, the user interest tag set is generated, and the user interest portrait is generated based on these tags, and the database is stored.

Benefits of technology

Improve the accuracy of user portraits, ensure the accuracy of information recommendations, and allow user history and real-time user portraits to be retrieved at any time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111797210B_ABST
    Figure CN111797210B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of big data technology, and discloses an information recommendation method based on user portrait, comprising the following steps: receiving a human-computer dialogue chat record in a first scenario in real time through a log collection system Flume; performing desensitization processing on the chat record to obtain first data; performing stop word removal processing on the first data to obtain second data; extracting keywords of the second data through a preset word graph; obtaining a first tag set according to the keywords; removing duplicates from the first tag set data to obtain a second tag set; generating a user interest portrait based on the second tag set, and storing the user interest portrait in a database; receiving a recommendation instruction, and obtaining a user interest portrait according to the recommendation instruction; obtaining information to be recommended corresponding to the recommendation instruction according to the user interest portrait. The present invention also provides an information recommendation device, equipment and storage medium based on user portrait, and the information recommendation method based on user portrait provided by the present invention improves the accuracy of user portrait.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular to a method, device, equipment and storage medium for information recommendation based on user portraits. Background Art

[0002] At present, for customer service and functional robots, user interactions are highly purposeful. Even if the current robots cannot solve user needs, they also contain certain interests and concerns of users. The existing industry cannot effectively extract user interest tags based on conversation content and enable user interest tags to be applied in actual application scenarios of application software, such as product and advertising recommendation scenarios. Because the user portrait generated by user interest tags in the existing technology will have inaccurate recommendations when applied to information recommendation scenarios, the fundamental reason is that the accuracy of existing user portraits is relatively low. Summary of the invention

[0003] The main purpose of the present invention is to provide an information recommendation method, device, equipment and storage medium based on user portraits, aiming to solve the technical problem of low accuracy of existing user portraits.

[0004] The human-computer dialogue chat records in the first scenario are received in real time through the log collection system Flume;

[0005] Performing desensitization processing on the chat record to obtain first data;

[0006] Performing stop word removal processing on the first data to obtain second data;

[0007] extracting keywords of the second data through a preset word graph;

[0008] Obtaining a first tag set according to the keyword, wherein the first tag set consists of corresponding tags and / or similar tags;

[0009] Deduplicating the first label set data to obtain a second label set;

[0010] Generate a first user interest profile based on the second tag set, and store the first user interest profile in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS;

[0011] When a recommendation instruction is received, the to-be-recommended information corresponding to the recommendation instruction is obtained according to the first user interest portrait.

[0012] Optionally, performing desensitization processing on the chat record to obtain the first data includes the following steps:

[0013] Use regular expressions to filter out machine voice information in human-machine dialogue chat records;

[0014] Determine whether there is sensitive information in the received user voice information;

[0015] If there is sensitive information in the received user voice information, the sensitive information is replaced with a preset symbol through a replacement algorithm to obtain the first data.

[0016] Optionally, extracting keywords of the second data by using a preset word graph comprises the following steps:

[0017] Traversing all nodes of the preset word graph, and determining the weight of the keyword according to the number of occurrences of the keyword in each node;

[0018] The keywords are sorted according to the weights to obtain a target sorting result, and the keywords of the second data are obtained according to the target sorting result.

[0019] Optionally, sorting the keywords according to the weights to obtain a target sorting result, and acquiring the keywords of the second data according to the target sorting result includes the following steps:

[0020] Sorting the keywords according to the weights using a bubble sort algorithm to obtain a target sorting result;

[0021] Determining whether the accuracy of the target sorting result is greater than or equal to the preset accuracy according to the preset target sorting result;

[0022] If the accuracy of the target sorting result is greater than or equal to the preset accuracy, the keywords of the second data are obtained according to the target sorting result, and the keywords ranked in the top N positions in the target sorting result are selected as the keywords of the second data, where N is greater than 1.

[0023] Optionally, before traversing all nodes of the preset word graph and determining the weight of the keyword according to the number of occurrences of the keyword in each node, the following steps are also included:

[0024] The weights of the nodes in the word graph are iterated according to preset rules and training data until the target ranking result of the keywords corresponding to the training data outputted is greater than or equal to the preset accuracy.

[0025] Optionally, obtaining a first tag set according to the keyword, wherein the first tag set consists of corresponding tags and / or similar tags, comprises the following steps:

[0026] If an instruction to obtain a tag according to a keyword is received, it is determined whether there is a tag matching the keyword in the preset tag library;

[0027] If there is a tag matching the keyword in the preset tag library, then obtaining a corresponding tag according to a preset mapping relationship between the keyword and the tag in the preset tag library;

[0028] If there is no tag matching the keyword in the preset tag library, converting the keyword into a corresponding vector;

[0029] Calculating a cosine angle between the vector and a preset keyword vector in a preset vocabulary;

[0030] Determining whether the cosine angle is less than or equal to a preset angle;

[0031] If the cosine angle is less than or equal to a preset angle, obtaining similar keywords corresponding to the keyword according to a preset keyword vector;

[0032] Determine whether there is a tag matching the similar keyword in the tag system;

[0033] If there is a tag matching the similar keyword in the tag system, a similar tag is obtained;

[0034] The corresponding tags and / or the similar tags are combined into a first tag set.

[0035] Optionally, after generating the first user interest portrait based on the second tag set and storing the first user interest portrait in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS, the following steps are also included:

[0036] The human-computer dialogue chat records in the second scenario are received in real time through the log collection system Flume;

[0037] Extracting a third tag set from the human-computer dialogue chat record in the second scenario;

[0038] A second user portrait is generated based on the third tag set, and the second user portrait is stored in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS.

[0039] Furthermore, in order to achieve the above-mentioned object, the present invention also provides an information recommendation device based on user portrait, and the information recommendation device based on user portrait comprises the following modules:

[0040] A chat record receiving module is used to receive the human-computer dialogue chat record in the first scenario in real time through the log collection system Flume;

[0041] A desensitization processing module, used for performing desensitization processing on the chat record to obtain first data;

[0042] A stop word removal processing module, used for removing stop words from the first data to obtain second data;

[0043] A keyword extraction module, used to extract keywords of the second data through a preset word graph;

[0044] A first tag set acquisition module, configured to obtain a first tag set according to the keyword, wherein the first tag set consists of corresponding tags and / or similar tags;

[0045] A first label set data deduplication module, used for deduplicating the first label set data to obtain a second label set;

[0046] A user interest portrait storage module, configured to generate a first user interest portrait based on the second tag set, and store the first user interest portrait in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS;

[0047] The module for recommending information to be recommended is used to obtain the information to be recommended corresponding to the recommendation instruction according to the interest portrait of the first user.

[0048] Optionally, the desensitization processing module includes the following units:

[0049] A filtering unit, used to filter out machine voice information in the human-machine dialogue chat record through regular expressions;

[0050] A sensitive information determination unit, used to determine whether there is sensitive information in the received user voice information;

[0051] The replacement unit is used to replace the sensitive information with a preset symbol through a replacement algorithm to obtain the first data if the received user voice information contains sensitive information.

[0052] Optionally, the keyword extraction module includes the following units:

[0053] A traversal unit, used to traverse all nodes of the preset word graph and determine the weight of the keyword according to the number of occurrences of the keyword in each node;

[0054] A sorting unit is used to sort the keywords according to the weights to obtain a target sorting result, and obtain the keywords of the second data according to the target sorting result.

[0055] Optionally, the sorting unit is used to:

[0056] Sort the weighted keywords by a bubble sort algorithm to obtain a target sort result;

[0057] Determining whether the accuracy of the target sorting result is greater than or equal to the preset accuracy according to the preset target sorting result;

[0058] If the accuracy of the target sorting result is greater than or equal to the preset accuracy, the keywords of the second data are obtained according to the target sorting result, and the keywords ranked in the top N positions in the target sorting result are selected as the keywords of the second data, where N is greater than 1.

[0059] Optionally, the information recommendation device based on user portraits also includes the following modules:

[0060] The iteration module is used to iterate the weights of each node in the word graph according to preset rules and training data until the target ranking result of the keywords corresponding to the training data output is greater than or equal to the preset accuracy.

[0061] Optionally, the first tag set acquisition module includes the following units:

[0062] A keyword matching tag determination unit, configured to determine whether there is a tag matching the keyword in the preset tag library if an instruction to obtain a tag according to the keyword is received;

[0063] A corresponding label acquisition unit, configured to obtain a corresponding label according to a preset mapping relationship between the keyword and the label of the preset label library if there is a label matching the keyword in the preset label library;

[0064] A word vector conversion unit, configured to convert the keyword into a corresponding vector if there is no tag matching the keyword in the preset tag library;

[0065] A calculation unit, used for calculating the cosine angle between the vector and a preset keyword vector in a preset vocabulary;

[0066] A cosine angle determination unit, used to determine whether the cosine angle is less than or equal to a preset angle;

[0067] a similar keyword acquisition unit, configured to acquire similar keywords corresponding to the keyword according to a preset keyword vector if the cosine angle is less than or equal to a preset angle;

[0068] A similar keyword determination unit, used to determine whether there is a tag matching the similar keyword in the tag system;

[0069] A similar tag acquisition unit, configured to obtain a similar tag if there is a tag matching the similar keyword in the tag system;

[0070] A combining unit is used to combine the corresponding tags and / or the similar tags into a first tag set.

[0071] Optionally, the information recommendation device based on user portraits also includes the following modules:

[0072] The human-computer dialogue receiving module in the second scenario is used to receive the human-computer dialogue chat records in the second scenario in real time through the log collection system Flume;

[0073] A third tag set extraction module, used to extract a third tag set from the human-computer dialogue chat record in the second scenario;

[0074] The second user portrait generation module is used to generate a second user portrait based on the third tag set, and store the second user portrait in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS.

[0075] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a user portrait-based information recommendation device, which includes a memory, a processor, and a user portrait-based information recommendation program stored in the memory and executable on the processor, and the user portrait-based information recommendation program, when executed by the processor, implements the steps of the user portrait-based information recommendation method as described in any one of the above items.

[0076] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a storage medium, on which a user portrait-based information recommendation program is stored, and when the user portrait-based information recommendation program is executed by a processor, the steps of the user portrait-based information recommendation method as described in any of the above items are implemented.

[0077] The present invention filters out the user's privacy information through desensitization processing, so that the user portrait finally generated does not contain sensitive information. The keywords in the human-computer dialogue process are obtained by means of word graphs, which can ensure that the generated user portrait is more accurate. In addition, one or more user interest tags can be obtained according to the mapping relationship between keywords and the preset tag system. The user interest portrait can be generated based on the user interest tags, and the generated user portrait can be saved in a database. When there is an instruction to recommend advertisements or products, the user interest portrait can be obtained from the database, and based on the user portrait, the advertisements or products can be accurately pushed to the user. Since each generated user portrait will be saved in the database, this method can not only retrieve the user's historical user portrait at any time, but also retrieve the real-time user portrait, thereby improving the accuracy of the user portrait. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 A schematic diagram of the structure of the operating environment of the information recommendation device based on user portrait involved in the embodiment of the present invention;

[0079] Figure 2 This is a flow chart of a first embodiment of the information recommendation method based on user portraits of the present invention;

[0080] Figure 3 for Figure 2 A detailed flow chart of an embodiment of step S20;

[0081] Figure 4 for Figure 2 A detailed flow chart of an embodiment of step S40;

[0082] Figure 5 for Figure 4 A detailed flow chart of an embodiment of step S402;

[0083] Figure 6 This is a flow chart of a second embodiment of the information recommendation method based on user portraits of the present invention;

[0084] Figure 7 for Figure 2 A detailed flow chart of an embodiment of step S50;

[0085] Figure 8 This is a flow chart of a third embodiment of the information recommendation method based on user portraits of the present invention;

[0086] Fig. 9 This is a schematic diagram of functional modules of an embodiment of an information recommendation device based on user portraits of the present invention.

[0087] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0088] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0089] The user portrait-based information recommendation method involved in the embodiment of the present invention is mainly applied to a user portrait-based information recommendation device, which can be a PC, a portable computer, a mobile terminal, or other device with display and processing functions.

[0090] Reference Figure 1 , Figure 1The hardware structure diagram of the information recommendation device based on user portrait involved in the embodiment of the present invention is shown in FIG. In the embodiment of the present invention, the information recommendation device based on user portrait may include a processor 1001 (e.g., CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface); the memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0091] Those skilled in the art will understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation on the information recommendation device based on user portraits, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0092] Continue to refer to Figure 1 , Figure 1 The memory 1005 as a storage medium may include an operating system, a network communication module, and an information recommendation program based on user portraits.

[0093] exist Figure 1 In the embodiment, the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the information recommendation program based on the user portrait stored in the memory 1005, and execute the information recommendation method based on the user portrait provided in the embodiment of the present invention.

[0094] An embodiment of the present invention provides an information recommendation method based on user portrait.

[0095] Reference Figure 2 , Figure 2 1 is a flow chart of a first embodiment of the information recommendation method based on user portraits of the present invention. In this embodiment, the information recommendation method based on user portraits includes the following steps:

[0096] Step S10, receiving the human-computer dialogue chat record in the first scenario in real time through the log collection system Flume;

[0097] In this embodiment, Flume is a distributed massive log collection system, and the chat records of real-time human-computer dialogue can be received through the log collection system Flume.

[0098] Step S20, performing desensitization processing on the chat record to obtain first data;

[0099] In this embodiment, since the chat record of the human-computer dialogue includes the user's sensitive information, for example, the sensitive information includes: mobile phone number, bank card number, insurance policy number and address information, in order to prevent the leakage of user sensitive information, the sensitive information can be replaced by a replacement algorithm. For example, the mobile phone number, bank card number, and insurance policy number are matched by a method of matching consecutive numbers. If a consecutive 4-digit number is matched, the number is changed to * and then a mark is added, such as the bank card number is changed to bankNum****. Geographic information is matched according to regular expressions, and the province, city, district and other information are changed from province to ** province, such as Guangdong Province is changed to ** province. The user's information security is ensured by non-recoverable desensitization processing.

[0100] Step S30, performing stop word removal processing on the first data to obtain second data;

[0101] In this embodiment, in order to improve the efficiency of subsequent label extraction, the first data is first processed to remove stop words to obtain the second data.

[0102] Step S40, extracting keywords of the second data through a preset word graph;

[0103] In this embodiment, different data can be input into different nodes of the word graph to obtain a word graph that meets the current application scenario. When certain data appears repeatedly in a node, the weight of the node storing the data is increased, thereby achieving the purpose of extracting keywords.

[0104] Lattice is a form of expression of speech recognition results. It represents multiple decoded candidate results on a directed acyclic graph to extract keywords from the second data.

[0105] Step S50, obtaining a first tag set according to the keyword, wherein the first tag set consists of corresponding tags and / or similar tags;

[0106] In this embodiment, a mapping process between keywords and the tag system is performed before this to establish a corresponding relationship between keywords and the first tag set. For example, the received user text data is: "Running for half an hour", and "running" in the text data can be extracted. Since there is a mapping relationship between the tag system of "running" and "health", the tag "health" can be obtained. The corresponding tag refers to a tag that has a corresponding relationship with the keyword, and the similar tag refers to a tag that has no corresponding relationship with the keyword itself, but has a corresponding relationship with words similar to the keyword.

[0107] Step S60, removing duplicates from the first label set data to obtain a second label set;

[0108] In this embodiment, the first label set here may refer to one label or multiple labels. In a scenario with multiple labels, there is a possibility of duplicate labels. Therefore, all labels may be checked in turn by traversing. If there are duplicates, deduplication processing is performed to obtain the second label set.

[0109] Step S70, generating a first user interest portrait based on the second tag set, and storing the first user interest portrait in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS;

[0110] In this embodiment, all the second tag sets are combined together to form a user portrait of the user in the human-computer dialogue scenario. HIVE is a data warehouse tool based on Hadoop, which can map structured data files into a database table and provide complete SQL query functions, and can convert SQL statements into MapReduce tasks for execution. Hadoop is a distributed file system that can be used to store data.

[0111] Step S80, obtaining the information to be recommended corresponding to the recommendation instruction according to the interest portrait of the first user.

[0112] In this embodiment, the execution subject of the recommendation information is a server, which can obtain the recommendation information according to the pre-established correspondence between the user interest profile and the information to be recommended. The information to be recommended is pre-set, which can be product information or the machine's response data in the human-computer dialogue scene.

[0113] Through desensitization processing, the user's privacy information is filtered out so that the final user portrait does not contain sensitive information. By obtaining keywords in the human-computer dialogue process through word graphs, the generated user portrait can be guaranteed to be more accurate. In addition, according to the mapping relationship between keywords and the preset tag system, one or more user interest tags can be obtained. Based on the user interest tags, a user interest portrait can be generated, and the generated user portrait can be saved in a database. When there is an instruction to recommend advertisements or products, the user interest portrait can be obtained from the database, and based on the user portrait, advertisements or products can be accurately pushed to the user. Since each generated user portrait will be saved in the database, this method can not only retrieve the user's historical user portrait at any time, but also retrieve the real-time user portrait, thereby improving the accuracy of the user portrait.

[0114] Reference Figure 3 , Figure 3 for Figure 2 In this embodiment, step S20, performing desensitization processing on the chat record to obtain the first data, includes the following steps:

[0115] Step S201, filtering out machine voice information in the human-machine dialogue chat record by using regular expressions;

[0116] In this embodiment, since what is ultimately desired is a user portrait rather than a machine portrait, the machine's voice information needs to be filtered out.

[0117] Step S202, determining whether there is sensitive information in the received user voice information;

[0118] In this embodiment, in order to protect user privacy, it is necessary to determine whether sensitive information exists after receiving the user voice information, wherein the sensitive information includes: mobile phone number, bank card number, insurance policy number and address information.

[0119] Step S203: If there is sensitive information in the received user voice information, the sensitive information is replaced with a preset symbol through a replacement algorithm to obtain first data.

[0120] In this embodiment, if there is sensitive information, the sensitive data and address information need to be converted into preset symbols. For example, the mobile phone number, bank card number and insurance policy number in the sensitive information are replaced with preset symbols through a replacement algorithm, and the address information in the sensitive information is replaced with a second preset symbol through a regular method.

[0121] Reference Figure 4 , Figure 4 for Figure 2 In this embodiment, step S40, extracting keywords of the second data through the preset word graph, includes the following steps:

[0122] Step S401, traverse all nodes of the preset word graph, and determine the weight of the keyword according to the number of occurrences of the keyword in each node;

[0123] In this embodiment, the weight of the word segmentation result can be determined by the number of times the traversed word segmentation result appears in the word graph node. For example, the more times it appears, the higher the weight.

[0124] Step S402, sorting the keywords according to the weights to obtain a target sorting result, and obtaining the keywords of the second data according to the target sorting result.

[0125] In this embodiment, after sorting the weighted word segmentation results, a target sorting result can be obtained. For example, the top three keywords can be preset to be output to obtain the final keywords.

[0126] Reference Figure 5 , Figure 5 for Figure 4In this embodiment, step S402, sorting the keywords according to the weights to obtain a target sorting result, and obtaining the keywords of the second data according to the target sorting result, includes the following steps:

[0127] Step S4021, sorting the weighted keywords by a bubble sort algorithm to obtain a target sorting result;

[0128] Step S4022, judging whether the accuracy of the target sorting result is greater than or equal to the preset accuracy according to the preset target sorting result;

[0129] Step S4023, if the accuracy of the target sorting result is greater than or equal to the preset accuracy, the keywords of the second data obtained according to the target sorting result are selected as the keywords of the second data, where N is greater than 1.

[0130] In this embodiment, starting from the head of the unordered sequence, two-by-two comparisons are performed, and positions are exchanged according to size until the largest (smallest) data element is finally exchanged to the tail of the unordered queue, thus becoming part of the ordered sequence; the process is continued next time until all data elements are sorted. Through this sorting process, keywords that meet the preset conditions can be obtained. For example, it is preset to obtain only the first 3 keywords in the sorted queue. In order to make the result more accurate, the keywords are manually sorted before this, and then the keywords after bubble sorting are compared to calculate the accuracy of bubble sorting. In order to make the result of bubble sorting more in line with the artificially predetermined rules, if the accuracy is not greater than or equal to the preset accuracy, the weights of certain keywords can be appropriately reduced or increased, thereby obtaining keywords that meet the preset rules.

[0131] Reference Figure 6 , Figure 6 This is a flow chart of a second embodiment of the information recommendation method based on user portraits of the present invention. In this embodiment, in step S401, before traversing all nodes of the preset word graph and determining the weight of the keyword according to the number of occurrences of the keyword in each node, the following steps are also included:

[0132] Step S90, iterate the weights of each node in the word graph according to preset rules until the target ranking result of the keywords output by the word graph is greater than or equal to the preset accuracy. The preset rules and training data iterate the weights of each node in the word graph until the target ranking result of the keywords corresponding to the training data output is greater than or equal to the preset accuracy.

[0133] In this embodiment, sometimes words that appear frequently are not necessarily keywords, so it is necessary to train the weight coefficients of each node through a preset mechanism. For example, the two keywords "running" and "weight loss" appear frequently, but there is no label matching "running" in the preset vocabulary, but there is a label matching "weight loss". Therefore, the user's real intention may be more inclined to lose weight. Therefore, it is necessary to adjust the weights of the nodes used to store "running" and "weight loss" until the user's real needs are met. When the word graph receives the keywords in this scenario again, the keyword "weight loss" can be directly output.

[0134] Reference Figure 7 , Figure 7 for Figure 2 Detailed flow chart of an embodiment of step S50 in the embodiment. In this embodiment, step S50, obtaining a first tag set according to the keyword, wherein the first tag set consists of corresponding tags and similar tags, includes the following steps:

[0135] In this embodiment, it is determined whether an instruction to obtain a tag according to a keyword is currently received.

[0136] Step S501: if an instruction to obtain a tag according to a keyword is received, it is determined whether there is a tag matching the keyword in the preset tag library;

[0137] In this embodiment, if an instruction to obtain a tag according to a keyword is currently received, it is determined whether there is a tag matching the keyword in the tag system.

[0138] Step S502: if there is a tag matching the keyword in the preset tag library, then the corresponding tag is obtained according to the preset mapping relationship between the keyword and the tag in the preset tag library;

[0139] Step S503: if there is no tag matching the keyword in the preset tag library, the keyword is converted into a corresponding vector;

[0140] In this embodiment, the generation process of the preset mapping relationship can be to cluster the keywords through a clustering algorithm, so as to obtain the category to which each keyword belongs, obtain the label according to the category, and thus establish the mapping relationship between the keyword and the label. If there is a label matching the keyword in the label system, the corresponding label is obtained according to the mapping relationship, and if not, the keyword is converted into a corresponding vector.

[0141] Step S504, calculating the cosine angle between the vector and the preset keyword vector in the preset vocabulary;

[0142] Step S505, determining whether the cosine angle is less than or equal to a preset angle;

[0143] This embodiment calculates the angle between the vector of the current keyword and the vector of the keyword in the preset vocabulary through the cosine similarity algorithm. A value of the angle can be preset, for example, 20 degrees. When the angle between the vectors is less than 20 degrees, a word similar to the current keyword can be obtained, that is, a similar keyword. With the similar keywords, similar labels of the similar keywords can be obtained.

[0144] Step S506, if the cosine angle is less than or equal to the preset angle, obtaining similar keywords corresponding to the keyword according to the preset keyword vector;

[0145] In this embodiment, the cosine angle between the vector and the preset keyword vector in the preset word library is calculated to obtain similar keywords corresponding to the keywords. The preset word library is a library for storing keywords. If there is no tag matching the keyword in the preset tag library, it means that the current keyword has no corresponding tag. In actual scenarios, it is often necessary to push messages to users based on the user's interest tags. When the tag corresponding to the keyword cannot be obtained, it means that the message cannot be pushed. In order to overcome this defect, this embodiment calculates the angle between the vector of the current keyword and the vector of the keyword in the preset word library through the cosine similarity algorithm. A value of the angle can be preset, for example, 20 degrees. When the angle between the vectors is less than 20 degrees, a word similar to the current keyword can be obtained, that is, a similar keyword. With similar keywords, similar tags of similar keywords can be obtained.

[0146] Step S507, determining whether there is a tag matching the similar keyword in the tag system;

[0147] Step S508, if there is a tag matching the similar keyword in the tag system, then a similar tag is obtained;

[0148] In this embodiment, if there are tags matching similar keywords in the tag system, tags matching similar keywords are obtained. After adding similar tags on the basis of corresponding tags, the richness of tags can be improved, so when generating user portraits, it will be more accurate.

[0149] Step S509: combining the corresponding tags and similar tags into a first tag set.

[0150] By calculating the cosine angle between the keyword vector and the preset keyword vector, similar keywords of the keyword can be obtained, and similar tags can be obtained based on the similar keywords, which can increase the richness of the tags.

[0151] Reference Figure 8 , Figure 8This is a flow chart of the third embodiment of the information recommendation method based on user portraits of the present invention. In this embodiment, in step S70, a first user interest portrait is generated based on the second tag set, and the first user interest portrait is stored in a database, and the database includes a data warehouse tool HIVE and a distributed file system HDFS, and further includes the following steps:

[0152] Step S100, receiving the human-computer dialogue chat record in the second scenario in real time through the log collection system Flume;

[0153] In this embodiment, other scenarios refer to scenarios other than the human-computer dialogue chat scenario.

[0154] Step S110, extracting a third tag set from the human-computer dialogue chat record in the second scenario;

[0155] Step S120: Generate a second user portrait based on the third tag set, and store the second user portrait in a database, where the database includes a data warehouse tool HIVE and a distributed file system HDFS.

[0156] In this embodiment, since the user portrait is obtained in the scenario of human-computer dialogue and chat, the user's interest tags in other scenarios can also be obtained according to this solution to obtain the user portraits in other scenarios. Since the existing database only stores user portraits in the scenario of human-computer dialogue and chat, when the user portrait in the second scenario is also stored in the database, it can enrich the original user portrait. Different areas can be pre-divided in the database, and different areas respectively store user portraits in different scenarios. For example, the first scenario is a human-computer dialogue scenario for purchasing insurance products, and the second scenario is a human-computer dialogue scenario for purchasing financial products.

[0157] Keywords are obtained through word graphs, and corresponding tags and similar tags are obtained based on the mapping relationship between keywords and tags, which greatly expands the number of tags. Based on user interest tags, user interest portraits are finally obtained. Since each generated user portrait will be saved in the database, this method can not only retrieve user historical user portraits at any time, but also retrieve real-time user portraits, thereby improving the accuracy of user portraits.

[0158] Reference Fig. 9 , Fig. 9 This is a functional module diagram of an embodiment of the information recommendation device based on user portrait of the present invention. In this embodiment, the information recommendation device based on user portrait includes:

[0159] A chat record receiving module 10 is used to receive the human-computer dialogue chat record in the first scenario in real time through the log collection system Flume;

[0160] A desensitization processing module 20, used for performing desensitization processing on the chat record to obtain first data;

[0161] A stop word removal processing module 30, configured to remove stop words from the first data to obtain second data;

[0162] A keyword extraction module 40, configured to extract keywords of the second data through a preset word graph;

[0163] A first tag set acquisition module 50, configured to obtain a first tag set according to the keyword, wherein the first tag set is composed of corresponding tags and / or similar tags;

[0164] A first label set data deduplication module 60, configured to dedupe the first label set data to obtain a second label set;

[0165] A user interest portrait storage module 70, configured to generate a first user interest portrait based on the second tag set, and store the first user interest portrait in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS;

[0166] The to-be-recommended information recommendation module 80 is used to obtain the to-be-recommended information corresponding to the recommendation instruction according to the first user interest portrait.

[0167] The invention also provides a storage medium.

[0168] In this embodiment, the storage medium stores an information recommendation program based on user portraits, and when the information recommendation program based on user portraits is executed by the processor, the steps of the information recommendation method based on user portraits described in any of the above embodiments are implemented.

[0169] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM) and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0170] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims. All equivalent structures or equivalent process changes made using the contents of the specification and drawings of the present invention, or directly or indirectly used in other related technical fields, are protected by the present invention.

Claims

1. An information recommendation method based on user portrait, characterized in that: include: The human-computer dialogue chat records in the first scenario are received in real time through the log collection system Flume; Performing desensitization processing on the chat record to obtain first data; Performing stop word removal processing on the first data to obtain second data; extracting keywords of the second data through a preset word graph; Obtain a first tag set according to the keyword, wherein the first tag set consists of corresponding tags and / or similar tags; Deduplicating the first label set data to obtain a second label set; Generate a first user interest profile based on the second tag set, and store the first user interest profile in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS; When a recommendation instruction is received, obtaining information to be recommended corresponding to the recommendation instruction according to the first user interest portrait; The extracting the keywords of the second data by using the preset word graph includes: Traversing all nodes of the preset word graph, and determining the weight of the keyword according to the number of occurrences of the keyword in each node; Sorting the keywords according to the weights to obtain a target sorting result, and obtaining keywords of the second data according to the target sorting result; The step of sorting the keywords according to the weights to obtain a target sorting result, and acquiring the keywords of the second data according to the target sorting result includes: Sorting the keywords according to the weights using a bubble sort algorithm to obtain a target sorting result; Determining whether the accuracy of the target sorting result is greater than or equal to the preset accuracy according to the preset target sorting result; If the accuracy of the target ranking result is greater than or equal to the preset accuracy, the keywords ranked in the top N positions in the target ranking result are selected as keywords of the second data, where N is greater than 1.

2. The information recommendation method based on user portrait according to claim 1, characterized in that: The desensitizing the chat record to obtain the first data includes: Use regular expressions to filter out machine voice information in human-machine dialogue chat records; Determine whether there is sensitive information in the received user voice information; If there is sensitive information in the received user voice information, the sensitive information is replaced with a preset symbol through a replacement algorithm to obtain the first data.

3. The information recommendation method based on user portrait according to claim 1, characterized in that: Before traversing all nodes of the preset word graph and determining the weight of the keyword according to the number of occurrences of the keyword in each node, the method further includes: The weights of the nodes in the word graph are iterated according to preset rules and training data until the target ranking result of the keywords corresponding to the training data outputted is greater than or equal to the preset accuracy.

4. The information recommendation method based on user portrait according to claim 1, characterized in that: The step of obtaining a first tag set according to the keyword, wherein the first tag set is composed of corresponding tags and / or similar tags, including: If an instruction to obtain a tag according to a keyword is received, it is determined whether there is a tag matching the keyword in the preset tag library; If there is a tag matching the keyword in the preset tag library, then obtaining a corresponding tag according to a preset mapping relationship between the keyword and the tag in the preset tag library; If there is no tag matching the keyword in the preset tag library, converting the keyword into a corresponding vector; Calculating a cosine angle between the vector and a preset keyword vector in a preset vocabulary; Determining whether the cosine angle is less than or equal to a preset angle; If the cosine angle is less than or equal to a preset angle, obtaining similar keywords corresponding to the keyword according to a preset keyword vector; Determine whether there is a tag matching the similar keyword in the tag system; If there is a tag matching the similar keyword in the tag system, a similar tag is obtained; The corresponding tags and / or the similar tags are combined into a first tag set.

5. The information recommendation method based on user portrait according to any one of claims 1 to 4, characterized in that: After generating the first user interest portrait based on the second tag set and storing the first user interest portrait in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS, the method further includes: The human-computer dialogue chat records in the second scenario are received in real time through the log collection system Flume; Extracting a third tag set from the human-computer dialogue chat record in the second scenario; A second user portrait is generated based on the third tag set, and the second user portrait is stored in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS.

6. An information recommendation device based on user portrait, characterized in that: The information recommendation device based on user portrait includes the following modules: A chat record receiving module is used to receive the human-computer dialogue chat record in the first scenario in real time through the log collection system Flume; A desensitization processing module, used for performing desensitization processing on the chat record to obtain first data; A stop word removal processing module, used for removing stop words from the first data to obtain second data; A keyword extraction module, used to extract keywords of the second data through a preset word graph; A first tag set acquisition module, configured to obtain a first tag set according to the keyword, wherein the first tag set consists of corresponding tags and / or similar tags; A first label set data deduplication module, used for deduplicating the first label set data to obtain a second label set; A user interest portrait storage module, configured to generate a first user interest portrait based on the second tag set, and store the first user interest portrait in a database, wherein the database includes a data warehouse tool HIVE and a distributed file system HDFS; A to-be-recommended information recommendation module, used for acquiring to-be-recommended information corresponding to the recommendation instruction according to the first user interest portrait; The keyword extraction module includes the following units: A traversal unit, used to traverse all nodes of the preset word graph and determine the weight of the keyword according to the number of occurrences of the keyword in each node; A sorting unit, configured to sort the keywords according to the weights to obtain a target sorting result, and obtain keywords of the second data according to the target sorting result; The sorting unit is used for: Sort the weighted keywords by a bubble sort algorithm to obtain a target sort result; Determining whether the accuracy of the target sorting result is greater than or equal to the preset accuracy according to the preset target sorting result; If the accuracy of the target sorting result is greater than or equal to the preset accuracy, the keywords of the second data are obtained according to the target sorting result, and the keywords ranked in the top N positions in the target sorting result are selected as the keywords of the second data, where N is greater than 1.

7. The information recommendation device based on user portrait according to claim 6, characterized in that: The desensitization processing module includes the following units: A filtering unit, used to filter out machine voice information in the human-machine dialogue chat record through regular expressions; A sensitive information determination unit, used to determine whether there is sensitive information in the received user voice information; The replacement unit is used to replace the sensitive information with a preset symbol through a replacement algorithm to obtain the first data if the received user voice information contains sensitive information.

8. The information recommendation device based on user portrait according to claim 6, characterized in that: Also includes the following modules: The iteration module is used to iterate the weights of each node in the word graph according to preset rules and training data until the target ranking result of the keywords corresponding to the training data output is greater than or equal to the preset accuracy.

9. An information recommendation device based on user portrait, characterized in that: The user portrait-based information recommendation device includes a memory, a processor, and a user portrait-based information recommendation program stored in the memory and executable on the processor. When the user portrait-based information recommendation program is executed by the processor, the steps of the user portrait-based information recommendation method as described in any one of claims 1 to 5 are implemented.

10. A storage medium, characterized in that: The storage medium stores an information recommendation program based on user portraits, and when the information recommendation program based on user portraits is executed by a processor, the steps of the information recommendation method based on user portraits as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Financial product recommendation method, device and equipment and storage medium

    CN109934721A

  • Search term recommendation method, device, program and medium

    WO2018113468A1

Cited By

  • Intelligent voice dialogue scene verbal skill intervention method and system based on customer portrait

    CN116049360A

  • Intelligent voice dialogue scene script intervention method and system based on customer portrait

    CN116049360B