Session message prompting method, system and device and medium
By matching key word segmentation and filtering the context of the conversation message, a goal prompt message is generated, which solves the problems of high and time-consuming workload and long-term answers in answering non-diagnostic and treatment questions by the existing traditional Chinese medicine experts, and improves work efficiency and user experience.
Patent Information
- Application Number
- CN202411461881.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art in answers to non-diagnostic and treatment questions raised by patients through conversation messages has resulted in large workload, long time-consuming, and difficult answers, and poor user experience.
By obtaining the application question-and-answer word segmentation set, the first question-and-answer standard unit set and the user's conversation message context, key word segmentation matching, unit set filtering and question-and-answer filtering are performed, and target prompt messages are generated to reduce the medical experts' need to answer non-diagnostic and treatment questions.
It effectively reduces the workload and time-consuming of medical professionals during online consultation, and improves the work efficiency of medical professionals and the user experience of patients.
Smart Images

Figure CN119514675A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of message processing, and in particular to a method, system, device and medium for prompting a conversation message. Background Art
[0002] With the continuous development of society, Internet hospitals have attracted widespread attention because they can enable online consultations between patients and medical experts through conversation messages. During the patient's online consultation process, patients often consult medical experts on non-diagnosis and treatment issues (such as the execution, payment, cancellation and other operating methods and rules, process constraints, etc. of medical orders during diagnosis and treatment) through conversation messages in Internet hospitals.
[0003] At present, for non-diagnostic questions raised by patients through conversation messages, the existing technology mainly relies on medical experts to rely on preset help manuals or treatment guides in Internet hospitals to answer them. This method increases the workload of medical experts during online consultations and takes a long time for a single diagnosis and treatment. In addition, since medical experts may not have a deep understanding of non-diagnostic issues, it is difficult for them to answer non-diagnostic questions, and the explanations they provide on business rules and operations are not necessarily standard, resulting in a poor user experience for patients.
[0004] Therefore, the problems existing in the prior art still need to be solved and optimized. Summary of the invention
[0005] The purpose of the present invention is to solve one of the technical problems existing in the related art to at least a certain extent.
[0006] To this end, an object of an embodiment of the present invention is to provide a conversation message prompt method, system, device and medium, wherein the method can effectively reduce the workload of medical experts during online consultation, reduce the time required for a single diagnosis and treatment, improve the work efficiency of medical experts and improve the user experience of patients.
[0007] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present application include:
[0008] In a first aspect, an embodiment of the present application provides a method for prompting a session message, comprising:
[0009] Acquire a plurality of application question and answer word sets, a plurality of first question and answer standard unit sets, and a user's conversation message context, wherein each application question and answer word set corresponds to one first question and answer standard unit set, and the conversation message context is used to record the message content and application information of the user;
[0010] According to all the application question and answer word sets, key word matching is performed on the conversation message context to obtain a key word set, wherein the key word set is used to represent a set of target question and answer word sets corresponding to the message content in the application question and answer word set corresponding to the application information;
[0011] According to the key word set, the corresponding first question and answer standard unit set is screened to obtain a second question and answer standard unit set, where the second question and answer standard unit set is used to represent a set of question and answer standard units associated with each of the target question and answer participles;
[0012] The second question and answer standard unit set is screened to obtain a target prompt message.
[0013] In addition, the method according to the above embodiment of the present application may also have the following additional technical features:
[0014] Further, in one embodiment of the present application, performing key word matching on the conversation message context according to all the application question and answer word sets to obtain a key word set includes:
[0015] According to the application information, all the application question and answer word sets are screened to obtain a first question and answer word set;
[0016] According to the first question-answer word set, content matching is performed on the message content to obtain the key word set.
[0017] Further, in an embodiment of the present application, the first question-answer word set includes a plurality of question-answer word sets, and the content matching of the message content is performed according to the first question-answer word set to obtain the key word set, including:
[0018] Get the current question and answer segmentation;
[0019] According to the current question and answer segmentation, the message content is segmented and matched to obtain a segmentation matching result;
[0020] If the word segmentation matching result is a successful word segmentation match and there is at least one question and answer participle that has not been matched by word segmentation, the current question and answer participle is determined as the target question and answer participle, and the current question and answer participle is updated according to the next question and answer participle, and then the step of obtaining the current question and answer participle is returned; or, if the word segmentation matching result is a successful word segmentation match and there is at least one question and answer participle that has not been matched by word segmentation, the current question and answer participle is determined as the target question and answer participle, and the key participle set is obtained based on all the target question and answer participles.
[0021] Further, in one embodiment of the present application, the step of performing unit set screening on the corresponding first question and answer standard unit set according to the key word set to obtain a second question and answer standard unit set includes:
[0022] Get the preset question and answer attributes;
[0023] According to the key word set, the first question and answer standard unit set is screened for association relationships to obtain a third question and answer standard unit set;
[0024] According to the question and answer attributes, attribute rule screening is performed on the third question and answer standard unit set to obtain the second question and answer standard unit set.
[0025] Further, in one embodiment of the present application, the first question-answer standard unit set is screened for association relationships based on the key word set to obtain a third question-answer standard unit set, including:
[0026] Acquire a word segmentation association relationship corresponding to each question and answer standard unit in the first question and answer standard unit set;
[0027] According to the word segmentation association relationship and the key word segmentation set, the first question and answer standard unit set is deduplicated and screened to obtain the third question and answer standard unit set.
[0028] Further, in one embodiment of the present application, the step of screening the second question and answer standard unit set to obtain a target prompt message includes:
[0029] Obtaining a preset hit threshold, a hit word set, and an original word set, wherein the original word set is used to represent a set of standard word segments corresponding to a target question and answer standard unit in the second question and answer standard unit set, and the hit word set is used to represent a set of standard word segments corresponding to the target question and answer segment in the original word set;
[0030] According to the hit word segmentation set, weight calculation is performed on the original word segmentation set to obtain a word segmentation hit value;
[0031] Comparing the word segmentation hit value with the hit threshold to obtain a hit comparison result;
[0032] According to the hit comparison result, the second question and answer standard unit set is screened to obtain the target prompt message.
[0033] Further, in the embodiment of the present application, the second question-and-answer standard unit is subjected to unit screening according to the hit comparison result to obtain the target prompt message, including:
[0034] Get the preset message generation rules;
[0035] According to the hit comparison result, the second question-and-answer standard cell set is hit screened to obtain a plurality of target standard cells;
[0036] Prompt messages are generated for all the target standard cells according to the message generation rule to obtain the target prompt messages.
[0037] In a second aspect, an embodiment of the present application provides a conversation message prompting system, including:
[0038] A first processing unit is used to obtain a plurality of application question and answer word sets, a plurality of first question and answer standard unit sets, and a user's conversation message context, each of the application question and answer word sets corresponds to one of the first question and answer standard unit sets, and the conversation message context is used to record the message content and application information of the user;
[0039] a second processing unit, configured to perform key word matching on the conversation message context according to all the application question and answer word sets to obtain a key word set, wherein the key word set is used to represent a set of target question and answer word sets corresponding to the message content in the application question and answer word set corresponding to the application information;
[0040] a third processing unit, configured to perform unit set screening on the corresponding first question and answer standard unit set according to the key word set to obtain a second question and answer standard unit set, wherein the second question and answer standard unit set is used to represent a set of question and answer standard units associated with each of the target question and answer participles;
[0041] The fourth processing unit is used to perform question and answer screening on the second question and answer standard unit set to obtain a target prompt message.
[0042] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0043] at least one processor;
[0044] at least one memory for storing at least one program;
[0045] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.
[0046] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used to implement the above method when executed by the processor.
[0047] The advantages and benefits of the present application will be partially given in the following description, and partially become apparent from the following description, or be understood through the practice of the present application:
[0048] The embodiment of the present application discloses a method, system, device and medium for prompting a conversation message, wherein the method obtains a plurality of application question and answer word sets, a plurality of first question and answer standard unit sets and a conversation message context of a user, each of the application question and answer word sets corresponds to a first question and answer standard unit set, and the conversation message context is used to record the message content and application information of the user; according to all the application question and answer word sets, the conversation message context is matched with key word sets to obtain a key word set, and the key word set is used to represent a set of target question and answer word sets corresponding to the message content in the application question and answer word set corresponding to the application information; according to the key word set, the corresponding first question and answer standard unit set is screened to obtain a second question and answer standard unit set, and the second question and answer standard unit set is used to represent a set of question and answer standard units associated with each of the target question and answer word sets; the second question and answer standard unit set is screened for questions and answers to obtain a target prompt message. The method determines a set of target question and answer segmentations corresponding to the patient terminal (i.e., a key segmentation set) by matching key segmentations of the conversation message context, that is, providing target question and answer segmentations corresponding to the question and answer standard units with the highest degree of personalized adaptation for different applications or clients; in addition, the method is also based on unit sets and question and answer screening, and can provide one or more highly adapted question and answer standard units as target prompt messages for the user's conversation message context, which can reduce the situation where medical experts have to answer non-diagnosis and treatment questions, thereby reducing the workload of medical experts in the online consultation process, reducing the time required for a single diagnosis and treatment, improving the work efficiency of medical experts and improving the user experience of patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the embodiments of the present application or the drawings of the related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly expressing some embodiments of the technical solutions of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 A flowchart of a method for prompting a session message provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of the structural framework of a conversation message prompt system provided in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limitations on the present application. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0055] At present, for non-diagnostic questions raised by patients through conversation messages, the existing technology mainly relies on medical experts to rely on preset help manuals or treatment guides in Internet hospitals to answer them. This method increases the workload of medical experts during online consultations and takes a long time for a single diagnosis and treatment. In addition, since medical experts may not have a deep understanding of non-diagnostic issues, it is difficult for them to answer non-diagnostic questions, and the explanations they provide on business rules and operations are not necessarily standard, resulting in a poor user experience for patients.
[0056] In addition, due to the variety of client terminals and applications used by patients, there are large differences in the business rules of different client terminals and applications, and the medical experts' answers to non-diagnostic questions are not necessarily correct. While patients have a poor user experience, it also increases the workload of medical experts.
[0057] In view of this, an embodiment of the present invention provides a method for prompting a conversation message. The method determines a set of target question and answer segmentations corresponding to a patient terminal (i.e., a key segmentation set) by matching key segmentations in the conversation message context, that is, providing target question and answer segmentations corresponding to question and answer standard units with the highest degree of personalized adaptation for different applications or clients; in addition, the method is also based on unit sets and question and answer screening, and can provide one or more question and answer standard units with a high degree of adaptation as target prompt messages for the user's conversation message context, which can reduce the situation where medical experts have to answer non-diagnosis and treatment questions, thereby reducing the workload of medical experts in the online consultation process, reducing the time required for a single diagnosis and treatment, improving the work efficiency of medical experts, and improving the user experience of patients.
[0058] Reference Figure 1 In an embodiment of the present application, a method for prompting a conversation message includes:
[0059] Step 110: obtaining a plurality of application question and answer word sets, a plurality of first question and answer standard unit sets, and a user's conversation message context, wherein each application question and answer word set corresponds to one first question and answer standard unit set, and the conversation message context is used to record the message content and application information of the user;
[0060] In an embodiment of the present application, the user may be a patient user in an Internet hospital consultation chat room, and the message content may be a message sent by a user to a medical expert or a message sent by a medical expert to a user; the application question and answer word set and the first question and answer standard unit set may be data in an Internet hospital database, wherein the application question and answer word set records a number of preset question and answer word sets, and each application question and answer word set corresponds to a different application client; each first question and answer standard unit set records a plurality of question and answer standard units corresponding to the application client, and each question and answer standard unit includes a preset configuration answer and associated questions and answers, etc.
[0061] It can be understood that the user's conversation message context can be constructed through message content and application information, wherein the application information can be obtained based on the user's application end and client end. For example, the application end can be an Internet hospital-patient end, and the client can be any one of the Android end, host end, WeChat applet end, IOS end, etc. This application example is for illustration only.
[0062] Step 120: performing key word matching on the conversation message context according to all the application question and answer word sets to obtain a key word set, wherein the key word set is used to represent a set of target question and answer word sets corresponding to the message content in the application question and answer word set corresponding to the application information;
[0063] In an embodiment of the present application, the key word matching in step 120 can be based on the inclusion matching method to find several question and answer participles in the application question and answer participle set that match the conversation message context, and then determine the found question and answer participles as target question and answer participles, and then assemble all the obtained target question and answer participles into a key word set.
[0064] In some embodiments, the step 120, performing key word matching on the conversation message context according to all the application question and answer word sets to obtain a key word set, includes:
[0065] A1. Screening all the application question and answer word sets according to the application information to obtain a first question and answer word set;
[0066] In an embodiment of the present application, step A1 can be based on the application end of the application information record, matching and comparing the application client corresponding to each application question and answer word set, eliminating the application question and answer word set that fails to match and compare successfully, and retaining the application question and answer word set that successfully matches and compares. The application question and answer word set that successfully matches and compares is recorded as the first question and answer word set.
[0067] A2. According to the first question-answer word set, content matching is performed on the message content to obtain the key word set.
[0068] Furthermore, the first question-answer word set includes a plurality of question-answer word sets, and the step A2 of performing content matching on the message content according to the first question-answer word set to obtain the key word set includes:
[0069] A21. Get the current question and answer segmentation;
[0070] A22. Perform word segmentation matching on the message content according to the current question and answer word segmentation to obtain a word segmentation matching result;
[0071] A23. If the word segmentation matching result is a successful word segmentation match and there is at least one question and answer participle that has not been matched for word segmentation, the current question and answer participle is determined as the target question and answer participle, and the current question and answer participle is updated according to the next question and answer participle, and then the step of obtaining the current question and answer participle is returned; or, if the word segmentation matching result is a successful word segmentation match and there is at least one question and answer participle that has not been matched for word segmentation, the current question and answer participle is determined as the target question and answer participle, and the key participle set is obtained according to all the target question and answer participles.
[0072] In an embodiment of the present application, the content matching in step A2 can be to traverse and extract all question and answer participles in the first question and answer participle set, match each question and answer participle and the message content by means of inclusion matching method, and then determine all successfully matched question and answer participles as target question and answer participles, thereby obtaining a key participle set.
[0073] It can be understood that, for a certain traversal process, the current question and answer segmentation in step A21 can be any one of all the question and answer segmentations that have not been traversed in the first question and answer segmentation set. The segmentation matching in step 22 can be to determine whether the current question and answer segmentation exists in the message content. If the current question and answer segmentation exists in the message content, a segmentation matching result representing a successful segmentation matching is obtained; otherwise, if the current question and answer segmentation does not exist in the message content, a segmentation matching result representing a failed segmentation matching is obtained.
[0074] It should be noted that, if the word segmentation matching result is a successful word segmentation match and there is at least one question and answer word that has not been matched, it means that the question and answer word in the first question and answer word set has not been traversed. At this time, the current question and answer word can be determined as the target question and answer word, and the next question and answer word that has not been traversed can be determined as the current question and answer word in the next traversal process, and the process returns to step A21; or, if the word segmentation matching result is a failed word segmentation match and there is at least one question and answer word that has not been matched, the question and answer word can be marked as traversed, and then an untraversed question and answer word can be determined as the current question and answer word in the next traversal process. The current question and answer word segmentation returns to execute step A21; or, if the word segmentation matching result is a successful word segmentation match and there is not at least one question and answer word that has not been matched for word segmentation, it means that the traversal of the question and answer word segmentations in the first question and answer word segmentation set is completed. At this time, the current question and answer word segmentation can be determined as the latest target question and answer word segmentation, and then the key word segmentation set is determined according to the target question and answer word segmentations obtained in all the traversal processes; or, if the word segmentation matching result is a failed word segmentation match and there is not at least one question and answer word that has not been matched for word segmentation, at this time, the key word segmentation set can be directly determined according to the target question and answer word segmentations obtained in all the traversal processes.
[0075] Step 130: According to the key word set, the corresponding first question and answer standard unit set is screened to obtain a second question and answer standard unit set, where the second question and answer standard unit set is used to represent a set of question and answer standard units associated with each of the target question and answer participles;
[0076] In an embodiment of the present application, the unit set screening in step 130 can be to obtain the question and answer standard unit corresponding to each target question and answer participle in the key participle set in the first question and answer standard unit set, and determine the obtained question and answer standard unit as the second question and answer standard unit set.
[0077] In some embodiments, the step 130, based on the key word set, performs unit set screening on the corresponding first question and answer standard unit set to obtain a second question and answer standard unit set, includes:
[0078] B1. Obtain the preset question and answer attributes;
[0079] It can be understood that the question and answer attributes in the embodiments of the present application can be at least one of the state attributes, configuration attributes, conditional attributes, etc. of each question and answer standard unit, wherein the state attribute is used to characterize whether the corresponding question and answer standard unit is enabled; the configuration attribute is used to characterize the configuration client to which the corresponding question and answer standard unit belongs; and the conditional attribute is used to characterize whether the corresponding question and answer standard unit is conditionally valid.
[0080] It can be understood that the conditional attributes in the embodiments of the present application can be specifically determined in the form of conditional rules, conditional expressions, etc. For example, the conditional rules can be whether the corresponding question and answer standard unit exists with a specific message content in the conversation message context, whether the application end associated with the corresponding question and answer standard unit satisfies the application ID of the conversation message context, etc., and the conditional expression can be whether the text length of the message content corresponding to the question and answer standard unit is within a preset text range, etc. The examples in this application are for illustration only.
[0081] B2. According to the key word set, the first question and answer standard unit set is screened for association relationships to obtain a third question and answer standard unit set;
[0082] Furthermore, the step B2, based on the key word set, performs association screening on the first question-answer standard unit set to obtain a third question-answer standard unit set, includes:
[0083] B21, obtaining a word segmentation association relationship corresponding to each question and answer standard unit in the first question and answer standard unit set;
[0084] B22. According to the word segmentation association relationship and the key word segmentation set, the first question and answer standard unit set is deduplicated and screened to obtain the third question and answer standard unit set.
[0085] In an embodiment of the present application, the word segmentation association relationship in step B21 is used to characterize the association mapping relationship between the question and answer standard unit and all corresponding question and answer word segmentations, which can be obtained by extracting keywords in the question and answer standard unit, or by setting a number of question and answer word segmentations for each question and answer standard unit. The example of this application is for illustration only and does not limit the present application.
[0086] It can be understood that for a target question and answer segmentation in the key segmentation table, step B22 can first extract the question and answer standard unit corresponding to the target question and answer segmentation based on the segmentation association relationship, and construct a target relationship group, which is used to record the target question and answer segmentation and the corresponding question and answer standard unit. The same applies to the remaining target question and answer segmentations, which can be simply deduced by analogy.
[0087] Specifically, the embodiment of the present application can match and compare the target question and answer segmentation in the key segmentation table with the question and answer segmentation in the segmentation association relationship record. If the target question and answer segmentation in the key segmentation table and any question and answer segmentation in the segmentation association relationship record are matched and compared successfully, then the target relationship group can be constructed based on the target question and answer segmentation and the question and answer standard unit of the segmentation association relationship record. Conversely, if the target question and answer segmentation in the key segmentation table and all the question and answer segmentation in the segmentation association relationship record are matched and compared unsuccessfully, the target relationship group is not constructed. Then, after obtaining the target relationship group corresponding to all the target question and answer segmentations in the key segmentation set, all the question and answer standard units in the target relationship group can be spliced and merged, and then the third question and answer standard unit set can be obtained by removing the operation of duplicate question and answer standard units.
[0088] It is worth mentioning that the embodiment of the present application screens the question and answer standard unit set based on the word segmentation association relationship and the key word segmentation set, so that the target question and answer segmentation only needs to be matched and screened with the question and answer segmentation recorded in the word segmentation association relationship, rather than each target question and answer segmentation being matched and screened with all the question and answer standard units in the first question and answer standard unit set. This can effectively reduce the computing resources required for message prompts and improve the efficiency of question and answer prompt generation, thereby reducing the time required for a single diagnosis and treatment and improving the work efficiency of medical experts.
[0089] For example, if the target question and answer segmentation in a certain key segmentation set is [doctor, prescribe, check, examination application form, payment], the target relationship groups corresponding to each target question and answer segmentation are [doctor, QA1, QA2]; [prescribe, QA2, QA6]; [check, QA1, QA2, QA4, QA5, QA8]; [examination application form, QA2, QA4, QA5, QA6, QA7, QA8]; [payment, QA2, QA6]. After splicing, merging and removing duplicate question and answer standard units in the target relationship group, the third question and answer standard unit set obtained can be [QA1, QA2, QA4, QA5, QA6, QA7, QA8], where QA1, QA2, QA4, QA5, QA6, QA7, QA8 are all question and answer standard units in the first question and answer standard unit set. The example in this application is for illustration only. The expression form of the target relationship group can also be other forms. For example, the target relationship group [doctor, QA1, QA2] can also be simply transformed into the target relationship group doctor: [QA2, QA6], etc., and this application is not limited here.
[0090] B3. According to the question and answer attributes, attribute rule screening is performed on the third question and answer standard unit set to obtain the second question and answer standard unit set.
[0091] In an embodiment of the present application, the attribute rule screening in step B3 can be based on the state attributes, configuration attributes, conditional attributes, etc. in the question and answer attributes, and the validity of each question and answer standard unit in the third question and answer standard unit set is verified, and the second question and answer standard unit set is obtained by retaining valid question and answer standard units and eliminating invalid question and answer standard units.
[0092] Exemplarily, for a certain question and answer standard unit QA1 in the third question and answer standard unit set, if its corresponding state attribute is enabled, then the question and answer standard unit QA1 is valid from the state attribute perspective; conversely, if its corresponding state attribute is disabled, then the question and answer standard unit QA1 is invalid from the state attribute perspective. In addition, if the configuration attribute corresponding to the question and answer standard unit QA1 is consistent with the client part that sends the message content, then the question and answer standard unit QA1 is valid from the configuration attribute perspective. For example, when the configuration attribute of the question and answer standard unit QA1 is [QA1, Android, IOS], and the client corresponding to the message content is Android, then the question and answer standard unit QA1 is valid from the configuration attribute perspective; conversely, when the configuration attribute corresponding to the question and answer standard unit QA1 is completely inconsistent with the client that sends the message content, then the question and answer standard unit QA1 is invalid from the configuration attribute perspective. In addition, the content of the conditional attribute is similar to the content of the aforementioned state attribute and configuration attribute, and can be simply deduced by analogy.
[0093] It can be understood that in one of the feasible implementations, if the question and answer standard unit QA1 is valid from the perspective of state attributes, configuration attributes and conditional attributes, then the question and answer standard unit QA1 can be considered to be a valid question and answer standard unit; conversely, if the question and answer standard unit QA1 is invalid from the perspective of state attributes, configuration attributes and conditional attributes, then the question and answer standard unit QA1 can be considered to be an invalid question and answer standard unit. The same is true for the other question and answer standard units, and it can be simply deduced that finally a second question and answer standard unit set can be constructed based on all valid question and answer standard units.
[0094] It should be added that the examples of valid question and answer standard units in the embodiments of the present application are for illustration only. In actual applications, the conditions for judging whether the question and answer standard unit is valid may also be that there is at least one valid angle, a specific attribute rule angle is valid, etc., which will not be repeated in this application.
[0095] Step 140: Screen the second question and answer standard unit set to obtain a target prompt message.
[0096] In the embodiment of the present application, the target prompt message can be a standard answer corresponding to the user's message content, or a question-and-answer standard unit associated with the user's message content, or a combination of a standard answer corresponding to the user's message content and other question-and-answer standard units associated with the user's message content. In addition, the target prompt message in the embodiment of the present application can be generated on the Internet hospital-medical expert side, and the medical expert can choose whether to send it to the patient; or the target prompt message can also be directly displayed to the patient on the Internet hospital-patient side, and the example of this application is for illustration only.
[0097] It can be understood that the question and answer screening in step 140 is used to screen one or more question and answer standard units that are highly compatible with the message content, and generate a target prompt message that matches the message content based on the several question and answer standard units obtained through the screening. Specifically, if the message content contains only one message question, a target prompt message corresponding to the message question can be generated at this time; or, if the message content includes two and two message questions, sub-target prompt messages corresponding to each message question can be generated respectively at this time, and then all sub-target prompt messages are determined as the final target prompt message.
[0098] In some embodiments, the step 160 of screening the second question and answer standard unit set to obtain a target prompt message includes:
[0099] C1. Obtaining a preset hit threshold, a hit word set and an original word set, wherein the original word set is used to represent a set of standard word sets corresponding to a target question and answer standard unit in the second question and answer standard unit set, and the hit word set is used to represent a set of standard word sets corresponding to the target question and answer word in the original word set;
[0100] C2. According to the hit word segmentation set, weight calculation is performed on the original word segmentation set to obtain a word segmentation hit value;
[0101] C3. Compare the word segmentation hit value with the hit threshold to obtain a hit comparison result;
[0102] In the embodiment of the present application, the target question and answer standard unit can be any one of all the question and answer standard units in the second question and answer standard unit set, and each original word segmentation set records all the standard word segments contained in the corresponding target question and answer standard unit. In addition, the hit thresholds corresponding to all target question and answer standard units in the embodiment of the present application can be the same, or each target question and answer standard unit can correspond to a different hit threshold. The specific value of the hit threshold can be flexibly set according to the actual situation, such as any one of 0.4, 0.6, 0.85, 0.95, etc. The example of this application is for illustration only. In addition, for a certain target question and answer segmentation, an embodiment of the present application can be to traverse each standard segmentation in the original segmentation set based on the target question and answer segmentation, and then add the standard segmentation in the original segmentation set that is consistent with the target question and answer segmentation to the current hit segmentation set, and the same applies to the remaining target question and answer segmentations in the key segmentation set, so as to obtain the hit segmentation set; or, an embodiment of the present application can also be to traverse each standard segmentation in the original segmentation set based on the target question and answer segmentation, and then add the standard segmentation in the original segmentation set that is semantically similar to the target question and answer segmentation to the current hit segmentation set, and the same applies to the remaining target question and answer segmentations in the key segmentation set, so as to obtain the hit segmentation set.
[0103] It can be understood that for a certain target question-answering standard unit, step C2 can first be to obtain the standard weight corresponding to each standard participle in the original participle set, and the standard weight corresponding to each standard participle can be obtained by pre-setting; then, based on the same standard participle in the original participle set and the hit participle set, determine the standard weight corresponding to each standard participle in the hit participle set, specifically, the standard weight corresponding to the same standard participle in the original participle set can be transferred to the corresponding standard participle in the hit participle set; then, based on the standard participles and corresponding standard weights in the hit participle set, as well as the standard participles and standard weights in the original participles, the participle hit value is obtained by weight calculation. Specifically, for a certain original participle set and the corresponding hit participle set, the equivalent expression of its participle hit value can be:
[0104]
[0105] Among them, Hit is the hit value of the word segmentation; α i is the standard weight of the i-th standard segmentation word in the hit segmentation set; x i is the i-th standard segmentation in the hit segmentation set; N is the total number of all standard segmentations in the hit segmentation set; M is the total number of all standard segmentations in the original segmentation set; β j is the standard weight of the jth standard segmentation word in the original segmentation set; y j is the jth standard segmentation in the original segmentation set.
[0106] It should be noted that step C3 can be to compare the size relationship between the word segmentation hit value and the preset hit threshold to obtain the hit comparison result. The same is true for the other target question and answer standard units, which can be simply deduced by analogy.
[0107] C4. According to the hit comparison result, the second question and answer standard unit set is screened to obtain the target prompt message.
[0108] Furthermore, the step C4, performing unit screening on the second question-and-answer standard unit according to the hit comparison result to obtain the target prompt message, includes:
[0109] C41. Obtain preset message generation rules;
[0110] C42. Performing hit screening on the second question-and-answer standard cell set according to the hit comparison result to obtain a plurality of target standard cells;
[0111] C43. Generate prompt messages for all the target standard cells according to the message generation rule to obtain the target prompt messages.
[0112] In an embodiment of the present application, the message generation rule records preset sorting rules and screening selection rules, and the specific sorting rules and screening selection rules can be set according to actual conditions. In addition, for a certain hit comparison result, if the hit comparison result is that the word segmentation hit value is greater than or equal to the hit threshold, then the hit screening in step C42 can be to retain the corresponding question and answer standard unit in the second question and answer standard unit set; or, if the hit comparison result is that the word segmentation hit value is less than the hit threshold, then the hit screening in step C42 can be to eliminate the corresponding question and answer standard unit in the second question and answer standard unit set; the other hit comparison results are similar, and then all question and answer standard units retained in the second question and answer standard unit set are determined as target standard units.
[0113] It is understandable that if the number of target standard units obtained is 0, a blank target prompt message can be generated based on the screening and selection rules in the message generation rules. In addition, if the number of target standard units obtained is greater than or equal to 1, all target standard units obtained can be sorted based on the sorting rules. For example, based on the total number of hit participles (i.e., standard participles in the hit participle set) corresponding to each target standard unit, each target standard unit is sorted in order of size to obtain a target unit sequence, which includes several target standard units sorted from large to small; then, based on the screening and selection rules, one or more target standard units are selected to construct a target prompt message.
[0114] Specifically, if the target unit sequence satisfies the screening and selection rule that there is only one target standard unit or the word segmentation hit value of the first target standard unit is greater than the word segmentation hit value of the second target standard unit, then the target prompt message can be constructed based on the first target standard unit in the target unit sequence. Alternatively, if the target unit sequence satisfies the screening and selection rule that there are at least two target standard units and the hit value of the first target standard unit is equal to the hit value of the kth target standard unit, then sub-target prompt messages can be constructed based on the first k target standard units, and then all sub-target prompt messages are determined as the final target prompt message.
[0115] A conversation message prompting system proposed according to an embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0116] Reference Figure 2 , a conversation message prompt system proposed in an embodiment of the present application includes:
[0117] The first processing unit 101 is used to obtain a plurality of application question and answer word sets, a plurality of first question and answer standard unit sets, and a user's conversation message context, each of the application question and answer word sets corresponds to one of the first question and answer standard unit sets, and the conversation message context is used to record the message content and application information of the user;
[0118] The second processing unit 102 is configured to perform key word matching on the conversation message context according to all the application question and answer word sets to obtain a key word set, wherein the key word set is used to represent a set of target question and answer word sets corresponding to the message content in the application question and answer word set corresponding to the application information;
[0119] The third processing unit 103 is used to perform unit set screening on the corresponding first question and answer standard unit set according to the key word set to obtain a second question and answer standard unit set, where the second question and answer standard unit set is used to represent a set of question and answer standard units associated with each of the target question and answer participles;
[0120] The fourth processing unit 104 is used to perform question and answer screening on the second question and answer standard unit set to obtain a target prompt message.
[0121] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0122] Reference Figure 3 , the embodiment of the present application further provides an electronic device, including:
[0123] at least one processor 201;
[0124] At least one memory 202, used to store at least one program;
[0125] When the at least one program is executed by the at least one processor 201, the at least one processor 201 implements the above method embodiment.
[0126] Similarly, it can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0127] The embodiment of the present application further provides a computer-readable storage medium, in which a program executable by the processor 201 is stored. The program executable by the processor 201 is used to implement the above-mentioned method embodiment when executed by the processor 201.
[0128] Similarly, the contents of the above method embodiments are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0129] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the application is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part described as a larger operation is performed independently.
[0130] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present application. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional techniques of the engineer. Therefore, those skilled in the art can implement the present application set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the attached claims and their equivalents.
[0131] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method of the embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0132] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0133] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0134] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0135] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0136] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
[0137] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the embodiments. Technical personnel familiar with the field can make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A method for prompting a conversation message, characterized in that: include: Acquire a plurality of application question and answer word sets, a plurality of first question and answer standard unit sets, and a user's conversation message context, wherein each application question and answer word set corresponds to one first question and answer standard unit set, and the conversation message context is used to record the message content and application information of the user; According to all the application question and answer word sets, key word matching is performed on the conversation message context to obtain a key word set, wherein the key word set is used to represent a set of target question and answer word sets corresponding to the message content in the application question and answer word set corresponding to the application information; According to the key word set, the corresponding first question and answer standard unit set is screened to obtain a second question and answer standard unit set, where the second question and answer standard unit set is used to represent a set of question and answer standard units associated with each of the target question and answer participles; The second question and answer standard unit set is screened to obtain a target prompt message.
2. The method according to claim 1, characterized in that The step of performing key word matching on the conversation message context according to all the application question and answer word sets to obtain a key word set includes: According to the application information, all the application question and answer word sets are screened to obtain a first question and answer word set; According to the first question-answer word set, content matching is performed on the message content to obtain the key word set.
3. The method according to claim 2, characterized in that The first question-answer word set includes a plurality of question-answer word sets, and the content matching of the message content is performed according to the first question-answer word set to obtain the key word set, including: Get the current question and answer segmentation; According to the current question and answer segmentation, the message content is segmented and matched to obtain a segmentation matching result; If the word segmentation matching result is a successful word segmentation match and there is at least one question and answer participle that has not been matched by word segmentation, the current question and answer participle is determined as the target question and answer participle, and the current question and answer participle is updated according to the next question and answer participle, and then the step of obtaining the current question and answer participle is returned; or, if the word segmentation matching result is a successful word segmentation match and there is at least one question and answer participle that has not been matched by word segmentation, the current question and answer participle is determined as the target question and answer participle, and the key participle set is obtained based on all the target question and answer participles.
4. The method according to claim 1, characterized in that: The step of screening the corresponding first question-answer standard unit set according to the key word set to obtain a second question-answer standard unit set includes: Get the preset question and answer attributes; According to the key word set, the first question and answer standard unit set is screened for association relationships to obtain a third question and answer standard unit set; According to the question and answer attributes, attribute rule screening is performed on the third question and answer standard unit set to obtain the second question and answer standard unit set.
5. The method according to claim 4, characterized in that The step of performing association screening on the first question-answer standard unit set according to the key word set to obtain a third question-answer standard unit set includes: Acquire a word segmentation association relationship corresponding to each question and answer standard unit in the first question and answer standard unit set; According to the word segmentation association relationship and the key word segmentation set, the first question and answer standard unit set is deduplicated and screened to obtain the third question and answer standard unit set.
6. The method according to claim 1, characterized in that The step of screening the second question-and-answer standard unit set to obtain a target prompt message includes: Obtaining a preset hit threshold, a hit word set, and an original word set, wherein the original word set is used to represent a set of standard word segments corresponding to a target question and answer standard unit in the second question and answer standard unit set, and the hit word set is used to represent a set of standard word segments corresponding to the target question and answer segment in the original word set; According to the hit word segmentation set, weight calculation is performed on the original word segmentation set to obtain a word segmentation hit value; Comparing the word segmentation hit value with the hit threshold to obtain a hit comparison result; According to the hit comparison result, the second question and answer standard unit set is screened to obtain the target prompt message.
7. The method according to claim 6, characterized in that The step of performing unit screening on the second question-and-answer standard unit according to the hit comparison result to obtain the target prompt message includes: Get the preset message generation rules; According to the hit comparison result, hit screening is performed on the second question-and-answer standard cell set to obtain a plurality of target standard cells; According to the message generation rule, prompt messages are generated for all the target standard cells to obtain the target prompt messages.
8. A conversation message prompt system, characterized in that: include: A first processing unit is used to obtain a plurality of application question and answer word sets, a plurality of first question and answer standard unit sets, and a user's conversation message context, each of the application question and answer word sets corresponds to one of the first question and answer standard unit sets, and the conversation message context is used to record the message content and application information of the user; a second processing unit, configured to perform key word matching on the conversation message context according to all the application question and answer word sets to obtain a key word set, wherein the key word set is used to represent a set of target question and answer word sets corresponding to the message content in the application question and answer word set corresponding to the application information; a third processing unit, configured to perform unit set screening on the corresponding first question and answer standard unit set according to the key word set to obtain a second question and answer standard unit set, wherein the second question and answer standard unit set is used to represent a set of question and answer standard units associated with each of the target question and answer participles; The fourth processing unit is used to perform question and answer screening on the second question and answer standard unit set to obtain a target prompt message.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.