Method and device for providing online inquiry service

By using information extraction models, decision-making models and dialogue models in online consultation services for multiple rounds of dialogue processing, the existing online consultation services are solved, and fully automated consulting services are realized, which improves users Experience and service efficiency.

CN118969328APending Publication Date: 2024-11-15ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411095251.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Existing online consultation services mainly rely on manual responses, resulting in low service efficiency, high cost and high threshold, limiting the availability and user experience of services.

Method used

Use the trained information extraction model, decision model and dialogue model for fully automated services. Through multiple rounds of dialogue, user consultation content is processed, features are extracted, feature sets are updated, decisions are made, feature items to be questioned, and reply content is generated to realize Fully automated consulting services.

Benefits of technology

While ensuring service quality, it greatly improves the service efficiency of professional consulting services, reduces costs, improves user experience, and reduces dependence on manual services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118969328A_ABST
    Figure CN118969328A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for providing an online inquiry service, and relates to a plurality of rounds of dialogues with a user in a target session, and any round of dialogues comprises the following steps of: firstly, processing consultation contents input by the user in the current round by utilizing a trained information extraction model to obtain current round extraction features, the updating module is used for updating an extracted feature set corresponding to the target session; then, a trained decision model is utilized to process the extracted feature set updated in the round, and a decision result in the round is obtained; then, determining a plurality of feature items of a user to be asked according to a decision result of the round under the condition that the round of dialogue meets a preset anti-asking condition; and then, processing the plurality of feature items by using a trained dialogue model to obtain reply content for the consultation content.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application with application number 2024105239050 filed on April 28, 2024, and entitled “Method and device for providing online medical consultation services”. Technical Field

[0002] One or more embodiments of the present specification relate to the field of machine learning technology, and more particularly, to a method and apparatus for providing consulting services, a computer-readable storage medium, and a computing device. Background Art

[0003] Online consultation services, also known as telemedicine or e-health services, are a way of providing medical consultation and treatment through Internet technology. This service is usually implemented through instant messaging or dedicated medical applications, allowing patients to get professional advice and support from doctors without going to a hospital or clinic.

[0004] Online consultation services have the following key features: 1) Convenience: One of the biggest advantages of online consultation services is their convenience. Users can communicate with doctors anytime and anywhere through smartphones, tablets or computers. 2) Wide accessibility: This service is particularly suitable for patients living in remote areas or areas with inconvenient transportation, as well as those who find it difficult to go to the hospital in person due to busy work or physical conditions. 3) Preliminary assessment of symptoms: Online consultation can help doctors make a preliminary assessment of patients' symptoms and provide appropriate medical advice or referral to face-to-face diagnosis and treatment based on the severity of the condition. 4) Privacy and security: Online consultation platforms usually adopt high standards of data protection measures to ensure the security and privacy of patient information. 5) Continuous health management: Online consultation can also support the continuous health management of patients with chronic diseases, such as regular check-ups, medication management and health guidance.

[0005] However, currently, online consultation services in professional fields such as online medical consultation services are mainly based on manual responses from doctors and other professionals. Therefore, there is an urgent need for a solution that can effectively improve the service efficiency of online medical consultation services while ensuring service quality, thereby improving the service experience of users when using professional consultation services. Summary of the invention

[0006] The embodiments of this specification describe a method and device for providing consulting services, which can effectively improve service efficiency.

[0007] According to a first aspect, a method for providing consulting services is provided, involving several rounds of conversations with a user in a target conversation, wherein any round of conversations includes: using a trained information extraction model to process the consulting content input by the user in this round to obtain extracted features for updating the extracted feature set corresponding to the target conversation; using a trained decision model to process the updated extracted feature set in this round to obtain the decision result of this round; when it is judged that this round of conversation meets a preset counter-question condition, determining several feature items to be asked to the user according to the decision result of this round; using the trained conversation model to process the several feature items to obtain reply content to the consulting content.

[0008] In a possible implementation, the method further includes: creating the target session in response to the user entering the consulting service page; and / or creating the target session in response to the user initiating a session operation based on the consulting service page.

[0009] In a possible implementation, the training of the information extraction model includes the following steps: obtaining a plurality of decision case data in the field corresponding to the consulting service; for each decision case data, calling the trained first largest model to extract information therefrom to obtain the corresponding extraction result, and constructing the corresponding fine-tuning sample by using the decision case data as the sample feature and the extraction result as the sample label; using the fine-tuning sample to fine-tune the pre-trained second largest model; wherein the fine-tuned second largest model is used as the trained information extraction model.

[0010] In a possible implementation, the training of the decision model includes the following steps: obtaining a decision case data set in the field corresponding to the consulting service; processing each decision case data using the information extraction model to obtain an information extraction result; extracting a decision category label and several decision features from the information extraction result to form a training sample; and updating the decision model using the training sample.

[0011] In a possible implementation, the decision model is a decision tree model or a linear regression model.

[0012] In one possible implementation, the preset rhetorical question conditions include: the number of features in the extracted feature set after this round of update is not greater than a first threshold; and / or, the probability corresponding to the decision category with the highest probability in the decision results of this round is not greater than a second threshold; and / or, the number of decision categories in the decision results of this round whose corresponding probability is greater than a third threshold is greater than a fourth threshold; and / or, the number of rounds in this round of dialogue is not greater than a fifth threshold.

