Intelligent reply method and device, computer equipment and storage medium
By combining multi-source knowledge bases and large knowledge models, the intelligent customer service system can accurately understand user questions and generate personalized responses, solving the problem of inaccurate responses in existing technologies and improving user experience.
Patent Information
- Application Number
- CN202511218853.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-10-17
AI Technical Summary
When handling user inquiries, existing intelligent customer service systems, especially in the fields of healthcare and fintech, lack the ability to understand professional terms and complex concepts, resulting in inaccurate responses.
By receiving user consultation requests, using multi-source knowledge bases for semantic matching to generate classification labels, calling the knowledge model to generate the initial reply text, and adjusting the reply content based on the user's historical interaction data to ensure the accuracy and personalization of the reply.
It improves the accuracy and personalization of responses to user inquiries, and enhances user satisfaction and the overall performance of the intelligent customer service system.
Smart Images

Figure CN120804269A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to an intelligent reply method and device, computer equipment and a computer readable storage medium. BACKGROUND
[0002] At present, with the rapid development of information technology, users send consultation requests to service providers through various clients (such as mobile devices, web browsers, etc.). The traditional customer service system mainly relies on manual customer service, which has problems such as long response time, high cost, and unstable service quality. In recent years, with the development of natural language processing (NLP) and machine learning technology, intelligent customer service systems have gradually become an effective means to solve these problems. However, the existing intelligent customer service system often does not accurately understand the semantics of the problem when processing user consultation, resulting in a deviation between the generated reply and the user's real needs.
[0003] In the field of medical health, user consultation needs are particularly complex and diverse. Patients may need to consult disease symptoms, treatment plans, drug use methods, appointment registration information, etc. Medical health consultation often involves a large number of professional terms and complex medical concepts, and the existing intelligent customer service system has limited understanding of these professional terms, resulting in inaccurate generated replies.
[0004] In the field of financial technology, user consultation needs are also complex and diverse, involving financial product recommendations, investment consultation, account management, risk management, etc. Financial technology consultation often involves complex financial products and investment strategies, and the existing intelligent customer service system has limited understanding of these complex concepts, resulting in inaccurate generated replies.
[0005] Therefore, how to provide an intelligent reply method, device, computer equipment and computer readable storage medium to effectively improve the accuracy of the reply content when the user consults is a problem that the technical personnel in the field are eager to solve at present. SUMMARY
[0006] In view of the above deficiencies of the prior art, the purpose of the present application is to provide an intelligent reply method, device, computer equipment and computer readable storage medium, which aims to solve the problem of how to effectively improve the accuracy of the reply content when the user consults.
[0007] In order to achieve the above purpose, the present application adopts the following technical solutions:
[0008] In a first aspect, the present application provides an intelligent reply method, comprising:
[0009] receiving a consultation request sent by a target user through a client;
[0010] parsing the consultation request to extract a consultation question;
[0011] performing semantic matching on the consultation question based on a preset multi-source knowledge base to generate a classification label of the consultation question;
[0012] based on the classification label, calling a corresponding knowledge large model to process the consultation question to generate an initial reply text;
[0013] adjusting the initial reply text according to historical interaction data of the target user in the client to generate a target reply text, and returning the target reply text to the client for display.
[0014] In a second aspect, the present application provides an intelligent reply device, comprising:
[0015] a receiving module configured to receive a consultation request sent by a target user through a client;
[0016] a parsing module configured to parse the consultation request to extract a consultation question;
[0017] a semantic matching module configured to perform semantic matching on the consultation question based on a preset multi-source knowledge base to generate a classification label of the consultation question;
[0018] a processing module configured to, based on the classification label, call a corresponding knowledge large model to process the consultation question to generate an initial reply text;
[0019] an adjusting module configured to adjust the initial reply text according to historical interaction data of the target user in the client to generate a target reply text, and return the target reply text to the client for display.
[0020] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the intelligent reply method as described above when executing the computer program.
[0021] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the intelligent reply method as described above.
[0022] Compared with the prior art, the application provides an intelligent reply method, device, computer equipment and computer readable storage medium, wherein the intelligent reply method comprises the following steps: receiving a consultation request sent by a target user through a client; analyzing the consultation request and extracting a consultation question; performing semantic matching on the consultation question based on a preset multi-source knowledge base to generate a classification label of the consultation question; calling a corresponding knowledge large model to process the consultation question based on the classification label to generate an initial reply text; adjusting the initial reply text according to historical interaction data of the target user in the client to generate a target reply text, and returning the target reply text to the client for display; and thus the accuracy of reply content when the user consults can be effectively improved through the application. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0024] Figure 1 An application environment schematic diagram of an intelligent reply method provided by an embodiment of the present application.
[0025] Figure 2 A flowchart of an intelligent reply method provided by an embodiment of the present application.
[0026] Figure 3 A program module schematic diagram of an intelligent reply device provided by an embodiment of the present application.
[0027] Figure 4 A structure schematic diagram of a computer equipment provided by an embodiment of the present application.
[0028] Figure 5 Another structure schematic diagram of a computer equipment provided by an embodiment of the present application. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0030] It should be understood that the word "comprising" when used in the specification and claims of this application indicates the existence of the stated features, integers, steps, or elements but does not preclude the presence or addition of one or more other features, integers, steps, elements, or groups thereof.
[0031] It should also be understood that the term "and / or" when used in the specification and in the claims, means that the associated listed items are one or both of the items and can be a combination of any one or more of the associated listed items.
[0032] As used in the description of the application and the appended claims, the term "if' can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted to mean "once it is determined" or "in response to determining" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]" depending on the context.
[0033] In addition, the terms "first", "second", "third", etc. as used in the description of the application and the appended claims are merely used for distinguishing between similar elements and do not necessarily imply a serial or chronological order.
[0034] Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "in some embodiments" or "in other embodiments" or "in still other embodiments", etc. in various places throughout this specification are not necessarily all referring to the same embodiment, unless otherwise specifically so stated. The terms "including", "containing", "having" and variations thereof mean "including but not limited to", unless expressly specified otherwise.
[0035] It should be understood that the sequence of the steps in the following embodiments does not mean the order of execution, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the application.
[0036] In order to illustrate the technical solutions of the present application, the following specific embodiments are described.
[0037] An intelligent reply method provided by an embodiment of the present application can be applied to, for example, Figure 1The application environment shown, wherein the client and server communicate through the network. Among them, the client includes but is not limited to palmtop computer, desktop computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, cloud computer device, personal digital assistant (PDA) and other computer equipment. The server can be a stand-alone server, or a cloud server providing cloud services, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content distribution network (CDN), and big data and artificial intelligence platform, etc. Basic cloud computing services.
[0038] Please refer to Figure 2 An embodiment of the present application provides a kind of intelligent reply method, wherein the method comprises the following steps:
[0039] S100, receiving the consultation request sent by target user through client;
[0040] S200, the consultation request is parsed, and consultation question is extracted;
[0041] S300, based on the preset multi-source knowledge base, the consultation question is carried out semantic matching, and the classification label of the consultation question is generated;
[0042] S400, based on the classification label, corresponding knowledge big model is called to process the consultation question, and initial reply text is generated;
[0043] S500, according to the historical interaction data of the target user in the client, the initial reply text is adjusted, target reply text is generated, and the target reply text is returned to the client and is shown.
[0044] Specific implementation, the intelligent reply method of the embodiment can effectively improve the accuracy of reply content when user consults through a series of carefully designed steps. Specific analysis as follows:
[0045] 1. receiving consultation request (S100):
[0046] First, the consultation request sent by target user through client is received. This step ensures that the user's problem can be captured by the system in time, which provides the basis for subsequent processing.
[0047] 2. parsing consultation request (S200):
[0048] The system analyzes the consultation request and extracts the specific consultation question. This process, through natural language processing technology, can accurately extract key information from the user's input, ensuring the accuracy of subsequent processing.
[0049] 3. Semantic matching and classification (S300):
[0050] Based on the pre-set multi-source knowledge base, the system performs semantic matching on the consultation question and generates a classification label. The use of multi-source knowledge base provides rich semantic information, enabling the system to more accurately understand the user's problem intention. Through advanced semantic matching algorithms (such as BERT-based text embedding matching), the system can identify the core semantics of the user's question and classify it into the appropriate category. This process not only improves the accuracy of problem understanding, but also provides a clear direction for subsequent reply generation.
[0051] 4. Call knowledge large model to generate initial reply (S400):
[0052] According to the generated classification label, the system calls the corresponding knowledge large model to process the consultation question and generate an initial reply text. The use of knowledge large model ensures the professionalism and accuracy of the reply content. These models are trained on a large amount of data and can generate high-quality replies that meet user needs.
[0053] 5. Generate target reply based on historical interaction data (S500):
[0054] According to the historical interaction data of the target user in the client, the initial reply text is personalized and improved to generate a target reply text, which is returned to the client for display.
[0055] Through the above steps, the intelligent reply method of the present application can effectively improve the accuracy of the reply content when the user consults. The combination of multi-source knowledge base and advanced semantic matching algorithm ensures the accurate understanding of the user's problem by the system; while the use of knowledge large model and the combination of user historical interaction data ensure the professionalism and accuracy of the generated reply. This method not only improves user satisfaction, but also significantly improves the overall performance of the intelligent customer service system.
[0056] It can be understood that the intelligent reply method provided by the embodiments of the present application can be applied to the intelligent reply scene related to the medical health field, and the following is a specific example:
[0057] Scene description:
[0058] The user consults the symptoms and treatment methods of a certain disease through the online consultation service system of the hospital. The user sends a consultation request: "I have been feeling chest tightness and shortness of breath. Is this a symptom of heart disease? How should I treat it?"
[0059] Application process:
[0060] 1. Receive consultation request:
[0061] The system receives the consultation request sent by the user through the client: "I recently feel chest tightness and shortness of breath. Is this a symptom of heart disease? How should I treat it?"
[0062] 2. Analyze the consultation request:
[0063] The system analyzes the consultation request and extracts the key information: "chest tightness", "shortness of breath", "heart disease", "symptoms", "treatment", to form the consultation question.
[0064] 3. Semantic matching and classification:
[0065] The system performs semantic matching on the consultation question based on the pre-set multi-source knowledge base (including medical knowledge base, historical consultation records, etc.), and generates classification tags: "heart disease symptom consultation" and "heart disease treatment consultation".
[0066] 4. Call the knowledge big model to generate the initial reply:
[0067] The system calls the corresponding knowledge big model (such as the BERT model in the medical and health field) to process the consultation question according to the classification tags, and generates the initial reply text: "According to your description, chest tightness and shortness of breath may be symptoms of heart disease, but may also be caused by other diseases. It is recommended that you seek medical attention as soon as possible and undergo an electrocardiogram, echocardiogram, etc. to confirm the diagnosis. Before going to the hospital, avoid strenuous exercise and maintain emotional stability. If the symptoms worsen, please call the emergency number immediately."
[0068] 5. Generate target reply according to historical interaction data:
[0069] The system adjusts and perfects the initial reply text according to the user's historical interaction data in the client to generate a more accurate target reply text, and returns the generated target reply text to the client for display, so that the user can obtain accurate medical advice in a timely manner.
[0070] It can be understood that the intelligent reply method provided by the embodiment of the application can also be applied to the intelligent reply scene in the field of financial technology. The following is a specific example:
[0071] Scene description:
[0072] The user consults the annual yield of a certain financial product and the risk through the online customer service system of the bank. The user sends the consultation request: "I want to know the annual yield of this fund. Is the risk big or small?"
[0073] Application process:
[0074] 1. Receive consultation request:
[0075] The system receives the consultation request sent by the user through the client: "I want to know the annual yield of this fund, is the risk big or small?"
[0076] 2. Analyze the consultation request:
[0077] The system analyzes the consultation request and extracts the key information: "fund", "annual yield", "risk", to form the consultation question.
[0078] 3. Semantic matching and classification:
[0079] The system performs semantic matching on the consultation question based on the pre-set multi-source knowledge base (including financial product knowledge base, historical consultation records, etc.), and generates classification tags: "fund yield consultation" and "fund risk consultation".
[0080] 4. Call the knowledge big model to generate the initial reply:
[0081] The system calls the corresponding knowledge big model (such as GPT model in the field of financial technology) to process the consultation question according to the classification tags, and generates the initial reply text: "The annual yield of this fund is about 8%, but please note that the yield of the fund will be affected by market fluctuations, and the actual yield may be different. The risk rating of this fund is medium, suitable for investors with certain risk tolerance. Before investing, please read the fund prospectus carefully to understand the investment strategy and risk characteristics of the fund. If necessary, you can consult a professional financial consultant."
[0082] 5. Generate target reply according to historical interaction data:
[0083] The system adjusts and perfects the initial reply text according to the user's historical interaction data in the client to generate more accurate target reply text, and returns the generated target reply text to the client for display, so that the user can obtain accurate financial advice in time.
[0084] Through the above two specific examples, it can be seen that the application effect of the intelligent reply method provided by the embodiment of the application in the field of medical health and financial technology. Through multi-source knowledge base and advanced semantic matching technology, the method can accurately understand the user's consultation question, and call the corresponding knowledge big model and combine the user's historical interaction data to generate high-quality final reply. This not only improves the accuracy of the reply content, but also improves the user experience, so that the intelligent customer service system can provide effective service in complex professional fields.
[0085] Further, in one embodiment, the intelligent reply method, wherein the parsing the consultation request, extracting the consultation question, specifically includes the steps of:
[0086] Parsing the consultation request, extracting the text content and non-text content of the consultation request;
[0087] Extracting information from the non-text content and integrating the information extraction result with the text content to obtain the consultation text of the consultation request;
[0088] After the consultation text is processed by word segmentation, stop word removal, and part-of-speech tagging, the consultation question of the consultation text is obtained by using a context-aware algorithm.
[0089] In specific implementation, the specific implementation process of the steps of the present embodiment is as follows:
[0090] 1. Parsing the consultation request, extracting the text and non-text content
[0091] The consultation request sent by the user through the client is received, and the consultation request is parsed using a parsing tool to extract the text content and non-text content therein. For example, regular expressions are used to extract the text content, and an HTML parser is used to extract non-text elements in a web page. For a consultation request sent by a user, such as a text description and an X-ray image, the system extracts the text content "I have been feeling chest tightness recently. Is this a symptom of heart disease?" and the image file.
[0092] 2. Information extraction on non-text content
[0093] For the extracted non-text content, information extraction is performed using corresponding techniques. For example, for image content, OCR technology is used to recognize the text in the image; for PDF files, key information is extracted; for audio content, speech recognition is performed to convert the text. The system uses OCR technology to recognize the text description "Patient Name: Zhang San, Examination Date: 2023-10-01, Diagnosis: Suspected Heart Disease" in the X-ray image.
[0094] 3. Integrating text and non-text content
[0095] The information in the extracted non-text content is integrated with the original text content to form a complete consultation text. For example, the image text recognized by OCR is inserted into the corresponding position in the text. The system integrates the text content and the text description in the image as: "I have been feeling chest tightness recently. Is this a symptom of heart disease? Patient Name: Zhang San, Examination Date: 2023-10-01, Diagnosis: Suspected Heart Disease".
[0096] 4. Preprocessing the consultation text
[0097] The integrated consultation text is processed for word segmentation, stop word removal, and part-of-speech tagging. Word segmentation is the process of dividing text into words or phrases; stop word removal is the process of deleting common words that do not help with semantic understanding; and part-of-speech tagging is the process of tagging each word with its part of speech. The system performs word segmentation on the integrated text to obtain "I recently feel chest tightness, is this a symptom of heart disease? Patient name Zhang San Check date 2023-10-01 Diagnosis Suspected heart disease". After removing stop words, we get "recently feel chest tightness heart disease symptoms patient name Zhang San check date 2023-10-01 diagnosis suspected heart disease". After part-of-speech tagging, we get "recently (adverb) feel (verb) chest tightness (noun) heart disease (noun) symptoms (noun) patient (noun) name (noun) Zhang San (noun) check (verb) date (noun) 2023-10-01 (noun) diagnosis (verb) suspected (verb) heart disease (noun)".
[0098] 5. Extracting consultation questions using context-aware algorithms
[0099] The pre-processed consultation text is analyzed using a context-aware algorithm (such as a deep learning-based NLP model such as BERT or Transformer) to extract the core content of the consultation question. The algorithm takes into account the context information of the text to ensure that the extracted question accurately reflects the user's intent. The system uses the BERT model to perform semantic analysis on the pre-processed text and extracts the core content of the consultation question: "Is chest tightness a symptom of heart disease?" In addition, it extracts other questions that the user may be interested in, such as "How to diagnose heart disease" and "Further examination recommendations for suspected heart disease".
[0100] Through the above steps, the system can accurately extract the user's core question from complex consultation requests, providing accurate input for subsequent semantic matching and reply generation, thereby improving the accuracy and relevance of the reply content.
[0101] Further, in one embodiment, the intelligent reply method, wherein the based on the pre-set multi-source knowledge base, the consultation question is performed semantic matching, generates the classification label of the consultation question, specifically including steps:
[0102] Load the pre-set multi-source knowledge base;
[0103] Use a semantic similarity algorithm to calculate the similarity between the consultation question and the sentences in the multi-source knowledge base;
[0104] According to the similarity calculation result and the pre-set classification strategy, determine the classification label of the consultation question.
[0105] In specific implementation, the specific implementation process of the steps of the present embodiment is approximately as follows:
[0106] 1. Load pre-set multi-source knowledge bases
[0107] The system loads pre-set multi-source knowledge bases, which include structured business rules, historical question-answer records, and user behavior tags. These knowledge bases are stored in distributed databases or cloud storage to ensure data integrity and availability.
[0108] For example, the system loads a multi-source knowledge base that includes structured business rules related to the medical health field (such as disease symptoms, treatment methods), historical question-answer records (such as common questions and their answers), and user behavior tags (such as user consultation frequency, preferred question types).
[0109] 2. Calculate similarity using semantic similarity algorithms
[0110] The system uses advanced semantic similarity algorithms (such as BERT-based text embedding matching) to process the consultation question and calculate its similarity with the sentences in the multi-source knowledge base. The algorithm generates text embedding vectors for the consultation question and the knowledge base sentences, and calculates the similarity between these vectors.
[0111] For example, the user's consultation question is "I recently feel chest tightness, is this a symptom of heart disease?" The system uses the BERT model to generate the text embedding vector for this question, and calculates the similarity with the text embedding vector of the sentence about heart disease symptoms in the knowledge base (such as "chest tightness and shortness of breath may be symptoms of heart disease"). The similarity score is obtained.
[0112] 3. Determine the classification label based on the similarity calculation result and the pre-set classification strategy
[0113] The system determines the classification label of the consultation question based on the similarity calculation result and the pre-set classification strategy. The pre-set classification strategy may include similarity threshold, keyword matching, etc., and the system will classify the consultation question into the appropriate category according to these rules.
[0114] For example, the system determines that the user's consultation question has a high similarity with the sentence about heart disease symptoms in the knowledge base (the similarity score exceeds the pre-set threshold of 0.8) based on the similarity calculation result, so it classifies the question as "heart disease symptom consultation". At the same time, the system will consider the existence of keywords such as "chest tightness", "heart disease", etc., to further confirm the accuracy of the classification.
[0115] Through the above steps, the system can accurately perform semantic matching and classification on the consultation question, providing accurate input for subsequent reply generation, thereby improving the accuracy and relevance of the reply content.
[0116] Further, in one embodiment, the intelligent reply method, wherein the calling the corresponding knowledge large model to process the consultation question based on the classification label to generate an initial reply text specifically includes steps of:
[0117] determining a corresponding knowledge large model from a preset large model library according to the classification label;
[0118] calling the knowledge large model to process the consultation question to generate an initial reply text.
[0119] Further, the intelligent reply method, wherein the adjusting the initial reply text according to the historical interaction data of the target user in the client to generate a target reply text, and returning the target reply text to the client for display specifically includes steps of:
[0120] obtaining historical interaction data of the target user in the client;
[0121] constructing a user portrait of the target user according to the historical interaction data;
[0122] adjusting the initial reply text according to the user portrait to generate a target reply text;
[0123] returning the target reply text to the client for display to the target user.
[0124] Further, the intelligent reply method, wherein the constructing a user portrait of the target user according to the historical interaction data specifically includes steps of:
[0125] cleaning, denoising and formatting the historical interaction data;
[0126] extracting features from the cleaned, denoised and formatted historical interaction data to obtain behavior features and preference features of the target user;
[0127] constructing a user portrait of the target user according to the behavior features and the preference features.
[0128] Further, the intelligent reply method, wherein the adjusting the initial reply text according to the user portrait to generate a target reply text specifically includes steps of:
[0129] adjusting the initial reply text according to the behavior features and the preference features in the user portrait;
[0130] configuring a corresponding target graph for the adjusted initial reply text according to a preset graph configuration strategy;
[0131] Integrating the target graph with the adjusted initial reply text generates a target reply text.
[0132] In implementation, the specific implementation process of the steps of the embodiment is as follows:
[0133] 1. Determine the corresponding knowledge large model from the pre-set large model library according to the classification label
[0134] The system selects the most suitable knowledge large model from the pre-set large model library according to the classification label of the consultation question. The large model library stores multiple trained models, each of which specializes in handling specific types of consultation questions. The system determines the most suitable knowledge large model for handling the current consultation question by matching the classification label with the specialized field of the model. For example, if the classification label is "consultation on symptoms of heart disease", the system will select a knowledge large model specializing in the field of medical health.
[0135] 2. Call the knowledge large model to process the consultation question and generate an initial reply text
[0136] The system calls the selected knowledge large model and inputs the consultation question into the model for processing. The model generates an initial reply text for the consultation question based on its training data and algorithms. This process utilizes the deep learning capabilities of the large model to ensure that the generated reply text is highly relevant to the consultation question in terms of semantics and accurate in content. For example, for the consultation question "I have been feeling chest tightness recently, is this a symptom of heart disease?", the model may generate an initial reply text as "Chest tightness and shortness of breath may be symptoms of heart disease, please seek medical attention for examination as soon as possible."
[0137] 3. Adjust the initial reply text according to the historical interaction data of the target user in the client to generate a target reply text
[0138] The system obtains the historical interaction data of the target user in the client, including the user's past consultation records, feedback information, operation behavior, etc. The system constructs a user portrait based on these data and analyzes the user's behavior characteristics and preference characteristics. Then, the system adjusts the initial reply text according to the characteristics in the user portrait, optimizes the expression method and information focus of the reply content, and generates a target reply text that better meets the user's individual needs. For example, if the user prefers detailed information, the system will increase the detail level of the reply text.
[0139] Specifically, the detailed implementation process of step 3 above is as follows:
[0140] 31. Obtain the historical interaction data of the target user in the client
[0141] The system obtains historical interaction data of the target user from the client, which may be stored in a local database or a cloud server. The obtained data includes the user's historical consultation records, feedback information, operation behavior, etc., which will be used to build the user portrait. For example, the system obtains the user's past consultation records, including the time, content, user feedback, etc.
[0142] 32. According to the historical interaction data, the user portrait of the target user is constructed
[0143] The system cleans, denoises and formats the obtained historical interaction data, and then analyzes and extracts features from the cleaned, denoised and formatted historical interaction data, including behavior features and preference features of the user. Behavior features may include consultation frequency, consultation time, consultation topic, etc.; preference features may include the user's preferred reply style, information detail level, etc. The system builds a user portrait based on these features to provide a basis for subsequent personalized adjustment. For example, the system analyzes and finds that the user often consults medical and health problems and prefers detailed information, so the user portrait built will contain these features.
[0144] 33. According to the user portrait, the initial reply text is adjusted to generate the target reply text
[0145] The system adjusts the initial reply text according to the behavior features and preference features in the user portrait. The adjustment content may include optimizing the language style, adjusting the information focus, increasing or reducing the detail level, etc. The system can also configure corresponding graphics (including images and charts) for the reply text according to the preferences in the user portrait to enhance the intuitiveness and ease of understanding of the reply, to generate the target reply text.
[0146] Specifically, the system makes personalized adjustments to the initial reply text according to the behavior features and preference features in the user portrait. For example, if the user prefers a concise reply style, the system will reduce the detail level of the reply text; if the user often consults a specific topic, the system will add detailed information about related content in the reply. For example, if the user prefers a concise style, the system will adjust the initial reply text "Chest tightness and shortness of breath may be symptoms of heart disease. It is recommended that you seek medical attention for examination as soon as possible." to "Chest tightness may be a symptom of heart disease. It is recommended that you seek medical attention."
[0147] Specifically, the system configures corresponding graphics (including images and charts) for the adjusted reply text according to the preset graphic configuration strategy. The graphic configuration strategy may be based on the preference features in the user portrait, for example, if the user prefers visual information, the system will add relevant images, charts or videos to the reply text. For example, the system adds a diagram of heart disease symptoms to the adjusted reply text "Chest tightness may be a symptom of heart disease. It is recommended that you seek medical attention."
[0148] Specifically, the system integrates the configured target graphics with the adjusted reply text to generate the final target reply text. The integration method can include embedding graphics in the text, generating a graphic-text reply, etc., to ensure that the reply content contains both text information and graphic information, improving user experience. For example, the target reply text generated by the system is "Chest tightness may be a symptom of heart disease. It is recommended to see a doctor. (Attached figure: heart disease symptom diagram)".
[0149] 4. Return the target reply text to the client for display to the target user
[0150] The system sends the adjusted target reply text back to the client, and the client displays it to the target user after receiving the reply text. This process ensures that the user can see the personalized reply to their consultation request in a timely manner, improving user experience and satisfaction.
[0151] Through the above steps, the system can generate accurate, relevant, and personalized reply text based on the user's consultation request and historical interaction data, significantly improving user experience and satisfaction.
[0152] As can be seen from the above method embodiment, the intelligent reply method provided by the present application comprises: receiving a consultation request sent by a target user through a client; analyzing the consultation request and extracting the consultation question; based on a pre-set multi-source knowledge base, performing semantic matching on the consultation question to generate a classification label for the consultation question; based on the classification label, calling a corresponding knowledge large model to process the consultation question to generate an initial reply text; adjusting the initial reply text according to the historical interaction data of the target user in the client to generate a target reply text, and returning the target reply text to the client for display. In this way, the method of the present application can effectively improve the accuracy of the reply content when the user consults.
[0153] It should be understood that although the present application provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps can be included based on routine or non-creative labor, and the operation steps are not necessarily executed in the order of the embodiments or flowcharts. The order of steps listed in the embodiments or flowcharts is only one of the many execution orders, and does not represent the only execution order. It should be noted that there is no certain sequence between the above steps, and those skilled in the art can understand from the description of the embodiments of the present application that the above steps can have different execution orders in different embodiments, that is, they can be executed in parallel, or exchanged, etc. Moreover, at least part of the steps in the embodiments or flowcharts can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation, alternation or synchronization with other steps or sub-steps or stages of other steps.
[0154] Based on the above method embodiments, please refer to Figure 3 Another embodiment of the present application also provides an intelligent reply device, wherein the device comprises:
[0155] The receiving module 11 is configured to receive a consultation request sent by a target user through a client;
[0156] The parsing module 12 is configured to parse the consultation request and extract a consultation question;
[0157] The semantic matching module 13 is configured to perform semantic matching on the consultation question based on a preset multi-source knowledge base, and generate a classification label of the consultation question;
[0158] The processing module 14 is configured to call a corresponding knowledge large model to process the consultation question based on the classification label, and generate an initial reply text;
[0159] The adjusting module 15 is configured to adjust the initial reply text according to historical interaction data of the target user in the client, generate a target reply text, and return the target reply text to the client for display.
[0160] Further, in one embodiment, the intelligent reply device, wherein the parsing of the consultation request and the extraction of the consultation question specifically comprise:
[0161] Parsing the consultation request to extract text content and non-text content of the consultation request;
[0162] information extraction is performed on the non-text content, and the information extraction result is integrated with the text content to obtain a consultation text of the consultation request;
[0163] After the consultation text is processed by word segmentation, stop word removal, and part-of-speech tagging, a consultation question of the consultation text is obtained by using a context-aware algorithm.
[0164] Further, in an embodiment, the intelligent reply device, wherein the semantic matching of the consultation question based on the preset multi-source knowledge base to generate a classification label of the consultation question specifically includes:
[0165] loading a preset multi-source knowledge base;
[0166] using a semantic similarity algorithm to calculate the similarity between the consultation question and the sentences in the multi-source knowledge base;
[0167] determining the classification label of the consultation question according to the similarity calculation result and a preset classification strategy.
[0168] Further, in an embodiment, the intelligent reply device, wherein the calling of the corresponding knowledge large model based on the classification label to process the consultation question and generate an initial reply text specifically includes:
[0169] determining the corresponding knowledge large model from a preset large model library according to the classification label;
[0170] calling the knowledge large model to process the consultation question and generate an initial reply text.
[0171] Further, the intelligent reply device, wherein the adjusting of the initial reply text according to the historical interaction data of the target user in the client to generate a target reply text and returning the target reply text to the client for display specifically includes:
[0172] obtaining the historical interaction data of the target user in the client;
[0173] constructing a user portrait of the target user according to the historical interaction data;
[0174] adjusting the initial reply text according to the user portrait to generate a target reply text;
[0175] returning the target reply text to the client for display to the target user.
[0176] Further, the intelligent reply device, wherein the constructing of the user portrait of the target user according to the historical interaction data specifically includes:
[0177] cleaning, denoising and formatting the historical interaction data;
[0178] extracting features from the cleaned, denoised and formatted historical interaction data to obtain behavior features and preference features of the target user;
[0179] constructing a user portrait of the target user according to the behavior features and the preference features.
[0180] Further, the intelligent reply device, wherein the adjusting the initial reply text according to the user portrait to generate a target reply text specifically comprises:
[0181] adjusting the initial reply text according to the behavior features and the preference features in the user portrait;
[0182] configuring a corresponding target graphic for the adjusted initial reply text according to a preset graphic configuration strategy;
[0183] integrating the target graphic with the adjusted initial reply text to generate a target reply text.
[0184] It should be noted that, in the device embodiment of the present application, the information interaction, execution process and the like between the above-mentioned modules are based on the same concept as the method embodiment of the present application, and the specific functions and the technical effects brought by the same can be specifically referred to the method embodiment part, which will not be repeated here.
[0185] Based on the above-mentioned method embodiment, another embodiment of the present application further provides a computer device, which can be a server, and the internal structure diagram thereof can be as shown in Figure 4 The computer device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with the external terminal through the network connection. The computer program is executed by the processor to realize the functions or steps of the intelligent reply method server side in any one of the above-mentioned method embodiments.
[0186] Based on the above-mentioned method embodiment, another embodiment of the present application further provides a computer device, which can be a client, and the internal structure diagram thereof can be as shown in Figure 5As shown in the structural schematic diagram of the computer device. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is used to communicate with the external terminal through the network connection. The computer program is executed by the processor to realize the functions or steps of the intelligent reply method client side in any one of the method embodiments.
[0187] Those skilled in the art can understand that, Figure 4 With Figure 5 The structural schematic diagram shown in the foregoing embodiments is only a schematic diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. Specifically, the computer device can include more components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0188] The processor can be a CPU, and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0189] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory can be the memory of the computer device, and the internal memory provides an environment for the operating system and the computer readable instructions in the readable storage medium to run. The readable storage medium can be the hard disk of the computer device, and in other embodiments, can also be the external storage device of the computer device, for example, the plug-in hard disk, the smart media card (SMC), the secure digital (SD) card, the flash card, etc. equipped on the computer device. Further, the memory can include both the internal storage unit of the computer device and the external storage device. The memory is used to store the operating system, the application program, the boot loader, the data and other programs, etc., such as the program code of the computer program. The memory can also be used to temporarily store the data that has been output or will be output.
[0190] Based on the above method embodiments, another embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the computer-readable storage medium implements the intelligent reply method described in any of the above method embodiments. The computer-readable storage medium may be non-volatile or volatile.
[0191] It should be noted that the above-mentioned functions or steps that can be implemented by computer-readable storage media or computer devices, and the technical effects brought about by the functions / steps, can be found in the relevant descriptions in the aforementioned method embodiments. To avoid repetition, they will not be described one by one here.
[0192] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM). The disclosed memory components or memories of the operating environments described herein are intended to comprise one or more of these and / or any other suitable types of memory.
[0193] Those skilled in the art can clearly understand that, for the convenience and brevity of description, in the device embodiment of the present application, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the device can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here. The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium.
[0194] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0195] In the embodiments provided by the present application, it should be understood that the disclosed device / computer equipment and method can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, and the division of the modules or units is only a logical function division, and there can be another division in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or in other forms.
[0196] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0197] It should be noted that if non-company software tools or components appear in the embodiments of the present application, they are only used for example introduction and do not represent actual use. The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the foregoing embodiments of the present application have been described in detail, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. An intelligent reply method, characterized in that: include: Receive consultation requests sent by target users through the client; Parsing the consultation request and extracting consultation questions; Based on a preset multi-source knowledge base, semantic matching is performed on the consulting questions to generate classification labels for the consulting questions; Based on the classification labels, the corresponding knowledge model is called to process the consultation question and generate an initial reply text; The initial reply text is adjusted according to the historical interaction data of the target user in the client to generate a target reply text, and the target reply text is returned to the client for display.
2. The intelligent reply method according to claim 1, characterized in that: The step of parsing the consultation request and extracting the consultation questions includes: Parsing the consultation request to extract text content and non-text content of the consultation request; Extracting information from the non-text content and integrating the information extraction result with the text content to obtain a consultation text of the consultation request; After word segmentation, stop word removal, and part-of-speech tagging are performed on the consultation text, a context-aware algorithm is used to obtain the consultation question of the consultation text.
3. The intelligent reply method according to claim 1, characterized in that: The step of performing semantic matching on the consulting questions based on a preset multi-source knowledge base to generate classification labels for the consulting questions includes: Load the preset multi-source knowledge base; Utilizing a semantic similarity algorithm, similarity calculation is performed between the consulting question and the statements in the multi-source knowledge base; According to the similarity calculation result and the preset classification strategy, the classification label of the consulting question is determined.
4. The intelligent reply method according to claim 1, characterized in that: Based on the classification labels, the corresponding knowledge model is called to process the consultation question and generate an initial reply text, including: According to the classification label, determining the corresponding knowledge big model from the preset big model library; The knowledge model is called to process the consultation question and generate an initial response text.
5. The intelligent reply method according to claim 1, characterized in that: The adjusting the initial reply text according to the historical interaction data of the target user in the client to generate a target reply text, and returning the target reply text to the client for display includes: Obtaining historical interaction data of the target user in the client; Building a user profile of the target user based on the historical interaction data; Adjust the initial reply text according to the user portrait to generate a target reply text; The target reply text is returned to the client to be displayed to the target user.
6. The intelligent reply method according to claim 5, characterized in that: The step of constructing a user profile of the target user based on the historical interaction data includes: Cleaning, denoising and formatting the historical interaction data; Performing feature extraction on the cleaned, denoised, and formatted historical interaction data to obtain behavioral features and preference features of the target user; A user profile of the target user is constructed based on the behavioral characteristics and the preference characteristics.
7. The intelligent reply method according to claim 6, characterized in that: The adjusting the initial reply text according to the user portrait to generate a target reply text includes: Adjusting the initial reply text according to the behavioral characteristics and the preference characteristics in the user portrait; According to a preset graphic configuration strategy, configuring a corresponding target graphic for the adjusted initial reply text; The target graphic is integrated with the adjusted initial reply text to generate a target reply text.
8. An intelligent reply device, characterized in that: include: A receiving module, used for receiving a consultation request sent by a target user through a client; A parsing module, used to parse the consultation request and extract consultation questions; A semantic matching module is used to perform semantic matching on the consulting questions based on a preset multi-source knowledge base and generate classification labels for the consulting questions; A processing module, configured to process the consultation question based on the classification label and call the corresponding knowledge model to generate an initial reply text; An adjustment module is used to adjust the initial reply text according to the historical interaction data of the target user in the client, generate a target reply text, and return the target reply text to the client for display.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the intelligent reply method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the intelligent reply method according to any one of claims 1 to 7 is implemented.