Model training method, feature classification method, device and computer equipment

By using the least squares dual support vector machine meta-classification model as the second-layer meta-classifier of Stacking ensemble learning, the problems of low efficiency and overfitting in the traditional department triage method are solved, and efficient department classification and process optimization are achieved.

CN114169399BActive Publication Date: 2025-09-26SHANGHAI LIANYING ZHIYUAN MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111333019.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-11
Publication Date
2025-09-26
Estimated Expiration
2041-11-11

AI Technical Summary

Technical Problem

In traditional department triage methods, manual triage is inefficient and costly, while the expert system-based method lacks a comprehensive medical knowledge base, resulting in inaccurate triage. In addition, the Boosting algorithm is prone to overfitting during training, reducing model training efficiency.

Method used

The least squares dual support vector machine meta-classification model is used as the second-layer meta-classifier of Stacking ensemble learning. By determining the contribution of disease characteristics to each department, a sample data set is constructed, and the initial classification model is trained in layers to reduce learning difficulty and improve training efficiency and classification speed.

Benefits of technology

It improves the solution efficiency of model training, reduces storage space requirements, reduces training time, improves the speed and adaptability of department classification, and optimizes the department consultation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114169399B_ABST
    Figure CN114169399B_ABST
Patent Text Reader

Abstract

The present application relates to a model training method, a feature classification method, an apparatus and a computer device. The method includes: the computer device determines the contribution of each symptom feature to each department based on the historical symptom feature data of multiple users, determines a sample data set based on the contribution of the historical symptom features, trains the initial classification model based on the sample data set, and obtains a target classification model; wherein the contribution is the frequency of occurrence of the symptom feature for the department, the initial classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model, and the target classification model is used to classify departments according to the user's symptom features. The target classification model involved in this solution uses the least squares dual support vector machine as the second-layer meta-classifier of Stacking ensemble learning, which reduces the learning difficulty of the model during training and improves the solution efficiency of model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of medical technology, and in particular to a model training method, feature classification method, device and computer equipment. Background Art

[0002] Traditional department triage is divided into two parts: manual and expert system. Due to the large number of patients, manual triage alone is difficult to accommodate a large number of patients in a short period of time, which can easily cause patient dissatisfaction. The expert system-based method requires a large number of professionals to build a medical knowledge base, which has high production costs and difficult later maintenance. Moreover, there is currently no medical knowledge base that covers all diseases, which makes it easy for triage to fail, resulting in the patient's medical process being unable to continue.

[0003] In response to the two traditional department triage methods mentioned above, we propose implementing intelligent department triage through network models. The Boosting algorithm is a commonly used algorithm for training network models. The Boosting algorithm uses iterative training to gradually train weak learners into strong learners through multiple iterations. During the iterative training process, each base classifier adjusts its weight based on incorrectly classified samples from the previous iteration, causing the base classifier to focus more on misclassified samples. Through continuous iterative training, the model reduces the bias in the training results.

[0004] However, the Boosting algorithm is prone to overfitting during the training process, which reduces the efficiency of model training. Summary of the Invention

[0005] Based on this, it is necessary to provide a model training method, feature classification method, device and computer equipment that can improve the efficiency of model training in response to the above technical problems.

[0006] In a first aspect, a model training method is provided, the method comprising:

[0007] Determine the contribution of each symptom characteristic to each department based on the historical symptom characteristic data of multiple users; the contribution is the frequency of occurrence of the symptom characteristic for each department;

[0008] Determine the sample data set based on the contribution of historical disease characteristics;

[0009] The initial classification model is trained according to the sample data set to obtain the target classification model; the initial classification model includes the first-layer classification model and the second-layer classification model, wherein the second-layer classification model is the least squares dual support vector machine meta-classification model; the target classification model is used to classify departments according to the user's symptom characteristics.

[0010] In one optional embodiment, training the initial classification model based on the sample data set to obtain the target classification model includes:

[0011] Input the sample data set into the first-level classification model to obtain the first classification result corresponding to the sample data set;

[0012] According to the first classification results and the sample data set, the second-layer classification model is trained until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining the target classification model.

[0013] In one optional embodiment, the first classification result includes a first training result and a first test result; the sample data set is input into the first-layer classification model to obtain the first classification result corresponding to the sample data set, including

[0014] Determine a first training set and a first test set in the sample data set according to a preset division ratio;

[0015] Inputting the first training set into the first-layer classification model to obtain a first training result;

[0016] The first test set is input into the first-layer classification model to obtain the first test result.

[0017] In one optional embodiment, a second-layer classification model is trained based on the first classification result and the sample data set until the model parameters of the second-layer classification model meet the preset parameter conditions to obtain a target classification model, including:

[0018] Obtain a second training set and a second test set; the second training set includes the first training result and the first training set; the second test set includes the first test result and the first test set;

[0019] The second-layer classification model is trained according to the second training set and the second test set until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining a target classification model.

[0020] In one optional embodiment, the second-layer classification model is trained according to the second training set and the second test set until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining a target classification model, including:

[0021] Calculate the second classification result of the second-layer classification model corresponding to a preset number of times according to the second training set, the second test set and a preset cross-validation algorithm;

[0022] Determine the classification recognition rate corresponding to each classification result according to the second classification results of each second-layer classification model;

[0023] Determine the standard deviation of each classification result based on the classification recognition rate corresponding to each classification result and the preset threshold;

[0024] Determine the candidate model parameters corresponding to the classification result with the smallest standard deviation, and configure the second-layer classification model according to the candidate model parameters to obtain the target classification model.

[0025] In one optional embodiment, based on the historical disease characteristic data of multiple users, determining the contribution of each disease characteristic to each department includes:

[0026] According to each historical disease characteristic data, determine the word frequency-inverse document frequency corresponding to each disease characteristic;

[0027] Based on the word frequency-inverse document frequency of each disease feature, the contribution of each disease feature to each department is calculated.

[0028] In one optional embodiment, determining the sample data set based on the contribution of historical disease characteristics includes:

[0029] Determine the classification labels corresponding to each disease feature;

[0030] According to the classification labels of each disease feature, each disease feature is numerically processed using the Boolean type to obtain a disease feature set after numerical processing;

[0031] The numerically processed disease feature set and the contribution of each disease feature are weighted to obtain a sample data set.

[0032] In a second aspect, a feature classification method is provided, the method comprising:

[0033] Obtain the user's disease characteristics;

[0034] Input the user's symptom characteristics into the target classification model to determine the department classification of the user's symptom characteristics; the target classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model;

[0035] Among them, the target classification model is obtained by training the initial classification model based on the sample data set. The sample data set is a data set determined based on the user's historical disease feature data and the contribution of each disease feature to each department. The contribution is the frequency of occurrence of the disease feature for the department.

[0036] In a third aspect, a model training device is provided, comprising:

[0037] An acquisition module is used to determine the contribution of each symptom characteristic to each department based on the historical symptom characteristic data of multiple users; the contribution is the frequency of occurrence of the symptom characteristic for each department;

[0038] A determination module, used to determine a sample data set based on the contribution of historical disease characteristics;

[0039] The training module is used to train the initial classification model based on the sample data set to obtain the target classification model; the initial classification model includes the first-layer classification model and the second-layer classification model, where the second-layer classification model is a least squares dual support vector machine meta-classification model; the target classification model is used to classify departments according to the user's symptom characteristics.

[0040] In a fourth aspect, a feature classification device is provided, the device comprising:

[0041] An acquisition module is used to obtain the user's disease characteristics;

[0042] A classification module is used to input the user's symptom characteristics into a target classification model to determine the department classification of the user's symptom characteristics; the target classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model;

[0043] Among them, the target classification model is obtained by training the initial classification model based on the sample data set. The sample data set is a data set determined based on the user's historical disease feature data and the contribution of each disease feature to each department. The contribution is the frequency of occurrence of the disease feature for the department.

[0044] In a fifth aspect, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements any of the methods described in the first and second aspects above when executing the computer program.

[0045] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the method described in any one of the first and second aspects above.

[0046] The above-mentioned model training method, feature classification method, device and computer equipment, the computer equipment determines the contribution of each symptom feature to each department based on the historical symptom feature data of multiple users, determines the sample data set based on the contribution of the historical symptom features, trains the initial classification model based on the sample data set to obtain the target classification model; wherein, the contribution is the frequency of occurrence of the symptom feature for the department, the initial classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model, and the target classification model is used to classify departments according to the user's symptom features. The target classification model involved in this scheme uses the least squares dual support vector machine as the second-layer meta-classifier of Stacking ensemble learning, which reduces the learning difficulty of the model during training, improves the solution efficiency of model training, and reduces the storage space requirements during model training, reduces the model training time, improves the classification speed of the model, and has good adaptability. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is an application environment diagram of a model training method in one embodiment;

[0048] Figure 2 Schematic diagram of a flow chart of a model training method in one embodiment;

[0049] Figure 3 Schematic diagram of a flow chart of a model training method in one embodiment;

[0050] Figure 4 Schematic diagram of a flow chart of a model training method in one embodiment;

[0051] Figure 5 Schematic diagram of a flow chart of a model training method in one embodiment;

[0052] Figure 6 Schematic diagram of a flow chart of a model training method in one embodiment;

[0053] Figure 7 Schematic diagram of a flow chart of a model training method in one embodiment;

[0054] Figure 8 Schematic diagram of a flow chart of a model training method in one embodiment;

[0055] Figure 9 1 is a flow chart of a feature classification method according to an embodiment;

[0056] Figure 10 Schematic diagram of a flow chart of a method for training and applying a model in another embodiment;

[0057] Figure 11is a structural block diagram of a model training device in one embodiment;

[0058] Figure 12 2 is a structural block diagram of a feature classification device in one embodiment. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0060] The model training method provided in this application can be applied to Figure 1 In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a model training method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.

[0061] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0062] The following will explain in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems through embodiments and in conjunction with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that the present application Figure 2-Figure 8The model training methods provided in the embodiments may be executed by a computer device or a model training apparatus. The model training apparatus may be implemented as part or all of the computer device through software, hardware, or a combination of software and hardware. The following method embodiments are described using a computer device as the execution subject.

[0063] In one embodiment, Figure 2 As shown, a model training method is provided, comprising the following steps:

[0064] S201. Determine the contribution of each symptom characteristic to each department based on historical symptom characteristic data of multiple users; the contribution is the frequency of occurrence of the symptom characteristic with respect to the department.

[0065] The historical symptom characteristic data refers to the symptom characteristic data in the medical records of the user's visits to the clinic. Optionally, the computer device may obtain the user's medical records from a historical database and use a feature extraction algorithm to obtain the user's symptom characteristics. Alternatively, the computer device may use historical medical imaging data in the historical database and use an image recognition algorithm to obtain the user's symptom characteristics.

[0066] In this embodiment, after obtaining the historical disease characteristic data, the computer device can extract the disease characteristics based on the disease characteristic data, and thus calculate the contribution of each disease data to each department based on the disease characteristics, that is, determine the correlation between each disease characteristic data and each department, where the disease characteristics may include "chest pain", "palpitation", "dizziness"... "low back pain", etc. Optionally, the computer device can determine the contribution of each disease characteristic data to each department by calculating the frequency of each disease characteristic appearing in the medical records of each department. This embodiment does not limit this.

[0067] S202. Determine a sample data set based on the contribution of historical disease characteristics.

[0068] Among them, the sample data set refers to the data set used to train the initial classification model. In this embodiment, after determining the contribution of each symptom feature, the computer device can determine the sample data set based on the contribution of each symptom feature and the symptom feature data; the data in the sample data set should have the practicality of training the model, that is, based on the contribution of each symptom feature, the data with extremely small contribution to the triage department can be correspondingly eliminated. The data with extremely small contribution may be erroneous data, and the extremely small contribution here can be considered to be less than 1%. Optionally, the computer device can also pre-process the symptom feature data first, for example, processing the string type symptom feature data into discrete data for calculating the contribution of each symptom feature, which is not limited in this embodiment.

[0069] S203. Train the initial classification model based on the sample data set to obtain a target classification model; the initial classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model; the target classification model is used to classify departments according to the user's symptom characteristics.

[0070] Among them, the first-level classification model can be composed of one or more heterogeneous base classifiers. For example, the base classifier can be a classifier such as random forest, K-nearest neighbor, gradient boosting decision tree, etc.

[0071] In this embodiment, the computer device trains an initial classification model based on a sample data set. Optionally, the computer device may first input the sample data set into a first-layer classification model to train the first-layer classification model. After the first-layer classification model is trained, the least squares dual support vector machine meta-classification model is further trained based on the classification results output by the first-layer classification model. After the least squares dual support vector machine meta-classification model meets preset conditions, a trained least squares dual support vector machine meta-classification model is obtained. Further, based on the trained first-layer classification model and the trained least squares dual support vector machine meta-classification model, a target classification model is obtained. Alternatively, the computer device may also input the sample data set into the first-layer classification model and the least squares dual support vector machine meta-classification model respectively, train the two models respectively, and after the two models meet preset conditions respectively, a target classification model is obtained based on the trained classification model and the trained least squares dual support vector machine meta-classification model. This embodiment does not limit this.

[0072] In the above-mentioned model training method, the computer equipment determines the contribution of each symptom characteristic to each department based on the historical symptom characteristic data of multiple users, determines the sample data set based on the contribution of the historical symptom characteristics, and trains the initial classification model based on the sample data set to obtain the target classification model; wherein the contribution is the frequency of occurrence of the symptom characteristics for the department, and the initial classification model includes a classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model, and the target classification model is used to classify the department according to the user's symptom characteristics. The target classification model involved in this scheme uses the least squares dual support vector machine as the second-layer meta-classifier of Stacking ensemble learning, which reduces the learning difficulty of the model during training, improves the solution efficiency of model training, and reduces the storage space requirements during model training, reduces the model training time, improves the classification speed of the model, and has good adaptability.

[0073] The training process of the classification model in the computer device is divided into two parts. In one optional embodiment, as shown in FIG. Figure 3As shown, the initial classification model is trained based on the sample data set to obtain the target classification model, including:

[0074] S301: Input the sample data set into the first-level classification model to obtain a first classification result corresponding to the sample data set.

[0075] In this embodiment, the computer device first trains the first-layer classification model in the initial classification model based on the sample data set, inputs the sample data set into the first-layer classification model, and obtains a first classification result corresponding to the sample data set.

[0076] S302: Based on the first classification result and the sample data set, train the second-layer classification model until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining a target classification model.

[0077] In this embodiment, the second-layer classification model is taken as an example of a least squares dual support vector machine meta-classification model. After obtaining the first classification result, the computer device determines the input data set of the second-layer model in the initial classification model based on the first classification result and the sample data set, that is, determines the input data set of the least squares dual support vector machine meta-classification model, and then trains the least squares dual support vector machine meta-classification model based on the input data set until the model parameters of the least squares dual support vector machine meta-classification model meet the preset parameter conditions, thereby obtaining the target classification model. This embodiment does not limit this.

[0078] In this embodiment, during the model training process, the output results of the first-layer base classifier training will be used as the training data for the second-layer meta-classifier, reducing the overfitting problem that may occur during the model training process and improving the overall generalization of the model by using multiple heterogeneous base classifiers.

[0079] The specific implementation method of the computer device determining the first classification result includes, in one optional embodiment, as follows: Figure 4 As shown, the first classification result includes a first training result and a first test result; the sample data set is input into the first-layer classification model to obtain the first classification result corresponding to the sample data set, including:

[0080] S401: Determine a first training set and a first test set in a sample data set according to a preset division ratio.