[0013] In a possible implementation, several feature items of the user to be questioned are determined based on the results of this round of decisions, including: based on the focus feature set corresponding to the consulting service and the extracted feature set after the update of this round, multiple unknown feature items with unknown feature values ​​are determined; for any first unknown feature item, based on the decision probability corresponding to each decision category in the results of this round of decisions, and its correlation coefficient with each decision category, a first current-round weight is determined; and several unknown feature items whose current-round weights are ranked within a predetermined ranking range are selected from the multiple unknown feature items as several feature items of the user to be questioned.

[0014] Further, in some possible embodiments, for any first unknown feature item, based on the decision probability corresponding to each decision category in the decision result of this round, and its correlation coefficient with each decision category, a first current-round weight is determined, including: for each decision category, based on the decision probability of the decision category and the first correlation coefficient between the first unknown feature item and the decision category, determining the score of the first unknown feature item under the decision category; determining the first current-round weight based on multiple scores of the first unknown feature item under the multiple decision categories.

[0015] Furthermore, in some possible examples, based on the decision probability of the decision category and the first correlation coefficient between the first unknown feature item and the decision category, the score of the first unknown feature item under the decision category is determined, including: determining the ranking of the first correlation coefficient among the multiple correlation coefficients between the multiple unknown feature items and the decision category; and dividing the ranking by a predetermined power of the decision probability of the decision category as the score under the decision category.

[0016] In a possible implementation, the method further includes: when it is determined that the current round of dialogue does not satisfy a preset counter-question condition, using a trained dialogue model to process the current round of decision results to obtain a response content to the consultation content.

[0017] In a possible implementation, the trained dialogue model is used to process the decision results of this round and several feature items to obtain a reply content for the consultation content, which also includes: using the dialogue model to process the decision results of this round, several feature items, and the dialogue content in the previous round to obtain the reply content.

[0018] In a possible implementation, the method is controlled and executed by a target big model deployed in a consulting service platform in response to input of the consulting content.

[0019] In a possible implementation, the consulting service is an online medical consultation service, the extracted feature set involves at least one of the following features: symptoms, basic information, medical history, examination report, and the current round of decision results involves the diagnosed disease and the corresponding probability.

[0020] According to a second aspect, a device for providing consulting services is provided, wherein the consulting services involve several rounds of dialogues with a user in a target conversation, wherein any round of dialogues is implemented by the following modules included in the providing device: a feature extraction module, configured to use a trained information extraction model to process the consulting content input by the user in this round, to obtain the extracted features of this round, which are used to update the extracted feature set corresponding to the target conversation; a decision module, configured to use a trained decision model to process the updated extracted feature set of this round, to obtain the decision result of this round; a counter-question feature determination module, configured to determine several feature items of the user to be counter-questioned according to the decision result of this round when it is determined that the current round of dialogue meets the preset counter-question conditions; a reply content generation module, configured to use the trained conversation model to process the several feature items, to obtain reply content for the consulting content.

[0021] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method of the first aspect.

[0022] According to a fourth aspect, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method of the first aspect is implemented.

[0023] By adopting the above-mentioned method and device provided in the embodiments of this specification, a fully automated service for professional field consultation can be realized, which can greatly improve the service efficiency of professional consulting services while ensuring the service quality, thereby effectively improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A flowchart of the implementation process of the consulting service solution disclosed in the embodiments of this specification;

[0026] Figure 2 A schematic diagram of the steps of the method for fine-tuning the information extraction model disclosed in the embodiments of this specification;

[0027] Figure 3 A schematic diagram of the method flow steps for training a decision model disclosed in an embodiment of this specification;

[0028] Figure 4 A schematic diagram of the process steps of the method for providing consulting services disclosed in the embodiments of this specification;

[0029] Figure 5 This is a schematic diagram of the functional modules of the consulting service providing device disclosed in the embodiments of this specification. DETAILED DESCRIPTION

[0030] The solution provided in this specification is described below in conjunction with the accompanying drawings.

[0031] As mentioned above, the current online consulting platforms mainly rely on manual responses when providing consulting services in professional fields to users. However, consulting services in professional fields have very high requirements for service personnel: 1) Service personnel are required to have a large amount of professional knowledge and skills reserves, 2) Service personnel are required to continuously learn and update their knowledge base, 3) Service personnel are required to have excellent communication skills, etc. This undoubtedly leads to a high threshold for professional consulting services, and related costs increase accordingly, including but not limited to the costs of professional training and salary payments. In addition, the high professional requirements limit the number of service personnel, thereby limiting the availability of services. The scarcity of resources may lead to longer service response times, and users may feel inconvenienced by long waiting times, resulting in poor user experience.

[0032] Based on the above observations and analysis, the applicant proposed a fully automated service solution for professional field consulting, which can greatly improve the service efficiency of professional consulting services while ensuring service quality, thereby effectively improving user experience.

[0033] like Figure 1 As shown, in this scheme, in order to improve the quality of consultation, when the information provided by the user is insufficient, it is necessary to ask the user a question. Therefore, in a single consultation session, one or more rounds of interactive dialogues may be involved. In any round of interactive dialogues, it includes: first, using the trained information extraction model to process the consultation content input by the user in this round of conversation, obtaining the features extracted in this round, which are used to update the extracted feature set; then using the trained decision model to process the updated extracted feature set to obtain the decision result of this round; then, when it is determined that a question is needed, the feature item of the user to be asked is determined according to the decision result of this round, so as to use the trained dialogue model to process the feature item, obtain the reply content for the consultation content of this round, and start the next round of dialogue, otherwise, using the trained dialogue model to process the decision result of this round, obtain the reply content for the consultation content of this round, and end this session.

[0034] For a clear description, the following first introduces the training methods of the above-mentioned information extraction model, decision model and dialogue model, and then introduces the specific implementation steps of the above solution.

[0035] 1. Training of Information Extraction Model

[0036] The information extraction model can be trained in advance in the offline stage. As for its training method, those skilled in the art are able to train the information extraction model using conventional supervised learning methods based on the model reasoning process described in the article, such as: using manually annotated training data to train the information extraction model after random parameter initialization, thereby obtaining a trained information extraction model.

[0037] In addition, the applicant also proposed a new training method, which first uses the first largest model with excellent performance in the industry and unknown structure to automatically construct annotated data, and then uses the automatically generated annotated data to fine-tune the second largest model with known structure and completed pre-training, and uses the fine-tuned second largest model as the trained information extraction model, thus realizing the distillation of the knowledge of the first largest model into the information extraction model. It should be noted that the "first" and "second" in the "first largest model" and "second largest model", as well as similar terms elsewhere in the text, are to distinguish similar things and do not have other limiting functions such as sorting.

[0038] Large models, or Large Language Models (LLMs) have been widely used in all walks of life due to their outstanding natural language understanding capabilities. The above-mentioned first large model is generally a closed-source commercial large model, whose model structure and parameters are unknown and require paid calls. If the first large model is directly used as an information extraction model for online consulting services, it will incur high costs, and the first large model is generally more popular, and the response time for calling it is uncontrollable. If the response time is too long, it will affect the user experience. Therefore, calling the first large model to construct training data to fine-tune the second large model as an information extraction model is a better way to save money and time and can be used even when the network is disconnected. It can be understood that the second large model can be an open source large model obtained from the Internet, or it can be a large model developed by the provider of professional consulting services.

[0039] Specifically, the process of training the information extraction model using the above new training method includes: Figure 2 The following steps S21-S23 are shown in:

[0040] Step S21, obtaining multiple decision-making case data in the professional field corresponding to the consulting service.

[0041] For example, assuming that the consulting service is an online consultation service, the multiple decision case data can be multiple medical record data. It should be noted that the obtained medical record data will not leak the user's privacy. It is generally public data, for example, from an open source data set or legally crawled from a medical record website, or the medical record data is collected with the user's authorization and obtained after desensitization.

[0042] Step S22: for each decision case data, call the trained first model to extract information and obtain the corresponding extraction result. By taking the decision case data as the sample feature and the extraction result as the sample label, the corresponding fine-tuning sample is constructed.

[0043] Exemplarily, assuming that the consulting service is an online consultation service, the information items in the medical record extraction result generally include symptoms, medical history, examination report, user basic information, disease diagnosis results, and the like.

[0044] Step S23, fine-tuning the pre-trained second largest model using the fine-tuning sample.

[0045] Exemplarily, fine-tuning may be performed by fixing the parameters of most of the network layers in the second largest model and adjusting only the model parameters of some of the network layers. It should be understood that "some" in the text refers to one or more.

[0046] Above, using Figure 2 The method steps shown in can obtain the second largest model after fine-tuning, which is used as the trained information extraction model.

[0047] 2. Training of decision-making models

[0048] Considering that big models have been widely used in various industries, it is proposed that big models can be used as decision-making models.

[0049] In addition, considering the characteristics of consulting decision-making data in professional fields, the applicant proposes that a probability model, or a statistical machine learning algorithm, can also be used as a decision model to automatically learn or discover reasoning patterns or paths from a large amount of data. Exemplarily, the decision model can be a decision tree model or a linear regression model.

[0050] The decision model can be trained using Figure 3 The following steps S31-S34 are shown in:

[0051] Step S31, obtaining a decision case data set in the professional field corresponding to the consulting service.

[0052] It should be understood that for the decision case dataset obtained in this step, Figure 2The relationship between the multiple decision case data obtained in step S21 is not limited in the embodiments of this specification. Generally, the decision case data set may include the multiple decision case data mentioned above, and may also include other decision case data.

[0053] Step S32: Process each decision case data using the trained information extraction model to obtain an information extraction result.

[0054] Exemplarily, assuming that the consulting service is an online medical consultation service, the information items in the information extraction result generally include symptoms, medical history, examination report, user basic information, disease diagnosis results, and the like.

[0055] Step S33, extracting decision category labels and several decision features from the information extraction results to form training samples.

[0056] In one embodiment, for the information extraction results corresponding to each decision probability data, information corresponding to the decision result can be extracted as a decision category label, and other information can be used as a number of decision features to obtain corresponding training samples.

[0057] In another implementation, the information extraction result set corresponding to the decision case data set can be used to determine the feature items of interest corresponding to each decision category label, and then extract the features of interest to construct training samples. In this way, the features most relevant to the decision goal are selected as training data, which can reduce the interference of noise features, reduce computational complexity, and significantly improve the interpretability, generalization ability, and accuracy of the decision model.

[0058] Specifically, first, multiple first candidate feature items involved in the statistical information extraction result set are selected, and multiple second candidate feature items whose occurrence frequency exceeds a first threshold (such as 100 times) are selected; then, for each decision category (such as each disease), the second candidate feature whose correlation with it reaches a predetermined standard is used as the feature item of interest under the decision category. It should be understood that the correlation can be measured by a correlation coefficient, for example, the point-biserial correlation coefficient (Point-biserial correlation coefficient) or the Phi coefficient ( coefficient), etc. The specific calculation method can refer to the existing technology and will not be described in detail. For the standard pre-set for correlation, in one example, it can be that the correlation is ranked within a predetermined ranking range, for example, the top 10 feature items corresponding to the correlation coefficients arranged from high to low; in another example, it can be that the absolute value of the correlation coefficient is greater than a predetermined threshold, such as 0.05; in another example, it can be that the correlation coefficient is ranked within a predetermined ranking range and the absolute value is greater than a predetermined threshold.

[0059] Thus, several attention feature items under each decision category can be determined. Thus, for each information extraction result, a decision category label and several decision features corresponding to the several attention feature items under the decision category label can be extracted, and then the corresponding training samples can be constructed.

[0060] From the above, we can get the training samples corresponding to each decision case data.

[0061] Step S34, using the training sample set corresponding to the decision case data set to update the decision model.

[0062] It should be understood that the execution of this step can be implemented using conventional supervised learning techniques, which will not be described in detail.

[0063] From the above, we can select the probability model as the decision model and use Figure 3 The method shown trains the decision model.

[0064] 3. Training of Dialogue Model

[0065] In one implementation, a pre-trained large language model, such as the second large model, can be directly used as a trained dialogue model. In another implementation, the pre-trained large language model can be fine-tuned and the fine-tuned large model can be used as a trained dialogue model. For the fine-tuning method, refer to the method of using the dialogue model for reasoning in the text, which will not be described in detail here.

[0066] The above introduction Figure 1 The method for obtaining the trained information extraction model, decision model and dialogue model shown in FIG. Next, the specific implementation steps of the above solution are described in combination with more drawings and embodiments.

[0067] Figure 4 This is a schematic diagram of the process steps of the method for providing consulting services disclosed in the embodiments of this specification. It can be understood that this method (and Figure 2 and Figure 3 The execution entity of the method shown in the figure can be any device, platform, server or equipment cluster with computing and processing capabilities, for example, it can be an online consulting service platform (or simply consulting service platform).

[0068] It should be noted that the online consulting services mentioned in this article are targeted at specific professional fields, such as medical, legal, insurance or finance. To help understand, this article mainly uses the example of the professional field being the medical diagnosis field and the consulting service being the online consultation service as an example.

[0069] Each time the consulting service platform provides consulting services to users, a corresponding consulting session will be created. For the sake of clarity and brevity, the target session is used in this article to refer to any consulting session. There are many ways to trigger the creation of a target session. In one possible triggering method, the target session is created in response to a user entering the consulting service page; in another possible triggering method, the target session is created in response to a user initiating a session based on the consulting service page, for example, in response to a user sending consulting content through an input box for the first time after entering the page.

[0070] The target session includes several rounds of dialogue with the user. Figure 4 As shown, the implementation of any round of dialogue in the target session includes the following steps:

[0071] First, in step S410, the consultation content input by the user in this round of dialogue is processed using the trained information extraction model to obtain the extracted features of this round, which are used to update the extracted feature set corresponding to the target dialogue. It can be understood that the extracted feature set is initially empty.

[0072] It should be noted that the information items extracted by the information extraction model during its training phase include not only decision features but also decision category labels. However, during the inference phase, since the consulting content generally does not include the decision category itself, the extracted information items will not include the decision category. Alternatively, a removal operation can be added to remove the information extracted by the information extraction model when it is determined that the information includes the decision category.

[0073] As described above, the features extracted in this round can be obtained. Exemplarily, assuming that the consulting service is an online consultation service, the features extracted in this round can include at least one of the following features: symptoms, basic information, medical history, and examination report.

[0074] Furthermore, the features extracted in this round can be added to the extracted feature set corresponding to the target session, thereby obtaining the updated extracted feature set in this round.

[0075] Then, in step S420, the trained decision model is used to process the extracted feature set after this round of update to obtain the decision result of this round.

[0076] Specifically, the decision results of this round may include several decision categories and the probabilities corresponding to the decision categories. In one example, assuming that the consulting service is an online consultation service, the decision results of this round may include several diagnosed diseases and the probabilities corresponding to each disease. In another example, assuming that the consulting service is a legal consulting service, the decision results of this round may include several applicable legal provisions, as well as the corresponding probabilities and legal cases.

[0077] The above results show the decision-making results of this round.

[0078] Afterwards, in step S430, it is determined whether the current round of dialogue satisfies the preset rhetorical question conditions. It should be understood that the above rhetorical question conditions can be preset by the staff and adjusted in actual application according to experience feedback and the like.

[0079] Factors that need to be considered when setting the rhetorical questioning condition generally include: not being able to ask too many rounds of questions in a row; if there are no candidate decision categories, then rhetoric is required; if there are too many candidate decision categories, then rhetoric is required. Based on this, in some embodiments, the preset rhetorical questioning condition may include one or more of the following, and the relationship between any two conditions may be logical AND or logical OR:

[0080] 1) The number of features in the extracted feature set after this round of update is not greater than a first threshold (eg, 10).

[0081] 2) The probability corresponding to the decision category with the highest probability in the current round of decision results is not greater than a second threshold (eg, 30%).

[0082] 3) The number of decision categories in the current round of decision results whose corresponding probabilities are greater than the third threshold (for example, 10%) is greater than the fourth threshold (for example, 3).

[0083] 4) The number of rounds of this dialogue is not greater than a fifth threshold (eg, 5 rounds).

[0084] According to a specific example, assuming that the consulting service is an online diagnosis and treatment service, the preset rhetorical condition may be:

[0085] Known symptoms ≤ 8

[0086] AND known symptoms and known symptoms not present ≤ 10

[0087] AND (the probability of the disease with the highest probability in this round of decision results is ≤ 20% OR the number of diseases with a probability greater than 10% in this round of decision results is > 3)

[0088] AND the number of rounds in this conversation is ≤ 5

[0089] It should be understood that the above AND represents a logical AND, and OR represents a logical OR.

[0090] The above describes the preset rhetorical question conditions. Accordingly, in this step, it can be determined whether the current round of dialogue meets the preset rhetorical question conditions in combination with the current round of decision results and / or the number of rounds of the current round of dialogue.

[0091] Further, when it is determined that the conditions are met, step S440 is executed to determine a number of feature items to be asked to the user according to the result of the current round of decision making.

[0092] In one implementation, a number of unknown feature items with unknown feature values ​​may be determined based on the focus feature set corresponding to the consulting service and the extracted feature set after the current round of update.

[0093] It should be understood that the set of attention features corresponding to the consulting service can be determined in advance. Figure 3 In the description of step S33, it is mentioned that several attention feature items under each decision category are determined. Based on this, the attention feature items under all decision categories corresponding to the consulting service can be used to construct an attention feature set. Further, considering that before the user enters the consulting session page, the consulting platform usually guides the user to select a sub-field under the professional field, for example, select a department under the consultation service. At this time, the attention feature set corresponding to the consulting service can only be related to the sub-field.

[0094] In this step, based on the pre-determined feature set of interest, by comparing it with the extracted feature set, several unknown feature items with unknown feature values ​​can be determined.

[0095] Based on the several unknown feature items obtained above, further, in one embodiment, they can be directly used as several feature items to be asked back to the user. In another embodiment, when it is determined that the number of the several unknown feature items is greater than a predetermined number threshold (for example, 3), the multiple unknown feature items are sorted by importance, so that important unknown feature items are screened out as feature items to be asked back to the user according to the sorting results.

[0096] The purpose of the above sorting is to: 1) improve efficiency, ask key features, reduce the content and rounds of questions; 2) improve the accuracy of decision-making. Sorting is achieved by determining the weights of multiple unknown feature items. The design idea of ​​sorting weights is: the higher the decision probability of the decision category, the more important the feature is, the greater the weight, that is, the key feature in the key decision category.

[0097] Exemplarily, the current round weight v of any i-th unknown feature item among multiple unknown features can be calculated using the following formula: i :

[0098]

[0099] In the above formula (1), P j It represents the probability of the jth decision category among the n decision categories included in the decision results of this round; rank ij It represents the ranking of the correlation coefficient between the j-th decision category and the i-th unknown feature item in the j-th decision category. It should be understood that the correlation coefficient can be calculated in advance. For details, please refer to the relevant description in the aforementioned embodiment and will not be repeated here. t is a hyperparameter, and the value is set manually.

[0100] It should be noted that formula (1) is carefully designed by the applicant, which reflects the ranking weight v i and decision category P j Positive correlation, and correlation coefficient ranking ij In addition to the negative correlation, P j With rank ij -1 Multiplying instead of adding can avoid the problem of inconsistent magnitudes introduced by addition operations. Use the correlation coefficient name rank ij The non-correlation coefficient itself can denoise the correlation coefficient fluctuation caused by the data, and the calculation result is more stable. The coefficient t can be used to adjust the balance between the decision category probability and the correlation coefficient. For example, when the decision probability is considered more important than the correlation coefficient ranking, t can be set to a value greater than 1. In this way, by adopting formula (1), a highly usable ranking weight can be obtained. It should be understood that a variant of formula (1) can also be used. Even if the effect of the variant is not as good as the original formula (1), as long as it meets the above design ideas of the ranking weight, the calculation result is still usable and effective.

[0101] Based on the above, multiple current round weights corresponding to multiple unknown feature items can be obtained. Based on this, according to the sorting results of multiple current round weights from large to small, several unknown feature items with corresponding weights ranked in the front preset ranking range can be selected as several feature items to be asked back to the user.

[0102] In the above implementation, a number of unknown feature items are first determined, and then a number of feature items to be questioned to the user are determined therefrom.

[0103] In another embodiment, the decision result of this round, the feature set of interest corresponding to the consulting service, and the extracted feature set after this round of update can be directly input into the trained feature prediction model to obtain several feature items of the user to be questioned. It should be understood that the training of the feature prediction model is similar to its reasoning stage and will not be elaborated here.

[0104] From the above, we can get several feature items of the user to be questioned.

[0105] Afterwards, in step S450, the trained dialogue model is used to process several feature items to obtain the reply content for the current round of consultation content.

[0106] In one embodiment, the input of the dialogue model may include, in addition to several feature items, one or more of the following: the current round of consultation content, the current round of decision results, and the previous round of dialogue content. The dialogue model may output the current round of reply content by processing its input.

[0107] On the other hand, in one embodiment, assuming that the dialogue model is a large language model, in this case, several feature items can be filled into a pre-set prompt word template to obtain the corresponding prompt word (or reference information). For example, assuming that the consulting service is an online consultation service, in this case, the prompt word template can be designed as:

[0108] Possible diseases of _____ symptoms include _____. Further questioning is needed to confirm the diagnosis.

[0109] In the above three slots, the first slot is used to fill in the features extracted in this round or the features in the extracted feature set after this round of update, the second slot is used to fill in the disease category in the diagnosis result of this round, and the third slot is used to fill in several feature items to be asked back to the user. Based on this, the prompt words obtained by filling in the above template can be:

[0110] Urgent and frequent urination Symptoms of possible diseases include Urinary tract infection Further questions are needed to confirm the diagnosis Is urination difficult? .

[0111] Furthermore, the above prompt words can be input into the trained dialogue model to obtain the output reply content. For example, the generated reply content can be: Do you have symptoms of dysuria?

[0112] In this way, the large language model can be used to process the prompt words and obtain the reply content of this round.

[0113] In the above description, when it is determined that the current round of dialogue meets the counter-question condition, steps S440 and S450 are executed to obtain the content of the reply to the user in the current round of dialogue. When it is determined that the current round of dialogue does not meet the counter-question condition, step S460 ( Figure 4 (not shown): Use the trained dialogue model to process the decision result of this round to obtain the reply content for the consultation content. It should be noted that the introduction of step S460 can refer to the introduction of step S450. The main difference is that the input of the dialogue model does not contain feature items that need to be asked back to the user.

[0114] In summary, by executing Figure 4 The method shown in the figure can efficiently complete any round of consulting dialogue in the target conversation without real customer service, and the dialogue quality is high enough. In this way, it is possible to provide users with fully automated consulting services in professional fields.

[0115] According to another embodiment, Figure 4The execution of the method flow shown is implemented by hard coding in the system. For example, the system calls the decision model, and then inputs its results into the dialogue model in the form of prompt words to generate a response result. In this regard, the applicant proposes that an improvement can be made by replacing it with a method of directly using a large model for tool learning, that is, letting the large model learn to call the decision model as a tool to produce results.

[0116] Specifically, Figure 4 The method flow shown can be controlled and executed by a trained target large model deployed in the consulting service platform. Typically, the data processing corresponding to the above steps S410, S420, S430, S440, etc. are encapsulated in the target application programming interface (Application Programming Interface, referred to as API). For the sake of simplicity, this data processing is called the first processing stage.

[0117] Based on this, before the first processing stage, the target big model responds to the consulting service platform receiving the consulting content input by the user in this round of dialogue, processes the consulting content, and obtains the uniform resource locator (Uniform Resource Location, URL) of the target API. Further, the first processing stage may include: the target big model uses the consulting content as an input parameter of the target API to obtain the output of the target API, and the output content at least includes the decision result of this round, and may also include several feature items of the user to be asked back. Exemplarily, the output content of the target API can be a prompt word constructed based on the decision result of this round and several feature items of the user to be asked back.

[0118] Furthermore, in the second processing stage, the target large model responds to the output of the target API, processes the output content, and obtains the reply content for the current round of consultation content. It should be understood that at this time, the target large model is also used as the above-mentioned dialogue model.

[0119] The above describes how to advance the target large model Figure 4 Execution of the method steps.

[0120] For the training of the target large model, it can be obtained by fine-tuning the pre-trained large model. The fine-tuning samples can be automatically generated according to the system log according to the rules, without the need for manual labeling. Regarding the composition of the fine-tuning samples, those skilled in the art are capable of inferring them through the above introduction to the operation of the target large model. To help understand, the following is an example of a fine-tuning sample in conjunction with the online consultation service.

[0121] 1) An example of the first fine-tuning sample for the first processing stage is as follows:

[0122] ①Current input: I feel the urge to urinate frequently, what could be the reason?

[0123] ②Call API: #Call the decision model API to calculate the probability of illness, API url: [URL content omitted here] 'I feel urgent and frequent urination, what could be the reason? '#

[0124] The content in ① above is used as the feature of the first fine-tuning sample, and the content in ② is used as the label of the first fine-tuning sample.

[0125] 2) An example of the second fine-tuning sample for the second processing stage is as follows:

[0126] ③API returns the result: Possible diseases: Urinary tract infection. Questions to be asked: Is urination difficult?

[0127] ④Answer: Based on your description, you may have a urinary tract infection. Do you have difficulty urinating?

[0128] The content in ③ above is used as the feature of the second fine-tuning sample, and the content in ④ is used as the label of the second fine-tuning sample.

[0129] The above introduction uses the target large model to control execution Figure 4 The process of the method pipeline in ,and ,the fine-tuning samples used to fine-tune the target large model.

[0130] In summary, compared to the hard-coded control in the system Figure 4 The execution of the method flow using the target large model for control execution has the following advantages:

[0131] (1) Flexibility and adaptability: When the API interface changes, hard-coded calls may require manual code updates, which is time-consuming and error-prone. Using large models can automatically adapt to these changes through training data, thereby reducing the need for manual intervention.

[0132] (2) Automated error handling: Large models can learn to identify and handle various exceptions and error situations from past interactions, improving the robustness of the system. In the case of hard coding, every possible error requires developers to foresee and encode a handling strategy, which is impractical.

[0133] (3) Real-time learning and optimization: Large models are able to continuously learn and optimize their behavior based on new data. This means that they can improve the efficiency and effectiveness of API calls over time, while hard-coded solutions lack this adaptive capability.

[0134] (4) Personalization and context-awareness: Large models can customize API calls based on the user's specific needs and context, providing more personalized services. Hard-coded methods usually lack this flexibility because they are usually designed for a standard situation.

[0135] (5) Maintenance and scalability: As system requirements evolve, updating and extending hard-coded API calls can be difficult and risky. With large models, it is easier to expand functionality and integrate new APIs because the model can be retrained to adapt to new interfaces and technologies.

[0136] With these advantages, using large models to learn and execute API calls is a way to achieve Figure 4 Software development of algorithms offers a more dynamic and scalable solution, especially in a rapidly changing technological environment.

[0137] Corresponding to the above-mentioned method for providing consulting services, the embodiments of this specification also disclose a device. Figure 5 This is a functional module diagram of a device for providing consulting services disclosed in an embodiment of this specification. The consulting service involves conducting several rounds of dialogue with a user in a target session, wherein any round of dialogue is implemented by the following modules included in the device 500:

[0138] The feature extraction module 510 is configured to use the trained information extraction model to process the consultation content input by the user in this round, obtain the extracted features of this round, and use them to update the extracted feature set corresponding to the target conversation; the decision module 520 is configured to use the trained decision model to process the updated extracted feature set of this round to obtain the decision result of this round; the counter-question feature determination module 530 is configured to determine several feature items of the user to be counter-questioned according to the decision result of this round when it is determined that the current round of dialogue meets the preset counter-question conditions; the reply content generation module 540 is configured to use the trained dialogue model to process the several feature items to obtain the reply content for the consultation content.

[0139] In one embodiment, the device 500 also includes a target session creation module, which is configured to: create the target session in response to the user entering the consulting service page; and / or create the target session in response to the user initiating a session operation based on the consulting service page.

[0140] In one embodiment, the device 500 also includes an information extraction model training module, which is configured to: obtain multiple decision case data in the field corresponding to the consulting service; for each decision case data, call the trained first model to extract information from it to obtain the corresponding extraction result, and construct a corresponding fine-tuning sample by using the decision case data as a sample feature and the extraction result as a sample label; use the fine-tuning sample to fine-tune the pre-trained second model; wherein the fine-tuned second model is used as the trained information extraction model.

[0141] In one embodiment, the device 500 also includes a decision model training module, which is configured to: obtain a decision case data set in the field corresponding to the consulting service; process each decision case data using the information extraction model to obtain an information extraction result; extract a decision category label and several decision features from the information extraction result to form a training sample; and use the training sample to update the decision model.

[0142] In one embodiment, the decision model is a decision tree model or a linear regression model.

[0143] In one embodiment, the preset rhetorical question conditions include: the number of features in the extracted feature set after this round of update is not greater than a first threshold; and / or, the probability corresponding to the decision category with the highest probability in the decision results of this round is not greater than a second threshold; and / or, the number of decision categories in the decision results of this round whose corresponding probability is greater than a third threshold is greater than a fourth threshold; and / or, the number of rounds of this round of dialogue is not greater than a fifth threshold.

[0144] In one embodiment, the counter-question feature determination module 530 is specifically configured as follows: based on the focus feature set corresponding to the consulting service and the extracted feature set after the current round of update, a plurality of unknown feature items with unknown feature values ​​are determined; for any first unknown feature item, based on the decision probability corresponding to each decision category in the current round of decision results, and its correlation coefficient with each decision category, a first current round weight is determined; and a plurality of unknown feature items whose current round weights are ranked within a predetermined ranking range are selected from the plurality of unknown feature items as a plurality of feature items to be counter-questioned to the user.

[0145] In a specific embodiment, the inverse question feature determination module 530 is configured to determine the first current round weight, specifically including: for each decision category, based on the decision probability of the decision category and the first correlation coefficient between the first unknown feature item and the decision category, determining the score of the first unknown feature item under the decision category; based on multiple scores of the first unknown feature item under the multiple decision categories, determining the first current round weight.

[0146] Further, in one example, the inverse question feature determination module 530 is configured to determine the score of the first unknown feature item under the decision category, specifically including: determining the ranking of the first correlation coefficient among multiple correlation coefficients between the multiple unknown feature items and the decision category; and using a predetermined power of the decision probability of the decision category divided by the ranking as the score under the decision category.

[0147] In one embodiment, the reply content generation module 540 is further configured to: when it is determined that the current round of dialogue does not meet the preset rhetorical question condition, use the trained dialogue model to process the current round of decision results to obtain the reply content for the consultation content.

[0148] In one embodiment, the reply content generation module 540 is specifically configured to: use the dialogue model to process the decision result of this round, several feature items, and the dialogue content in the previous round to obtain the reply content.

[0149] In one embodiment, the method is controlled and executed by a target big model deployed in a consulting service platform in response to input of the consulting content.

[0150] In one embodiment, the consulting service is an online medical consultation service, the extracted feature set involves at least one of the following features: symptoms, basic information, medical history, and examination report, and the current round of decision results involves the diagnosed disease and the corresponding probability.

[0151] According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute a combination of Figure 2 or Figure 3 or Figure 4 The method described.

[0152] According to another embodiment of the present invention, a computing device is provided, including a memory and a processor, wherein an executable code is stored in the memory, and when the processor executes the executable code, the Figure 2 or Figure 3 or Figure 4 The method described.

[0153] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0154] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for providing consulting services, involving conducting a plurality of rounds of dialogue with a user in a target session, wherein any round of dialogue includes: Using the trained information extraction model to process the consultation content input by the user in this round, obtain the extracted features of this round, and use them to update the extracted feature set corresponding to the target session; Use the trained decision model to process the extracted feature set after this round of update to obtain the decision result of this round; When it is determined that the current round of dialogue meets the preset counter-questioning condition, a number of feature items of the user to be counter-questioned are determined according to the decision result of the current round; The trained dialogue model is used to process the several feature items to obtain a reply content for the consultation content.

2. The method according to claim 1, further comprising: In response to the user entering the consulting service page, creating the target session; and / or, In response to the user performing a session initiation operation based on the consulting service page, the target session is created.

3. The method according to claim 1, wherein: The training of the information extraction model includes the following steps: Obtaining multiple decision-making case data in the field corresponding to the consulting service; For each decision case data, call the trained first model to extract information from it to obtain the corresponding extraction result. By using the decision case data as the sample feature and the extraction result as the sample label, the corresponding fine-tuning sample is constructed; The pre-trained second largest model is fine-tuned using the fine-tuning samples; wherein the fine-tuned second largest model is used as the trained information extraction model.

4. The method according to claim 1, wherein: The training of the decision model includes the following steps: Obtaining a decision-making case data set in the field corresponding to the consulting service; For each decision case data, the information extraction model is used to process it to obtain an information extraction result; Extracting decision category labels and several decision features from the information extraction results to form training samples; The decision model is updated using the training samples.

5. The method according to claim 1 or 4, wherein the decision model is a decision tree model or a linear regression model.

6. The method according to claim 1, wherein: The preset rhetorical question conditions include: The number of features in the extracted feature set after this round of update is not greater than the first threshold; and / or, The probability corresponding to the decision category with the highest probability in the decision results of this round is not greater than the second threshold; and / or, The number of decision categories corresponding to the probability greater than the third threshold in the decision results of this round is greater than the fourth threshold; and / or, The number of rounds of this dialogue is not greater than the fifth threshold.

7. The method according to claim 1, wherein: According to the decision result of this round, several feature items of the user to be questioned are determined, including: Based on the focus feature set corresponding to the consulting service and the extracted feature set after the current round of update, determining a plurality of unknown feature items whose feature values ​​are unknown; For any first unknown feature item, based on the decision probability corresponding to each decision category in the current round decision result and its correlation coefficient with each decision category, determine a first current round weight; A number of unknown feature items whose weights in this round are within a predetermined ranking range are selected from the multiple unknown feature items as the number of feature items to be asked back to the user.

8. The method according to claim 7, wherein: For any first unknown feature item, based on the decision probability corresponding to each decision category in the current round decision result and its correlation coefficient with each decision category, a first current round weight is determined, including: For each decision category, based on the decision probability of the decision category and a first correlation coefficient between the first unknown feature item and the decision category, determine a score of the first unknown feature item under the decision category; The first current-round weight is determined based on multiple scores of the first unknown feature item under the multiple decision categories.

9. The method according to claim 8, wherein: Determining a score of the first unknown feature item under the decision category based on the decision probability of the decision category and a first correlation coefficient between the first unknown feature item and the decision category includes: Determine a ranking of the first correlation coefficient among a plurality of correlation coefficients between the plurality of unknown feature items and the decision category; The predetermined power of the decision probability of the decision category is divided by the ranking to obtain a score for the decision category.

10. The method according to claim 1, further comprising: When it is determined that the current round of dialogue does not meet the preset counter-question condition, the trained dialogue model is used to process the decision result of the current round to obtain the reply content for the consultation content.

11. The method according to claim 1, wherein: The trained dialogue model is used to process the decision result of this round and several feature items to obtain the reply content for the consultation content, which also includes: The dialogue model is used to process the decision result of this round, several feature items, and the dialogue content in the previous round to obtain the reply content.

12. The method according to claim 1, wherein: The method is controlled and executed by a target big model deployed in a consulting service platform in response to the input of the consulting content.

13. The method according to claim 1, wherein: The consulting service is an online consultation service, and the extracted feature set involves at least one of the following features: Symptoms, basic information, medical history, examination reports, the results of this round of decision-making involve the diagnosed diseases and the corresponding probabilities.

14. A device for providing consulting services, wherein the consulting services involve conducting a plurality of rounds of dialogue with a user in a target session, wherein any round of dialogue is implemented by the following modules included in the device: A feature extraction module, configured to use the trained information extraction model to process the consultation content input by the user in this round, obtain the extracted features of this round, and use them to update the extracted feature set corresponding to the target session; A decision module is configured to use the trained decision model to process the extracted feature set after the current round of update to obtain the decision result of the current round; A counter-question feature determination module is configured to determine a number of feature items of the user to be counter-questioned according to the decision result of this round when it is determined that the current round of dialogue meets the preset counter-question condition; The reply content generation module is configured to use the trained dialogue model to process the several feature items to obtain reply content for the consultation content.

15. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 13.

16. A computing device comprising a memory and a processor, wherein: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 13 is implemented.