Model training method and device, medical equipment classification method and device, electronic equipment and storage medium
By processing the sample equipment information of medical equipment and predicting probability calculations, and training a hierarchical classification model, the problem of low accuracy of existing medical equipment classification methods is solved, and higher classification accuracy of medical equipment is achieved.
Patent Information
- Application Number
- CN202411939197.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-18
AI Technical Summary
The existing medical equipment classification methods are relatively low in accuracy and need to improve the classification accuracy.
By obtaining sample equipment information and hierarchical category labels of sample medical equipment, the sample equipment information is processed based on the pre-constructed hierarchical classification system, and the input text corresponding to each level in the hierarchical classification system is obtained. Then, each input text is processed to obtain the hierarchical category prediction probability of the sample medical device under each category in the corresponding hierarchy of the input text. Based on the hierarchical classification system and the obtained predicted probability of all hierarchical categories, the hierarchical constraint predicted probability of sample medical equipment under each category in the hierarchical classification system is obtained. Finally, based on these prediction probabilities and labels, a hierarchical classification model is obtained.
Through the training, the hierarchical classification model can better understand the context and hierarchical relationships, adapt to changes in different hierarchical structures, and improve the accuracy of medical equipment classification.
Smart Images

Figure CN119848670A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular to a model training method, a medical equipment classification method, an apparatus, an electronic device, and a storage medium. Background Art
[0002] In order to achieve refined management of medical equipment, it is first necessary to establish a unified standard classification system, and then classify all medical equipment based on this standard classification system.
[0003] However, the existing medical device classification methods have low accuracy and need to be urgently addressed. Summary of the invention
[0004] Embodiments of the present invention provide a model training method, a medical device classification method, an apparatus, an electronic device, and a storage medium to improve the accuracy of medical device classification.
[0005] According to one aspect of the present invention, a model training method is provided, which may include:
[0006] Obtaining sample device information and hierarchical category labels of sample medical devices, and processing the sample device information based on a pre-constructed hierarchical classification system to obtain input texts corresponding to each level in the hierarchical classification system;
[0007] For each input text, the input text is processed to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text;
[0008] Based on the hierarchical classification system and the obtained prediction probabilities of all hierarchical categories, the hierarchical constraint prediction probabilities of the sample medical devices in each category in the hierarchical classification system are obtained;
[0009] Based on the obtained prediction probabilities of all hierarchical categories, all hierarchical constraint prediction probabilities and hierarchical category labels, a hierarchical classification model is trained.
[0010] According to another aspect of the present invention, a medical device classification method is provided, which may include:
[0011] Obtain a hierarchical classification model trained according to the model training method provided by any embodiment of the present invention and, for a target medical device to be classified, obtain target device information of the target medical device;
[0012] Input the target device information into the hierarchical classification model to obtain the hierarchical category prediction probability corresponding to each category of the target medical device in the pre-constructed hierarchical classification system;
[0013] Based on the obtained multiple hierarchical category prediction probabilities, the hierarchical category classification results of the target medical device are determined.
[0014] According to another aspect of the present invention, a model training device is provided, which may include:
[0015] An input text obtaining module is used to obtain sample device information and hierarchical category labels of sample medical devices, and based on a pre-built hierarchical classification system, process the sample device information to obtain input texts corresponding to each level in the hierarchical classification system;
[0016] A hierarchical category prediction probability obtaining module is used to process each input text to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text;
[0017] A hierarchical constraint prediction probability obtaining module is used to obtain the hierarchical constraint prediction probability of the sample medical device under each category in the hierarchical classification system based on the hierarchical classification system and the obtained prediction probabilities of all hierarchical categories;
[0018] The hierarchical classification model training module is used to train a hierarchical classification model based on the obtained prediction probabilities of all hierarchical categories, all hierarchical constraint prediction probabilities and hierarchical category labels.
[0019] According to another aspect of the present invention, a medical device classification device is provided, which may include:
[0020] A target device information acquisition module, used to acquire a hierarchical classification model trained according to the model training method provided in any embodiment of the present invention, and to acquire target device information of a target medical device to be classified;
[0021] A hierarchical category prediction probability obtaining module is used to input the target device information into the hierarchical classification model to obtain the hierarchical category prediction probability corresponding to each category of the target medical device in the pre-constructed hierarchical classification system;
[0022] The hierarchical category classification result determination module is used to determine the hierarchical category classification result of the target medical device based on the obtained multiple hierarchical category prediction probabilities.
[0023] According to another aspect of the present invention, there is provided an electronic device, which may include:
[0024] at least one processor; and
[0025] a memory communicatively connected to at least one processor; wherein,
[0026] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor implements the model training method or medical device classification method provided by any embodiment of the present invention when executing.
[0027] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored, and the computer instructions are used to enable a processor to implement the model training method or medical device classification method provided by any embodiment of the present invention when executed.
[0028] The technical solution of the embodiment of the present invention obtains sample device information and hierarchical category labels of sample medical devices, and processes the sample device information based on a pre-constructed hierarchical classification system to obtain input texts corresponding to each level in the hierarchical classification system, which helps the trained hierarchical classification model to better understand the context and hierarchical relationship when processing hierarchical classification tasks; for each input text, the input text is processed to obtain the hierarchical category prediction probability of the sample medical device in each category in the level corresponding to the input text; based on the hierarchical classification system and the obtained all hierarchical category prediction probabilities, the hierarchical constraint prediction probability of the sample medical device in each category in the hierarchical classification system is obtained, so that the hierarchical classification model can use the contextual information in the hierarchical structure when predicting; based on the obtained all hierarchical category prediction probabilities and all hierarchical constraint prediction probabilities and hierarchical category labels, the hierarchical classification model is trained, so that the trained hierarchical classification model can adapt to changes in different hierarchical structures and improve the accuracy of the hierarchical classification model. The above technical scheme trains a hierarchical classification model by obtaining the hierarchical category prediction probability, the hierarchical constraint prediction probability and the hierarchical category label, so that the trained hierarchical classification model can adapt to the changes of different hierarchical structures and obtain a more accurate hierarchical classification model, thereby improving the accuracy of medical device classification.
[0029] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1is a flow chart of a model training method provided according to an embodiment of the present invention;
[0032] Figure 2 is a flowchart of another model training method provided according to an embodiment of the present invention;
[0033] Figure 3 is a flowchart of another model training method provided according to an embodiment of the present invention;
[0034] Figure 4 is a flow chart of a medical device classification method provided according to an embodiment of the present invention;
[0035] Figure 5 is a medical device classification flow chart according to a specific example of a medical device classification method provided in an embodiment of the present invention;
[0036] Figure 6 is a model structure diagram of a specific example of a medical device classification method provided in an embodiment of the present invention;
[0037] Figure 7 is a structural block diagram of a model training device provided according to an embodiment of the present invention;
[0038] Figure 8 is a structural block diagram of a medical equipment classification device provided according to an embodiment of the present invention;
[0039] Fig. 9 It is a structural schematic diagram of an electronic device for implementing the model training method or medical device classification method of an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0042] Figure 1 It is a flow chart of a model training method provided in an embodiment of the present invention. This embodiment is applicable to the case where a hierarchical classification model is obtained through training. The method can be executed by a model training device provided in an embodiment of the present invention, which can be implemented by software and / or hardware, and the device can be integrated on an electronic device, which can be various user terminals or servers.
[0043] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0044] S110, obtaining sample device information and hierarchical category labels of sample medical devices, and processing the sample device information based on a pre-constructed hierarchical classification system to obtain input text corresponding to each level in the hierarchical classification system.
[0045] Among them, the sample medical equipment can be understood as the medical equipment used for model training; the sample equipment information can be understood as the equipment information of the sample medical equipment, such as the equipment name, department to which it belongs, and equipment ID, etc.
[0046] The hierarchical category labels can be understood as pre-marked labels that characterize the hierarchy and category of sample medical equipment, such as first-level emergency equipment.
[0047] The hierarchical classification system can be understood as a pre-built classification system for classifying medical devices into hierarchies and categories based on the classification needs of medical devices. Optionally, the medical devices at each level in the hierarchical classification system are in a containment relationship, for example:
[0048] First-level category: used to represent the major categories of medical equipment, including: treatment equipment, first aid and life support equipment, and inspection equipment, etc.
[0049] Secondary categories: Specific categories used to subdivide primary categories, including:
[0050] Equipment under the category of therapeutic equipment: surgical equipment, physical therapy equipment, radiotherapy equipment, etc.;
[0051] Equipment under first aid and life support equipment: respiratory equipment, first aid equipment and anesthesia equipment, etc.;
[0052] Equipment under the inspection equipment: radiological inspection equipment and ultrasonic inspection equipment, etc.;
[0053] Tertiary categories: Specific equipment types used to further subdivide secondary categories, including:
[0054] Equipment under surgical equipment: laser surgical equipment, ultrasonic surgical equipment, microwave surgical equipment, etc.;
[0055] Equipment under respiratory equipment: ventilator, resuscitation ball and nebulizer, etc.;
[0056] Equipment under the category of radiological examination equipment: magnetic resonance imaging equipment and cardiovascular imaging systems, etc.
[0057] The input text can be understood as text containing hierarchical information obtained by adaptively processing the sample device information based on the hierarchical classification system, for example, "Level i: [MASK]".
[0058] Obtain sample device information and hierarchical category labels of sample medical devices, and then process the sample device information based on a pre-built hierarchical classification system to obtain input texts corresponding to each level in the hierarchical classification system. For example, when the hierarchical classification system contains three levels, three input texts corresponding to the levels will be obtained.
[0059] S120 . For each input text, process the input text to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text.
[0060] The hierarchical category prediction probability can be understood as the probability of the sample medical device being classified into each category in the hierarchy corresponding to the input text. For example, in the case where the first hierarchy includes treatment equipment, emergency and life support equipment, and inspection equipment, the hierarchical category prediction probability can be 80% for treatment equipment, 40% for emergency and life support equipment, and 30% for inspection equipment.
[0061] For each input text, the input text may be processed to obtain the hierarchical category prediction probability corresponding to the input text. Optionally, feature extraction may be performed on the input text, and then probability prediction may be performed to obtain the hierarchical category prediction probability.
[0062] S130. Based on the hierarchical classification system and the obtained prediction probabilities of all hierarchical categories, obtain the hierarchical constraint prediction probability of the sample medical device in each category in the hierarchical classification system.
[0063] Among them, the hierarchical constraint prediction probability can be understood as the probability of the sample medical device being classified into each category in the hierarchy corresponding to the input text after adding the hierarchical constraint conditions. It can be calculated through the hierarchical classification system and the predicted probabilities of all hierarchical categories. The hierarchical constraint prediction probability can utilize the contextual information in the hierarchical structure and make the predicted probability more consistent with the given hierarchical structure.
[0064] S140. Based on the obtained prediction probabilities of all hierarchical categories, all hierarchical constraint prediction probabilities and hierarchical category labels, a hierarchical classification model is trained.
[0065] The hierarchical classification model can be understood as a trained neural network model used to classify medical devices into hierarchical categories.
[0066] The hierarchical classification model can be trained by using all the hierarchical category prediction probabilities, all the hierarchical constraint prediction probabilities, and the hierarchical category labels. Optionally, the model loss of the hierarchical classification model can be calculated based on all the hierarchical category prediction probabilities, all the hierarchical constraint prediction probabilities, and the hierarchical category labels, and the various parameters in the hierarchical classification model can be adjusted by the model loss to train the hierarchical classification model.
[0067] The technical solution of the embodiment of the present invention obtains sample device information and hierarchical category labels of sample medical devices, and processes the sample device information based on a pre-constructed hierarchical classification system to obtain input texts corresponding to each level in the hierarchical classification system, which helps the trained hierarchical classification model to better understand the context and hierarchical relationship when processing hierarchical classification tasks; for each input text, the input text is processed to obtain the hierarchical category prediction probability of the sample medical device in each category in the level corresponding to the input text; based on the hierarchical classification system and the obtained all hierarchical category prediction probabilities, the hierarchical constraint prediction probability of the sample medical device in each category in the hierarchical classification system is obtained, so that the hierarchical classification model can use the contextual information in the hierarchical structure when predicting; based on the obtained all hierarchical category prediction probabilities and all hierarchical constraint prediction probabilities and hierarchical category labels, the hierarchical classification model is trained, so that the trained hierarchical classification model can adapt to changes in different hierarchical structures and improve the accuracy of the hierarchical classification model. The above technical scheme trains a hierarchical classification model by obtaining the hierarchical category prediction probability, the hierarchical constraint prediction probability and the hierarchical category label, so that the trained hierarchical classification model can adapt to the changes of different hierarchical structures and obtain a more accurate hierarchical classification model, thereby improving the accuracy of medical device classification.
[0068] An optional technical solution is to train a hierarchical classification model based on all the obtained hierarchical category prediction probabilities, all the hierarchical constraint prediction probabilities and hierarchical category labels, including: calculating the hierarchical category prediction probability loss based on all the obtained hierarchical category prediction probabilities and hierarchical category labels, and calculating the hierarchical constraint prediction probability loss based on all the hierarchical constraint prediction probabilities and hierarchical category labels; training the hierarchical classification model based on the hierarchical category prediction probability loss and the hierarchical constraint prediction probability loss.
[0069] The hierarchical category prediction probability loss can be understood as the loss between the predicted hierarchical category prediction probability and the actual hierarchical category classification in the hierarchical category label. Optionally, it can be calculated using a loss function, such as cross entropy loss. The specific formula is as follows:
[0070]
[0071] in, is the cross entropy loss of input text i on category j in level d, is the corresponding hierarchical category label, is the predicted probability of input text i in category j in level d, L d is the predicted probability of the hierarchical category, l d is the number of categories in the dth layer, D is the total number of layers, and d is the layer where the input text i is located.
[0072] The hierarchical constraint prediction probability loss can be understood as the loss between the hierarchical constraint prediction probability and the actual hierarchical category classification in the hierarchical category label. Optionally, it can be calculated by a loss function, such as cross entropy loss. The specific formula is as follows:
[0073]
[0074] Among them, L HC is the level constraint prediction probability loss, d is the current level, l d-1 is the number of categories at level d-1, is the hierarchical constraint prediction probability, is the corresponding level category label, D is the total level, and d is the current level.
[0075] After that, the hierarchical category prediction probability loss and the hierarchical constraint prediction probability loss can be combined to get the total loss. The specific formula is as follows:
[0076] L=L d +λL HC
[0077] Among them, λ is a hyperparameter that controls the weight of the hierarchical constraint prediction probability loss, and L is the total loss.
[0078] Finally, the total loss can be used to adjust parameters and train a hierarchical classification model.
[0079] The above technical solution, through the hierarchical category prediction probability loss and the hierarchical constraint prediction probability loss, jointly trains the hierarchical classification model, which can improve the accuracy of the hierarchical classification model.
[0080] Another optional technical solution is to process sample device information based on a pre-built hierarchical classification system to obtain input text corresponding to each level in the hierarchical classification system, including: creating a prompt template based on the pre-built hierarchical classification system; inputting sample device information into the prompt template to obtain input text corresponding to each level in the hierarchical classification system.
[0081] Among them, using the prompt template pre-built based on the hierarchical classification system, the input sample device information can be automatically converted into input text corresponding to each level in the hierarchical classification system.
[0082] The construction formula of the prompt template is as follows:
[0083] T prompt (x) = {[CLS]t i …t D .x[SEP]}
[0084] Among them, [CLS] is the beginning of the prompt template, [SEP] is the end of the prompt template, x is the input text, t i For "Level i: [MASK]", t D It is "D-level: [MASK]".
[0085] The above technical solution can obtain the input text quickly and accurately through the prompt template.
[0086] Figure 2 It is a flowchart of another model training method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the input text is processed to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text, including: processing the input text based on the pre-trained model encoder to obtain the hidden state of the input text; based on the mapper corresponding to the hierarchy corresponding to the input text, processing the hidden state to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text.
[0087] The explanations of the terms that are the same as or corresponding to the above embodiments are not repeated here.
[0088] See also Figure 2 The method of this embodiment may specifically include the following steps:
[0089] S210, obtaining sample device information and hierarchical category labels of sample medical devices, and processing the sample device information based on a pre-constructed hierarchical classification system to obtain input text corresponding to each level in the hierarchical classification system.
[0090] S220: For each input text, process the input text based on the pre-trained model encoder to obtain a hidden state of the input text.
[0091] The pre-trained model encoder can be understood as a pre-trained model encoder, which can be used to better extract the hidden state of the input text. Optionally, the pre-trained model encoder can be a pre-trained language representation model (Bidirectional Encoder Representations from Transformers, BERT).
[0092] The hidden state can be understood as the information obtained by extracting the information and contextual relationships in the input text through the pre-trained model encoder.
[0093] The hidden state of the input text can be obtained through the pre-trained model encoder. The specific formula is as follows:
[0094] h 1:n =Encoder(T prompt (x) 1:n )
[0095] Among them, h 1:n ∈R n×r , r is the hidden state dimension of the encoder, n is the input text T prompt The length of (x), h 1:n is the hidden state, and R is the preset value range.
[0096] S230. Based on the mapper corresponding to the level corresponding to the input text, the hidden state is processed to obtain the level category prediction probability of the sample medical device in each category in the level corresponding to the input text.
[0097] Where the mapper is represented as a continuous vector Among them l d is the number of categories in the dth layer. Each mapper corresponds to a level one by one. The hidden state can be processed by the mapper to obtain the hierarchical category prediction probability of the sample medical device in each category in the level corresponding to the input text.
[0098] S240. Based on the hierarchical classification system and the obtained prediction probabilities of all hierarchical categories, obtain the hierarchical constraint prediction probability of the sample medical device under each category in the hierarchical classification system.
[0099] S250: Based on the obtained prediction probabilities of all hierarchical categories, all hierarchical constraint prediction probabilities and hierarchical category labels, a hierarchical classification model is trained.
[0100] The technical solution of the embodiment of the present invention extracts the hidden state of the input text through a pre-trained model encoder. Since the pre-trained model encoder has undergone a pre-training process, the number of training samples can be reduced.
[0101] An optional technical solution processes the hidden state based on a mapper corresponding to the level corresponding to the input text to obtain the hierarchical category prediction probability of the sample medical device in each category in the level corresponding to the input text, including: multiplying the mapper corresponding to the level corresponding to the input text with the hidden state to obtain the product result; adding the product result and a preset bias term to obtain the addition result, and processing the addition result using a probability distribution function to obtain the hierarchical category prediction probability of the sample medical device in each category in the level corresponding to the input text.
[0102] Among them, the vector represented by the mapper can be multiplied with the hidden state to obtain the product result. Then, the product result is added to the preset bias term to obtain the addition result. Finally, the addition result is processed using the probability distribution function to obtain the hierarchical category prediction probability. The specific formula is as follows:
[0103] P(y d |T prompt (x), D = d) = q (h d W d +b d )
[0104] in, is the vector represented by the mapper, is the bias term, and q is the probability distribution function.
[0105] The above technical solution can obtain the hierarchical category prediction probability through calculation.
[0106] Figure 3 It is a flowchart of another model training method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, based on the hierarchical classification system and the obtained prediction probabilities of all hierarchical categories, the hierarchical constraint prediction probability of the sample medical device under each category in the hierarchical classification system is obtained, including: based on each level in the hierarchical classification system, obtaining the hierarchical mapping relationship between each category under the level and each category under the next level of the level; based on all the obtained hierarchical mapping relationships and all the hierarchical category prediction probabilities, the hierarchical constraint prediction probability of the sample medical device under each category in the hierarchical classification system is obtained. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0107] See also Figure 3 The method of this embodiment may specifically include the following steps:
[0108] S310, obtaining sample device information and hierarchical category labels of sample medical devices, and processing the sample device information based on a pre-constructed hierarchical classification system to obtain input text corresponding to each level in the hierarchical classification system.
[0109] S320 , for each input text, processing the input text to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text.
[0110] S330. Based on each level in the hierarchical classification system, obtain a hierarchical mapping relationship between each category under the level and each category under the next level of the level.
[0111] The hierarchical mapping relationship can be expressed by the following formula:
[0112]
[0113] Among them, In the above formula, n is the mapped category, d is the level, and j is any category in level d.
[0114] The formula can be used to obtain the hierarchical mapping relationship between the j category in the d level and the next d+1 level of the d level.
[0115] S340. Based on all the obtained hierarchical mapping relationships and all the obtained hierarchical category prediction probabilities, obtain the hierarchical constraint prediction probability of the sample medical device in each category in the hierarchical classification system.
[0116] Among them, each category in the hierarchical classification system can calculate the hierarchical constraint prediction probability under this category through the hierarchical mapping relationship corresponding to the category in all hierarchical mapping relationships, and the hierarchical category prediction probability corresponding to the category in all hierarchical category prediction probabilities, so as to summarize the hierarchical constraint prediction probabilities under all categories in the hierarchical classification system.
[0117] S350: Based on the obtained prediction probabilities of all hierarchical categories, all hierarchical constraint prediction probabilities and hierarchical category labels, a hierarchical classification model is trained.
[0118] The technical solution of the embodiment of the present invention can make the classification result conform to a given hierarchical structure by calculating the hierarchical constraint prediction probability, thereby improving the accuracy of the trained hierarchical classification model.
[0119] An optional technical solution obtains the hierarchical constraint prediction probability of the sample medical device under each category in the hierarchical classification system based on all the obtained hierarchical mapping relationships and all the hierarchical category prediction probabilities, including: for each category in the hierarchical classification system, determining the hierarchical mapping relationship corresponding to the category from all the obtained hierarchical mapping relationships; determining multiple subordinate categories corresponding to the category based on the determined hierarchical mapping relationship; determining the hierarchical category prediction probabilities corresponding to the multiple subordinate categories respectively from all the hierarchical category prediction probabilities, and calculating the probability sum of the determined multiple hierarchical category prediction probabilities, and determining the hierarchical category prediction probability corresponding to the category from all the hierarchical category prediction probabilities; obtaining a preset constraint degree parameter, and obtaining the hierarchical constraint prediction probability of the sample medical device under the category based on the constraint degree parameter, the probability sum and the determined hierarchical category prediction probability.
[0120] Among them, the hierarchical constraint prediction probability can be calculated by the following formula:
[0121]
[0122] in, represents the hierarchical constraint prediction probability of the input text i in the j category in the d level, and β is the constraint degree parameter are the subcategories of category j, Indicates the subordinate categories at level d+1 The hierarchical constraints predict the probability.
[0123] The above technical solution can realize the accurate calculation of hierarchical constraint prediction probability.
[0124] Figure 4 : is a flowchart of a medical device classification method provided in an embodiment of the present invention. This embodiment can be applied to the case of detecting a target to be detected in a multimodal medical image. The method can be executed by a medical device classification device provided in an embodiment of the present invention, which can be implemented by software and / or hardware, and the device can be integrated on an electronic device, which can be various user terminals or servers.
[0125] See also Figure 4 The method of the embodiment of the present invention specifically includes the following steps:
[0126] S410. Obtain a hierarchical classification model trained according to the model training method provided in any embodiment of the present invention, and obtain target device information of the target medical device to be classified.
[0127] The target medical device can be understood as the medical device to be classified, and the target device information is the specific information of the medical device, such as the device name, department to which it belongs, and device ID.
[0128] S420, inputting the target device information into the hierarchical classification model to obtain the hierarchical category prediction probability corresponding to each category of the target medical device in the pre-constructed hierarchical classification system.
[0129] Among them, the target device information is input into the hierarchical classification model, and the target device information can be processed by the hierarchical classification model to directly obtain the hierarchical category prediction probability corresponding to each category of the target medical device in the pre-constructed hierarchical classification system.
[0130] S430. Determine the hierarchical category classification result of the target medical device based on the obtained multiple hierarchical category prediction probabilities.
[0131] Among them, the hierarchical category classification result can be understood as a classification result that characterizes which category in which level the target medical device belongs to.
[0132] After obtaining the hierarchical category prediction probability, the hierarchical category classification result of the target medical device can be determined by the hierarchical category prediction probability. For example, the category to which the maximum value of the hierarchical category prediction probability belongs can be used as the hierarchical category classification result of the target medical device; further, when the maximum value of the hierarchical category prediction probability exceeds a preset probability threshold, the category to which the maximum value belongs can be used as the hierarchical category classification result of the target medical device.
[0133] The technical solution of the embodiment of the present invention can improve the accuracy of medical device classification by classifying target medical devices through a trained hierarchical classification model.
[0134] An optional technical solution determines the hierarchical category classification result of the target medical device based on the obtained multiple hierarchical category prediction probabilities, including: comparing the maximum value of the multiple hierarchical category prediction probabilities with a preset probability threshold; when the maximum value is greater than or equal to the probability threshold, the hierarchical category corresponding to the maximum value is used as the hierarchical category classification result of the target medical device.
[0135] Among them, in order to improve the credibility of the hierarchical category classification results, the hierarchical category classification results can be screened by a preset probability threshold. The maximum value of the predicted probabilities of multiple hierarchical categories can be compared with the preset probability threshold. When the maximum value is greater than or equal to the probability threshold, the hierarchical category corresponding to the maximum value is used as the hierarchical category classification result of the target medical device. When the maximum value is less than the probability threshold, the target medical device can be handed over to the proofreader for review. During the review process, the device name, department and classification results are compared and confirmed.
[0136] The above technical solution can improve the credibility of hierarchical category classification results.
[0137] In order to better understand the above-mentioned technical solutions as a whole, the following is an illustrative description of them with specific examples. Figure 5 As shown, the specific steps are as follows:
[0138] Step 1: Construct a medical device classification system, which is divided into three levels, and each sub-category belongs to one of its super-category. The specific classification is as follows:
[0139] First-level category: used to represent the major categories of medical devices, such as:
[0140] Treatment equipment, first aid and life support equipment, inspection equipment, testing equipment and auxiliary equipment.
[0141] Secondary category: A specific category used to subdivide the primary category. For example:
[0142] Treatment equipment includes: surgical equipment, physical therapy equipment and radiotherapy equipment, etc.
[0143] First aid and life support equipment include: respiratory equipment, first aid equipment and anesthesia equipment, etc.
[0144] Inspection equipment includes: radiological inspection equipment, ultrasonic inspection equipment and endoscopic inspection equipment, etc.
[0145] Tertiary categories: Specific equipment types used to further subdivide secondary categories. For example:
[0146] Surgical equipment includes: laser surgical equipment, ultrasonic surgical equipment and microwave surgical equipment, etc.
[0147] Respiratory equipment includes: ventilators, resuscitation balls and nebulizers, etc.
[0148] Radiological examination equipment includes: X-ray computer tomography equipment, magnetic resonance imaging equipment and cardiovascular imaging systems, etc.
[0149] Step 2: Synchronize third-party asset information
[0150] Obtain basic information about the equipment from the third-party asset management system, including the equipment name, department, and equipment ID, etc. Preprocess the equipment information, such as removing unnecessary punctuation and unifying naming conventions, to facilitate subsequent classification and processing.
[0151] Step 3: Build and train a hierarchical classification model
[0152] 1. Building a hierarchical classification model
[0153] The initial hierarchical classification model is constructed using the Prompt template, the encoder (i.e., the pre-trained model encoder) and multiple hierarchical mappers (i.e., the mapper). The structure diagram of the initial hierarchical classification model is as follows: Figure 6 shown.
[0154] 2. Training hierarchical classification model
[0155] The sample device information of 1,500 sample medical devices was manually annotated. Each sample medical device was classified into the constructed three-level classification system, including three labels: primary, secondary, and tertiary, as shown in the following table:
[0156] Table 1
[0157] Device Name Department First level category Secondary Category Level 3 Category Syringe Pump Endocrinology and Geriatrics First aid and life support equipment General support equipment Micro-injection pump
[0158] The batch size of the model training is 5. The learning rate is set to 5e-5. In addition, a learning rate of 1e-4 is used to accelerate the convergence of its hierarchical label word embedding. The training is performed for 20 epochs, and the Adam optimizer is used. The learning rate is gradually decayed and warmed up at 0.
[0159] The sample device information is input into the initial hierarchical classification model, and the parameters of the pre-trained model encoder and multiple mappers are adjusted by the calculated model loss, so as to train the hierarchical classification model.
[0160] Step 4: The hierarchical classification model outputs hierarchical categories (i.e., hierarchical categories) and confidence (i.e., hierarchical category prediction probability)
[0161] The target device information is input into the hierarchical classification model, and the structured information of the hierarchical labels is integrated through the Prompt template to obtain the hierarchical classification and confidence level corresponding to the device.
[0162] According to the confidence distribution and data volume, the confidence threshold is set to 0.9 to judge the accuracy of the hierarchical classification results. The specific process is as follows:
[0163] 1. If the confidence of the hierarchical classification result is higher than or equal to the confidence threshold, the hierarchical classification result is directly output.
[0164] 2. If the confidence of the hierarchical classification result is lower than the confidence threshold, the result will be transferred to manual review. During the manual review process, the equipment name, department and hierarchical classification results are compared and confirmed. After proofreading, the confirmed hierarchical classification result is used as the final output, and the data is marked as manually proofread data to facilitate subsequent optimization of the model.
[0165] At the same time, the system will regularly collect the manually proofread target device information and hierarchical classification results to improve the accuracy of the hierarchical classification model. This includes: integrating the manually proofread data and using its annotation results as new training samples to enhance the generalization ability of the hierarchical classification model for small samples. Regularly fine-tune the classification model and update the model parameters in combination with new data to improve the classification effect of the hierarchical classification results.
[0166] The above specific examples can improve the accuracy of medical device classification.
[0167] Figure 7 This is a structural block diagram of a model training device provided in an embodiment of the present invention, and the device is used to execute the model training method provided in any of the above embodiments. The device and the model training method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the model training device can refer to the embodiment of the above model training method. Figure 7The device may specifically include: an input text obtaining module 510, a hierarchical category prediction probability obtaining module 520, a hierarchical constraint prediction probability obtaining module 530 and a hierarchical classification model training module 540.
[0168] An input text obtaining module 510 is used to obtain sample device information and hierarchical category labels of sample medical devices, and process the sample device information based on a pre-constructed hierarchical classification system to obtain input texts corresponding to each level in the hierarchical classification system;
[0169] A hierarchical category prediction probability obtaining module 520 is used to process each input text to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text;
[0170] A hierarchical constraint prediction probability obtaining module 530 is used to obtain the hierarchical constraint prediction probability of the sample medical device in each category in the hierarchical classification system based on the hierarchical classification system and the obtained prediction probabilities of all hierarchical categories;
[0171] The hierarchical classification model training module 540 is used to train a hierarchical classification model based on all the obtained hierarchical category prediction probabilities and all the obtained hierarchical constraint prediction probabilities and hierarchical category labels.
[0172] An optional module 520 for obtaining the hierarchical category prediction probability includes:
[0173] The hidden state obtaining submodule is used to process the input text based on the pre-trained model encoder to obtain the hidden state of the input text;
[0174] The hierarchical category prediction probability obtaining submodule is used to process the hidden state based on the mapper corresponding to the hierarchy corresponding to the input text, and obtain the hierarchical category prediction probability of the sample medical device under each category in the hierarchy corresponding to the input text.
[0175] On this basis, an optional, hierarchical category prediction probability is obtained submodule, including:
[0176] A product result obtaining unit, used for multiplying the mapper corresponding to the level corresponding to the input text with the hidden state to obtain a product result;
[0177] The hierarchical category prediction probability obtaining unit is used to add the product result and the preset bias term to obtain the addition result, and process the addition result using the probability distribution function to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text.
[0178] Alternatively, the hierarchical constraint prediction probability obtaining module 530 includes:
[0179] A hierarchical mapping relationship acquisition submodule is used to acquire, based on each level in the hierarchical classification system, a hierarchical mapping relationship between each category under the level and each category under the next level of the level;
[0180] The hierarchical constraint prediction probability obtaining submodule is used to obtain the hierarchical constraint prediction probability of the sample medical device in each category in the hierarchical classification system based on all the hierarchical mapping relationships and all the hierarchical category prediction probabilities obtained.
[0181] On this basis, an optional hierarchical constraint prediction probability is obtained submodule, including:
[0182] A hierarchical mapping relationship determination unit, configured to determine, for each category in the hierarchical classification system, a hierarchical mapping relationship corresponding to the category from all the obtained hierarchical mapping relationships;
[0183] A subordinate category determination unit, configured to determine a plurality of subordinate categories corresponding to a category based on the determined hierarchical mapping relationship;
[0184] A hierarchical category prediction probability determination unit, used to determine hierarchical category prediction probabilities corresponding to multiple subordinate categories respectively from all hierarchical category prediction probabilities, calculate the probability sum of the determined multiple hierarchical category prediction probabilities, and determine the hierarchical category prediction probability corresponding to the category from all hierarchical category prediction probabilities;
[0185] The hierarchical constraint prediction probability obtaining unit is used to obtain a preset constraint degree parameter, and based on the constraint degree parameter, probability and determined hierarchical category prediction probability, obtain the hierarchical constraint prediction probability of the sample medical device under the category.
[0186] Another optional hierarchical classification model training module 540 includes:
[0187] A hierarchical constraint prediction probability loss calculation submodule, used to calculate the hierarchical category prediction probability loss based on all the obtained hierarchical category prediction probabilities and hierarchical category labels, and to calculate the hierarchical constraint prediction probability loss based on all the hierarchical constraint prediction probabilities and hierarchical category labels;
[0188] The hierarchical classification model training submodule is used to train a hierarchical classification model based on the hierarchical category prediction probability loss and the hierarchical constraint prediction probability loss.
[0189] Optionally, the input text obtaining module 510 includes:
[0190] A prompt template creation submodule is used to create prompt templates based on a pre-built hierarchical classification system;
[0191] The input text obtaining submodule is used to input the sample device information into the prompt template to obtain the input text corresponding to each level in the hierarchical classification system.
[0192] The model training device provided by the embodiment of the present invention obtains the sample device information and hierarchical category labels of the sample medical device through the input text obtaining module, and processes the sample device information based on the pre-constructed hierarchical classification system to obtain the input text corresponding to each level in the hierarchical classification system, which helps the trained hierarchical classification model to better understand the context and hierarchical relationship when processing the hierarchical classification task; through the hierarchical category prediction probability obtaining module, for each input text, the input text is processed to obtain the hierarchical category prediction probability of the sample medical device in each category in the level corresponding to the input text; through the hierarchical constraint prediction probability obtaining module, based on the hierarchical classification system and the obtained all hierarchical category prediction probabilities, the hierarchical constraint prediction probability of the sample medical device in each category in the hierarchical classification system is obtained, so that the hierarchical classification model can use the contextual information in the hierarchical structure when predicting; through the hierarchical classification model training module, based on the obtained all hierarchical category prediction probabilities and all hierarchical constraint prediction probabilities and hierarchical category labels, the hierarchical classification model is trained, so that the trained hierarchical classification model can adapt to the changes of different hierarchical structures and improve the accuracy of the hierarchical classification model. The above-mentioned model training device trains a hierarchical classification model by obtaining the hierarchical category prediction probability, the hierarchical constraint prediction probability and the hierarchical category label. The trained hierarchical classification model can be adapted to the changes of different hierarchical structures to obtain a more accurate hierarchical classification model, thereby improving the accuracy of medical device classification.
[0193] The model training device provided in the embodiment of the present invention can execute the model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0194] It is worth noting that in the embodiment of the above-mentioned model training device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0195] Figure 8 This is a structural block diagram of a medical device classification device provided in an embodiment of the present invention, and the device is used to execute the medical device classification method provided in any of the above embodiments. The device and the medical device classification method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the medical device classification device, please refer to the embodiment of the above medical device classification method. Figure 8 The device may specifically include: a target device information acquisition module 610, a hierarchical category prediction probability acquisition module 620, and a hierarchical category classification result determination module 630.
[0196] The target device information acquisition module 610 is used to acquire the hierarchical classification model trained by the model training method provided by any embodiment of the present invention, and acquire the target device information of the target medical device to be classified;
[0197] A hierarchical category prediction probability obtaining module 620 is used to input the target device information into the hierarchical classification model to obtain the hierarchical category prediction probability corresponding to each category of the target medical device in the pre-constructed hierarchical classification system;
[0198] The hierarchical category classification result determination module 630 is used to determine the hierarchical category classification result of the target medical device based on the obtained multiple hierarchical category prediction probabilities.
[0199] Optionally, the hierarchical category classification result determination module 630 includes:
[0200] A probability threshold comparison submodule is used to compare the maximum value of the predicted probabilities of multiple hierarchical categories with a preset probability threshold;
[0201] The hierarchical category classification result determination submodule is used to use the hierarchical category corresponding to the maximum value as the hierarchical category classification result of the target medical device when the maximum value is greater than or equal to the probability threshold.
[0202] The medical device classification device provided by the embodiment of the present invention obtains the medical device classification model trained according to the model training method provided by any embodiment of the present invention through the target device information acquisition module, and obtains the target device information of the target medical device for the target medical device to be classified; through the hierarchical category prediction probability acquisition module, the target device information is input into the hierarchical classification model to obtain the hierarchical category prediction probability corresponding to each category of the target medical device in the pre-constructed hierarchical classification system; and through the hierarchical category classification result determination module, the hierarchical category classification result of the target medical device is determined based on the obtained multiple hierarchical category prediction probabilities. The above-mentioned medical device classification device can improve the accuracy of medical device classification through the medical device classification model.
[0203] The medical equipment classification device provided in the embodiment of the present invention can execute the medical equipment classification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0204] It is worth noting that in the embodiment of the above-mentioned medical equipment classification device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0205] Fig. 9 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0206] like Fig. 9 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0207] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0208] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a model training method or a medical device classification method.
[0209] In some embodiments, the model training method or the medical device classification method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the model training method or the medical device classification method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the model training method or the medical device classification method in any other appropriate manner (e.g., by means of firmware).
[0210] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0211] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0212] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0213] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0214] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0215] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0216] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0217] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A model training method, characterized in that: include: Acquire sample device information and hierarchical category labels of sample medical devices, and process the sample device information based on a pre-constructed hierarchical classification system to obtain input texts corresponding to each level in the hierarchical classification system; For each of the input texts, the input text is processed to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text; Based on the hierarchical classification system and the obtained predicted probabilities of all the hierarchical categories, obtaining the hierarchical constraint predicted probability of the sample medical device under each category in the hierarchical classification system; Based on all the obtained hierarchical category prediction probabilities, all the obtained hierarchical constraint prediction probabilities and the hierarchical category labels, a hierarchical classification model is trained.
2. The method according to claim 1, characterized in that The processing of the input text to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text includes: Processing the input text based on a pre-trained model encoder to obtain a hidden state of the input text; Based on the mapper corresponding to the level corresponding to the input text, the hidden state is processed to obtain the level category prediction probability of the sample medical device under each category in the level corresponding to the input text.
3. The method according to claim 2, characterized in that The process of processing the hidden state based on the mapper corresponding to the level corresponding to the input text to obtain the level category prediction probability of the sample medical device under each category in the level corresponding to the input text comprises: After multiplying the mapper corresponding to the level corresponding to the input text with the hidden state, a product result is obtained; The product result is added to a preset bias term to obtain an addition result, and the addition result is processed using a probability distribution function to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text.
4. The method according to claim 1, characterized in that: The step of obtaining the hierarchical constraint prediction probability of the sample medical device under each category in the hierarchical classification system based on the hierarchical classification system and all the obtained hierarchical category prediction probabilities includes: Based on each level in the hierarchical classification system, obtaining a hierarchical mapping relationship between each category under the level and each category under the next level of the level; Based on all the obtained hierarchical mapping relationships and all the obtained hierarchical category prediction probabilities, the hierarchical constraint prediction probability of the sample medical device under each category in the hierarchical classification system is obtained.
5. The method according to claim 4, characterized in that The step of obtaining the hierarchical constraint prediction probability of the sample medical device in each category in the hierarchical classification system based on all the obtained hierarchical mapping relationships and all the obtained hierarchical category prediction probabilities includes: For each category in the hierarchical classification system, determining the hierarchical mapping relationship corresponding to the category from all the obtained hierarchical mapping relationships; Based on the determined hierarchical mapping relationship, determining a plurality of subordinate categories corresponding to the category; Determining the hierarchical category prediction probabilities corresponding to the plurality of subordinate categories respectively from all the hierarchical category prediction probabilities, calculating the probability sum of the determined plurality of hierarchical category prediction probabilities, and determining the hierarchical category prediction probability corresponding to the category from all the hierarchical category prediction probabilities; A preset constraint degree parameter is obtained, and based on the constraint degree parameter, the probability sum and the determined hierarchical category prediction probability, the hierarchical constraint prediction probability of the sample medical device under the category is obtained.
6. The method according to claim 1, characterized in that The step of training a hierarchical classification model based on all the obtained hierarchical category prediction probabilities, all the obtained hierarchical constraint prediction probabilities and the hierarchical category labels comprises: Calculating the level category prediction probability loss based on all the obtained level category prediction probabilities and the level category labels, and calculating the level constraint prediction probability loss based on all the obtained level constraint prediction probabilities and the level category labels; Based on the hierarchical category prediction probability loss and the hierarchical constraint prediction probability loss, a hierarchical classification model is trained.
7. The method according to claim 1, characterized in that The processing of the sample device information based on the pre-constructed hierarchical classification system to obtain input texts corresponding to each level in the hierarchical classification system includes: Create prompt templates based on pre-built hierarchical classification systems; The sample device information is input into the prompt template to obtain input text corresponding to each level in the hierarchical classification system.
8. A method for classifying medical equipment, characterized in that: include: Obtaining a hierarchical classification model trained according to the model training method of any one of claims 1 to 7, and obtaining target device information of a target medical device to be classified; Inputting the target device information into the hierarchical classification model to obtain the hierarchical category prediction probability corresponding to each category of the target medical device in the pre-constructed hierarchical classification system; Based on the obtained multiple hierarchical category prediction probabilities, the hierarchical category classification result of the target medical device is determined.
9. The method according to claim 1, characterized in that: The step of determining the hierarchical category classification result of the target medical device based on the obtained plurality of hierarchical category prediction probabilities comprises: Comparing the maximum value of the predicted probabilities of the multiple hierarchical categories with a preset probability threshold; When the maximum value is greater than or equal to the probability threshold, the hierarchical category corresponding to the maximum value is used as the hierarchical category classification result of the target medical device.
10. A model training device, characterized in that: include: An input text obtaining module, used to obtain sample device information and hierarchical category labels of sample medical devices, and based on a pre-constructed hierarchical classification system, process the sample device information to obtain input texts corresponding to each level in the hierarchical classification system; A hierarchical category prediction probability obtaining module is used to process the input text for each of the input texts to obtain the hierarchical category prediction probability of the sample medical device in each category in the hierarchy corresponding to the input text; A hierarchical constraint prediction probability obtaining module, used to obtain the hierarchical constraint prediction probability of the sample medical device under each category in the hierarchical classification system based on the hierarchical classification system and the obtained prediction probabilities of all the hierarchical categories; The hierarchical classification model training module is used to train a hierarchical classification model based on all the hierarchical category prediction probabilities and all the hierarchical constraint prediction probabilities and the hierarchical category labels.
11. A medical equipment classification device, characterized in that: include: A target device information acquisition module, used to acquire a hierarchical classification model trained according to the model training method of any one of claims 1 to 7, and to acquire target device information of a target medical device to be classified; A hierarchical category prediction probability obtaining module, used to input the target device information into the hierarchical classification model to obtain the hierarchical category prediction probability corresponding to each category of the target medical device in the pre-constructed hierarchical classification system; The hierarchical category classification result determination module is used to determine the hierarchical category classification result of the target medical device based on the obtained multiple hierarchical category prediction probabilities.
12. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor performs the model training method as described in any one of claims 1-7, or the medical device classification method as described in claims 8-9.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the model training method as described in any one of claims 1-7, or the medical device classification method as described in claims 8-9 when executed.
Citation Information
Cited By
Text consistency judgment method and system based on deep learning
CN120910235A