[0081] In this embodiment, the preset division ratio can be determined according to actual conditions. For example, the sample data set L={x n ,y n} is divided into the first training set and the first test set according to 2:1, where x n Represents all symptom attributes contained in the nth sample, y nRepresents the correct department to which the nth sample belongs. This embodiment does not limit the division ratio.

[0082] S402: Input the first training set into the first-layer classification model to obtain a first training result.

[0083] In this embodiment, the computer device inputs the first training set into the first-layer classification model to obtain a corresponding first training result. Optionally, the computer device may divide the first training set into k parts using a cross-validation method, use the first k-1 parts of the data to train each base classifier in the first layer, and then use the trained base classifier to predict the kth part of the data to obtain the first training result.

[0084] S403: Input the first test set into the first-layer classification model to obtain a first test result.

[0085] In this embodiment, the computer device inputs the first test set into the trained first-layer classification model to obtain a corresponding first test result.

[0086] In this embodiment, the sample data set is divided into a training set and a test set, and the cross-validation method is used to train the first-layer classification model based on the training set to obtain the first training result of the training set; the first test result of the test set is obtained based on the trained classification model, and the second-layer model is trained based on the first training result and the second test result. That is, the output result of the first-layer base classifier training will be used as the training data of the second-layer meta-classifier to reduce the problem of overfitting.

[0087] After obtaining the first training result and the first test result, the computer device trains the second layer classifier, that is, trains the second layer classification model according to the first training result and the second test result. In one optional embodiment, as Figure 5 As shown, based on the first classification results and the sample data set, the second-layer classification model is trained until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining the target classification model, including:

[0088] S501, obtain a second training set and a second test set; the second training set includes the first training result and the first training set; the second test set includes the first test result and the first test set.

[0089] In this embodiment, the second-layer classification model is taken as the least squares dual support vector machine meta-classification model. The computer device uses the first training result and the first training set as the second training set T = {x' n ,y' n}(where n>0), where x' n Represents the symptom attribute set of the first training set, where y'n Optionally, the computer device uses the first test result and the first test set as the second test set D = {x' n ,y' n}, (where n>0).

[0090] S502: Train the second-layer classification model according to the second training set and the second test set until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining a target classification model.

[0091] In this embodiment, the second training set T and the second test set D are used to train and test the least squares dual support vector machine meta-classification model respectively.

[0092] Among them, based on the characteristic that the dual support vector machine TWSVM can train faster by solving two smaller-scale quadratic programming problems (QPP), this embodiment adopts the least squares dual support vector machine meta-classification model (LSTSVM) as the second-layer classification model. The least squares dual support vector machine (LSTSVM) modifies the inequality constraints in the twin twin support vector machine (TWSVM) into equality constraints in the sense of least squares, thereby reducing the learning difficulty, improving the solution efficiency, and reducing the requirements for storage space. Among them, the principle formula of the least squares dual support vector machine meta-classification model is as follows:

[0093]

[0094] st-(K(X2,D T )μ1+eγ1)=e-ξ

[0095]

[0096] st-(K(X1,D T )μ2+eγ2)=e-η

[0097] Among them, K(X1, D T )、K(X2,D T ) is the kernel function introduced, μ1, μ2∈R n ,γ1,γ2∈R n , C1 and C2 are regularization parameters, i.e., penalty parameters; ξ and η are slack variables, e is a unit vector with appropriate dimension; D = [X1, X2].

[0098] After solving the above, we can get:

[0099]

[0100]

[0101] Where P = [K(X1, D), e], Q = [K(X2, D T ),e] After obtaining the correct weights and biases, two non-parallel hyperplanes can be obtained, namely: K(X T ,D T )μ1+γ1=0,K(X T ,D T )μ2+γ2=0.

[0102] Using Gaussian kernel function (RBF) Where σ is the kernel parameter. For a new unknown sample, calculate the distance from this pair of hyperplanes. The hyperplane that is closer to the sample is defined as the class to which the sample belongs, that is: f(i) = arg min(j = 1, 2|X T μ j +γ j | / ||μ j ||).

[0103] In this embodiment, the computer device trains the second-layer classification model according to the second training set and the second test set until the model parameters meet the preset parameter conditions to obtain the target classification model. Figure 6 As shown, the second-layer classification model is trained according to the second training set and the second test set until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining the target classification model, including:

[0104] S601: Calculate the second classification result of the second-layer classification model corresponding to a preset number of times based on the second training set, the second test set and a preset cross-validation algorithm.

[0105] In this embodiment, the second-layer classification model is taken as the least squares dual support vector machine meta-classification model. According to the second training set, the second test set and the preset cross-validation algorithm, the optimal solution of the parameters (C1, C2, σ) of the least squares dual support vector machine meta-classification model is found, wherein the initial value range of the model C1, C2, σ is 2 -9 ~2 9 , the common ratio is 2. Traverse each pair of parameters in the search grid, perform 1 / 10 cross validation on each pair of parameters in turn, and obtain the corresponding second classification result.

[0106] S602: Determine the classification recognition rate corresponding to each classification result according to the second classification result of each second-layer classification model.

[0107] In this embodiment, after the computer device calculates the second classification results of each least squares dual support vector machine meta-classification model, the classification recognition rate corresponding to each classification result is calculated based on the second classification result, wherein the classification recognition rate can be calculated based on the classification result and the reference standard.

