CN116364300A - Method, device, equipment and storage medium for identifying physique of traditional Chinese medicine - Google Patents
Method, device, equipment and storage medium for identifying physique of traditional Chinese medicine Download PDFInfo
- Publication number
- CN116364300A CN116364300A CN202310413056.9A CN202310413056A CN116364300A CN 116364300 A CN116364300 A CN 116364300A CN 202310413056 A CN202310413056 A CN 202310413056A CN 116364300 A CN116364300 A CN 116364300A
- Authority
- CN
- China
- Prior art keywords
- patient
- doctor
- score
- symptom
- question
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 239000003814 drug Substances 0.000 title claims abstract description 42
- 208000024891 symptom Diseases 0.000 claims abstract description 219
- 230000002194 synthesizing effect Effects 0.000 claims abstract description 7
- 239000013598 vector Substances 0.000 claims description 74
- 230000015654 memory Effects 0.000 claims description 23
- 238000012360 testing method Methods 0.000 claims description 21
- 238000012549 training Methods 0.000 claims description 21
- 230000006870 function Effects 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 10
- 238000013507 mapping Methods 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 9
- 230000011218 segmentation Effects 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000013139 quantization Methods 0.000 claims description 6
- 230000004913 activation Effects 0.000 claims description 4
- 238000004140 cleaning Methods 0.000 claims description 4
- 238000013135 deep learning Methods 0.000 claims description 4
- 238000000605 extraction Methods 0.000 claims description 4
- 239000011159 matrix material Substances 0.000 claims description 4
- 230000007246 mechanism Effects 0.000 claims description 4
- 238000013473 artificial intelligence Methods 0.000 abstract description 6
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000004891 communication Methods 0.000 description 8
- 206010033557 Palpitations Diseases 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000011156 evaluation Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000006403 short-term memory Effects 0.000 description 2
- 235000011293 Brassica napus Nutrition 0.000 description 1
- 240000008100 Brassica rapa Species 0.000 description 1
- 235000000540 Brassica rapa subsp rapa Nutrition 0.000 description 1
- 206010062717 Increased upper airway secretion Diseases 0.000 description 1
- 208000031975 Yang Deficiency Diseases 0.000 description 1
- 208000031971 Yin Deficiency Diseases 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 208000026435 phlegm Diseases 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/70—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for mining of medical data, e.g. analysing previous cases of other patients
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
- G06F16/353—Clustering; Classification into predefined classes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
- G06F40/295—Named entity recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H10/00—ICT specially adapted for the handling or processing of patient-related medical or healthcare data
- G16H10/60—ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/30—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for calculating health indices; for individual health risk assessment
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Medical Informatics (AREA)
- Public Health (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Databases & Information Systems (AREA)
- Primary Health Care (AREA)
- Epidemiology (AREA)
- Biomedical Technology (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Pathology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The invention relates to an artificial intelligence technology, and discloses a traditional Chinese medicine constitution identification method, which comprises the following steps: performing punctuation completion on the doctor-patient question-answering data, and performing role identification, text and basic information splicing on the doctor-patient question-answering data after the punctuation completion to obtain a complete continuous text; classifying the complete continuous text by using the pre-trained Roberta model to obtain a first body score; identifying symptom entities of the doctor-patient question-answering data, and matching preset symptom standard scales according to the symptom entities to obtain direct and indirect symptoms; combining the direct symptoms and the indirect symptoms to obtain target direct symptoms, and calculating a second body quality score according to basic information of the patient and the target direct symptoms by using a prediction scale rule; and synthesizing the first and second body mass scores to obtain a comprehensive constitution score, wherein the highest score in the comprehensive constitution score is used as the constitution of the patient. The invention also provides a traditional Chinese medicine constitution identification device, electronic equipment and a storage medium. The invention can improve the constitution identification efficiency and accuracy.
Description
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a traditional Chinese medicine constitution identification method, a traditional Chinese medicine constitution identification device, electronic equipment and a computer readable storage medium.
Background
The theory of constitutions in traditional Chinese medicine divides human constitutions into 9 basic types, and the basis of judgment is mainly "the mass scale of traditional Chinese medicine", the classification and judgment table of constitutions in traditional Chinese medicine ", and so on.
The current constitution judging method generally adopts the following three modes: 1. the key physical signs of the patient are obtained by manual inquiry of the middle doctor, the main physical constitution type of the patient is judged through the medical knowledge of the middle doctor, and the accuracy of physical constitution identification is not high because the medical knowledge of the middle doctor is completely relied on; 2. calculating constitution score by combining the judging tool and the symptoms of the patient, so as to obtain constitution type; 3. user information is collected in an electronic coupon mode, corresponding calculation rules are set in a system background, and the physique type of the user is calculated.
At present, the constitution judging method adopts an artificial inquiry mode to completely depend on the medical knowledge of a traditional Chinese medical practitioner, so that the accuracy of constitution identification is not high; the method adopts a judging tool or an electronic questionnaire, so that complicated symptom information is required to be filled by a user, the constitution identification efficiency is low, the user conversion rate is low, but if less information is acquired by evaluation by adopting an incomplete scale, the accuracy of constitution identification can be reduced, and if part of users are old users, the symptom information remained in the system is not utilized when the constitution is judged, and the symptom is required to be filled again by the user, so that the constitution identification efficiency is low.
Disclosure of Invention
The invention provides a method and a device for identifying physique of traditional Chinese medicine and a computer readable storage medium, which mainly aim to solve the problem of low efficiency and accuracy in physique identification.
In order to achieve the above object, the present invention provides a method for identifying physique of traditional Chinese medicine, comprising:
acquiring doctor-patient question-answering data and patient basic information, performing punctuation completion on the doctor-patient question-answering data, and performing role identification and text splicing on the doctor-patient question-answering data after the punctuation completion to obtain a role continuous text;
performing basic information splicing on the character continuous text according to the basic information of the patient to obtain a complete continuous text;
classifying physical labels of the complete continuous text by utilizing a pre-trained Roberta model to obtain a first physical score;
identifying symptom entities of the doctor-patient question-answering data, matching a preset symptom standard table according to the symptom entities to obtain direct symptoms and indirect symptoms, and mapping the indirect symptoms into weighted direct symptoms;
combining the direct symptoms and the weighted direct symptoms to obtain target direct symptoms, and calculating a second body score by using a prediction scale rule according to the basic information of the patient and the target direct symptoms;
And synthesizing the first body score and the second body score to obtain a comprehensive body score, and taking the highest score in the comprehensive body score as the body of the patient.
Optionally, the performing punctuation completion on the doctor-patient question-answering data, and performing role identification and text splicing on the doctor-patient question-answering data after the punctuation completion to obtain a role continuous text, including:
text cleaning is carried out on the doctor-patient question-answering data to obtain first doctor-patient question-answering data;
judging the sentence type of the clean doctor-patient question-answering data by using a preset Bert model, and performing punctuation completion on the clean doctor-patient question-answering data according to the sentence type to obtain second doctor-patient question-answering data;
combining a plurality of messages continuously sent by the same role in the second doctor-patient question-answering data into one message to obtain third doctor-patient question-answering data;
and adding a role identifier at the starting end of each question and answer data of the third doctor-patient question and answer data, and sequentially connecting each question and answer data with the role identifier by utilizing a preset separator to obtain a role continuous text.
Optionally, the classifying the physical label of the complete continuous text by using the pre-trained Roberta model to obtain a first physical score includes:
Word segmentation and quantization processing are carried out on the complete continuous text, so that a doctor-patient question-answering vector sequence is obtained;
extracting an embedded vector, a segment vector and a position vector of the doctor-patient question-answering vector sequence by using an Embedding layer in the pre-trained Roberta model;
adjusting weights of the embedded vector, the segment vector and the position vector by using a self-attention mechanism of a transducer layer in the pre-trained Roberta model to obtain the embedded vector, the segment vector and the position vector with weights;
performing matrix operation on the weighted embedded vector, the weighted segment vector and the weighted position vector by utilizing a transducer layer in the pre-trained Roberta model to obtain an attention text vector;
classifying the attention text vectors by using a full connection layer in the pre-trained Roberta model to obtain physique labels of the complete continuous texts;
and scoring the physique label by using an activation function in a full-connection layer in the pre-trained Roberta model to obtain a first physique score.
Optionally, before classifying the physical label of the complete continuous text by using the pre-trained Roberta model to obtain the first physical score, the method further includes:
Acquiring historical doctor-patient question-answering data, basic information of a historical patient and physique of the historical patient, performing punctuation completion on the historical doctor-patient question-answering data, and performing role identification and text splicing on the historical doctor-patient question-answering data after punctuation completion to obtain a continuous text of a historical role;
performing basic information splicing on the continuous text of the historical role according to the basic information of the historical patient to obtain a complete continuous text of the history, and dividing the complete continuous text of the history into a training set and a testing set;
analyzing the constitution score of the training set by using a pre-constructed Roberta model, selecting a constitution label with the largest constitution score as a history patient prediction constitution label, calculating a loss value between the history patient prediction constitution label and the history patient constitution by using a preset loss function, adjusting parameters of the Roberta model according to the loss value, returning to the step of performing basic information splicing on the continuous text of the history role according to the basic information of the history patient to obtain a history complete continuous text, and dividing the history complete continuous text into a training set and a testing set until the loss value is smaller than a preset loss threshold value to obtain a Roberta model with preliminary training completed;
And testing the Roberta model after the preliminary training by using the test set to obtain a test result, and returning the basic information splicing of the continuous texts of the historical roles according to the basic information of the historical patients to obtain a complete continuous text of the history, and dividing the complete continuous text of the history into a training set and a test set until the test result is passed to obtain a Roberta model after the pre-training is completed.
Optionally, the step of obtaining the direct symptom and the indirect symptom according to the matching of the symptom entity with a preset symptom standard scale includes:
word segmentation is carried out on the symptom entity and the preset symptom standard table to obtain a symptom entity sequence and a preset symptom sequence;
quantizing the symptom entity sequence by using a preset word vector model to obtain a symptom entity vector sequence and a preset symptom vector sequence;
calculating word vector similarity between the symptom entity vector sequence and the preset symptom vector sequence to obtain a similarity score;
when the similarity score is smaller than a preset similarity threshold, the symptom entity is an indirect symptom;
and when the similarity score is not smaller than a preset similarity threshold, the symptom entity is a direct symptom.
Optionally, the identifying the symptom entity of the doctor-patient question-answer data includes:
word segmentation and quantization processing are carried out on the doctor-patient question-answering data, and a preliminary doctor-patient question-answering vector sequence is obtained;
extracting the preliminary symptom entity of the preliminary doctor-patient question-answer vector sequence by using a preset deep learning entity extraction model;
and performing entity alignment on the preliminary symptom entity to obtain a symptom entity.
Optionally, the performing basic information stitching on the character continuous text according to the basic information of the patient to obtain a complete continuous text includes:
dividing the age information in the basic patient information into three age groups, and respectively setting age identifiers of the three age groups and sex identifiers in the basic patient information;
and the age identifier and the gender identifier Fu Pinjie are arranged at the front end of the character continuous text, so that a complete continuous text is obtained.
In order to solve the above problems, the present invention also provides a device for identifying physique of traditional Chinese medicine, the device comprising:
the data splicing module is used for acquiring doctor-patient question-answering data and basic patient information, performing punctuation completion on the doctor-patient question-answering data, and performing role identification and text splicing on the doctor-patient question-answering data after the punctuation completion to obtain a role continuous text; performing basic information splicing on the character continuous text according to the basic information of the patient to obtain a complete continuous text;
The first body score calculation module is used for classifying the body labels of the complete continuous texts by utilizing the pre-trained Roberta model to obtain first body scores;
the symptom distinguishing module is used for identifying the symptom entity of the doctor-patient question-answering data, obtaining direct symptoms and indirect symptoms according to the matching of the symptom entity with a preset symptom standard table, and mapping the indirect symptoms into weighted direct symptoms;
the second body quality score calculation module is used for combining the direct symptoms and the weighted direct symptoms to obtain target direct symptoms, and calculating a second body quality score by using a prediction scale rule according to the basic information of the patient and the target direct symptoms;
and the constitution identification module is used for synthesizing the first constitution score and the second constitution score to obtain a comprehensive constitution score, and taking the highest score in the comprehensive constitution score as the constitution of the patient.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method of distinguishing physical constitution of traditional Chinese medicine as described above.
In order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-mentioned method for recognizing physique of traditional Chinese medicine.
According to the embodiment of the invention, the doctor-patient question-answering data and the basic information of the patient are obtained, the doctor-patient question-answering data are subjected to punctuation completion, character identification and text splicing are carried out on the doctor-patient question-answering data after the punctuation completion, character continuous texts are obtained, basic information splicing is carried out on the character continuous texts according to the basic information of the patient, complete continuous texts are obtained, the patient does not need to repeatedly fill in an evaluation table to carry out constitution judgment, the constitution identification efficiency is improved, the information expression capability of the question-answer data is improved, and the accuracy of Chinese medicine constitution identification is improved; further classifying the physical label of the complete continuous text by using the pre-trained Roberta model to obtain a first physical score, accurately extracting text characteristics, and obtaining an accurate first physical score, thereby improving the accuracy of physical identification; further identifying symptom entities of the doctor-patient question-answering data, matching a preset symptom standard table according to the symptom entities to obtain direct symptoms and indirect symptoms, mapping the indirect symptoms into weighted direct symptoms, combining the direct symptoms and the weighted direct symptoms to obtain target direct symptoms, calculating a second body quality score according to the basic information of the patient and the target direct symptoms by using a prediction table rule, ensuring the utilization rate of patient information, and improving the accuracy of physique identification; and finally, integrating the first body score and the second body score to obtain an integrated body score, taking the highest score in the integrated body score as the body of the patient, and carrying out body identification on the patient by combining a model and a scale rule, thereby improving the accuracy of body identification. Therefore, the method, the device, the electronic equipment and the computer readable storage medium for identifying the physique of the traditional Chinese medicine can solve the problem of lower efficiency and accuracy in the process of identifying the physique.
Drawings
Fig. 1 is a flow chart of a method for identifying physique of traditional Chinese medicine according to an embodiment of the invention;
FIG. 2 is a schematic diagram showing a detailed implementation flow of one of the steps in the method for identifying physique in traditional Chinese medicine shown in FIG. 1;
FIG. 3 is a detailed flow chart of another step in the method for identifying physique in Chinese medicine shown in FIG. 1;
FIG. 4 is a functional block diagram of a device for identifying physical constitution of a traditional Chinese medicine according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for implementing the method for identifying physique according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the application provides a method for identifying physique of traditional Chinese medicine. The main execution body of the traditional Chinese medicine physique identification method includes, but is not limited to, at least one of a server, a terminal and the like which can be configured to execute the method provided by the embodiment of the application. In other words, the method for recognizing physique of traditional Chinese medicine may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (ContentDelivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of a method for identifying physique according to an embodiment of the present invention is shown. In this embodiment, the method for identifying physique of traditional Chinese medicine includes:
s1, acquiring doctor-patient question-answering data and basic patient information, performing punctuation completion on the doctor-patient question-answering data, and performing role identification and text splicing on the doctor-patient question-answering data after punctuation completion to obtain a role continuous text.
In the embodiment of the invention, the doctor-patient question-answering data is obtained under the condition that the patient finishes question-answering on an online question-answering platform or system. The patient basic information includes age and sex information included when the patient is registered in the system.
In detail, referring to fig. 2, in S1, punctuation completion is performed on the doctor-patient question-answering data, and character identification and text splicing are performed on the doctor-patient question-answering data after the punctuation completion to obtain character continuous text, which includes:
s11, performing text cleaning on the doctor-patient question-answering data to obtain first doctor-patient question-answering data;
s12, judging the sentence type of the clean doctor-patient question-answering data by using a preset Bert model, and performing punctuation completion on the clean doctor-patient question-answering data according to the sentence type to obtain second doctor-patient question-answering data;
S13, combining a plurality of messages continuously sent by the same role in the second doctor-patient question-answering data into one message to obtain third doctor-patient question-answering data;
and S14, adding a role identifier at the initial end of each question-answer data of the third doctor-patient question-answer data, and sequentially linking each question-answer data with the role identifier by utilizing a preset separator to obtain a role continuous text.
In the embodiment of the invention, text cleaning is performed on the doctor-patient question-answering data, including removing invalid characters, doctor self-introduction, template content and the like contained in the doctor-patient question-answering data, wherein the invalid characters are a series of English characters for representing pictures; wherein the template content, e.g. the patient does not respond for a long time, the system will automatically send "do you, this consultation is still in progress, do you pay attention to? "etc.
In the embodiment of the invention, the sentence types are statement sentences and question sentences, the sentences in the doctor-patient question-answering data are divided into the statement sentences or question sentences by using a preset Bert model, and the sentence ends in the doctor-patient question-answering data are supplemented according to the statement sentences or question sentences. "or"? ", the broken sentence in the sentence is complemented by using a'".
In the embodiment of the invention, the roles comprise doctors and patients, and a plurality of messages continuously sent by the doctors or the patients in the second doctor-patient question-answering data are combined into one message to obtain third doctor-patient question-answering data.
In the embodiment of the invention, the role identifier is a doctor or a patient.
In the embodiment of the invention, the doctor-patient question-answering data is subjected to punctuation completion, and character identification and text splicing are performed on the doctor-patient question-answering data subjected to punctuation completion, so that the information expression capability of the question-answering data is improved, and the accuracy of the traditional Chinese medicine physique identification is improved.
And S2, performing basic information splicing on the character continuous text according to the basic information of the patient to obtain a complete continuous text.
In detail, the S2 includes:
dividing the age information in the basic patient information into three age groups, and respectively setting age identifiers of the three age groups and sex identifiers in the basic patient information;
and the age identifier and the gender identifier Fu Pinjie are arranged at the front end of the character continuous text, so that a complete continuous text is obtained.
In the embodiment of the invention, the three ages are teenagers in the age range of 0-18 years old, adults in the age range of 18-65 years old and aged people above 65 years old, and the age identifiers are used for representing teenagers, adults and aged people.
According to the embodiment of the invention, the basic information of the patient is combined with the doctor-patient question-answering data, so that the constitution identification is carried out according to different age groups and sexes, and the accuracy of the constitution identification is improved.
And S3, classifying the physical labels of the complete continuous text by utilizing the pre-trained Roberta model to obtain a first physical score.
In the embodiment of the invention, the physique labels are divided into 9 basic types, namely yang deficiency, yin deficiency, qi deficiency, phlegm dampness, damp heat mass, blood stasis, specific nature, qi depression and mild nature, wherein the mild nature is healthy physique, and the rest 8 types are sub-healthy physiques.
In the embodiment of the invention, the Roberta model (A Robustly Optimized BERT Pretraining Approach, turnip tower) is a modified version of the BERT model.
In the embodiment of the invention, the pre-trained Roberta model comprises an Embedding layer, a transforming layer and a full-connection layer, wherein the number of the full-connection layer is 9 which is the same as the number of the physique label classification seeds.
In detail, before the step S3, the method further includes:
acquiring historical doctor-patient question-answering data, basic information of a historical patient and physique of the historical patient, performing punctuation completion on the historical doctor-patient question-answering data, and performing role identification and text splicing on the historical doctor-patient question-answering data after punctuation completion to obtain a continuous text of a historical role;
Performing basic information splicing on the continuous text of the historical role according to the basic information of the historical patient to obtain a complete continuous text of the history, and dividing the complete continuous text of the history into a training set and a testing set;
analyzing the constitution score of the training set by using a pre-constructed Roberta model, selecting a constitution label with the largest constitution score as a history patient prediction constitution label, calculating a loss value between the history patient prediction constitution label and the history patient constitution by using a preset loss function, adjusting parameters of the Roberta model according to the loss value, returning to the step of performing basic information splicing on the continuous text of the history role according to the basic information of the history patient to obtain a history complete continuous text, and dividing the history complete continuous text into a training set and a testing set until the loss value is smaller than a preset loss threshold value to obtain a Roberta model with preliminary training completed;
and testing the Roberta model after the preliminary training by using the test set to obtain a test result, and returning the basic information splicing of the continuous texts of the historical roles according to the basic information of the historical patients to obtain a complete continuous text of the history, and dividing the complete continuous text of the history into a training set and a test set until the test result is passed to obtain a Roberta model after the pre-training is completed.
Further, referring to fig. 3, the step S3 includes:
s31, performing word segmentation and quantization on the complete continuous text to obtain a doctor-patient question-answering vector sequence;
s32, extracting an embedded vector, a segment vector and a position vector of the doctor-patient question-answer vector sequence by using an Embedding layer in the pre-trained Roberta model;
s33, adjusting weights of the embedded vector, the segment vector and the position vector by using a self-attention mechanism of a transducer layer in the pre-trained Roberta model to obtain the embedded vector, the segment vector and the position vector with weights;
s34, performing matrix operation on the weighted embedded vector, the weighted segment vector and the weighted position vector by utilizing a transducer layer in the pre-trained Roberta model to obtain an attention text vector;
s35, classifying the attention text vector by utilizing a full connection layer in the pre-trained Roberta model to obtain a constitution tag of the complete continuous text;
and S36, scoring the physique label by using an activation function in a full-connection layer in the pre-trained Roberta model to obtain a first physique score.
In the embodiment of the invention, the activation function may be a sigmoid function, and the score of the physique label is calculated by using the sigmoid function, so as to obtain the scores of 9 physique labels.
In the embodiment of the invention, the Roberta model is utilized to classify the physical label of the complete continuous text to obtain the first physical score, the text characteristics are accurately extracted, and the accurate first physical score is obtained, so that the accuracy of physical identification is improved.
S4, identifying symptom entities of the doctor-patient question-answering data, matching a preset symptom standard table according to the symptom entities to obtain direct symptoms and indirect symptoms, and mapping the indirect symptoms into weighted direct symptoms.
In detail, the identifying the symptom entity of the doctor-patient question-answer data in S4 includes:
word segmentation and quantization processing are carried out on the doctor-patient question-answering data, and a preliminary doctor-patient question-answering vector sequence is obtained;
extracting the preliminary symptom entity of the preliminary doctor-patient question-answer vector sequence by using a preset deep learning entity extraction model;
and performing entity alignment on the preliminary symptom entity to obtain a symptom entity.
In the embodiment of the invention, the preset deep learning entity extraction model can be a CR-CNN (Classifying Relations by Ranking with Convolutional Neural Networks) model, an LSTM-CRF (Long Short-term Memory Conditional Random Field Algorithm, long-Short-term memory conditional random field neural network) model, a BiLSTM-CRF (Bi-directional Short-term Memory Conditional Random Field Algorithm, two-way Long-Short-term memory conditional random field neural network) model and the like.
The entity alignment in the embodiment of the invention comprises entity disambiguation and entity fusion.
In the embodiment of the invention, the direct symptoms and the indirect symptoms are combined, the second body quality score is calculated by utilizing the prediction scale rule according to the basic information of the patient and the target direct symptoms, the utilization rate of the patient information is ensured, and the accuracy rate of physique identification is improved.
In the embodiment of the invention, the similarity score between the symptom entity and the preset symptom standard table can be calculated by using a preset text matching model. The text matching model comprises a convolution representation layer, a similarity matching layer and a full connection layer, wherein the convolution representation layer can process the text information to obtain vector representation of the text information; the similarity matching layer can carry out outer product on the text to be matched to obtain a similarity matrix; wherein the fully connected layer can normalize the two-dimensional vector by softmax to obtain a matching score.
Further, in S4, the step of obtaining the direct symptom and the indirect symptom according to the matching of the symptom entity with a preset symptom standard scale includes:
word segmentation is carried out on the symptom entity and the preset symptom standard table to obtain a symptom entity sequence and a preset symptom sequence;
Quantizing the symptom entity sequence by using a preset word vector model to obtain a symptom entity vector sequence and a preset symptom vector sequence;
calculating word vector similarity between the symptom entity vector sequence and the preset symptom vector sequence to obtain a similarity score;
when the similarity score is smaller than a preset similarity threshold, the symptom entity is an indirect symptom;
and when the similarity score is not smaller than a preset similarity threshold, the symptom entity is a direct symptom.
In the embodiment of the invention, 114 kinds of standard symptoms are involved in the preset symptom standard table, and symptom entities with the existing symptoms of the patient consistent with the symptoms in the preset symptom standard table are taken as direct symptoms, and other symptom entities are taken as indirect symptoms.
In the embodiment of the invention, the symptom entities related in the doctor-patient question-answering data are divided into direct symptoms and indirect symptoms, and all symptom information is fully considered, so that the accuracy of body identification is higher.
Further, according to the similarity between the indirect symptoms and the direct symptoms, the indirect symptoms are mapped to weighted direct symptoms, such as palpitation is the direct symptoms, palpitation is the indirect symptoms, palpitation is mapped to 0.8 palpitation in the doctor-patient question-answering data, namely, the symptoms of palpitation provide weight contribution degree of 0.8 for the palpitation.
And S5, combining the direct symptoms with the weighted direct symptoms to obtain target direct symptoms, and calculating a second body score by using a prediction scale rule according to the basic information of the patient and the target direct symptoms.
In the embodiment of the invention, the direct symptoms and the weighted direct symptoms are combined to obtain the target direct symptoms, the target direct symptoms are conveniently matched with the prediction scale, the second body quality score is calculated, the symptoms of the patient are ensured to be utilized, and the accuracy of physique identification is improved.
And S6, integrating the first physical score and the second physical score to obtain an integrated physical score, and taking the highest score in the integrated physical score as the physical of the patient.
In the embodiment of the invention, various constitution scores in the first constitution score and the second constitution score are combined in a mean value obtaining manner to obtain a comprehensive constitution score, each constitution of the comprehensive constitution score is ordered according to the score size, and the highest score in the comprehensive constitution score is used as the constitution of a patient.
According to the embodiment of the invention, the doctor-patient question-answering data and the basic information of the patient are obtained, the doctor-patient question-answering data are subjected to punctuation completion, character identification and text splicing are carried out on the doctor-patient question-answering data after the punctuation completion, character continuous texts are obtained, basic information splicing is carried out on the character continuous texts according to the basic information of the patient, complete continuous texts are obtained, the patient does not need to repeatedly fill in an evaluation table to carry out constitution judgment, the constitution identification efficiency is improved, the information expression capability of the question-answer data is improved, and the accuracy of Chinese medicine constitution identification is improved; further classifying the physical label of the complete continuous text by using the pre-trained Roberta model to obtain a first physical score, accurately extracting text characteristics, and obtaining an accurate first physical score, thereby improving the accuracy of physical identification; further identifying symptom entities of the doctor-patient question-answering data, matching a preset symptom standard table according to the symptom entities to obtain direct symptoms and indirect symptoms, mapping the indirect symptoms into weighted direct symptoms, combining the direct symptoms and the weighted direct symptoms to obtain target direct symptoms, calculating a second body quality score according to the basic information of the patient and the target direct symptoms by using a prediction table rule, ensuring the utilization rate of patient information, and improving the accuracy of physique identification; and finally, integrating the first body score and the second body score to obtain an integrated body score, taking the highest score in the integrated body score as the body of the patient, and carrying out body identification on the patient by combining a model and a scale rule, thereby improving the accuracy of body identification. Therefore, the method for identifying the physique of the traditional Chinese medicine can solve the problem of low efficiency and accuracy in physique identification.
Fig. 4 is a functional block diagram of a device for identifying physical constitution of traditional Chinese medicine according to an embodiment of the present invention.
The device 100 for identifying the constitution of the traditional Chinese medicine can be installed in electronic equipment. According to the functions, the apparatus 100 for recognizing physique of traditional Chinese medicine may include a data splicing module 101, a first physique score calculating module 102, a symptom differentiating module 103, a second physique score calculating module 104 and a physique recognizing module 105. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the data splicing module 101 is configured to obtain doctor-patient question-answering data and basic patient information, perform punctuation completion on the doctor-patient question-answering data, and perform role identification and text splicing on the doctor-patient question-answering data after the punctuation completion to obtain a role continuous text; performing basic information splicing on the character continuous text according to the basic information of the patient to obtain a complete continuous text;
the first body score calculation module 102 is configured to classify the physical label of the complete continuous text by using a pre-trained Roberta model, so as to obtain a first body score;
The symptom differentiating module 103 is configured to identify a symptom entity of the doctor-patient question-answer data, obtain a direct symptom and an indirect symptom according to the matching of the symptom entity with a preset symptom standard table, and map the indirect symptom to a weighted direct symptom;
the second body score calculating module 104 is configured to combine the direct symptom and the weighted direct symptom to obtain a target direct symptom, and calculate a second body score according to the basic information of the patient and the target direct symptom by using a prediction scale rule;
the constitution identification module 105 is configured to integrate the first constitution score and the second constitution score to obtain an integrated constitution score, and take the highest score in the integrated constitution score as the constitution of the patient.
In detail, each module of the apparatus 100 for identifying the constitution of traditional Chinese medicine in the embodiment of the present invention adopts the same technical means as the method for identifying the constitution of traditional Chinese medicine described in fig. 1 to 3, and can produce the same technical effects, and is not described here again.
Fig. 5 is a schematic structural diagram of an electronic device for implementing a method for identifying physique according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program stored in the memory 11 and executable on the processor 10, such as a Chinese medicine physique recognition program.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing Unit, CPU), a microprocessor, a digital processing chip, a graphics processor, a combination of various control chips, and so on. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules (for example, executing a Chinese medicine constitution recognition program, etc.) stored in the memory 11, and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only for storing application software installed in an electronic device and various data such as codes of a physical constitution recognition program of traditional Chinese medicine, but also for temporarily storing data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Fig. 5 shows only an electronic device with components, it being understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The traditional Chinese medicine physique recognition program stored in the memory 11 of the electronic device 1 is a combination of a plurality of instructions, and when running in the processor 10, the following can be realized:
Acquiring doctor-patient question-answering data and patient basic information, performing punctuation completion on the doctor-patient question-answering data, and performing role identification and text splicing on the doctor-patient question-answering data after the punctuation completion to obtain a role continuous text;
performing basic information splicing on the character continuous text according to the basic information of the patient to obtain a complete continuous text;
classifying physical labels of the complete continuous text by utilizing a pre-trained Roberta model to obtain a first physical score;
identifying symptom entities of the doctor-patient question-answering data, matching a preset symptom standard table according to the symptom entities to obtain direct symptoms and indirect symptoms, and mapping the indirect symptoms into weighted direct symptoms;
combining the direct symptoms and the weighted direct symptoms to obtain target direct symptoms, and calculating a second body score by using a prediction scale rule according to the basic information of the patient and the target direct symptoms;
and synthesizing the first body score and the second body score to obtain a comprehensive body score, and taking the highest score in the comprehensive body score as the body of the patient.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
acquiring doctor-patient question-answering data and patient basic information, performing punctuation completion on the doctor-patient question-answering data, and performing role identification and text splicing on the doctor-patient question-answering data after the punctuation completion to obtain a role continuous text;
performing basic information splicing on the character continuous text according to the basic information of the patient to obtain a complete continuous text;
classifying physical labels of the complete continuous text by utilizing a pre-trained Roberta model to obtain a first physical score;
Identifying symptom entities of the doctor-patient question-answering data, matching a preset symptom standard table according to the symptom entities to obtain direct symptoms and indirect symptoms, and mapping the indirect symptoms into weighted direct symptoms;
combining the direct symptoms and the weighted direct symptoms to obtain target direct symptoms, and calculating a second body score by using a prediction scale rule according to the basic information of the patient and the target direct symptoms;
and synthesizing the first body score and the second body score to obtain a comprehensive body score, and taking the highest score in the comprehensive body score as the body of the patient.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.
Claims (10)
1. A method for identifying physique of traditional Chinese medicine, which is characterized by comprising the following steps:
Acquiring doctor-patient question-answering data and patient basic information, performing punctuation completion on the doctor-patient question-answering data, and performing role identification and text splicing on the doctor-patient question-answering data after the punctuation completion to obtain a role continuous text;
performing basic information splicing on the character continuous text according to the basic information of the patient to obtain a complete continuous text;
classifying physical labels of the complete continuous text by utilizing a pre-trained Roberta model to obtain a first physical score;
identifying symptom entities of the doctor-patient question-answering data, matching a preset symptom standard table according to the symptom entities to obtain direct symptoms and indirect symptoms, and mapping the indirect symptoms into weighted direct symptoms;
combining the direct symptoms and the weighted direct symptoms to obtain target direct symptoms, and calculating a second body score by using a prediction scale rule according to the basic information of the patient and the target direct symptoms;
and synthesizing the first body score and the second body score to obtain a comprehensive body score, and taking the highest score in the comprehensive body score as the body of the patient.
2. The method for identifying physique of traditional Chinese medicine according to claim 1, wherein the steps of performing punctuation completion on the doctor-patient question-answering data, performing character identification and text splicing on the doctor-patient question-answering data after punctuation completion to obtain character continuous text, and comprising:
Text cleaning is carried out on the doctor-patient question-answering data to obtain first doctor-patient question-answering data;
judging the sentence type of the clean doctor-patient question-answering data by using a preset Bert model, and performing punctuation completion on the clean doctor-patient question-answering data according to the sentence type to obtain second doctor-patient question-answering data;
combining a plurality of messages continuously sent by the same role in the second doctor-patient question-answering data into one message to obtain third doctor-patient question-answering data;
and adding a role identifier at the starting end of each question and answer data of the third doctor-patient question and answer data, and sequentially connecting each question and answer data with the role identifier by utilizing a preset separator to obtain a role continuous text.
3. The method for identifying physique according to claim 1, wherein said classifying the physique labels of the complete continuous text using the pre-trained robert model to obtain a first physique score comprises:
word segmentation and quantization processing are carried out on the complete continuous text, so that a doctor-patient question-answering vector sequence is obtained;
extracting an embedded vector, a segment vector and a position vector of the doctor-patient question-answering vector sequence by using an Embedding layer in the pre-trained Roberta model;
Adjusting weights of the embedded vector, the segment vector and the position vector by using a self-attention mechanism of a transducer layer in the pre-trained Roberta model to obtain the embedded vector, the segment vector and the position vector with weights;
performing matrix operation on the weighted embedded vector, the weighted segment vector and the weighted position vector by utilizing a transducer layer in the pre-trained Roberta model to obtain an attention text vector;
classifying the attention text vectors by using a full connection layer in the pre-trained Roberta model to obtain physique labels of the complete continuous texts;
and scoring the physique label by using an activation function in a full-connection layer in the pre-trained Roberta model to obtain a first physique score.
4. A method of distinguishing physical constitutions of chinese medicine as claimed in claim 3, wherein said classifying physical constitutions of said complete continuous text using a pre-trained Roberta model, before obtaining a first physical score, further comprises:
acquiring historical doctor-patient question-answering data, basic information of a historical patient and physique of the historical patient, performing punctuation completion on the historical doctor-patient question-answering data, and performing role identification and text splicing on the historical doctor-patient question-answering data after punctuation completion to obtain a continuous text of a historical role;
Performing basic information splicing on the continuous text of the historical role according to the basic information of the historical patient to obtain a complete continuous text of the history, and dividing the complete continuous text of the history into a training set and a testing set;
analyzing the constitution score of the training set by using a pre-constructed Roberta model, selecting a constitution label with the largest constitution score as a history patient prediction constitution label, calculating a loss value between the history patient prediction constitution label and the history patient constitution by using a preset loss function, adjusting parameters of the Roberta model according to the loss value, returning to the step of performing basic information splicing on the continuous text of the history role according to the basic information of the history patient to obtain a history complete continuous text, and dividing the history complete continuous text into a training set and a testing set until the loss value is smaller than a preset loss threshold value to obtain a Roberta model with preliminary training completed;
and testing the Roberta model after the preliminary training by using the test set to obtain a test result, and returning the basic information splicing of the continuous texts of the historical roles according to the basic information of the historical patients to obtain a complete continuous text of the history, and dividing the complete continuous text of the history into a training set and a test set until the test result is passed to obtain a Roberta model after the pre-training is completed.
5. The method for distinguishing physical constitutions of traditional Chinese medicine according to claim 1, wherein the obtaining of direct symptoms and indirect symptoms according to the matching of the symptom entity with a preset symptom standard scale comprises:
word segmentation is carried out on the symptom entity and the preset symptom standard table to obtain a symptom entity sequence and a preset symptom sequence;
quantizing the symptom entity sequence by using a preset word vector model to obtain a symptom entity vector sequence and a preset symptom vector sequence;
calculating word vector similarity between the symptom entity vector sequence and the preset symptom vector sequence to obtain a similarity score;
when the similarity score is smaller than a preset similarity threshold, the symptom entity is an indirect symptom;
and when the similarity score is not smaller than a preset similarity threshold, the symptom entity is a direct symptom.
6. The method for distinguishing physical constitutions of traditional Chinese medicine according to claim 1, wherein the identification of the symptom entity of the doctor-patient question-answering data comprises:
word segmentation and quantization processing are carried out on the doctor-patient question-answering data, and a preliminary doctor-patient question-answering vector sequence is obtained;
extracting the preliminary symptom entity of the preliminary doctor-patient question-answer vector sequence by using a preset deep learning entity extraction model;
And performing entity alignment on the preliminary symptom entity to obtain a symptom entity.
7. The method for recognizing physique according to claim 1, wherein the step of performing basic information splicing on the character continuous text according to the basic information of the patient to obtain a complete continuous text comprises the steps of:
dividing the age information in the basic patient information into three age groups, and respectively setting age identifiers of the three age groups and sex identifiers in the basic patient information;
and the age identifier and the gender identifier Fu Pinjie are arranged at the front end of the character continuous text, so that a complete continuous text is obtained.
8. A device for identifying physique of traditional Chinese medicine, characterized in that the device comprises:
the data splicing module is used for acquiring doctor-patient question-answering data and basic patient information, performing punctuation completion on the doctor-patient question-answering data, and performing role identification and text splicing on the doctor-patient question-answering data after the punctuation completion to obtain a role continuous text; performing basic information splicing on the character continuous text according to the basic information of the patient to obtain a complete continuous text;
the first body score calculation module is used for classifying the body labels of the complete continuous texts by utilizing the pre-trained Roberta model to obtain first body scores;
The symptom distinguishing module is used for identifying the symptom entity of the doctor-patient question-answering data, obtaining direct symptoms and indirect symptoms according to the matching of the symptom entity with a preset symptom standard table, and mapping the indirect symptoms into weighted direct symptoms;
the second body quality score calculation module is used for combining the direct symptoms and the weighted direct symptoms to obtain target direct symptoms, and calculating a second body quality score by using a prediction scale rule according to the basic information of the patient and the target direct symptoms;
and the constitution identification module is used for synthesizing the first constitution score and the second constitution score to obtain a comprehensive constitution score, and taking the highest score in the comprehensive constitution score as the constitution of the patient.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of distinguishing physical constitutions of chinese medical science according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for recognizing a constitution of chinese medical science according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310413056.9A CN116364300A (en) | 2023-04-07 | 2023-04-07 | Method, device, equipment and storage medium for identifying physique of traditional Chinese medicine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310413056.9A CN116364300A (en) | 2023-04-07 | 2023-04-07 | Method, device, equipment and storage medium for identifying physique of traditional Chinese medicine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116364300A true CN116364300A (en) | 2023-06-30 |
Family
ID=86937856
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310413056.9A Pending CN116364300A (en) | 2023-04-07 | 2023-04-07 | Method, device, equipment and storage medium for identifying physique of traditional Chinese medicine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116364300A (en) |
-
2023
- 2023-04-07 CN CN202310413056.9A patent/CN116364300A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113674858B (en) | Intelligent inspection method, device, equipment and storage medium for on-line medical prescription medication | |
CN114822812A (en) | Character dialogue simulation method, device, equipment and storage medium | |
CN115238670B (en) | Information text extraction method, device, equipment and storage medium | |
CN116578704A (en) | Text emotion classification method, device, equipment and computer readable medium | |
CN116450829A (en) | Medical text classification method, device, equipment and medium | |
CN115221276A (en) | Chinese image-text retrieval model training method, device, equipment and medium based on CLIP | |
CN116681082A (en) | Discrete text semantic segmentation method, device, equipment and storage medium | |
CN114840684A (en) | Map construction method, device and equipment based on medical entity and storage medium | |
CN116821373A (en) | Map-based prompt recommendation method, device, equipment and medium | |
CN116739001A (en) | Text relation extraction method, device, equipment and medium based on contrast learning | |
CN116701635A (en) | Training video text classification method, training video text classification device, training video text classification equipment and storage medium | |
CN116383766A (en) | Auxiliary diagnosis method, device, equipment and storage medium based on multi-mode data | |
CN116719904A (en) | Information query method, device, equipment and storage medium based on image-text combination | |
CN116522944A (en) | Picture generation method, device, equipment and medium based on multi-head attention | |
CN116702776A (en) | Multi-task semantic division method, device, equipment and medium based on cross-Chinese and western medicine | |
CN116705345A (en) | Medical entity labeling method, device, equipment and storage medium | |
CN116364300A (en) | Method, device, equipment and storage medium for identifying physique of traditional Chinese medicine | |
CN114595321A (en) | Question marking method and device, electronic equipment and storage medium | |
CN114219367A (en) | User scoring method, device, equipment and storage medium | |
CN114723523B (en) | Product recommendation method, device, equipment and medium based on user capability image | |
CN116825391A (en) | Method, device, equipment and storage medium for question and answer sorting model | |
CN116881454A (en) | Medical corpus generation method, device, equipment and computer readable storage medium | |
CN116431810A (en) | Pruning paradigm disorder segment extraction method, device, equipment and storage medium | |
CN116521867A (en) | Text clustering method and device, electronic equipment and storage medium | |
CN116737878A (en) | Disease search ordering method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |