Inquiry preference detection method and device, storage medium and computer equipment

By fusing and hierarchically clustering subjective descriptions and consultation department information from patient sample data, the system automatically labels sample classes and constructs a detection model. This solves the problem of high manual labeling costs in online internet medical consultations and achieves efficient and accurate consultation preference detection.

CN115331808BActive Publication Date: 2026-07-10KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD
Filing Date
2022-08-09
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies in online medical consultations that analyze the preference between traditional Chinese medicine and Western medicine based on patients' subjective descriptions of their conditions suffer from high manual annotation costs and reliance on human experience, resulting in insufficient sample annotation efficiency and accuracy.

Method used

By fusing subjective descriptions and departmental information from patient sample data, hierarchical clustering is performed using BERT vector representation capabilities to automatically label sample classes and construct a consultation preference detection model, thereby achieving automatic labeling and detection of patient consultation preferences.

Benefits of technology

It saves on the labor costs of manual labeling, improves the efficiency and accuracy of sample labeling, and enhances the accuracy of patient preference detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115331808B_ABST
    Figure CN115331808B_ABST
Patent Text Reader

Abstract

The application discloses a diagnosis preference detection method and device, a storage medium and a computer device. The method comprises the following steps: fusing and expressing subjective description information and diagnosis department information in each patient sample data to obtain fusion features of each patient sample data; performing hierarchical clustering on the fusion features corresponding to a plurality of patient sample data to obtain a plurality of sample classes, and labeling each sample class according to the diagnosis department information corresponding to the patient sample data in the sample class; constructing model training samples according to the labeled sample classes, training a preset diagnosis preference detection model by using the model training samples; fusing and expressing target subjective description information and target diagnosis department information of a patient to be detected to obtain target fusion features of the patient to be detected, inputting the target fusion features into the trained preset diagnosis preference detection model, and obtaining diagnosis preferences of the patient to be detected. The application can realize automatic sample labeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of digital healthcare and artificial intelligence technology, and in particular to a method and apparatus for detecting consultation preferences, a storage medium, and a computer device. Background Technology

[0002] In the context of online medical consultations, analyzing the patient's subjective description of their condition and their preference for traditional Chinese medicine (TCM) versus Western medicine is a challenging problem and a field worthy of in-depth study. Simply put, when a user inputs a description of their condition, existing solutions can use keyword matching, rule engines, and other expert systems to identify the specific description and determine their preference for TCM or Western medicine consultation.

[0003] Existing machine learning algorithms or some deep learning models are designed for traditional supervised learning. They are quite demanding on the size of the training set and the degree of dependence on annotation, requiring technicians to manually annotate a large number of samples, which results in high costs in practical applications. Summary of the Invention

[0004] In view of this, this application provides a method and apparatus, storage medium, and computer equipment for detecting consultation preferences. The method clusters samples based on the fusion features obtained by fusing subjective description information and consultation department information, and automatically labels the samples using the consultation department information of the samples in each sample class. This saves the labor cost of manual labeling, overcomes the shortcomings of manual labeling that relies on human experience, improves the efficiency and accuracy of sample labeling, and further helps to improve the accuracy of consultation preference detection.

[0005] According to one aspect of this application, a method for detecting patient consultation preferences is provided, the method comprising:

[0006] Multiple patient sample data were obtained, each of which included subjective description information and information about the department where the patient sought medical attention;

[0007] The subjective description information and the consultation department information in each patient sample data are fused and expressed to obtain the fusion feature of each patient sample data;

[0008] Hierarchical clustering is performed on the fusion features corresponding to multiple patient sample data to obtain multiple sample classes, and each sample class is labeled according to the consultation department information corresponding to the patient sample data in each sample class;

[0009] Based on the labeled sample classes, model training samples are constructed, and the preset consultation preference detection model is trained using the model training samples. Each model training sample includes fusion features and consultation preference labels, and the consultation preference labels include traditional Chinese medicine preferences and Western medicine preferences.

[0010] The target subjective description information and target consultation department information of the patient to be tested are fused and expressed to obtain the target fusion feature of the patient to be tested. The target fusion feature is then input into a pre-trained preset consultation preference detection model to obtain the consultation preference of the patient to be tested.

[0011] Optionally, before fusing and expressing the target subjective description information of the patient to be tested and the target consultation department information, the method further includes:

[0012] Based on the description of the patient's condition provided by the patient to be tested, the target subjective description information is determined;

[0013] The personal consultation information of the patient to be tested is obtained, and feature analysis is performed on the personal consultation information to determine the target consultation department information.

[0014] Optionally, after labeling any sample class based on the consultation department information corresponding to the patient sample data in any sample class, the method further includes:

[0015] Determine the cluster center of any sample class, and calculate the distance between each patient sample data in any sample class and the cluster center of any sample class;

[0016] Based on the distance, determine the weight of each patient sample data in any sample class;

[0017] Accordingly, constructing model training samples based on the labeled sample classes specifically includes:

[0018] Based on the labeled sample class, the consultation preference label for each patient sample data is determined, and based on the fusion features, consultation preference label and weight of each patient sample data, the training sample corresponding to each patient sample data is determined, and the model training sample is constructed.

[0019] Optionally, determining the weight of each patient sample data in any sample class based on the distance specifically includes:

[0020] Based on the distance, a distance weight is determined for each patient sample data in any sample class, wherein the distance weight is positively correlated with the distance;

[0021] Keyword frequency statistics are performed on the subjective description information of each patient sample data, and the word frequency weight of each patient sample data is determined based on the keyword frequency, wherein the word frequency weight is negatively correlated with the keyword frequency;

[0022] The weight of each patient sample data is determined based on the distance weight and the word frequency weight.

[0023] Optionally, training the preset consultation preference detection model using the model training samples specifically includes:

[0024] Based on the consultation preference labels and weights in the model training samples, determine the consultation preference probability of the model training samples;

[0025] The preset consultation preference detection model is trained by using the fusion features in the model training samples as the model training input and the consultation preference probability corresponding to the model training samples as the model training output.

[0026] Optionally, the step of inputting the target fusion features into a pre-trained preset consultation preference detection model to obtain the consultation preferences of the patient to be detected specifically includes:

[0027] The target fusion features are input into a pre-trained preset consultation preference detection model to obtain the probability of TCM consultation preference and the probability of Western medicine consultation preference of the patient to be detected.

[0028] If the probability of TCM consultation preference is greater than the preset TCM preference threshold, and the probability of Western medicine consultation preference is less than or equal to the preset Western medicine preference threshold, then the consultation preference of the patient to be tested is determined to be TCM.

[0029] If the probability of Western medicine consultation preference is greater than the preset Western medicine preference threshold, and the probability of traditional Chinese medicine consultation preference is less than or equal to the preset traditional Chinese medicine preference threshold, then the consultation preference of the patient to be tested is determined to be Western medicine.

[0030] Otherwise, the patient's consultation preference is determined to be neutral.

[0031] According to another aspect of this application, a medical consultation preference detection device is provided, the device comprising:

[0032] The sample acquisition module is used to acquire multiple patient sample data, where each patient sample data includes subjective description information and information of the department consulted.

[0033] The feature expression module is used to fuse and express the subjective description information and consultation department information in each patient sample data to obtain the fused features of each patient sample data.

[0034] The sample labeling module is used to perform hierarchical clustering on the fusion features corresponding to multiple patient sample data to obtain multiple sample classes, and to label any sample class according to the consultation department information corresponding to the patient sample data in any sample class;

[0035] The model training module is used to construct model training samples based on the labeled sample classes, and to train the preset consultation preference detection model using the model training samples. Each model training sample includes fusion features and consultation preference labels, and the consultation preference labels include traditional Chinese medicine preferences and Western medicine preferences.

[0036] The detection module is used to fuse and express the target subjective description information and target consultation department information of the patient to be tested, so as to obtain the target fusion feature of the patient to be tested, and input the target fusion feature into the trained preset consultation preference detection model to obtain the consultation preference of the patient to be tested.

[0037] Optionally, the detection module is further configured to:

[0038] Before fusing and expressing the target subjective description information and target consultation department information of the patient to be tested, the target subjective description information is determined based on the description information of the patient's condition provided by the patient to be tested;

[0039] The personal consultation information of the patient to be tested is obtained, and feature analysis is performed on the personal consultation information to determine the target consultation department information.

[0040] Optionally, the apparatus further includes: a weight calculation module, used for:

[0041] Based on the consultation department information corresponding to the patient sample data in any sample class, after labeling the sample class, the cluster center of the sample class is determined, and the distance between each patient sample data in the sample class and the cluster center of the sample class is calculated respectively.

[0042] Based on the distance, determine the weight of each patient sample data in any sample class;

[0043] Accordingly, the model training module is also used for:

[0044] Based on the labeled sample class, the consultation preference label for each patient sample data is determined, and based on the fusion features, consultation preference label and weight of each patient sample data, the training sample corresponding to each patient sample data is determined, and the model training sample is constructed.

[0045] Optionally, the weight calculation module is further configured to:

[0046] Based on the distance, a distance weight is determined for each patient sample data in any sample class, wherein the distance weight is positively correlated with the distance;

[0047] Keyword frequency statistics are performed on the subjective description information of each patient sample data, and the word frequency weight of each patient sample data is determined based on the keyword frequency, wherein the word frequency weight is negatively correlated with the keyword frequency;

[0048] The weight of each patient sample data is determined based on the distance weight and the word frequency weight.

[0049] Optionally, the model training module is specifically used for:

[0050] Based on the consultation preference labels and weights in the model training samples, determine the consultation preference probability of the model training samples;

[0051] The preset consultation preference detection model is trained by using the fusion features in the model training samples as the model training input and the consultation preference probability corresponding to the model training samples as the model training output.

[0052] Optionally, the detection module is specifically used for:

[0053] The target fusion features are input into a pre-trained preset consultation preference detection model to obtain the probability of TCM consultation preference and the probability of Western medicine consultation preference of the patient to be detected.

[0054] If the probability of TCM consultation preference is greater than the preset TCM preference threshold, and the probability of Western medicine consultation preference is less than or equal to the preset Western medicine preference threshold, then the consultation preference of the patient to be tested is determined to be TCM.

[0055] If the probability of Western medicine consultation preference is greater than the preset Western medicine preference threshold, and the probability of traditional Chinese medicine consultation preference is less than or equal to the preset traditional Chinese medicine preference threshold, then the consultation preference of the patient to be tested is determined to be Western medicine.

[0056] Otherwise, the patient's consultation preference is determined to be neutral.

[0057] According to another aspect of this application, a storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method for detecting consultation preferences.

[0058] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described consultation preference detection method.

[0059] By employing the above technical solution, this application provides a method, apparatus, storage medium, and computer device for detecting patient consultation preferences. After fusing and expressing subjective descriptive information and consultation department information from patient sample data, the obtained fusion features are used to hierarchically cluster each patient sample data to obtain multiple sample classes. Based on the consultation department information corresponding to each patient sample data within a sample class, the sample class is labeled, thereby achieving automatic labeling of each patient sample data. Furthermore, the labeled samples are used for model training, and finally, the trained model is used to detect the patient's consultation preferences. Compared to the existing manual labeling methods that require significant manpower, this application's embodiment clusters samples based on the fusion features obtained from fusing subjective descriptive information and consultation department information, and automatically labels the samples using the consultation department information of samples within each sample class. This saves the manpower cost of manual labeling, overcomes the deficiency of manual labeling relying on human experience, improves sample labeling efficiency and accuracy, and further contributes to improving the accuracy of consultation preference detection.

[0060] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0061] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0062] Figure 1 A flowchart illustrating a method for detecting patient consultation preferences provided in an embodiment of this application is shown.

[0063] Figure 2 A schematic flowchart of a sample annotation method provided in an embodiment of this application is shown;

[0064] Figure 3 A schematic diagram of a consultation preference detection device provided in an embodiment of this application is shown. Detailed Implementation

[0065] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0066] This embodiment provides a method for detecting patient consultation preferences, such as... Figure 1 As shown, the method includes:

[0067] Step 101: Obtain multiple patient sample data, where each patient sample data includes subjective description information and information of the department where the consultation was conducted;

[0068] This application embodiment is used to detect patients' consultation preferences based on their subjective descriptions of their conditions, specifically whether they prefer Traditional Chinese Medicine (TCM) or Western medicine consultations. This allows for better allocation of online doctor resources, reducing the need for reallocation due to mismatches between assigned online doctors and patient preferences, thus improving the efficiency of online consultations. This application embodiment includes a model training section and a consultation preference detection section.

[0069] In the model training section, this embodiment of the application can train a preset consultation preference detection model based on unlabeled sample data. First, multiple patient historical consultation data are obtained as patient sample data. Each patient sample data consists of two parts: the patient's subjective description information and the consultation department information. The subjective description information is the patient's subjective description of their own condition, and the consultation department information is the department that the patient ultimately consulted during an online consultation experience.

[0070] Step 102: The subjective description information and consultation department information in each patient sample data are fused and expressed to obtain the fusion feature of each patient sample data;

[0071] In the model training part, secondly, the vector representation capability of BERT is used to fuse the subjective description information and consultation department information contained in each patient sample data. The advantage of fused representation compared with independent BERT vector representation is that fused representation can learn the relationship between subjective description information and consultation department information and describe the relevant features.

[0072] Step 103: Perform hierarchical clustering on the fusion features corresponding to the multiple patient sample data to obtain multiple sample classes, and label any sample class according to the consultation department information corresponding to the patient sample data in any sample class;

[0073] In the model training section, the patient sample data is then automatically labeled. In this embodiment, hierarchical clustering is performed on the patient sample data based on the fusion features corresponding to each patient sample data to obtain multiple sample classes. Then, for any sample class, the consultation department information corresponding to each patient sample data in that sample class is obtained. The consultation department information is statistically analyzed, and the consultation preference label for that sample class is determined based on the statistical data of the consultation department information. Specifically, the department label corresponding to each department can be preset first, that is, it can be determined whether each department belongs to traditional Chinese medicine or Western medicine. After clustering the patient sample data, the frequency of each department in the patient sample data contained in each sample class is counted, and the department label corresponding to the department with the most frequent occurrences is determined as the consultation preference label corresponding to that sample class.

[0074] Step 104: Based on the labeled sample classes, construct model training samples, and use the model training samples to train the preset consultation preference detection model. Each model training sample includes fusion features and consultation preference labels, and the consultation preference labels include traditional Chinese medicine preferences and Western medicine preferences.

[0075] In the model training section, the final step involves using sample classes labeled with patient consultation preference tags to determine the patient consultation preference tags within each sample class. This process constructs model training samples, enabling unsupervised and automatic labeling of patient sample data and saving technical personnel the cost of labeling samples. Furthermore, the pre-defined patient consultation preference detection model is trained using these labeled training samples. During training, the fusion features of each training sample are used as input data, and the patient consultation preference tags are used as output data. This allows the trained model to detect patients' preferences for specific departments during consultations.

[0076] Step 105: The target subjective description information and target consultation department information of the patient to be tested are fused and expressed to obtain the target fusion feature of the patient to be tested, and the target fusion feature is input into the trained preset consultation preference detection model to obtain the consultation preference of the patient to be tested.

[0077] In the consultation preference detection part, for the patient to be tested, the patient's target subjective description information and target consultation department information are obtained, and the two are fused and expressed to obtain the patient's target fusion feature. Then, the target fusion feature is input into the pre-trained preset consultation preference detection model to determine the consultation preference of the patient to be tested.

[0078] Optionally, before step 105, the method further includes: determining the target subjective description information based on the disease description information provided by the patient to be tested; obtaining the personal consultation information of the patient to be tested, and performing feature analysis on the personal consultation information to determine the target consultation department information.

[0079] In this embodiment, the description of the patient's condition provided by the patient to be tested is used as the target subjective description information. For the target consultation department information, the user's past number of TCM consultations, number of Western medicine consultations, number of TCM point consultations, number of Western medicine point consultations, browsing history of TCM-related information, age, gender and other personal information (after de-sensitization processing) can be combined to extract and visualize the features of each user.

[0080] By applying the technical solution of this embodiment, subjective description information and consultation department information in patient sample data are fused and expressed. The obtained fusion features are then used to hierarchically cluster each patient sample data to obtain multiple sample classes. Based on the consultation department information corresponding to each patient sample data in each sample class, the sample class is labeled, thus achieving automatic labeling of each patient sample data. Furthermore, the labeled samples are used for model training, and finally, the trained model is used to detect the consultation preferences of the patients to be tested. Compared with the existing manual labeling method, which requires a large amount of manpower, this embodiment of the application clusters samples based on the fusion features obtained after fusing subjective description information and consultation department information, and automatically labels the samples using the consultation department information of the samples in each sample class. This saves the manpower cost of manual labeling, overcomes the deficiency of manual labeling relying on human experience, improves the efficiency and accuracy of sample labeling, and further helps to improve the accuracy of consultation preference detection.

[0081] In this embodiment of the application, to improve sample accuracy and enhance model recognition accuracy, the samples can be finely annotated. Optionally, such as... Figure 2 As shown, after step 103, the following steps are also included:

[0082] Step 201: Determine the cluster center of any sample class, and calculate the distance between each patient sample data in any sample class and the cluster center of any sample class;

[0083] Step 202: Based on the distance, determine the distance weight of each patient sample data in any sample class, wherein the distance weight is positively correlated with the distance;

[0084] Step 203: Perform keyword frequency statistics on the subjective description information of each patient sample data, and determine the word frequency weight of each patient sample data based on the keyword frequency, wherein the word frequency weight is negatively correlated with the keyword frequency;

[0085] Step 204: Determine the weight of each patient sample data based on the distance weight and the word frequency weight.

[0086] In this embodiment, to achieve differentiated expression of samples with the same consultation preference label, after hierarchical clustering of each patient sample data, the cluster center of each sample class can be determined by calculating the Euclidean space centroid. The distance between each patient sample data in the sample class and the cluster center is calculated. The distances corresponding to each patient sample data in the same sample class are normalized, and the corresponding distance weights are determined based on the principle that distance weights are positively correlated with distance. In addition, the frequency of some keywords in the patient's subjective description information will also affect the accuracy of the fusion features corresponding to this sample. For example, if a patient describes "bitter mouth" multiple times in the description, this sample will show a higher correlation with TCM preference in the fusion features because it describes content related to TCM preference multiple times, and thus be more easily labeled as TCM preference. However, if the patient describes "bitter mouth" multiple times during consultation preference detection, other keyword features may be buried in the multiple "bitter mouth" features during feature expression, affecting the detection accuracy. Therefore, in addition to calculating distance weight, this embodiment can also calculate word frequency weight, thereby fusing distance weight and word frequency weight to obtain the final weight of the sample. Specifically, for any patient sample data, keywords are extracted from the subjective description information in the patient sample data, and the frequency of each keyword is counted to determine the word frequency of each keyword. Based on the principle that word frequency weight is negatively correlated with word frequency, the corresponding word frequency weight is calculated according to the keyword word frequency. For example, a correspondence between the maximum keyword frequency and the word frequency weight can be set. Specifically, multiple preset maximum keyword frequencies with gradients can be set (e.g., first frequency > second frequency > third frequency, etc.), and a word frequency weight corresponding to each preset maximum keyword frequency can be set. In a specific application scenario, if the maximum keyword frequency is greater than the first frequency, the word frequency weight can be determined as the first weight; otherwise, if the maximum keyword frequency is greater than the second frequency, the word frequency weight can be determined as the second weight, and so on...

[0087] Corresponding to steps 201 to 204 above, in this embodiment of the application, step 104 may optionally include:

[0088] Step 104-1: Based on the labeled sample class, determine the consultation preference label for each patient sample data, and based on the fusion features, consultation preference label and weight of each patient sample data, determine the training sample corresponding to each patient sample data, and construct the model training sample;

[0089] Step 104-2: Determine the consultation preference probability of the model training sample based on the consultation preference labels and weights in the model training sample;

[0090] Step 104-3: Use the fusion features in the model training samples as the model training input and the consultation preference probability corresponding to the model training samples as the model training output to train the preset consultation preference detection model.

[0091] In this embodiment, training samples are constructed that include fusion features, consultation preference labels, and weights. The product of the consultation preference labels and weights is used as the consultation preference probability of the training samples. Thus, by using the fusion features as model input and the consultation preference probability as model output, a model capable of predicting the probabilities of TCM and Western medicine preferences is obtained.

[0092] In this embodiment of the application, optionally, step 105, "inputting the target fusion feature into a trained preset consultation preference detection model to obtain the consultation preference of the patient to be detected," specifically includes:

[0093] Step 105-1: Input the target fusion features into the trained preset consultation preference detection model to obtain the probability of TCM consultation preference and the probability of Western medicine consultation preference of the patient to be tested;

[0094] Step 105-2: If the probability of TCM consultation preference is greater than the preset TCM preference threshold, and the probability of Western medicine consultation preference is less than or equal to the preset Western medicine preference threshold, then the consultation preference of the patient to be tested is determined to be TCM.

[0095] Step 105-3: If the probability of Western medicine consultation preference is greater than the preset Western medicine preference threshold, and the probability of traditional Chinese medicine consultation preference is less than or equal to the preset traditional Chinese medicine preference threshold, then the consultation preference of the patient to be tested is determined to be Western medicine.

[0096] Step 105-4: Otherwise, determine that the patient's consultation preference is neutral.

[0097] In this embodiment, after obtaining the target fusion features of the patient to be tested, they are input into the trained model to obtain the probabilities of TCM preference and Western medicine preference. Finally, the probabilities of TCM preference and Western medicine preference are compared with preset TCM preference thresholds and preset Western medicine preference thresholds, respectively, to determine the patient's consultation preference. Specifically, if the probability of TCM preference is high and the probability of Western medicine preference is low, that is, the probability of TCM consultation preference is greater than the preset TCM preference threshold and the probability of Western medicine consultation preference is less than or equal to the preset Western medicine preference threshold, then it can be determined as TCM preference; if the probability of TCM preference is low and the probability of Western medicine preference is high, that is, the probability of Western medicine consultation preference is greater than the preset Western medicine preference threshold and the probability of TCM consultation preference is less than or equal to the preset TCM preference threshold, then it can be determined as Western medicine preference; and if the probabilities of TCM preference and Western medicine preference are both high or both low, then it is determined as neutral preference.

[0098] Furthermore, as Figure 1 In terms of specific implementation of the method, this application provides a consultation preference detection device, such as... Figure 3 As shown, the device includes:

[0099] The sample acquisition module is used to acquire multiple patient sample data, where each patient sample data includes subjective description information and information of the department consulted.

[0100] The feature expression module is used to fuse and express the subjective description information and consultation department information in each patient sample data to obtain the fused features of each patient sample data.

[0101] The sample labeling module is used to perform hierarchical clustering on the fusion features corresponding to multiple patient sample data to obtain multiple sample classes, and to label any sample class according to the consultation department information corresponding to the patient sample data in any sample class;

[0102] The model training module is used to construct model training samples based on the labeled sample classes, and to train the preset consultation preference detection model using the model training samples. Each model training sample includes fusion features and consultation preference labels, and the consultation preference labels include traditional Chinese medicine preferences and Western medicine preferences.

[0103] The detection module is used to fuse and express the target subjective description information and target consultation department information of the patient to be tested, so as to obtain the target fusion feature of the patient to be tested, and input the target fusion feature into the trained preset consultation preference detection model to obtain the consultation preference of the patient to be tested.

[0104] Optionally, the detection module is further configured to:

[0105] Before fusing and expressing the target subjective description information and target consultation department information of the patient to be tested, the target subjective description information is determined based on the description information of the patient's condition provided by the patient to be tested;

[0106] The personal consultation information of the patient to be tested is obtained, and feature analysis is performed on the personal consultation information to determine the target consultation department information.

[0107] Optionally, the apparatus further includes: a weight calculation module, used for:

[0108] Based on the consultation department information corresponding to the patient sample data in any sample class, after labeling the sample class, the cluster center of the sample class is determined, and the distance between each patient sample data in the sample class and the cluster center of the sample class is calculated respectively.

[0109] Based on the distance, determine the weight of each patient sample data in any sample class;

[0110] Accordingly, the model training module is also used for:

[0111] Based on the labeled sample class, the consultation preference label for each patient sample data is determined, and based on the fusion features, consultation preference label and weight of each patient sample data, the training sample corresponding to each patient sample data is determined, and the model training sample is constructed.

[0112] Optionally, the weight calculation module is further configured to:

[0113] Based on the distance, a distance weight is determined for each patient sample data in any sample class, wherein the distance weight is positively correlated with the distance;

[0114] Keyword frequency statistics are performed on the subjective description information of each patient sample data, and the word frequency weight of each patient sample data is determined based on the keyword frequency, wherein the word frequency weight is negatively correlated with the keyword frequency;