[0108] S603: Determine the standard deviation of each classification result according to the classification recognition rate corresponding to each classification result and a preset threshold.

[0109] In this embodiment, the computer device determines the standard deviation of each classification result based on the classification recognition rate of each classification result and a preset recognition rate threshold. Optionally, the difference between the classification recognition rate and the recognition rate threshold can be used as the standard deviation, or the ratio of the classification recognition rate to the recognition rate threshold can be used as the standard deviation.

[0110] S604: Determine the candidate model parameters corresponding to the classification result with the smallest standard deviation, and configure the second-layer classification model according to the candidate model parameters to obtain a target classification model.

[0111] In this embodiment, the computer device traverses parameters and cross-validation, and takes the candidate model parameters (C1, C2, σ) with the highest classification recognition rate in cross-validation and the smallest standard deviation corresponding to the 10 cross-validation department recognition rate standards as the optimal parameter value of the least squares dual support vector machine meta-classification model, and configures the least squares dual support vector machine meta-classification model according to the candidate model parameters (C1, C2, σ) to obtain a trained target classification model.

[0112] In this embodiment, during the model training process, the output results of the first-layer base classifier training will be used as the training data of the second-layer meta-classifier, and the cross-validation method is used to reduce the overfitting problem that may occur during the model training process.

[0113] The computer device can obtain historical disease feature data from the database to determine a training data set for training the classification model, wherein the computer device needs to determine the contribution of each disease feature to each department. In one optional embodiment, Figure 7 As shown, based on the historical disease characteristic data of multiple users, the contribution of each disease characteristic to each department is determined, including:

[0114] S701. Determine the word frequency-inverse document frequency corresponding to each symptom feature based on each historical symptom feature data.

[0115] Term frequency refers to how often a term appears in a document; inverse document frequency refers to the total number of documents divided by the number of documents containing the term. Inverse document frequency is often used to measure the importance of a term. Term frequency-inverse document frequency is the product of term frequency and inverse document frequency.

[0116] In this embodiment, when applied to the department classification scenario, the word frequency refers to the frequency of symptom t appearing in the symptom set of patients visiting the current department d; the inverse document frequency refers to the number of visiting departments N divided by the number of all departments containing symptom t. Optionally, the word frequency TF can be expressed as:

[0117]

[0118] Among them, f(t,d) represents the number of times symptom t appears in the symptom set of patients visiting the current department d, and N represents the number of visiting departments.

[0119] The inverse document frequency IDF can be expressed as:

[0120]

[0121] Where N represents the number of visiting departments, cf t Represents the number of all departments containing symptom t.

[0122] The computer device calculates the term frequency TF and inverse document frequency IDF value corresponding to each symptom feature based on the historical symptom feature data.

[0123] S702. Calculate the contribution of each symptom feature to each department based on the word frequency-inverse document frequency of each symptom feature.

[0124] In this embodiment, after obtaining the term frequency-inverse document frequency of each symptom feature, the computer device calculates the contribution of the symptom to a certain department based on the symptom feature term frequency TF and inverse document frequency IDF value, which can be expressed as follows:

[0125]

[0126] If a symptom frequently appears in the symptoms of patients visiting a certain department, and there are only a few departments that include this symptom or only the current department includes it, it means that the symptom has a high contribution to department triage and has a high degree of discrimination for the patient's department triage.

[0127] In this embodiment, the computer device determines the contribution of each symptom feature to each department based on the word frequency-inverse document frequency of each symptom feature, and can simply and accurately determine the relevance of each symptom to department triage.

[0128] Furthermore, according to the contribution of each disease feature to each department, the data set for the user to train the classification model is determined. In one optional embodiment, as Figure 8 As shown, based on the contribution of historical disease characteristics, the sample data set is determined, including:

[0129] S801. Determine the classification label corresponding to each symptom feature.

[0130] The classification labels may be determined based on the disease classification, for example, the classification labels include thoracic surgery, neurology, general surgery, cardiology, hepatology, etc. In this embodiment, the computer device determines the classification label corresponding to each disease feature based on the preset label type.

[0131] S802 : Based on the classification labels of the symptom features, each symptom feature is numerically processed using a Boolean type to obtain a symptom feature set after numerical processing.

[0132] Symptom features are digitized using the Boolean type. For example, for a symptom feature A, if the current user exhibits that symptom, the symptom flag is set to 1; if the current user does not exhibit that symptom, the symptom flag is set to 0. Taking cardiology patient data as an example, symptom frequency analysis revealed that cardiology patients typically experience symptoms such as chest pain, palpitations, dizziness, and lower back pain. Using Boolean annotation, a patient symptom data table was generated. The same method was used for data from patients in other departments, resulting in a digitized symptom feature set.

[0133] S803: Weighting the numerically processed disease feature set and the contribution of each disease feature to obtain a sample data set.

[0134] In this embodiment, after the contribution of each symptom feature is calculated in step 702, a weighted operation is performed on the contribution of each symptom feature and the digitized symptom feature set to obtain a sample data set for training a classification model.

[0135] In this embodiment, the computer device determines the sample data set used to train the classification model based on the contribution of each disease feature and the disease feature set after numerical processing. After data processing, the sample data set has a smaller data error. In the process of training the classification model, the problem of reduced training efficiency due to large errors in the training sample data set is avoided.

