Health education intelligent dialogue method, device, computer equipment and storage medium
By identifying user intentions and generating personalized replies in combination with health data and knowledge bases, the problem of lack of targeted and intelligent responses in the health management field is solved, and efficient customer service and user satisfaction are achieved.
Patent Information
- Application Number
- CN202411145582.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Existing chatbots cannot effectively utilize health knowledge bases and user health data to perform personalized and automatic responses in the field of health management, resulting in a lack of targeted and intelligent answers.
By obtaining the information and health data entered by the user, intent identification is carried out, recommendation information is generated using health data and a pre-constructed health knowledge base, intent is fitted and recommendations are generated for dialogue, and the dialogue output results are pushed to the user.
It has achieved effective use of health knowledge base and user health data for personalized responses, significantly improving customer service efficiency, improving user experience and satisfaction, and reducing the workload and cost of manual customer service.
Smart Images

Figure CN119128078B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a health education intelligent dialogue method, device, computer equipment and storage medium. Background Art
[0002] In the process of commodity sales, fast and efficient communication with customers is one of the important factors to promote sales. In order to save labor costs, chatbots came into being. Chatbots are based on artificial intelligence technology and are used to automatically solve customers' pre-sales consultation, after-sales support, usage methods, troubleshooting, etc., which can significantly reduce the labor costs of enterprises.
[0003] In the related technologies, chatbots are often used for initial communication due to the low efficiency and high cost of manual customer service in the field of health management. However, although the existing chatbots have improved efficiency to a certain extent, their answers are often lacking in pertinence and intelligence, and they are unable to effectively use the health knowledge base and user health data for personalized responses. Summary of the invention
[0004] In view of this, the present invention provides a health education intelligent dialogue method, apparatus, computer equipment and storage medium to solve the problem of being unable to effectively utilize knowledge base and user data for personalized automatic replies.
[0005] In a first aspect, the present invention provides a health education intelligent dialogue method, the method comprising:
[0006] Get input information and health data entered by the user;
[0007] Performing intent recognition on the input information to determine the intent information corresponding to the input information;
[0008] Based on the intent information, health data and pre-built health knowledge base are used to recommend user preference keywords and automatic marketing recommendations for the intent information, and generate recommendation information corresponding to the intent information;
[0009] Based on the intention information, generate prompt data corresponding to the intention information, fit the recommended information with the prompt data, and obtain fitting data;
[0010] The fitted data is input into the pre-trained dialogue model to obtain the dialogue output result, and the dialogue output result is pushed to the user.
[0011] In the present invention, by identifying the intention of the information input by the user, generating recommendation information using the user's health data and health database, generating dialogues by fitting the intentions and recommendations, and pushing the dialogue output results to the customer, the health knowledge base and user health data are effectively used for personalized replies, which significantly improves the customer service efficiency in commodity sales; personalized replies further improve user experience and satisfaction, promote user operations and conversions, and increase user stickiness. Intelligent generation of dialogue output results reduces the workload and cost of manual customer service and improves the operational efficiency of the enterprise.
[0012] In an optional implementation, the recommendation information includes preference keyword recommendation data, and recommending user preference keywords for the intent information includes:
[0013] Get the user's historical chat record data;
[0014] Perform information conversion on historical chat record data to obtain chat record text;
[0015] Based on the chat record text, generate the relationship between the chat message and the reply message;
[0016] Based on time decay, the preferred keywords are extracted from the chat record text to obtain the user's preferred keywords;
[0017] Based on the preferred keywords, the relationship between chat information and reply information, and the intent information, the preferred keyword recommendation data corresponding to the intent information is generated.
[0018] In this method, chat record text is generated by converting historical chat record data into information, and preference keywords are extracted from the chat record text based on time decay. The obtained preference keywords can be closer to the user's current preferences, further improving the timeliness and accuracy of preference recommendations.
[0019] In an optional implementation, the recommendation information includes a user preference recommendation list, and recommending user preference keywords for the intent information further includes:
[0020] Obtain the user's historical interactive behavior data;
[0021] Preprocess the historical interactive behavior data to obtain preprocessed behavior data;
[0022] Based on the behavior data, the cosine similarity calculation is used to obtain the similar user data corresponding to the behavior data;
[0023] Based on historical interaction behavior data and similar user data, a user preference recommendation list is obtained by fitting;
[0024] Combine the user preference list and the preference keyword recommendation data to generate the preference keywords corresponding to the intent information.
[0025] In this method, similar user queries are performed on the user's historical interactive behavior data, and a user preference list is fitted to generate corresponding preference keywords, thereby achieving personalized recommendations based on user behavior and health data, further increasing user stickiness.
[0026] In an optional implementation, performing automated marketing recommendations on the intent information includes:
[0027] Generate usage frequency and duration data of health products based on behavioral data;
[0028] Obtain marketing activity data, and screen target users based on pre-built marketing strategies according to usage frequency data, duration data, and marketing activity data;
[0029] Push marketing campaign data to target users.
[0030] In this method, by generating frequency data and duration data of health product usage corresponding to user behavior data, combined with marketing activities, the target users corresponding to the marketing activities are screened, and marketing push is carried out for the target users to ensure that the marketing push is sent to users who are interested in the product, making the marketing push more targeted and further improving the user experience and satisfaction.
[0031] In an optional implementation, before pushing the dialog output result to the user, the method further includes:
[0032] Calculate the score of the dialogue output result and determine whether the score is lower than the preset threshold;
[0033] When the score is lower than the preset threshold, obtain a manual response, push the manual response to the user, and use the manual response to update the dialogue model;
[0034] When the score is not lower than the preset threshold, the dialogue output result is pushed to the user.
[0035] In this method, by scoring the dialogue output results output by the model, obtaining manual replies when the score is below a threshold and using the manual replies to update the dialogue model, the targeted nature of the dialogue output result generation of the dialogue model can be further improved; directly outputting the dialogue output results when the score is above the threshold can further reduce the workload and cost of manual customer service and improve enterprise operating efficiency.
[0036] In an optional implementation, calculating a score for the dialogue output result includes:
[0037] Using the scoring model and combining the relationship between chat information and reply information, output the initial score corresponding to the dialogue output result;
[0038] Obtain historical manual scores, and use the historical manual scores and initial scores to update the scoring model to obtain an updated scoring model;
[0039] Using the updated scoring model, the score of the dialogue output is calculated.
[0040] In this method, the dialogue output results are scored based on the relationship between the user's chat information and reply information. Combined with manual historical scoring, the accuracy of the scoring is further improved, thereby improving the targetedness of the dialogue model.
[0041] In a second aspect, the present invention provides a health education intelligent dialogue device, the device comprising:
[0042] A data acquisition module, used to acquire input information and health data input by the user;
[0043] An intention recognition module is used to recognize the intention of the input information and determine the intention information corresponding to the input information;
[0044] A recommendation information generation module is used to recommend user preference keywords and automatic marketing recommendations for the intent information based on the intent information, using health data and a pre-built health knowledge base, and generate recommendation information corresponding to the intent information;
[0045] A prompt fitting module is used to generate prompt data corresponding to the intention information based on the intention information, and fit the recommendation information with the prompt data to obtain fitting data;
[0046] The dialogue output result push module is used to input the fitting data into the pre-trained dialogue model, obtain the dialogue output result, and push the dialogue output result to the user.
[0047] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the health education intelligent dialogue method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0048] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the health education intelligent dialogue method of the first aspect or any corresponding embodiment thereof.
[0049] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the intelligent dialogue method for health education according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 It is a flowchart of the health education intelligent dialogue method according to an embodiment of the present invention.
[0052] Figure 2 is a schematic diagram of intent recognition according to an embodiment of the present invention.
[0053] Figure 3 is a schematic diagram of an intelligent chat robot agent module according to an embodiment of the present invention.
[0054] Figure 4 It is a flowchart of another health education intelligent dialogue method according to an embodiment of the present invention.
[0055] Figure 5 It is a schematic diagram of chat text conversion according to an embodiment of the present invention.
[0056] Figure 6 is a schematic diagram of a keyword whitelist according to an embodiment of the present invention.
[0057] Figure 7 It is a schematic diagram of constructing a knowledge base according to an embodiment of the present invention.
[0058] Figure 8 It is a schematic diagram of a knowledge base expansion according to an embodiment of the present invention.
[0059] Fig. 9 It is a schematic diagram of a process of article disassembly according to an embodiment of the present invention.
[0060] Fig.10 It is a schematic diagram of a knowledge query process according to an embodiment of the present invention.
[0061] Fig.11 It is a flowchart of another health education intelligent dialogue method according to an embodiment of the present invention.
[0062] Fig.12is a schematic diagram of a marketing strategy according to an embodiment of the present invention.
[0063] Fig.13 4 is a structural block diagram of a health education intelligent dialogue device according to an embodiment of the present invention.
[0064] Fig.14 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0066] In the related technologies, chatbots are often used for initial communication due to the low efficiency and high cost of manual customer service in the field of health management. However, although the existing chatbots have improved efficiency to a certain extent, their answers are often lacking in pertinence and intelligence, and they are unable to effectively use the health knowledge base and user health data for personalized responses.
[0067] In order to solve the above problems, an embodiment of the present invention provides a health education intelligent dialogue method for use in a computer device. It should be noted that its execution subject can be a health education intelligent dialogue device, which can be implemented as part or all of the computer device through software, hardware, or a combination of software and hardware. The computer device can be a terminal or a client or a server. The server can be a single server or a server cluster composed of multiple servers. The terminal in the embodiment of the present application can be a smart phone, a personal computer, a tablet computer, or other intelligent hardware devices. In the following method embodiments, the execution subject is a computer device as an example for explanation.
[0068] The computer device in this embodiment is suitable for the use scenario of the application of intelligent chat robots in the sale of health products. The present invention provides an intelligent dialogue method for health education, which recognizes the intention of the information input by the user, generates recommendation information using the user's health data and health database, generates dialogues by fitting the intentions and recommendations, and pushes the dialogue output results to the customer, thereby realizing the effective use of the health knowledge base and user health data for personalized replies, significantly improving the customer service efficiency in commodity sales; personalized replies further improve user experience and satisfaction, promote user operations and conversions, and increase user stickiness. Intelligent generation of dialogue output results reduces the workload and cost of manual customer service and improves the efficiency of enterprise operations.
[0069] According to an embodiment of the present invention, an embodiment of a health education intelligent dialogue method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0070] In this embodiment, a health education intelligent dialogue method is provided, which can be used in the above-mentioned computer device. Figure 1 is a flow chart of a health education intelligent dialogue method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0071] Step S101, obtaining input information and health data input by the user.
[0072] In one example, the input information may include chat records, behavior data, etc.
[0073] Step S102: perform intent recognition on the input information to determine intent information corresponding to the input information.
[0074] In one example, the BERT algorithm can be used to identify specific intent based on user input. If the intent is simply to query information, there is no need to call modules such as keyword recommendation and knowledge graph recall. Figure 2 is a schematic diagram of intent recognition according to an embodiment of the present invention, such as Figure 2 As shown in the figure, since users often need to inquire about certain product functions, such as why points cannot be redeemed or why red envelopes have not been received, it is necessary to develop corresponding backend functions for such inquiries and package these functions into services that can be called by interfaces. When users enter chat information, the user intent is generated through the BERT algorithm; based on the user intent, it is dispatched to specific product functions and packaged for output.
[0075] Step S103, based on the intention information, using health data and a pre-built health knowledge base, recommends user preference keywords and automated marketing recommendations for the intention information, and generates recommendation information corresponding to the intention information.
[0076] In one example, based on user intent, user preference recommendation module, user preference keyword recommendation module, knowledge graph recall module, automated marketing recommendation module, automated response recommendation module and other modules are called concurrently to perform user preference keyword recommendation and automated marketing recommendation, and generate a call return result corresponding to the intent information.
[0077] Step S104: based on the intention information, generate prompt data corresponding to the intention information, and fit the recommended information with the prompt data to obtain fitting data.
[0078] In one example, in order to ensure the accuracy of information, different prompts are written based on different user intentions, and the call return results of the above steps are merged with the prompt template to obtain fitting data.
[0079] Step S105, input the fitting data into the pre-trained dialogue model to obtain a dialogue output result, and push the dialogue output result to the user.
[0080] In one example, the fitting data is uniformly input into a large model application to obtain a dialogue output result. The pre-trained dialogue model can be a large model application such as GPT and Tongyi Qianwen. The specific dialogue model is not limited in the present invention.
[0081] In one implementation scenario, Figure 3 is a schematic diagram of an intelligent chat robot agent module according to an embodiment of the present invention. Figure 3 As shown in the figure, the intelligent chatbot agent module can perform the following process: 1) User intent recognition: Based on user input, the BERT algorithm is used to identify specific intents, and then which modules are scheduled based on the intent. 2) Module collaborative call: Based on the intent, concurrently call user preference recommendation, user preference keyword recommendation, knowledge graph recall, automated marketing recommendation, automated answer recommendation and other modules. If the intent is only to query information, then there is no need to call keyword recommendation, knowledge graph recall and other modules. 3) Prompt template generation module: In order to ensure the accuracy of information, different prompts will be written based on different user intents. 4) Multi-data information fitting: Based on the results returned by the above calls, they will be merged with the prompt template and then uniformly given to the large model application (GPT, Tongyi Qianwen, etc.). 5) Evaluation and scoring: System scoring is performed based on the dialogue output results of the large model, including machine scoring and manual scoring: Manual scoring is asynchronous, similar to auditing, and is used for model training of the scoring system; machine scoring uses the BLEU model user chat / reply relationship data to generate scores, and also uses historical manual scoring as a reference to correct the scoring accuracy. 6) Human-computer switching: If the output dialogue output result score is lower than a specific threshold, the system will return the chat to the administrator, who will reply. The result of the administrator's reply can also be output as subsequent learning content; if the dialogue output result score is higher than a specific threshold, the dialogue output result returned by the large model will be directly pushed to the user.
[0082] The health education intelligent dialogue method provided in this embodiment recognizes the intention of the information input by the user, generates recommendation information using the user's health data and health database, generates dialogue by fitting the intention and recommendation, and pushes the dialogue output results to the customer, thereby realizing the effective use of the health knowledge base and user health data for personalized replies, significantly improving the customer service efficiency in commodity sales; personalized replies further improve user experience and satisfaction, promote user operations and conversions, and increase user stickiness. Intelligent generation of dialogue output results reduces the workload and cost of manual customer service and improves the operational efficiency of the enterprise.
[0083] In this embodiment, a health education intelligent dialogue method is provided, which can be used in the above-mentioned computer device. Figure 4 FIG. 1 is a flow chart of another health education intelligent dialogue method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0084] Step S401, obtaining input information and health data input by the user. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0085] Step S402: perform intent recognition on the input information to determine the intent information corresponding to the input information. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0086] Step S403, based on the intent information, using health data and a pre-built health knowledge base, recommends user preference keywords and automated marketing recommendations for the intent information, and generates recommendation information corresponding to the intent information.
[0087] Specifically, the above step S403 includes:
[0088] Step S4031, obtaining the user's historical chat record data.
[0089] Step S4032, convert the historical chat record data into information to obtain the chat record text.
[0090] Step S4033, generating the relationship between the chat information and the reply information based on the chat record text.
[0091] Step S4034: based on time decay, extract the preferred keywords from the chat record text to obtain the user's preferred keywords.
[0092] Step S4035, based on the preferred keywords, the relationship between the chat information and the reply information, and the intention information, generate the preferred keyword recommendation data corresponding to the intention information.
[0093] In one example, the user preference keyword recommendation module can be implemented by the following steps:
[0094] a. Chat record collection: Automatically collect chat records between users and the system by integrating instant messaging tools. Records include metadata such as text content, timestamp, and user ID. Currently, there are three main channels for communicating with users: WeChat private chat, WeChat group chat, and app message chat. Among them, the two chat methods of WeChat need to back up records through WeChat's session archive interface. App chat records can be archived within the system, and they need to be distinguished according to the chat record type when archiving. In addition, during the storage process, attention should be paid to the storage of multimedia materials. Information such as pictures, videos, and voices need to be stored in the cloud such as OSS. Only media network paths are stored in the system.
[0095] b. Information conversion: Figure 5 is a schematic diagram of a chat text conversion according to an embodiment of the present invention, such as Figure 5 As shown in the figure, due to the presence of multimedia data, it is necessary to convert video content, voice content, and image content into text information based on open source algorithm models. For example, FFmpeg first converts the video into voice + multi-frame pictures, then converts the voice into text, and converts the picture into text (PaddleOCR), and finally generates text. Since the chat records may contain dialects, we selected well-known domestic models such as iFLYTEK and Baidu Speech during the technology selection process, and conducted ab evaluation on the models, and identified the language type to select a specific model for conversion.
[0096] c. User preference keyword extraction: Based on the user chat record text, use NLP to segment the text, and then calculate the user preference. The typical algorithm model is TextRankdeng. Considering the time factor, the newer the user's chat record, the more interested the user is. Therefore, it is necessary to extract the preference keywords based on time decay. The decay function is shown in the following formula:
[0097] w=e -λ·Δt
[0098] Among them, w is the weight, λ is the decay rate, and Δt is the time difference between the current time and the time when the message was sent. Based on the decay function, each user chat record will have a corresponding decay function weight after word segmentation.
[0099] d. User chat / reply relationship data: Based on the existing chat data, especially 1v1 private chats, the relationship between user chat information and reply information can be generated. This relationship can be used for subsequent multi-dimensional scoring of machine-generated content.
[0100] In this method, chat record text is generated by converting historical chat record data into information, and preference keywords are extracted from the chat record text based on time decay. The obtained preference keywords can be closer to the user's current preferences, further improving the timeliness and accuracy of preference recommendations.
[0101] Step S4036, obtaining the user's historical interactive behavior data.
[0102] Step S4037, pre-processing the historical interactive behavior data to obtain pre-processed behavior data.
[0103] Step S4038: Based on the behavior data, similar user data corresponding to the behavior data is obtained by using cosine similarity calculation.
[0104] Step S4039: Based on the historical interactive behavior data and similar user data, a user preference recommendation list is fitted.
[0105] Step S4030: Generate preference keywords corresponding to the intent information by combining the user preference list and the preference keyword recommendation data.
[0106] In one example, the user preference recommendation module can be implemented by the following steps:
[0107] a. Behavioral data collection: Through API interfaces and data embedding technology, various interactive behavior data of users on the app are collected in real time, including browsing videos, watching live broadcasts, participating in quizzes, signing in, etc. When collecting data, pay attention to protecting user privacy and comply with relevant laws and regulations.
[0108] b. Behavioral data cleaning: Use ETL (Extract, Transform, Load) technology to clean and pre-process the collected raw data. The processing includes deduplication, filling missing values, data normalization and other steps to ensure the accuracy and consistency of the data.
[0109] c. Behavioral data storage: Store the cleaned data in a distributed database to ensure high availability and fast access to the data.
[0110] d. User preference content extraction: Based on the above behavioral data, information that can be obtained includes: user viewing videos, viewing time, completion rate, etc.; user browsing content; user evaluation content, comment information, like content, likes, collections, etc.; user participation in answering questions; user participation in signing in; user active time period, active time, etc.
[0111] Based on the user's behavior data, cosine similarity is used to calculate similar users. The formula is as follows:
[0112]
[0113] Wherein, u and V represent two users (or contents) respectively; I uv represents the set of content browsed by both user u and user v; r u,i and r v,i Respectively represent the ratings of user u and user v on content i; It represents the dot product of the ratings of user u and user V on the jointly evaluated content, which reflects the similarity of the ratings of the two users on the jointly evaluated content; It is the square root of the sum of the squares of the ratings of all the contents rated by user u; is the square root of the sum of the squares of the ratings of all the content evaluated by user v. These two parts represent the modulus of the rating vectors of user u and user v. The formula calculates the cosine value between the two rating vectors, and the value range is [-1, 1]. The closer the value is to 1, the more similar the interests of the two users are; the closer the value is to -1, the less similar the two are. The user similarity matrix and the content similarity matrix are obtained.
[0114] Based on the above information such as u2c (user browsing content), u2u (user similar user), and c2c (content similar content), the hybrid recommendation system is finally used to fit three parts of data: Recommendation based on user-user similarity: find users similar to the current user and recommend items that these similar users like. Recommendation based on item-item similarity: recommend other items similar to the items browsed or purchased by the user. Combined with user-item interaction data: integrate the user's historical behavior, the behavior of similar users, and the information of similar items to generate the final recommendation list.
[0115] e. User preference keyword extraction: Based on the above user preference content, the user's preferred keywords can be obtained by referring to the above multimedia extraction technology.
[0116] In one implementation scenario, the pre-built health knowledge base can be implemented through a knowledge graph establishment module, specifically including: 1) Establishing a keyword whitelist: Since products are enumerable, whitelist keywords are established using information such as product names, effects, and related health indicators. Figure 6 is a schematic diagram of a keyword whitelist according to an embodiment of the present invention, such as Figure 6 As shown, the knowledge base is stored using Ne04j, and each node is a keyword whitelist.
[0117] 2) Knowledge base construction: Figure 7 is a schematic diagram of a knowledge base construction according to an embodiment of the present invention, such as Figure 7As shown, based on the above whitelist keywords, combined with the internal knowledge base of the enterprise, the knowledge base is expanded, wherein the produced nodes need to ensure that the knowledge base content security is controllable and the expansion method is adopted. Figure 8 is a schematic diagram of a knowledge base expansion according to an embodiment of the present invention, such as Figure 8 As shown in Figure 1, the process of expanding the knowledge base is mainly to break down a large article into small articles.
[0118] Specifically, Fig. 9 is a schematic diagram of a process of article disassembly according to an embodiment of the present invention, such as Fig. 9 As shown, the disassembly process includes: Data preprocessing: extract document content. Text segmentation: use NLP technology to segment the text into multiple paragraphs or small articles. Sentence segmentation and topic models can be used here to identify paragraphs. Paragraph clustering: use topic models (such as LDA) to cluster paragraphs into different small articles. Title generation: use a pre-trained Transformer model (such as BERT or GPT) to generate the title of each small article. Output results: output the generated small articles and corresponding titles.
[0119] 3) Based on the original keywords, recall the newly generated small article titles; generate keywords and new keyword edges based on the topic model (LDA), complete the further expansion of the knowledge base, and the generated data needs to be further manually evaluated and reviewed to remove bad cases. Specifically include:
[0120] a. Knowledge update: Use crawlers to regularly update knowledge graphs from professional health websites, medical literature, and internal expert systems to ensure the timeliness and authority of its content. At the same time, provide a knowledge base background to regularly enter relevant health knowledge and manual review intervention. Based on the knowledge base that is also externally crawled and regularly entered, we use the internal knowledge base expansion solution to further expand the keyword knowledge base.
[0121] b. Knowledge query: Fig.10 is a schematic diagram of a knowledge query process according to an embodiment of the present invention, such as Fig.10 As shown in the figure, knowledge is indexed and constructed through Elasticsearch. At the same time, in order to achieve accurate retrieval of content, it is necessary to intervene in the index data and filter the index using the keyword whitelist to ensure that keywords not in the whitelist will not be excessively recalled. The scope of the whitelist is all nodes of the keyword knowledge base generated above. At the same time, when querying, neo4j will be called first to expand the keywords according to the keywords, and then the expanded keywords will be given to Elasticsearch for result recall.
[0122] Step S404: Generate prompt data corresponding to the intention information based on the intention information, and fit the recommended information with the prompt data to obtain fitting data. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0123] Step S405: Input the fitted data into the pre-trained dialogue model to obtain the dialogue output result, and push the dialogue output result to the user. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0124] The health education intelligent dialogue method provided in this embodiment converts information from historical chat record data to generate chat record text, extracts preference keywords from the chat record text based on time decay, and obtains preference keywords that are closer to the user's current preferences, further improving the timeliness and accuracy of preference recommendations. By performing similar user queries on the user's historical interactive behavior data, fitting to obtain a user preference list, and generating corresponding preference keywords, personalized recommendations based on user behavior and health data are implemented, further increasing user stickiness.
[0125] In this embodiment, a health education intelligent dialogue method is provided, which can be used in the above-mentioned computer device. Fig.11 is a flow chart of another health education intelligent dialogue method according to an embodiment of the present invention. Fig.11 As shown, the process includes the following steps:
[0126] Step S1101, obtaining input information and health data input by the user. Figure 4 Step S402 of the illustrated embodiment will not be described in detail here.
[0127] Step S1102: perform intent recognition on the input information to determine the intent information corresponding to the input information. Figure 4 Step S402 of the illustrated embodiment will not be described in detail here.
[0128] Step S1103, based on the intent information, using health data and a pre-built health knowledge base, recommends user preference keywords and automated marketing recommendations for the intent information, and generates recommendation information corresponding to the intent information.
[0129] Specifically, the above step S1103 includes:
[0130] Step S11031, based on the behavior data, generate the usage frequency data and duration data of the health product.
[0131] Step S11032, obtaining marketing activity data, and screening target users based on the pre-built marketing strategy according to the usage frequency data, duration data and marketing activity data.
[0132] Step S11033: Push the marketing activity data to the target user.
[0133] In one example, 1) basic data generation: based on the user behavior data mentioned above, the frequency and duration data of user product use are generated, such as the number of times and duration of user use of a product within a specific period of time.
[0134] 2) Basic activity rhythm data: structured marketing rhythm, obtaining the current store’s ongoing activities based on time.
[0135] 3) Marketing strategy definition: Fig.12 is a schematic diagram of a marketing strategy according to an embodiment of the present invention, such as Fig.12 As shown, the marketing strategy may include: filtering target users based on start time, end time, product, statistical item, operation symbol, quantity and other information, and then pushing marketing activities to target users to inform them to perform certain actions. For example: filtering users who watched the live broadcast less than 1 times between 2024.7.30 and 2024.8.04, and pushing messages to users to inform them that they need to watch the live broadcast to get rewards, which can be pushed as chat content.
[0136] 4) Marketing recommendation: Based on the marketing strategy definition, the marketing recommendation module is packaged, the user ID is input, the marketing activity information is output, and the chat information is output based on the activity information as the context after being processed and generated by the large model.
[0137] In this method, by generating frequency data and duration data of health product usage corresponding to user behavior data, combined with marketing activities, the target users corresponding to the marketing activities are screened, and marketing push is carried out for the target users to ensure that the marketing push is sent to users who are interested in the product, making the marketing push more targeted and further improving the user experience and satisfaction.
[0138] Step S1104: Generate prompt data corresponding to the intent information based on the intent information, and fit the recommended information with the prompt data to obtain fitting data. Figure 4 Step S404 of the illustrated embodiment will not be described in detail here.
[0139] Step S1105, calculating a score for the dialogue output result, and determining whether the score is lower than a preset threshold.
[0140] Specifically, the above step S1105 includes:
[0141] Step S11051, using the scoring model, combined with the relationship between the chat information and the reply information, outputs the initial score corresponding to the dialogue output result.
[0142] Step S11052, obtaining historical manual scores, and updating the scoring model using the historical manual scores and the initial scores to obtain an updated scoring model.
[0143] Step S11053, using the updated scoring model, calculate the score of the dialogue output result.
[0144] Step S1106, when the score is lower than a preset threshold, obtain a manual reply, push the manual reply to the user, and use the manual reply to update the dialogue model.
[0145] Step S1017: When the score is not lower than the preset threshold, the dialogue output result is pushed to the user.
[0146] In one example, scoring is performed based on the dialogue output of a large model, including machine scoring and manual scoring: manual scoring is asynchronous, similar to auditing, and is used to train the model of the scoring system. Machine scoring uses the BLEU model to refer to the user chat / reply relationship data generated above to generate scores, and also uses historical manual scoring as a reference to correct the scoring accuracy.
[0147] In this method, by scoring the dialogue output results output by the model, obtaining manual replies when the scores are below the threshold and using the manual replies to update the dialogue model, the pertinence of the dialogue output results generated by the dialogue model can be further improved; directly outputting the dialogue output results when the scores are above the threshold can further reduce the workload and cost of manual customer service and improve the operational efficiency of the enterprise. The dialogue output results are scored based on the relationship between the user's chat information and the reply information, and combined with the manual historical scoring, the accuracy of the scoring is further improved, thereby improving the pertinence of the dialogue model.
[0148] Step S1018: Input the fitted data into the pre-trained dialogue model to obtain the dialogue output result, and push the dialogue output result to the user. Figure 4 Step S405 of the illustrated embodiment will not be described in detail here.
[0149] The health education intelligent dialogue method provided in this embodiment generates the usage frequency data and duration data of health products corresponding to the user behavior data, combines the marketing activities, screens the target users corresponding to the marketing activities, and pushes marketing to the target users, ensuring that the marketing is pushed to users who are interested in the product, making the marketing push more targeted, thereby further improving the user experience and satisfaction. By scoring the dialogue output results output by the model, obtaining manual replies when the score is lower than the threshold and using the manual replies to update the dialogue model, the pertinence of the dialogue output results generated by the dialogue model can be further improved; directly outputting the dialogue output results when the score is higher than the threshold can further reduce the workload and cost of manual customer service and improve the operational efficiency of the enterprise. The dialogue output results are scored through the relationship between the user's chat information and the reply information, and combined with the manual historical scoring, the accuracy of the scoring is further improved, thereby improving the pertinence of the dialogue model.
[0150] In the present embodiment, a health education intelligent dialogue device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0151] This embodiment provides a health education intelligent dialogue device, such as Fig.13 As shown, including:
[0152] The data acquisition module 1301 is used to acquire the input information and health data input by the user. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0153] The intention recognition module 1302 is used to recognize the intention of the input information and determine the intention information corresponding to the input information. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0154] The recommendation information generation module 1303 is used to recommend user preference keywords and automatic marketing recommendations based on the intention information using health data and a pre-built health knowledge base, and generate recommendation information corresponding to the intention information. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0155] The prompt fitting module 1304 is used to generate prompt data corresponding to the intention information based on the intention information, and fit the recommended information with the prompt data to obtain fitting data. Figure 1Step S104 of the illustrated embodiment will not be described in detail here.
[0156] The dialogue output result push module 1305 is used to input the fitting data into the pre-trained dialogue model to obtain the dialogue output result, and push the dialogue output result to the user. For details, please refer to Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.
[0157] In some optional implementations, the recommendation information generating module 1303 includes:
[0158] The chat data acquisition unit is used to acquire the user's historical chat record data.
[0159] The information conversion unit is used to convert the historical chat record data into information to obtain the chat record text.
[0160] The relationship generating unit is used to generate the relationship between the chat information and the reply information based on the chat record text.
[0161] The first preference keyword generating unit is used to extract preference keywords from the chat record text based on time decay to obtain the user's preference keywords.
[0162] The preference keyword recommendation unit is used to generate preference keyword recommendation data corresponding to the intent information based on the preference keywords, the relationship between the chat information and the reply information, and the intent information.
[0163] In some optional implementations, the recommendation information generating module 1303 includes:
[0164] The behavior data acquisition unit is used to acquire the user's historical interactive behavior data.
[0165] The data preprocessing unit is used to preprocess the historical interactive behavior data to obtain preprocessed behavior data.
[0166] The similar user calculation unit is used to obtain similar user data corresponding to the behavior data by using cosine similarity calculation based on the behavior data.
[0167] The preference recommendation list fitting unit is used to fit the user preference recommendation list based on the historical interaction behavior data and similar user data.
[0168] The second preference keyword generating unit is used to generate a preference keyword corresponding to the intention information by combining the user preference list and the preference keyword recommendation data.
[0169] In some optional implementations, the recommendation information generating module 1303 includes:
[0170] The product usage unit is used to generate frequency and duration data of health product usage based on behavioral data.
[0171] The target user screening unit is used to obtain marketing activity data, and screen the target users based on the usage frequency data, duration data and marketing activity data and the pre-built marketing strategy.
[0172] The marketing data push unit is used to push marketing activity data to target users.
[0173] In some optional implementations, the health education intelligent dialogue device includes:
[0174] The scoring calculation unit is used to calculate the score of the dialogue output result and determine whether the score is lower than a preset threshold.
[0175] The manual response unit is used to obtain manual responses when the score is lower than a preset threshold, push the manual responses to the user, and use the manual responses to update the dialogue model.
[0176] The result push unit is used to push the dialogue output result to the user when the score is not lower than a preset threshold.
[0177] In some optional implementations, the score calculation unit includes:
[0178] The scoring generation subunit is used to use the scoring model and the relationship between the chat information and the reply information to output the initial score corresponding to the dialogue output result.
[0179] The model updating subunit is used to obtain historical manual ratings, and to update the rating model using the historical manual ratings and the initial ratings to obtain an updated rating model.
[0180] The scoring calculation subunit is used to calculate the score of the dialogue output result using the updated scoring model.
[0181] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0182] The health education intelligent dialogue device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0183] The embodiment of the present invention also provides a computer device having the above Fig.13 The health education intelligent dialogue device shown.
[0184] See also Fig.14 , Fig.14 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.14 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.14 A processor 10 is taken as an example.
[0185] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0186] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0187] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0188] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0189] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig.14 The example of connecting through bus is taken in the following.
[0190] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0191] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0192] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0193] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A health education intelligent dialogue method, characterized in that: The method comprises: Get input information and health data entered by the user; Performing intent recognition on the input information to determine intent information corresponding to the input information; Based on the intention information, using the health data and a pre-built health knowledge base, recommending user preference keywords and automated marketing recommendations for the intention information, and generating recommendation information corresponding to the intention information; Based on the intention information, generating prompt data corresponding to the intention information, and fitting the recommendation information with the prompt data to obtain fitting data; Inputting the fitting data into a pre-trained dialogue model to obtain a dialogue output result, and pushing the dialogue output result to the user; The recommendation information includes preference keyword recommendation data, and the recommending user preference keywords for the intention information includes: Get the user's historical chat record data; Performing information conversion on the historical chat record data to obtain a chat record text; Based on the chat record text, generate a relationship between the chat information and the reply information; Based on time decay, extracting preferred keywords from the chat record text to obtain the user's preferred keywords; Based on the preferred keywords, the relationship between the chat information and the reply information, and the intention information, generating the preferred keyword recommendation data corresponding to the intention information; The recommendation information includes a user preference recommendation list, and the recommending user preference keywords for the intent information further includes: Obtain the user's historical interactive behavior data; Preprocessing the historical interactive behavior data to obtain preprocessed behavior data; Based on the behavior data, similar user data corresponding to the behavior data is obtained by using cosine similarity calculation; Based on the historical interactive behavior data and the similar user data, fitting to obtain a user preference recommendation list; Combining the user preference recommendation list and the preference keyword recommendation data, generating a preference keyword corresponding to the intent information; Automated marketing recommendations are made based on the intent information, including: Based on the behavior data, generate usage frequency data and duration data of the health product; Acquire marketing activity data, and screen target users based on the usage frequency data, the duration data, and the marketing activity data and a pre-built marketing strategy; The marketing campaign data is pushed to the target user.
2. The method according to claim 1, characterized in that: Before pushing the dialog output result to the user, the method further includes: Calculating a score for the dialogue output result, and determining whether the score is lower than a preset threshold; When the score is lower than the preset threshold, obtaining a manual reply, pushing the manual reply to the user, and updating the dialogue model using the manual reply; When the score is not lower than the preset threshold, the dialogue output result is pushed to the user.
3. The method according to claim 2, characterized in that The calculating a score for the dialogue output result includes: Using a scoring model and combining the relationship between the chat information and the reply information, output an initial score corresponding to the dialogue output result; Obtaining historical manual scores, and updating the scoring model using the historical manual scores and the initial scores to obtain an updated scoring model; The updated scoring model is used to calculate the score of the dialogue output result.
4. A health education intelligent dialogue device, characterized in that: The device comprises: A data acquisition module, used to acquire input information and health data input by the user; An intention recognition module, used to perform intention recognition on the input information and determine the intention information corresponding to the input information; A recommendation information generation module, for performing user preference keyword recommendations and automated marketing recommendations on the intention information based on the intention information, using the health data and a pre-built health knowledge base, and generating recommendation information corresponding to the intention information; a prompt fitting module, configured to generate prompt data corresponding to the intention information based on the intention information, and fit the recommendation information with the prompt data to obtain fitting data; A dialogue output result push module is used to input the fitting data into a pre-trained dialogue model to obtain a dialogue output result, and push the dialogue output result to the user; The recommendation information generation module includes: A chat data acquisition unit, used to acquire the user's historical chat record data; An information conversion unit, used to convert historical chat record data into information to obtain chat record text; A relationship generating unit, used for generating a relationship between a chat message and a reply message based on the chat record text; A first preference keyword generating unit is used to extract preference keywords from the chat record text based on time decay to obtain the user's preference keywords; A preference keyword recommendation unit, used to generate preference keyword recommendation data corresponding to the intention information based on the preference keywords, the relationship between the chat information and the reply information, and the intention information; A behavior data acquisition unit is used to acquire the user's historical interactive behavior data; a data preprocessing unit is used to preprocess the historical interactive behavior data to obtain preprocessed behavior data; A similar user calculation unit, used to obtain similar user data corresponding to the behavior data by using cosine similarity calculation based on the behavior data; A preference recommendation list fitting unit is used to fit a user preference recommendation list based on historical interaction behavior data and similar user data; A second preference keyword generating unit, configured to generate a preference keyword corresponding to the intention information by combining the user preference recommendation list and the preference keyword recommendation data; Automated marketing recommendations are made based on the intent information, including: Based on the behavior data, generate usage frequency data and duration data of the health product; Acquire marketing activity data, and screen target users based on the usage frequency data, the duration data, and the marketing activity data and a pre-built marketing strategy; The marketing campaign data is pushed to the target user.
5. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the health education intelligent dialogue method according to any one of claims 1 to 3 by executing the computer instructions.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the health education intelligent dialogue method according to any one of claims 1 to 3.
7. A computer program product, characterized in that It comprises computer instructions, and the computer instructions are used to enable a computer to execute the health education intelligent dialogue method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Information recommendation method and apparatus
CN106970949A
Method and device for providing conversation service to customer
CN108418981A
Scenic spot information recommendation method and device, electronic equipment and storage medium
CN118364169A
Cited By
Method and system for generating personalized health education content for old people based on multi-modal data
CN122414378A