[0115] The weight of each patient sample data is determined based on the distance weight and the word frequency weight.

[0116] Optionally, the model training module is specifically used for:

[0117] Based on the consultation preference labels and weights in the model training samples, determine the consultation preference probability of the model training samples;

[0118] The preset consultation preference detection model is trained by using the fusion features in the model training samples as the model training input and the consultation preference probability corresponding to the model training samples as the model training output.

[0119] Optionally, the detection module is specifically used for:

[0120] The target fusion features are input into a pre-trained preset consultation preference detection model to obtain the probability of TCM consultation preference and the probability of Western medicine consultation preference of the patient to be detected.

[0121] If the probability of TCM consultation preference is greater than the preset TCM preference threshold, and the probability of Western medicine consultation preference is less than or equal to the preset Western medicine preference threshold, then the consultation preference of the patient to be tested is determined to be TCM.

[0122] If the probability of Western medicine consultation preference is greater than the preset Western medicine preference threshold, and the probability of traditional Chinese medicine consultation preference is less than or equal to the preset traditional Chinese medicine preference threshold, then the consultation preference of the patient to be tested is determined to be Western medicine.

[0123] Otherwise, the patient's consultation preference is determined to be neutral.

[0124] It should be noted that other corresponding descriptions of the functional units involved in the consultation preference detection device provided in this application embodiment can be found by referring to... Figures 1 to 2 The corresponding descriptions in the method will not be repeated here.

[0125] Based on the above, Figures 1 to 2 Accordingly, this application also provides a storage medium storing a computer program, which, when executed by a processor, implements the above-described method. Figures 1 to 2 The method for detecting patient consultation preferences is shown.

[0126] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.

[0127] Based on the above, Figures 1 to 2 The method shown, and Figure 3 To achieve the above objectives, the present application also provides a computer device, specifically a personal computer, server, network device, etc., as shown in the virtual device embodiment. This computer device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figures 1 to 2 The method for detecting patient consultation preferences is shown.

[0128] Optionally, the computer device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.

[0129] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0130] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software within the physical device.

[0131] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms, or by hardware to fuse and express the subjective description information and consultation department information in the patient sample data, and then use the obtained fusion features to perform hierarchical clustering of each patient sample data to obtain multiple sample classes. Based on the consultation department information corresponding to each patient sample data in the sample class, the sample class is labeled, thereby achieving automatic labeling of each patient sample data. Furthermore, the labeled samples are used for model training, and finally, the trained model is used to detect the consultation preferences of the patients to be tested. Compared with the manual labeling method in the prior art, which requires a large amount of manpower, this application's embodiments use the fusion features obtained after fusing and expressing subjective description information and consultation department information to cluster the samples, and use the consultation department information of the samples in each sample class to achieve automatic labeling of the samples. This saves the manpower cost of manual labeling, overcomes the defect of manual labeling relying on human experience, improves the efficiency and accuracy of sample labeling, and further helps to improve the accuracy of consultation preference detection.

[0132] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or they can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.

[0133] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A method for detecting patient consultation preferences, characterized in that, The method includes: Multiple patient sample data were obtained, each of which included subjective description information and information about the department where the patient sought medical attention; The subjective description information and the consultation department information in each patient sample data are fused and expressed to obtain the fusion feature of each patient sample data; Hierarchical clustering is performed on the fusion features corresponding to multiple patient sample data to obtain multiple sample classes, and each sample class is labeled according to the consultation department information corresponding to the patient sample data in each sample class; The process involves determining the cluster center of any sample class and calculating the distance between each patient sample data point in that sample class and the cluster center of that sample class; determining the weight of each patient sample data point in that sample class based on the distance, including: determining a distance weight for each patient sample data point in that sample class based on the distance, wherein the distance weight is positively correlated with the distance; performing keyword frequency statistics on the subjective description information of each patient sample data point, and determining a word frequency weight for each patient sample data point based on the keyword frequency, wherein the word frequency weight is negatively correlated with the keyword frequency; and determining the weight of each patient sample data point based on the distance weight and the word frequency weight. Based on the labeled sample class, the consultation preference label for each patient sample data is determined. Based on the fusion features, consultation preference label and weight of each patient sample data, the training sample corresponding to each patient sample data is determined, and the model training sample is constructed. The preset consultation preference detection model is trained using the model training sample. Each model training sample includes fusion features and consultation preference label. The target subjective description information and target consultation department information of the patient to be tested are fused and expressed to obtain the target fusion feature of the patient to be tested. The target fusion feature is then input into a pre-trained preset consultation preference detection model to obtain the consultation preference of the patient to be tested.