[0136] The following will explain in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems through embodiments and in conjunction with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that the present application Figure 9The feature classification methods provided in the embodiments may be executed by a computer device or a feature classification apparatus. The feature classification apparatus may be implemented as part or all of the computer device through software, hardware, or a combination of software and hardware. The following method embodiments are described using a computer device as the execution subject.

[0137] In one embodiment, Figure 9 As shown, a feature classification method is provided, which includes the following steps:

[0138] S901. Obtain the user's symptom characteristics.

[0139] In this embodiment, the computer device can obtain the user's symptom characteristics based on the user's medical history information through a feature extraction algorithm; it can also obtain the symptom characteristics input by the user based on the user interaction interface; or it can also obtain the user's symptom characteristics based on the user's medical images through an image recognition algorithm. This embodiment does not limit this.

[0140] S902. Input the user's symptom characteristics into the target classification model to determine the department classification of the user's symptom characteristics; the target classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model.

[0141] Among them, the target classification model is obtained by training the initial classification model based on the sample data set. The sample data set is a data set determined based on the user's historical disease feature data and the contribution of each disease feature to each department. The contribution is the frequency of occurrence of the disease feature for the department.

[0142] In this embodiment, after determining the user's symptom characteristics, the computer device inputs the user's symptom characteristics into the trained target classification model to obtain the department classification corresponding to the user's major symptom characteristics, that is, to obtain the user's medical department classification result. This embodiment does not limit this. Among them, the training method of the target classification model can refer to Figure 2-Figure 8 The model training method provided in the embodiment will not be described in detail in this embodiment.

[0143] In the above-mentioned feature classification method, a computer device obtains a user's symptom features, inputs the user's symptom features into a target classification model, and determines the department classification of the user's symptom features. The target classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model. The target classification model is obtained by training the initial classification model based on a sample dataset, where the sample dataset is determined based on the user's historical symptom feature data and the contribution of each symptom feature to each department, where the contribution is the frequency of occurrence of the symptom feature with respect to the department. In this solution, the target classification model uses a least squares dual support vector machine as the second-layer meta-classifier of stacking ensemble learning, which reduces the learning difficulty of the model during training and improves the solution efficiency of model training. Furthermore, it reduces the storage space required during model training, shortens the model training time, and increases the model classification speed, resulting in good adaptability. Furthermore, department classification based on symptom features based on the target classification model improves the speed of department classification, achieves excellent department triage results, and optimizes the department consultation process.

[0144] In order to better illustrate the above method, Figure 10 As shown, this embodiment provides a model training and application method, which specifically includes:

[0145] S101. Determine the word frequency-inverse document frequency corresponding to each symptom feature based on each historical symptom feature data;

[0146] S102. Calculate the contribution of each symptom feature to each department based on the word frequency-inverse document frequency of each symptom feature;

[0147] S103, determining the classification label corresponding to each disease feature;

[0148] S104, numerically processing each symptom feature using a Boolean type according to the classification label of each symptom feature to obtain a symptom feature set after numerical processing;

[0149] S105, weighting the numerically processed disease feature set and the contribution of each disease feature to obtain a sample data set;

[0150] S106: Input the sample data set into the first-level classification model to obtain a first classification result corresponding to the sample data set;

[0151] S107: training a second-layer classification model based on the first classification result and the sample data set until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining a target classification model;

[0152] S108, obtaining the user's symptom characteristics;

[0153] S109: Input the user's symptom characteristics into the target classification model to determine the department classification of the user's symptom characteristics.

[0154] In this embodiment, the target classification model uses a least squares dual support vector machine as the second-layer meta-classifier of Stacking ensemble learning, which reduces the learning difficulty of the model during training and improves the efficiency of model training. It also reduces the storage space requirements during model training, reduces model training time, and improves the classification speed of the model, showing good adaptability. Furthermore, department classification based on symptom characteristics based on the target classification model improves the speed of department classification, achieves a good department triage effect, and optimizes the process of department consultation.

[0155] The training and application methods of the models provided in the above embodiments have the same implementation principles and technical effects as those in the above embodiments. Figure 2-Figure 9 The embodiments provided are similar and will not be described again here.

[0156] It should be understood that although Figure 2-10 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 2-10 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The order of execution of these steps or stages is not necessarily one by one, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0157] In one embodiment, Figure 11 As shown, a model training device is provided, comprising:

[0158] Acquisition module 01 is used to determine the contribution of each symptom characteristic to each department based on the historical symptom characteristic data of multiple users; the contribution is the frequency of occurrence of the symptom characteristic for each department;

[0159] Determination module 02, for determining a sample data set based on the contribution of historical disease characteristics;

[0160] Training module 03 is used to train the initial classification model based on the sample data set to obtain the target classification model; the initial classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model; the target classification model is used to classify departments according to the user's symptom characteristics.

[0161] In one of the optional embodiments, the training module 03 is used to input the sample data set into the first-layer classification model to obtain a first classification result corresponding to the sample data set; based on the first classification result and the sample data set, the second-layer classification model is trained until the model parameters of the second-layer classification model meet the preset parameter conditions to obtain the target classification model.

[0162] In one of the optional embodiments, the first classification result includes a first training result and a first test result; the training module 03 is used to determine the first training set and the first test set in the sample data set according to a preset division ratio; the first training set is input into the first-layer classification model to obtain the first training result; the first test set is input into the first-layer classification model to obtain the first test result.

[0163] In one of the optional embodiments, the training module 03 is used to obtain a second training set and a second test set; the second training set includes the first training result and the first training set; the second test set includes the first test result and the first test set; according to the second training set and the second test set, the second-layer classification model is trained until the model parameters of the second-layer classification model meet the preset parameter conditions to obtain the target classification model.

[0164] In one of the optional embodiments, the training module 03 is used to calculate the second classification results of the second-layer classification model corresponding to a preset number of times based on the second training set, the second test set and the preset cross-validation algorithm; determine the classification recognition rate corresponding to each classification result based on the second classification results of each second-layer classification model; determine the standard deviation of each classification result based on the classification recognition rate corresponding to each classification result and a preset threshold; determine the candidate model parameters corresponding to the classification result with the smallest standard deviation, and configure the second-layer classification model according to the candidate model parameters to obtain the target classification model.

[0165] In one of the optional embodiments, the acquisition module 01 is used to determine the word frequency-inverse file frequency corresponding to each symptom feature based on each historical symptom feature data; and calculate the contribution of each symptom feature to each department based on the word frequency-inverse file frequency of each symptom feature.

[0166] In one of the optional embodiments, the determination module 02 is used to determine the classification label corresponding to each symptom feature; according to the classification label of each symptom feature, each symptom feature is numerically processed using the Boolean type to obtain a symptom feature set after numerical processing; the symptom feature set after numerical processing and the contribution of each symptom feature are weighted to obtain a sample data set.

[0167] For the specific definition of the model training device, please refer to the definition of the model training method above, which will not be repeated here. Each module in the above-mentioned model training device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0168] In one embodiment, Figure 12 As shown, a feature classification device is provided, the device comprising:

[0169] An acquisition module 11 is used to acquire the user's symptom characteristics;

[0170] The classification module 12 is used to input the user's symptom characteristics into the target classification model to determine the department classification of the user's symptom characteristics; the target classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model;

[0171] Among them, the target classification model is obtained by training the initial classification model based on the sample data set. The sample data set is a data set determined based on the user's historical disease feature data and the contribution of each disease feature to each department. The contribution is the frequency of occurrence of the disease feature for the department.

[0172] For the specific definition of the feature classification device, please refer to the definition of the feature classification method above, which will not be repeated here. The various modules in the above-mentioned feature classification device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0173] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0174] Determine the contribution of each symptom characteristic to each department based on the historical symptom characteristic data of multiple users; the contribution is the frequency of occurrence of the symptom characteristic for each department;

[0175] Determine the sample data set based on the contribution of historical disease characteristics;

[0176] The initial classification model is trained according to the sample data set to obtain the target classification model; the initial classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model; the target classification model is used to classify departments according to the user's symptom characteristics.

[0177] The implementation principle and technical effects of the computer device provided in the above embodiment are similar to those of the above method embodiment and will not be repeated here.

[0178] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0179] Obtain the user's disease characteristics;

[0180] Inputting the user's symptom characteristics into the target classification model to determine the department classification of the user's symptom characteristics; the target classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model;

[0181] Among them, the target classification model is obtained by training the initial classification model based on the sample data set. The sample data set is a data set determined based on the user's historical disease feature data and the contribution of each disease feature to each department. The contribution is the frequency of occurrence of the disease feature for the department.

[0182] The implementation principle and technical effects of the computer device provided in the above embodiment are similar to those of the above method embodiment and will not be repeated here.

[0183] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0184] Determine the contribution of each symptom characteristic to each department based on the historical symptom characteristic data of multiple users; the contribution is the frequency of occurrence of the symptom characteristic for each department;

[0185] Determine the sample data set based on the contribution of historical disease characteristics;

[0186] The initial classification model is trained according to the sample data set to obtain the target classification model; the initial classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model; the target classification model is used to classify departments according to the user's symptom characteristics.

[0187] The computer-readable storage medium provided in the above embodiment has similar implementation principles and technical effects to those of the above method embodiment, and will not be described in detail here.

[0188] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0189] Obtain the user's disease characteristics;

[0190] Inputting the user's symptom characteristics into the target classification model to determine the department classification of the user's symptom characteristics; the target classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model;

[0191] Among them, the target classification model is obtained by training the initial classification model based on the sample data set. The sample data set is a data set determined based on the user's historical disease feature data and the contribution of each disease feature to each department. The contribution is the frequency of occurrence of the disease feature for the department.

[0192] The computer-readable storage medium provided in the above embodiment has similar implementation principles and technical effects to those of the above method embodiment, and will not be described in detail here.

[0193] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0194] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0195] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A model training method, characterized in that: The method comprises: Determine the contribution of each symptom characteristic to each department based on historical symptom characteristic data of multiple users; the contribution is the frequency of occurrence of the symptom characteristic for each department; Determining a sample data set according to the contribution degree of the disease feature; the sample data set includes historical disease feature data corresponding to the disease feature whose contribution degree is not less than a preset contribution degree; An initial classification model is trained based on the sample data set to obtain a target classification model; the initial classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model; the target classification model is used to classify the department according to the symptom characteristics of the user; The initial classification model is trained according to the sample data set to obtain a target classification model, including: The sample data set is input into the first-layer classification model to obtain a first classification result corresponding to the sample data set; based on the first classification result and the sample data set, the second-layer classification model is trained until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining the target classification model.

2. The method according to claim 1, characterized in that The first classification result includes a first training result and a first test result; inputting the sample data set into the first-layer classification model to obtain the first classification result corresponding to the sample data set includes: Determining a first training set and a first test set in the sample data set according to a preset division ratio; Inputting the first training set into the first-layer classification model to obtain the first training result; The first test set is input into the first-layer classification model to obtain the first test result.

3. The method according to claim 2, characterized in that The step of training the second-layer classification model according to the first classification result and the sample data set until the model parameters of the second-layer classification model meet preset parameter conditions to obtain the target classification model includes: Obtain a second training set and a second test set; the second training set includes the first training result and the first training set; the second test set includes the first test result and the first test set; The second-layer classification model is trained according to the second training set and the second test set until the model parameters of the second-layer classification model meet preset parameter conditions, thereby obtaining the target classification model.

4. The method according to claim 3, characterized in that The step of training the second-layer classification model according to the second training set and the second test set until the model parameters of the second-layer classification model meet preset parameter conditions to obtain the target classification model includes: Calculating a second classification result of the second-layer classification model corresponding to a preset number of times according to the second training set, the second test set, and a preset cross-validation algorithm; Determining, based on the second classification results of each of the second-layer classification models, a classification recognition rate corresponding to each of the classification results; Determining a standard deviation of each classification result based on a classification recognition rate corresponding to each classification result and a preset threshold; Determine the candidate model parameters corresponding to the classification result with the smallest standard deviation, and configure the second-layer classification model according to the candidate model parameters to obtain the target classification model.

5. The method according to claim 1, wherein Determining the contribution of each symptom characteristic to each department based on the historical symptom characteristic data of multiple users includes: Determining the word frequency-inverse document frequency corresponding to each of the historical disease feature data; According to the word frequency-inverse document frequency of each of the symptom characteristics, the contribution of each of the symptom characteristics to each of the departments is calculated.

6. The method according to claim 5, characterized in that The step of determining the sample data set according to the contribution of the disease characteristics includes: Determining the classification label corresponding to each of the disease characteristics; According to the classification labels of the disease characteristics, each of the disease characteristics is numerically processed using a Boolean type to obtain a disease characteristic set after numerical processing; The numerically processed disease feature set and the contribution of each disease feature are weighted to obtain the sample data set.

7. A feature classification method, characterized in that: The method comprises: Obtain the user's disease characteristics; Inputting the user's symptom characteristics into a target classification model to determine the department classification of the user's symptom characteristics; the target classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model; The target classification model is obtained by training the initial classification model based on a sample data set. The sample data set is a data set determined based on the user's historical symptom feature data and the contribution of each symptom feature to each department. The contribution is the frequency of occurrence of the symptom feature for each department. The sample data set includes historical symptom feature data corresponding to the symptom features whose contribution is not less than a preset contribution. The target classification model is obtained by training the initial classification model based on the sample data set, including: inputting the sample data set into the first-layer classification model to obtain the first classification result corresponding to the sample data set; training the second-layer classification model based on the first classification result and the sample data set until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining the target classification model.

8. A model training device, characterized in that: The device comprises: An acquisition module is used to determine the contribution of each symptom characteristic to each department based on the historical symptom characteristic data of multiple users; the contribution is the frequency of occurrence of the symptom characteristic for each department; a determination module, configured to determine a sample data set according to the contribution of the disease feature; the sample data set includes historical disease feature data corresponding to the disease feature whose contribution is not less than a preset contribution; a training module, configured to train an initial classification model based on the sample data set to obtain a target classification model; the initial classification model includes a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model; the target classification model is configured to classify a department based on the symptom characteristics of the user; The training module is specifically used to input the sample data set into the first-layer classification model to obtain a first classification result corresponding to the sample data set; based on the first classification result and the sample data set, the second-layer classification model is trained until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining the target classification model.

9. A feature classification device, characterized in that: The device comprises: An acquisition module is used to obtain the user's disease characteristics; a classification module, configured to input the user's symptom characteristics into a target classification model to determine the department classification of the user's symptom characteristics; the target classification model comprises a first-layer classification model and a second-layer classification model, wherein the second-layer classification model is a least squares dual support vector machine meta-classification model; The target classification model is obtained by training the initial classification model based on a sample data set. The sample data set is a data set determined based on the user's historical symptom feature data and the contribution of each symptom feature to each department. The contribution is the frequency of occurrence of the symptom feature for each department. The sample data set includes historical symptom feature data corresponding to the symptom features whose contribution is not less than a preset contribution. The target classification model is obtained by training the initial classification model based on the sample data set, including: inputting the sample data set into the first-layer classification model to obtain the first classification result corresponding to the sample data set; training the second-layer classification model based on the first classification result and the sample data set until the model parameters of the second-layer classification model meet the preset parameter conditions, thereby obtaining the target classification model.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the model training method described in any one of claims 1 to 7 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the model training method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • A multi-label classification method for electronic medical records based on symptom extraction and feature representation

    CN109460473A

  • Malicious webpage integrated identification method and system based on Stacking

    CN110348523A