2. The method according to claim 1, characterized in that, Before fusing and expressing the target subjective description information and target consultation department information of the patient to be tested, the method further includes: Based on the description of the patient's condition provided by the patient to be tested, the target subjective description information is determined; The personal consultation information of the patient to be tested is obtained, and feature analysis is performed on the personal consultation information to determine the target consultation department information.

3. The method according to claim 1, characterized in that, The step of training the preset consultation preference detection model using the model training samples specifically includes: Based on the consultation preference labels and weights in the model training samples, determine the consultation preference probability of the model training samples; The preset consultation preference detection model is trained by using the fusion features in the model training samples as the model training input and the consultation preference probability corresponding to the model training samples as the model training output.

4. The method according to claim 3, characterized in that, The step of inputting the target fusion features into a pre-trained preset consultation preference detection model to obtain the consultation preferences of the patient to be detected specifically includes: The target fusion features are input into a pre-trained preset consultation preference detection model to obtain the probability of TCM consultation preference and the probability of Western medicine consultation preference of the patient to be detected. If the probability of TCM consultation preference is greater than the preset TCM preference threshold, and the probability of Western medicine consultation preference is less than or equal to the preset Western medicine preference threshold, then the consultation preference of the patient to be tested is determined to be TCM. If the probability of Western medicine consultation preference is greater than the preset Western medicine preference threshold, and the probability of traditional Chinese medicine consultation preference is less than or equal to the preset traditional Chinese medicine preference threshold, then the consultation preference of the patient to be tested is determined to be Western medicine. Otherwise, the patient's consultation preference is determined to be neutral.

5. A device for detecting patient consultation preferences, characterized in that, The device includes: The sample acquisition module is used to acquire multiple patient sample data, where each patient sample data includes subjective description information and information of the department consulted. The feature expression module is used to fuse and express the subjective description information and consultation department information in each patient sample data to obtain the fused features of each patient sample data. The sample labeling module is used to perform hierarchical clustering on the fusion features corresponding to multiple patient sample data to obtain multiple sample classes, and to label any sample class according to the consultation department information corresponding to the patient sample data in any sample class; The weight calculation module is used to label any sample class based on the consultation department information corresponding to the patient sample data in any sample class, determine the cluster center of any sample class, and calculate the distance between each piece of patient sample data in any sample class and the cluster center of any sample class; and determine the weight of each piece of patient sample data in any sample class based on the distance. The weight calculation module is further configured to: determine the distance weight of each patient sample data in any sample class based on the distance, wherein the distance weight is positively correlated with the distance; perform keyword frequency statistics on the subjective description information of each patient sample data, and determine the word frequency weight of each patient sample data based on the keyword frequency, wherein the word frequency weight is negatively correlated with the keyword frequency; and determine the weight of each patient sample data based on the distance weight and the word frequency weight. The model training module is used to determine the consultation preference label for each patient sample data according to the labeled sample class, and to determine the training sample corresponding to each patient sample data based on the fusion features, consultation preference label and weight of each patient sample data, to construct the model training sample, and to train the preset consultation preference detection model using the model training sample. Each model training sample includes fusion features and consultation preference label. The detection module is used to fuse and express the target subjective description information and target consultation department information of the patient to be tested, so as to obtain the target fusion feature of the patient to be tested, and input the target fusion feature into the trained preset consultation preference detection model to obtain the consultation preference of the patient to be tested.

6. The apparatus according to claim 5, characterized in that, The detection module is also used for: Before fusing and expressing the target subjective description information and target consultation department information of the patient to be tested, the target subjective description information is determined based on the description information of the patient's condition provided by the patient to be tested; The personal consultation information of the patient to be tested is obtained, and feature analysis is performed on the personal consultation information to determine the target consultation department information.

7. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for detecting consultation preferences as described in any one of claims 1 to 4.

8. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for detecting consultation preferences as described in any one of claims 1 to 4.