Large model voice interaction family health assistant dialogue method and device, equipment and medium
By performing medical intent segmentation processing on user voice streams and constructing dynamic entity graphs, combined with a pre-set medical big data model for diagnostic suggestions and consultation interactions, the problems of semantic loss and high rate of medical hallucinations in existing technologies are solved, achieving efficient and accurate medical diagnosis and interaction.
Patent Information
- Application Number
- CN202511447077.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-10-11
AI Technical Summary
Existing voice-interactive family health assistants suffer from semantic loss, high rates of medical illusion, and low interaction efficiency in medical scenarios, making it difficult to meet the requirements of accuracy, security, and structure.
By performing medical intent segmentation on the user's original voice stream, audio segments with medical tags are generated. Streaming speech recognition and medical entity extraction are performed simultaneously to construct a dynamic entity graph. Combined with a pre-set medical big data model, diagnostic suggestions and consultation interactions are provided to generate diagnostic reports or a list of follow-up questions, and medical rule chain verification is performed.
It improves the accuracy of speech recognition and the correct extraction of medical terminology, ensures the scientific validity and reliability of diagnostic suggestions, reduces the rate of medical hallucinations, and enhances interaction efficiency and the accuracy of diagnostic reports.
Smart Images

Figure CN120954763B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of computers, and particularly relates to a large model family health assistant dialogue method, device, equipment and medium for voice interaction. BACKGROUND
[0002] With the deep integration of smart home technology and the medical and health field, voice interaction type family health assistants have gradually become an important tool for solving users' daily health consultation needs. The assistant can provide services such as preliminary disease judgment and medication advice by receiving user voice input, which can effectively reduce the time cost of user medical consultation and is suitable for people with high demand for convenient health services such as the elderly and chronic disease patients.
[0003] However, the existing voice interaction family health assistant still has many deficiencies in technical implementation, which is difficult to meet the requirements of precision, safety and structuring in the medical scene. On the one hand, the existing technical solutions mostly use general voice models to process medical dialogues, without optimizing the recognition mechanism for the medical scene, resulting in insufficient recognition accuracy of professional medical terms, and often losing semantics such as misidentifying "left chest continuous pain" as "left brother holds four tunnels". On the other hand, in the medical decision and inquiry guidance link, the existing technical solutions rely on general large models to generate diagnosis suggestions, lack professional medical knowledge constraint mechanism, and have high medical illusion rate, such as recommending drugs that conflict with the patient's allergy history. In addition, when facing "stomach discomfort" and other ambiguous complaints, the fixed questionnaire template is used to ask questions, which requires multiple rounds of interaction to complete the diagnosis, and the inquiry logic is not dynamically adjusted according to the symptom matching degree, resulting in low interaction efficiency. SUMMARY
[0004] Therefore, it is necessary to provide a large model family health assistant dialogue method, device, equipment and medium for voice interaction, aiming to improve the accuracy of voice recognition, the reliability of diagnosis suggestions and the efficiency of inquiry interaction in the medical scene.
[0005] In a first aspect, the present application provides a large model family health assistant dialogue method for voice interaction, which comprises:
[0006] performing medical intent slicing processing on the user's original voice stream to generate audio slices with medical markers, and performing streaming voice recognition and medical entity synchronous extraction operations on the audio slices with medical markers to generate a dynamic entity graph;
[0007] based on the symptom entity of the dynamic entity graph, triggering a medical knowledge retrieval operation to generate an evidence-based decision prompt, and inputting the evidence-based decision prompt into a preset medical large model for processing to output a primary diagnosis result containing a list of necessary symptoms, and the preset medical large model is constructed based on a Transformer architecture;
[0008] According to the symptom matching degree of the necessary symptom list and the dynamic entity graph, a diagnosis report or a follow-up question list is generated, and a corresponding output type label is generated, when the output type label is a diagnosis report, a medical rule chain verification operation is performed on the diagnosis report to generate a quality control report, and based on the follow-up question list or the quality control report, a synthesized speech stream is generated.
[0009] In one of the embodiments, the medical marked audio slice is subjected to streaming speech recognition and medical entity synchronous extraction operation to generate a dynamic entity graph, including:
[0010] The medical marked audio slice is subjected to streaming speech recognition processing by the Faster-Whisper model based on the OpenAI Whisper architecture to generate a frame-by-frame incremental text sequence;
[0011] The text sequence is subjected to medical entity boundary detection processing by the entity extraction model to obtain the symptom starting position and entity type label; the entity extraction model is constructed based on the bidirectional long short-term memory network and the conditional random field, the entity extraction model includes the BiLSTM layer and the CRF layer, and the entity type label includes the symptom, the disease and the medication;
[0012] According to the entity type label, the text sequence is subjected to symptom description fragment extraction processing, and the text fragment with the entity type label of the symptom is screened out to obtain the symptom description fragment;
[0013] The symptom description fragment is subjected to semantic analysis by the Transformer encoder to output semantic information, and the corresponding symptom attribute key-value pair is matched out from the semantic information by combining the pre-set medical symptom attribute rule library to obtain a structured triple;
[0014] Based on the pre-set medical term library, the structured triple is subjected to entity disambiguation processing by semantic similarity calculation and term association weight ordering to obtain the disambiguated structured triple;
[0015] The disambiguated structured triple is subjected to repeated item detection and merging, the association relationship between symptoms, the symptom-disease association weight and the disease-drug contraindication rule are integrated, and a dynamic entity graph including the symptom network, the disease association and the drug contraindication relationship is generated.
[0016] In one of the embodiments, based on the symptom entity of the dynamic entity graph, a medical knowledge retrieval operation is triggered to generate an evidence-based decision prompt, and the evidence-based decision prompt is input into a pre-set medical large model for processing to output a primary diagnosis result including a necessary symptom list, and the pre-set medical large model is constructed based on the Transformer architecture, including:
[0017] extract a symptom name of the symptom entity when a confidence of the symptom entity in the dynamic entity graph meets a preset condition, and use the symptom name as a search key;
[0018] count a number of the symptom names, and sort and combine the symptom names based on semantic association relationships of corresponding symptom entities in the dynamic entity graph to generate a symptom combination;
[0019] query a preset medical knowledge graph based on the search key, traverse disease nodes associated with the search key in the preset medical knowledge graph through a graph traversal algorithm, and obtain an associated disease set and a disease-symptom relationship weight;
[0020] perform hash processing on the symptom combination to generate a hash value, match a guideline item corresponding to the hash value from a preset clinical guideline library, extract a diagnosis process, a differential point, and a recommended treatment scheme in the guideline item, and obtain a treatment path data block;
[0021] integrate the associated disease set, the disease-symptom relationship weight, and the treatment path data block to generate a constraint prompt sentence, and use the constraint prompt sentence as an evidence-based decision prompt;
[0022] input the evidence-based decision prompt into a preset medical large model to perform constraint reasoning processing, and output a primary diagnosis result including a possible disease list, a necessary symptom list, a confidence, and a preliminary medication suggestion.
[0023] In one of the embodiments, a diagnosis report or a follow-up question list is generated according to a symptom matching degree between the necessary symptom list and the dynamic entity graph, and a corresponding output type label is generated, including:
[0024] perform matching degree calculation processing on the necessary symptom list and a symptom set in the dynamic entity graph to obtain a symptom matching degree;
[0025] extract symptom entity attributes and a medication entity set in the dynamic entity graph when the symptom matching degree meets a first preset threshold condition, integrate the necessary symptom list, the symptom entity attributes, and the medication entity set according to a preset logical structure, generate a diagnosis report including a diagnosis conclusion and a medication suggestion, and add a corresponding output type label to the diagnosis report;
[0026] when the matching degree does not meet the first preset threshold condition, generate a minimum path follow-up set through a pruning algorithm based on a topological structure of a predefined symptom tree, wherein a root node of the predefined symptom tree is a differential dimension associated with the necessary symptom list, a first-level child node is a symptom entity extracted from the dynamic entity graph, and a second-level child node is a symptom in the necessary symptom list that is not matched with the dynamic entity graph;
[0027] The preset medical interrogation dialogue library is called to perform dialogue matching processing on the minimum path interrogation set, a interrogation question list is generated through dialogue template, and corresponding output type labels are added to the interrogation question list.
[0028] In one of the embodiments, when the output type label is a diagnosis report, a medical rule chain verification operation is performed on the diagnosis report to generate a quality control report with a risk level label, including:
[0029] The pre-stored user health record data is obtained, and the user health record data includes allergy history, age, weight, and kidney function indicators;
[0030] The diagnosis report is subjected to drug information analysis processing, and the drug name is extracted. The drug name and the allergy history data in the user health record data are subjected to conflict detection processing to generate a conflict identifier;
[0031] Based on the age, weight, and kidney function indicators in the user health record data, a safety dose threshold value is calculated through a preset individualized dose prediction equation to obtain a maximum safety dose threshold value. In the preset individualized dose prediction equation, the age and weight are used as basic variables, and the kidney function indicator is used as a correction variable;
[0032] The medication dose in the diagnosis report and the maximum safety dose threshold value are subjected to deviation calculation processing to obtain a dose deviation value, and the risk level label is marked according to the conflict identifier and the dose deviation value according to a preset grading rule;
[0033] When the dose deviation value meets a preset deviation condition, a corrected dose suggestion value is generated based on the maximum safety dose threshold value and in combination with a dose correction coefficient corresponding to the kidney function indicator;
[0034] The risk level label, the corrected dose suggestion value, and the diagnosis report content are integrated to generate a quality control report.
[0035] In one of the embodiments, based on the interrogation question list or the quality control report, a synthesized speech stream is generated, including:
[0036] When the output type label is the interrogation question list, the syntax structure of the interrogation question list is analyzed, the focus of the question is identified, and the focus word repetition parameter is set. The interrogation question list is subjected to speech generation processing through a speech synthesis engine based on the WaveNet architecture to obtain a synthesized speech stream;
[0037] When the output type label is the diagnosis report, corresponding speech parameter configurations are generated based on the risk level label of the quality control report corresponding to the diagnosis report;
[0038] Based on the speech parameter configurations, the quality control report is subjected to speech generation processing through the speech synthesis engine based on the WaveNet architecture to obtain the synthesized speech stream.
[0039] In one embodiment, the mathematical expression of the preset individualized dose prediction equation is:
[0040] ;
[0041] wherein, is a maximum safe dose threshold, is a standard dose marked in a drug instruction manual, is a body weight, is a standard body weight reference value, is a body weight influence coefficient, is an actual estimated glomerular filtration rate in a renal function index, is a normal renal function index threshold, is a renal function correction coefficient, is an age correction coefficient, which is calculated by age and a preset standard value.
[0042] In a second aspect, the present application further provides a large model family health assistant dialogue device for voice interaction, comprising:
[0043] a voice preprocessing and medical entity extraction module, configured to perform medical intent slicing processing on a user original voice stream, to generate audio slices with medical markers, and to perform streaming voice recognition and medical entity synchronous extraction operations on the audio slices with medical markers, to generate a dynamic entity graph;
[0044] a medical knowledge retrieval and primary diagnosis module, configured to trigger a medical knowledge retrieval operation based on symptom entities of the dynamic entity graph, to generate evidence-based decision prompts, and to input the evidence-based decision prompts into a preset medical large model for processing, to output a primary diagnosis result containing a list of necessary symptoms, the preset medical large model being constructed based on a Transformer architecture;
[0045] a diagnosis result processing and voice output module, configured to generate a diagnosis report or a list of follow-up questions based on a symptom matching degree between the list of necessary symptoms and the dynamic entity graph, and to generate a corresponding output type marker, to perform a medical rule chain verification operation on the diagnosis report to generate a quality control report when the output type marker is a diagnosis report, and to generate a synthesized voice stream based on the list of follow-up questions or the quality control report.
[0046] In a third aspect, the present application further provides a computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the first aspect when executing the computer program.
[0047] In a fourth aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps in the first aspect.
[0048] The large model voice interaction family health assistant dialogue method, device, equipment and medium provided by the above-mentioned method can avoid non-medical dialogue interference by screening audio fragments with medical markers, and can accurately capture medical intent and key information in the voice by constructing a dynamic entity graph, thereby ensuring the accuracy of voice recognition and the correct extraction of medical terms. Secondly, the dynamic entity graph triggers medical knowledge retrieval operation, and combines with the preset medical large model for processing, and outputs the primary diagnosis result containing the necessary symptom list, thereby ensuring the scientificity and reliability of the diagnosis suggestion, and reducing the medical illusion rate. In addition, the diagnosis report or the list of follow-up questions can be generated according to the matching degree of the necessary symptom list and the symptoms in the dynamic entity graph, and when the output is the diagnosis report, the quality control report can be generated through the medical rule chain verification operation, thereby improving the interaction efficiency and the accuracy of the diagnosis report. Finally, the synthesized voice stream can be generated based on the list of follow-up questions or the quality control report, thereby ensuring that the voice output adapts to the scene requirements. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiment or related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0050] Figure 1 The voice interaction large model family health assistant dialogue method flowchart provided for an exemplary embodiment of the present application;
[0051] Figure 2 The method flowchart for constructing a dynamic entity graph provided for an exemplary embodiment of the present application;
[0052] Figure 3 The voice interaction large model family health assistant dialogue device structure schematic diagram provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0054] In one embodiment, as Figure 1As shown, a large model family health assistant dialogue method for voice interaction is provided. In this embodiment, the method is applied to a terminal. It should be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be implemented through the interaction of the terminal and the server. In this embodiment, the method includes the following steps:
[0055] S101: Perform medical intent slicing processing on the user's original voice stream, generate audio slices with medical markers, and perform streaming voice recognition and medical entity synchronous extraction operations on the audio slices with medical markers to generate a dynamic entity graph.
[0056] Specifically, the user's original voice stream is a continuous audio signal containing the user's possible health consultation content, daily casual conversation and other information. Directly processing the full amount will introduce irrelevant data interference, reducing the efficiency and accuracy of subsequent medical entity recognition. Therefore, the user's original voice stream can be first divided into multiple short-time audio segments by real-time sliding according to a preset time window. Then, real-time speech-to-text processing is performed on each short-time audio segment to convert the audio signal into a corresponding text segment. Based on the pre-constructed medical intent keyword library and semantic rule library, the converted text segment is subjected to intent matching determination. The medical intent keyword library contains words such as symptoms, diagnosis and treatment, and drugs that are strongly related to medical consultation, and the semantic rule library contains the combination logic of symptom description and demand expression. When the words in the keyword library appear in the text segment and meet the logic in the semantic rule library, it is determined that the audio corresponding to the segment contains a medical consultation intent, and a medical marker is added. If the text segment only contains daily conversation words or does not meet the medical semantic logic, it is determined as a non-medical intent, and the corresponding audio segment is temporarily stored or directly filtered. Finally, the continuous short-time audio segments determined as medical intent are merged, which are merged into a complete audio slice with medical markers, avoiding the fragmentation of medical intent segments caused by time window division, and single or discontinuous non-medical intent segments are directly excluded.
[0057] Specifically, the streaming speech recognition can cut the audio fragments into small data blocks in time sequence in real time, and convert them into text sequences block by block, avoiding the delay caused by waiting for complete audio, and ensuring the real-time interaction of the medical entity synchronous extraction. When the speech recognition generates a text sequence, the text is parsed to extract medical entities such as symptoms, diseases, and drugs, as well as their attributes (such as the onset site, duration, and severity of symptoms), and to establish the association between entities. Finally, the extracted medical entities and their association are stored in a graph structure to generate a dynamic entity graph. The nodes represent medical entities, and the edges represent the relationships between entities. The graph can be dynamically updated with new audio fragments, continuously supplementing new entities and associations to form a complete and dynamic medical information structured representation, providing data support for subsequent diagnosis and decision-making.
[0058] S102: Based on the symptom entity in the dynamic entity graph, trigger the medical knowledge retrieval operation, generate the evidence-based decision prompt, and input the evidence-based decision prompt into the preset medical large model for processing to output the primary diagnosis result containing the necessary symptom list. The preset medical large model is based on the Transformer architecture.
[0059] Specifically, when a certain number of symptom entities are accumulated in the graph, a medical knowledge retrieval operation can be automatically triggered to provide professional medical knowledge support for diagnosis, avoiding the bias or errors that may be caused by relying only on the training data of the large model. Medical knowledge retrieval can use the symptom entities in the dynamic entity graph as the core retrieval condition to retrieve relevant disease information, symptom-disease association rules, diagnosis and treatment specifications, and other content from preset medical knowledge resources such as medical databases and clinical guideline libraries.
[0060] By integrating the retrieved medical knowledge with the symptom entities in the dynamic entity graph, a structured prompt text, i.e., an evidence-based decision prompt, can be formed. This text not only contains the user's current symptom information, but also incorporates associated diseases and diagnosis criteria from authoritative medical knowledge, providing clear boundaries and basis for subsequent reasoning of the large model. The preset medical large model is based on the Transformer architecture. By inputting the evidence-based decision prompt into the model, reasoning can be performed under the constraints of medical knowledge, and the primary diagnosis result can be output. The necessary symptom list is a key component of the primary diagnosis result, and its generation logic is based on the core elements of disease diagnosis, i.e., for possible diseases, the necessary symptom information for diagnosis or differential diagnosis is selected to provide clear standards for subsequent judgment of whether further questioning of the user is needed.
[0061] S103: generating a diagnosis report or a list of follow-up questions according to the symptom matching degree of the necessary symptom list and the dynamic entity graph, and generating a corresponding output type label, when the output type label is a diagnosis report, performing a medical rule chain verification operation on the diagnosis report to generate a quality control report, and generating a synthesized speech stream based on the list of follow-up questions or the quality control report.
[0062] Specifically, the symptom matching degree value can be determined by quantitative analysis such as calculating the ratio of intersection and union based on the degree of coincidence of the necessary symptom list and the symptom entities contained in the dynamic entity graph. When the matching degree reaches a preset threshold, it indicates that the current acquired symptom information has met the basic diagnostic requirements, and then a diagnosis report can be generated, which integrates the symptom information in the dynamic entity graph, the disease judgment in the primary diagnosis result, and other contents. If the matching degree does not reach the preset threshold, it indicates that there is a missing key symptom, and a list of follow-up questions needs to be generated to obtain more information. The list of follow-up questions can be formed based on the unmatched symptoms in the necessary symptom list combined with the clinical inquiry logic to obtain targeted questions to guide the user to supplement key information and avoid invalid inquiries caused by fixed templates, thereby improving the interaction efficiency. In order to distinguish between the two output results, the diagnosis report and the list of follow-up questions can also be added with corresponding output type labels. When the output type label is a diagnosis report, in order to ensure medical safety, the contents such as drug recommendations and diagnosis conclusions in the diagnosis report can be checked one by one based on the preset medical rule library, such as checking whether the recommended drugs conflict with the user's allergy history, whether the drug dosage is consistent with the user's age or physical condition, etc., to generate a quality control report. Finally, based on the list of follow-up questions or the quality control report, the text information can be converted into audible speech to realize natural and efficient voice interaction between the family health assistant and the user.
[0063] In the above method, by performing medical intent segmentation processing on the user's original speech stream before performing streaming speech recognition and medical entity synchronous extraction, the effective audio containing medical needs can be screened out, and the non-medical conversation interference can be excluded. By obtaining medical entities and constructing a dynamic entity graph, structured data support can be provided for subsequent diagnosis and decision-making. Secondly, based on the graph, evidence-based decision-making prompts are triggered by medical knowledge retrieval, and input into a preset medical large model for diagnosis, which can constrain the reasoning process of the large model with clinical guidelines, disease-symptom association weights and other data, avoid the medical illusion caused by the lack of medical knowledge boundary of general large models, and improve the professionalism and reliability of medical decision-making. And according to the matching degree of the necessary symptom list and the symptom of the dynamic entity graph, a diagnosis report or a list of follow-up questions is generated, which can replace the ineffective interaction under the fixed questionnaire template and improve the efficiency of the inquiry. When the output is a diagnosis report, a quality control report can also be generated by checking the medical rule chain to avoid risks such as drug allergy and dose over-limit. Finally, based on the list of follow-up questions or the quality control report, a synthesized speech stream is generated, which can adapt the content scene of the speech output to ensure that the user accurately receives key medical information, thereby realizing the accuracy, safety and efficiency of the medical interaction of the family health assistant.
[0064] In one embodiment, the medical marked audio segment is subjected to streaming speech recognition and medical entity synchronous extraction operation to generate a dynamic entity graph, comprising:
[0065] S201: performing streaming speech recognition processing on the medical marked audio segment by a Faster-Whisper model based on the OpenAI Whisper architecture to generate a frame-by-frame incremental text sequence;
[0066] S202: performing medical entity boundary detection processing on the text sequence by an entity extraction model to obtain a symptom starting position and an entity type label; the entity extraction model is constructed based on a bidirectional long short-term memory network and a conditional random field, the entity extraction model comprises a BiLSTM layer and a CRF layer, and the entity type label comprises a symptom, a disease and a medication;
[0067] S203: performing symptom description fragment extraction processing on the text sequence according to the entity type label, screening out the text fragment with the entity type label as the symptom to obtain a symptom description fragment;
[0068] S204: performing semantic analysis on the symptom description fragment by a Transformer encoder to output semantic information, and matching the semantic information to corresponding symptom attribute key-value pairs by combining a preset medical symptom attribute rule library to obtain a structured triple;
[0069] S205: Based on the preset medical term library, the structured triplets are processed for entity disambiguation by semantic similarity calculation and term association weight ordering, obtaining disambiguated structured triplets, and detecting and merging repeated entries of the disambiguated structured triplets, integrating the association between symptoms, symptom-disease association weight and disease-drug contraindication rules, and generating a dynamic entity graph containing symptom network, disease association and drug contraindication relationship.
[0070] Specifically, the Faster-Whisper model optimizes the inference speed based on the OpenAI Whisper architecture, and supports dividing the audio stream into continuous short-time audio frames according to the preset frame length, realizes real-time transcription frame by frame through GPU acceleration, avoids the interactive delay caused by waiting for complete audio fragment processing in traditional non-streaming models, and adapts to the real-time voice interaction scene requirements of the family health assistant. For example, first convert the audio fragment with medical markers into 16kHz single-channel PCM format, then generate the Mel feature corresponding to each audio frame through the built-in Mel spectrum extraction module of the model, then capture the temporal dependency between audio frames through the Transformer encoder, and finally output the incremental text sequence frame by frame through the decoder, ensuring the synchronization of text generation and voice stream playback, providing real-time text input for subsequent entity extraction.
[0071] Specifically, the entity extraction model is constructed based on Bidirectional Long Short-Term Memory (BiLSTM) and Conditional Random Field (CRF). The BiLSTM layer can simultaneously capture semantic dependency from the forward direction (from left to right) and the reverse direction (from right to left) of the text sequence, and the CRF layer can correct the local optimal prediction results output by the BiLSTM layer by learning the transition probability between labels, ensuring the accuracy of entity boundary detection. For example, the input layer of the model converts the text sequence generated by S201 into a word vector, which is then input into the BiLSTM layer containing 2 layers of hidden layers, outputting a bidirectional semantic feature vector for each word. Then input the vector into the CRF layer, calculate the global optimal label sequence through the built-in label transition matrix (trained based on medical entity annotation corpus) in the CRF layer, and finally output the start position of each entity and the entity type label. Then a mapping table of entity type-text position can be constructed to record the start and end positions of the text characters corresponding to each entity type label, and then by traversing the mapping table, the text fragments corresponding to the entity type label of symptoms are filtered out, while the context association of each symptom fragment in the original text sequence is preserved, and finally a set of symptom description fragments is formed.
[0072] Specifically, the Transformer encoder is used for semantic analysis, and its multi-head attention mechanism can capture the fine-grained semantic association in the symptom description fragment, and the preset medical symptom attribute rule library provides standardized basis for the mapping of semantic information to attribute key-value pairs. For example, the Transformer encoder uses a 6-layer encoder structure (each layer contains 8 attention heads, and the hidden layer dimension is 512), first converts the symptom description fragment into a word vector, and then calculates the attention weight of each word with other words through the multi-head attention mechanism, and outputs the semantic information containing the attribute-entity association. The preset medical symptom attribute rule library includes symptom attribute definition, attribute value specification and attribute-entity matching rule. By matching the attribute description in the semantic information with the rule library, structured triples (entity-attribute-attribute value) can be finally generated.
[0073] Illustratively, the preset medical term library can be constructed by referring to the ICD-10 disease classification standard, the LOINC test term standard and the State Drug Administration drug database, and contains standard medical terms, synonym sets and term association weights. The semantic similarity calculation can use the weighted Jaccard similarity coefficient to calculate the similarity of structured triples and standard term triples, and when the similarity is ≥0.8, it can be determined as the same entity to complete disambiguation. Subsequently, repeated item detection can be performed by comparing the consistency of the "entity-attribute-attribute value" of the triple, and if they are completely consistent, they are merged into one, and the earliest timestamp is retained, and multi-dimensional relationships such as symptom association, symptom-disease association weight, and disease-drug contraindication rules are integrated, and finally stored in a graph structure. The nodes include symptoms, diseases, and drugs, and the edges include symptom-symptom association (labeled association strength), symptom-disease association (labeled association weight), and disease-drug contraindication (labeled contraindication level). When new symptom triples are added, the relationships of related nodes and edges are automatically updated to form a dynamic entity graph, which provides structured knowledge support for subsequent medical knowledge retrieval and diagnosis reasoning.
[0074] In one embodiment, based on the symptom entity of the dynamic entity graph, a medical knowledge retrieval operation is triggered to generate an evidence-based decision prompt, and the evidence-based decision prompt is input into a preset medical large model for processing to output a primary diagnosis result containing a list of necessary symptoms. The preset medical large model is based on a Transformer architecture and includes:
[0075] When the confidence of the symptom entity in the dynamic entity graph meets the preset condition, the symptom name of the symptom entity is extracted, and the symptom name is used as a retrieval key. The number of symptom names is counted, and the symptom names are sorted and combined based on the semantic association relationship of the corresponding symptom entity in the dynamic entity graph to generate a symptom combination.
[0076] The preset medical knowledge graph is queried based on the search key, and a disease node associated with the search key in the preset medical knowledge graph is traversed through a graph traversal algorithm to obtain an associated disease set and a disease-symptom relationship weight;
[0077] The symptom combination is hashed to generate a hash value, and a guideline entry corresponding to the hash value is matched from a preset clinical guideline library, and a diagnosis process, a differential point and a recommended treatment scheme in the guideline entry are extracted to obtain a treatment path data block;
[0078] The associated disease set, the disease-symptom relationship weight and the treatment path data block are integrated to generate a constraint prompt sentence, and the constraint prompt sentence is used as a evidence-based decision prompt, and the evidence-based decision prompt is input into a preset medical large model for constraint reasoning processing to output a primary diagnosis result including a possible disease list, a necessary symptom list, a confidence, and a preliminary drug suggestion.
[0079] Specifically, the preset condition can be set as a confidence threshold of 0.7, and when the condition is met, the symptom name of the corresponding symptom entity can be extracted as the search key to ensure that the symptom information for searching has sufficient reliability. Then the number of symptom names is counted to judge the richness of the current symptom information, and based on the association strength between symptoms, the association strength is arranged from high to low to form an ordered symptom combination such as fever-cough-headache. The preset medical knowledge graph takes disease as the core node, and is associated with symptoms, treatment schemes and other information, wherein the disease-symptom relationship weight can be calculated based on the diagnosis contribution of symptoms to diseases in clinical case data. By using a graph traversal algorithm such as depth-first search, the path from the symptom node to the disease node can be traced, for example, starting from the cough node, traversing adjacent disease nodes such as respiratory tract infection and pneumonia, and recording the relationship weight of each disease and cough. Illustratively, the traversal depth can be set to 3 layers, and when the search key is a plurality of symptom combinations, the top 20 diseases with the highest weight sum of all disease nodes and all symptom nodes are selected as the associated disease set by calculating the weight sum, to ensure that the set contains high-association-degree diseases and controls the size to improve the efficiency of subsequent processing.
[0080] Preferably, the symptom combination can be hashed by the SHA-256 algorithm to convert the variable-length symptom combination into a fixed-length hash value as an index key for efficient retrieval. The preset clinical guideline library can be obtained by integrating the "Clinical Diagnosis and Treatment Guidelines" issued by the National Health Commission and the standardized content in authoritative medical textbooks, and each guideline entry is pre-generated with a corresponding symptom combination hash value. Then the corresponding guideline entry can be located through the hash value matching to improve the retrieval speed. Finally, the extracted treatment path data block can include diagnosis process, differential point, recommended treatment scheme, etc., to provide evidence-based basis for subsequent constraint prompt generation, ensuring that the diagnosis suggestion conforms to the clinical specification.
[0081] Specifically, the integration of the associated disease set, disease-symptom relationship weight, and treatment path data block converts multi-source data into structured prompts understandable by the large model. The preset medical large model is built based on the Transformer architecture, which can use 12 layers of encoder, 12 layers of decoder, and a hidden layer dimension of 768. Its self-attention mechanism can combine the weight and guideline information in the constraint prompt, prioritize the output of high correlation diseases, and generate a necessary symptom list based on the differential points. The symptoms in the list are missing information in the current dynamic entity graph but are crucial for diagnosis. For example, the generated constraint prompt statement can be "the patient has chest pain and difficulty breathing, which may be related to angina or myocardial infarction, and further examination of electrocardiogram and myocardial enzyme spectrum is recommended." Then input the large model for reasoning, output the primary diagnosis result, including the possible disease list (angina, myocardial infarction), the necessary symptom list (persistent chest pain, difficulty breathing), the confidence (0.85), and the preliminary medication recommendation (nitroglycerin), etc. And the preliminary medication recommendation strictly refers to the recommended scheme in the treatment path data block, avoiding conflicting recommendations with guidelines.
[0082] In one embodiment, according to the matching degree of the necessary symptom list and the symptoms in the dynamic entity graph, a diagnosis report or a list of follow-up questions is generated, and a corresponding output type label is generated, including:
[0083] The matching degree of the necessary symptom list and the symptom set in the dynamic entity graph is calculated and processed to obtain the symptom matching degree.
[0084] When the symptom matching degree meets the first preset threshold condition, the symptom entity attributes and medication entity set in the dynamic entity graph are extracted, and the necessary symptom list, symptom entity attributes, and medication entity set are associated and integrated according to the preset logical structure to generate a diagnosis report containing diagnosis conclusions and medication recommendations, and the diagnosis report is added with a corresponding output type label;
[0085] When the matching degree does not meet the first preset threshold condition, a minimum path follow-up set is generated based on the topology structure of the pre-defined symptom tree through a pruning algorithm, wherein the root node of the pre-defined symptom tree is the differential dimension associated with the necessary symptom list, the first-level child nodes are the symptom entities extracted from the dynamic entity graph, and the second-level child nodes are the symptoms in the necessary symptom list that do not match the dynamic entity graph.
[0086] The preset medical inquiry technique library is called to perform technique matching processing on the minimum path follow-up set, generate a follow-up question list through the technique template, and add a corresponding output type label to the follow-up question list.
[0087] Specifically, the Jaccard similarity coefficient can be used as the calculation index. By measuring the ratio of the intersection and union of the necessary symptom list and the symptom set in the dynamic entity graph, the degree of overlap of symptom coverage can be reflected. During the calculation process, the symptom entities in the two sets can be standardized first, such as unifying chest pain as chest pain, based on the synonym mapping table of the preset medical terminology library, to avoid matching deviation caused by expression differences. When the symptom matching degree meets the first preset threshold condition, such as 0.8, it indicates that the current dynamic entity graph has covered the key information in the necessary symptom list, then the symptom entity attributes and the medication entity set in the dynamic entity graph can be extracted, and can be divided into three parts: symptom information module, diagnosis conclusion module, and medication suggestion module for integration. The symptom information module can list all symptom entities and attributes in the format of symptom name-attribute value, ensuring the completeness of the information. The diagnosis conclusion module determines the disease ranked first as the core diagnosis conclusion based on the possible disease list in the primary diagnosis result (sorted by confidence), combined with the matching degree of symptom entity attributes and disease characteristics, and supplements the diseases that need to be excluded. The medication suggestion module selects the drugs that match the diagnosis conclusion and have no contraindications from the medication entity set, and labels the usage and dosage. After integrating to generate the diagnosis report, the corresponding output type label is added, which is convenient for subsequent system recognition and triggering of the quality control report generation process.
[0088] If the symptom matching degree does not meet the first preset threshold condition (i.e. matching degree < 0.8), it indicates that there is a key missing in the current symptom information, which needs to be supplemented by follow-up questions. The construction of the pre-defined symptom tree takes the differential diagnosis logic as the core, the root node is the differential dimension associated with the necessary symptom list (such as the necessary symptom list contains abdominal pain, the root node is set as abdominal pain differential dimension), the first-level child nodes are the symptom entities extracted from the dynamic entity graph (such as upper abdominal pain, postprandial aggravation), and the second-level child nodes are the symptoms in the necessary symptom list that are not matched with the dynamic entity graph (such as whether accompanied by nausea and vomiting, whether there is tenderness). The nodes are connected through the differential necessity weight. By using a pruning algorithm such as the weight-based greedy pruning algorithm, the pruning threshold can be set to 0.6, and the second-level nodes with a weight less than 0.6 are deleted. Then the remaining nodes are sorted by weight from high to low, and the top 5 symptoms are selected to form the follow-up set, ensuring that the follow-up set contains core differential symptoms and controls the number to reduce user interaction rounds and improve the efficiency of medical consultation. The pre-set medical consultation dialogue library contains the mapping relationship of symptom-inquiry dimension-dialogue template, where the dialogue template can use natural language expression, which meets the interaction scene of the family health assistant. For example, for each symptom in the follow-up set, determine its inquiry dimension, call the corresponding template from the dialogue library, and generate natural and understandable follow-up questions. And the question list is sorted by "differential necessity weight" to ensure that key information is obtained first. Finally, the follow-up question list is added with an output type label, which is convenient for subsequent recognition and triggering of the corresponding speech synthesis process.
[0089] In one embodiment, when the output type is marked as a diagnosis report, a medical rule chain verification operation is performed on the diagnosis report to generate a quality control report with a risk level label, including:
[0090] Obtain pre-stored user health record data, which includes allergy history, age, weight, and kidney function indicators;
[0091] Perform drug information analysis processing on the diagnosis report to extract the drug name, and perform conflict detection processing on the drug name and allergy history data in the user health record data to generate a conflict identifier;
[0092] Based on the age, weight, and kidney function indicators in the user health record data, perform safety dose threshold calculation processing through a pre-set individualized dose prediction equation to obtain a maximum safe dose threshold; in the pre-set individualized dose prediction equation, age and weight are used as basic variables, and kidney function indicators are used as correction variables;
[0093] Perform deviation calculation processing on the medication dose in the diagnosis report and the maximum safe dose threshold to obtain a dose deviation value, and according to the conflict identifier and the dose deviation value, mark a risk level label according to a pre-set grading rule;
[0094] When the dose deviation value meets a pre-set deviation condition, generate a corrected dose suggestion value based on the maximum safe dose threshold and in combination with the dose correction coefficient corresponding to the kidney function indicator;
[0095] Integrate the risk level label, the corrected dose suggestion value, and the diagnosis report content to generate a quality control report.
[0096] Specifically, when the output type is marked as a diagnosis report, pre-stored user health record data can be obtained, which includes allergy history, age, weight, and kidney function indicators. This data can be stored in local or cloud databases through encryption, and user identity authentication is required when calling to ensure data privacy. Subsequently, a keyword extraction algorithm based on regular expressions can be used to locate the drug name from the medication suggestion module of the diagnosis report. By comparing the extracted drug name with the list of contraindicated drugs in the allergy history data, if there is an intersection, a conflict identifier 1 is generated, indicating that there is an allergy risk, and if there is no intersection, 0 is generated, indicating no allergy risk. This detection process can be quickly matched through a hash table. Based on the age, weight, and kidney function indicators in the user health record data, safety dose threshold calculation processing can be performed through a pre-set individualized dose prediction equation to obtain a maximum safe dose threshold. This equation can be constructed based on the principles of clinical pharmacokinetics. Age affects drug metabolism enzyme activity, weight determines drug distribution volume, and kidney function indicators directly affect the clearance rate of drugs excreted by the kidneys. Illustratively, the expression of this equation is:
[0097] ;
[0098] wherein, is the maximum safe dose threshold, is the standard dose labeled in the drug instruction manual, is the body weight, is the standard body weight reference value, is the body weight influence coefficient, is the actual estimated glomerular filtration rate in the renal function index, is the normal renal function index threshold, is the renal function correction coefficient, is the age correction coefficient, calculated by the age and the preset standard value.
[0099] Subsequently, the dose deviation value can be obtained by performing deviation calculation processing on the medication dose in the diagnostic report and the maximum safe dose threshold. According to the conflict identifier and the dose deviation value, the risk level label can be labeled according to the preset grading rule, which is set with reference to the medical risk assessment standard. For example, if the conflict identifier is 1, there is an allergy risk, regardless of the dose deviation value, it is labeled as high risk. If the conflict identifier is 0, there is no allergy risk, then it is classified according to the deviation value to ensure the objectivity and standardization of risk judgment and avoid risk misjudgment caused by subjective judgment. And when the dose deviation value meets the preset deviation condition (i.e. deviation value > 10%, including the dose over-limit situation in the medium risk and high risk), the maximum safe dose threshold can be used as the basis to generate a revised dose recommendation value in combination with the dose correction coefficient corresponding to the renal function index, wherein the deviation control coefficient can be set according to the risk level, such as 0.15 for medium risk (to ensure that the revised dose is lower than the threshold by 15%). Finally, based on the risk level label and the revised dose recommendation value, a risk quality control module can be added to the original structure of the diagnostic report, sequentially listing the conflict detection results, the dose deviation value, the risk level label, the revised dose recommendation value and the risk prompt sentence, to generate a quality control report, ensuring the relevance and integrity of the quality control information and the diagnostic information.
[0100] In one embodiment, based on the follow-up question list or the quality control report, a synthesized speech stream is generated, including:
[0101] When the output type is marked as a follow-up question list, the syntax structure of the follow-up question list is parsed, the focus of the question is identified, and the focus word repetition parameter is set. The follow-up question list is processed by a speech generation engine based on the WaveNet architecture to obtain a synthesized speech stream;
[0102] When the output type is marked as a diagnostic report, the corresponding speech parameter configuration is generated based on the risk level label of the quality control report corresponding to the diagnostic report;
[0103] Based on the voice parameter configuration, the voice generation processing is performed on the quality control report by a voice synthesis engine based on the WaveNet architecture to obtain a synthesized voice stream.
[0104] Specifically, the syntax structure analysis can adopt a dependency syntax analysis algorithm to locate the focus of questions by constructing a syntax tree of subject-predicate-object-modifier. The setting of the focus word emphasis parameter can be based on the principles of voice interaction psychology to highlight the focus word by increasing the voice intensity and prolonging the duration, for example, the focus word intensity is increased by 18%-22% and the duration is prolonged by 12%-15% compared with the non-focus word, while keeping the fundamental frequency stable. Then the voice generation processing is performed on the list of follow-up questions by a voice synthesis engine based on the WaveNet architecture.
[0105] When the output type is marked as a diagnostic report, its voice parameter configuration can include three core dimensions of fundamental frequency, speech rate, and pause interval, and each dimension parameter is dynamically adjusted according to the risk level. For example, when the risk level is high risk, the configuration is to increase the fundamental frequency by 35Hz-40Hz, reduce the speech rate by 15%-18%, and prolong the pause interval between sentences to 1.8s-2.0s, and insert a 1.2s low-frequency warning sound effect before the risk prompt sentence to strengthen the warning effect. The parameter mapping process can be performed through a preset risk level-parameter contrast table. Based on the above voice parameter configuration, the quality control report can be processed by the WaveNet architecture voice synthesis engine to generate a synthesized voice stream. During the generation process, the quality control report text can be segmented according to the logic of diagnostic conclusion-risk prompt-correction suggestion, and each segment of text is adjusted by voice parameter configuration to adjust the corresponding intensity, fundamental frequency, duration, etc. Then the voice waveform is generated by the vocoder. The finally generated synthesized voice stream can also support streaming output, that is, it can use a ring buffer management to generate and play simultaneously to meet the real-time interaction requirements and ensure the accuracy and security of medical information transmission.
[0106] Based on the same inventive concept, as shown in Figure 3 The embodiments of the present application also provide a large model family health assistant dialogue device 300 for implementing the voice interaction large model family health assistant dialogue method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more voice interaction large model family health assistant dialogue device embodiments provided below can be referred to the limitations of the above method embodiments, which will not be repeated here. The device comprises:
[0107] The voice preprocessing and medical entity extraction module 301 is configured to perform medical intention segmentation on the original voice stream of the user, generate audio segments with medical labels, and perform streaming voice recognition and medical entity extraction on the audio segments with medical labels to generate a dynamic entity graph.
[0108] The medical knowledge retrieval and primary diagnosis module 302 is configured to trigger medical knowledge retrieval based on the symptom entities in the dynamic entity graph, generate evidence-based decision prompts, and input the evidence-based decision prompts into a preset medical large model for processing to output a primary diagnosis result including a list of necessary symptoms. The preset medical large model is constructed based on a Transformer architecture.
[0109] The diagnosis result processing and voice output module 303 is configured to generate a diagnosis report or a list of follow-up questions based on the matching degree of the necessary symptoms in the list with the symptoms in the dynamic entity graph, and generate a corresponding output type label. When the output type label is a diagnosis report, the diagnosis report is subjected to a medical rule chain verification operation to generate a quality control report. Based on the list of follow-up questions or the quality control report, a synthesized voice stream is generated.
[0110] In an exemplary embodiment, the present application further provides a computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the voice interaction large model family health assistant dialogue method of the present application when executing the computer program. Preferably, a multi-core processor is used to improve the parallel processing capability of the system. The memory provides sufficient temporary storage space to support the running of the program and the processing of data. The memory capacity should be large enough to accommodate a large amount of data information and computing tasks.
[0111] In an exemplary embodiment, the present application further provides a computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of the voice interaction large model family health assistant dialogue method of the present application. The computer readable storage medium can include a read-only memory (ROM), a random access memory (RAM), a solid state disk (SSD), or an optical disk.
[0112] The above-described embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the application. It should be noted that, for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application.
Claims
1. A large model voice interaction home health assistant dialogue method, characterized in that, The method comprises: performing medical intent slicing on a user's original voice stream to generate audio slices with medical labels, and performing streaming speech recognition and medical entity synchronous extraction operations on the audio slices with medical labels to generate a dynamic entity graph; based on the symptom entities of the dynamic entity graph, triggering a medical knowledge retrieval operation to generate an evidence-based decision prompt, and inputting the evidence-based decision prompt into a preset medical large model for processing to output a primary diagnosis result containing a list of necessary symptoms, wherein the preset medical large model is constructed based on a Transformer architecture; According to the matching degree of the list of necessary symptoms and the symptoms of the dynamic entity graph, a diagnosis report or a list of follow-up questions is generated, and a corresponding output type label is generated. When the output type label is the diagnosis report, a medical rule chain verification operation is performed on the diagnosis report to generate a quality control report, and a synthesized voice stream is generated based on the list of follow-up questions or the quality control report; wherein, the streaming speech recognition and medical entity synchronous extraction operation on the audio slices with medical labels to generate a dynamic entity graph comprises: performing streaming speech recognition on the audio slices with medical labels by a Faster-Whisper model based on an OpenAI Whisper architecture to generate a frame-by-frame incremental text sequence; performing medical entity boundary detection on the text sequence by an entity extraction model to obtain a symptom start position and an entity type label; the entity extraction model is constructed based on a bidirectional long short-term memory network and a conditional random field, and the entity extraction model comprises a BiLSTM layer and a CRF layer, and the entity type label comprises a symptom, a disease and a medication; performing symptom description segment extraction on the text sequence according to the entity type label to filter out the text segment with the entity type label as the symptom to obtain a symptom description segment; performing semantic analysis on the symptom description segment by a Transformer encoder to output semantic information, and matching the semantic information with a preset medical symptom attribute rule library to obtain a corresponding symptom attribute key-value pair to obtain a structured triple; based on a preset medical terminology library, performing entity disambiguation on the structured triple by semantic similarity calculation and term association weight ordering to obtain a disambiguated structured triple; performing repeated item detection and merging on the disambiguated structured triple, integrating the association relationship between symptoms, symptom-disease association weight and disease-drug contraindication rules to generate the dynamic entity graph containing symptom network, disease association and drug contraindication relationship.
2. The method of claim 1, wherein, The method comprises: performing medical intent slicing on a user's original voice stream to generate audio slices with medical labels, and performing streaming speech recognition and medical entity synchronous extraction operations on the audio slices with medical labels to generate a dynamic entity graph; based on the symptom entities of the dynamic entity graph, triggering a medical knowledge retrieval operation to generate an evidence-based decision prompt, and inputting the evidence-based decision prompt into a preset medical large model for processing to output a primary diagnosis result containing a list of necessary symptoms, wherein the preset medical large model is constructed based on a Transformer architecture; extract a symptom name of the symptom entity when a confidence of the symptom entity in the dynamic entity graph meets a preset condition, and use the symptom name as a search key; count a number of the symptom names, and sort and combine the symptom names based on a semantic association relationship of the corresponding symptom entity in the dynamic entity graph to generate a symptom combination; query a preset medical knowledge graph based on the search key, traverse a disease node associated with the search key in the preset medical knowledge graph through a graph traversal algorithm, obtain an associated disease set and a disease-symptom relationship weight, and generate a treatment path data block by hashing the symptom combination, matching a guideline item corresponding to a hash value from a preset clinical guideline library, and extracting a diagnosis process, a differential point, and a recommended treatment scheme in the guideline item; integrate the associated disease set, the disease-symptom relationship weight, and the treatment path data block to generate a constraint prompt sentence, and use the constraint prompt sentence as the evidence-based decision prompt; input the evidence-based decision prompt into the preset medical large model for constraint reasoning processing, and output the primary diagnosis result including a possible disease list, a necessary symptom list, the confidence, and a preliminary medication suggestion. generate a diagnosis report or a follow-up question list according to a symptom matching degree of the necessary symptom list and the dynamic entity graph, and generate a corresponding output type label, including:
3. The method of claim 1, wherein, perform matching degree calculation processing on the necessary symptom list and a symptom set in the dynamic entity graph to obtain the symptom matching degree; when the symptom matching degree meets a first preset threshold condition, extract symptom entity attributes and a medication entity set in the dynamic entity graph, and integrate the necessary symptom list, the symptom entity attributes, and the medication entity set according to a preset logical structure to generate the diagnosis report including a diagnosis conclusion and a medication suggestion, and add the corresponding output type label to the diagnosis report; when the matching degree does not meet the first preset threshold condition, generate a minimum path follow-up set through a pruning algorithm based on a topological structure of a predefined symptom tree, wherein a root node of the predefined symptom tree is a differential dimension associated with the necessary symptom list, a first-level child node is the symptom entity extracted from the dynamic entity graph, and a second-level child node is a symptom in the necessary symptom list that is not matched with the dynamic entity graph; call a preset medical inquiry rhetoric library to perform rhetoric matching processing on the minimum path follow-up set, generate the follow-up question list through a rhetoric template, and add the corresponding output type label to the follow-up question list. when the output type label is the diagnosis report, perform a medical rule chain verification operation on the diagnosis report to generate a quality control report with a risk level label, including:
4. The method according to any one of claims 1 to 3, characterized in that, obtain pre-stored user health record data, and the user health record data includes allergy history, age, weight, and kidney function indicators; The drug information analysis processing is performed on the diagnostic report, the drug name is extracted, the conflict identifier is generated by performing conflict detection processing on the drug name and the allergic history data in the user health record data; Based on the age, weight and renal function index in the user health record data, the maximum safe dose threshold is obtained by performing safety dose threshold calculation processing through a preset individualized dose prediction equation; in the preset individualized dose prediction equation, the age and the weight are taken as basic variables, and the renal function index is taken as a correction variable; The deviation calculation processing is performed on the medication dose in the diagnostic report and the maximum safe dose threshold, the dose deviation value is obtained, and the risk level label is marked according to the conflict identifier and the dose deviation value according to a preset grading rule; When the dose deviation value meets a preset deviation condition, a corrected dose suggestion value is generated based on the maximum safe dose threshold and in combination with the dose correction coefficient corresponding to the renal function index; The risk level label, the corrected dose suggestion value and the diagnostic report content are integrated to generate the quality control report.
5. The method of claim 4, wherein, The synthetic speech stream is generated based on the follow-up question list or the quality control report, including: When the output type label is the follow-up question list, the syntax structure of the follow-up question list is analyzed, the focus of the question is identified, the focus word repetition parameter is set, and the follow-up question list is processed by the speech generation engine based on the WaveNet architecture to obtain the synthetic speech stream; When the output type label is the diagnostic report, the corresponding speech parameter configuration is generated based on the risk level label of the quality control report corresponding to the diagnostic report; Based on the speech parameter configuration, the quality control report is processed by the speech generation engine based on the WaveNet architecture to obtain the synthetic speech stream.
6. The method of claim 4, wherein, The mathematical expression of the preset individualized dose prediction equation is: ; wherein, is the maximum safe dose threshold value, is the standard dose marked in the drug instruction, is the body weight, is the standard body weight reference value, is the body weight influence coefficient, is the actual estimated glomerular filtration rate in the renal function index, is the normal renal function index threshold value, is the renal function correction coefficient, is the age correction coefficient, calculated by the age and a preset standard value.
7. A large model voice interactive home health assistant dialog apparatus, characterized by, The device includes: The voice preprocessing and medical entity extraction module is configured to perform medical intent segmentation processing on the user's original voice stream, generate audio segments with medical markers, and perform streaming voice recognition and medical entity synchronous extraction operations on the audio segments with medical markers to generate a dynamic entity graph; The medical knowledge retrieval and primary diagnosis module is configured to trigger medical knowledge retrieval based on the symptom entities of the dynamic entity graph, generate evidence-based decision prompts, and input the evidence-based decision prompts into a preset medical large model to output a primary diagnosis result containing a list of necessary symptoms, wherein the preset medical large model is based on a Transformer architecture; The diagnosis result processing and voice output module is configured to generate a diagnostic report or a follow-up question list according to the matching degree of the necessary symptom list and the symptom entities of the dynamic entity graph, and generate a corresponding output type label, when the output type label is the diagnostic report, perform medical rule chain verification on the diagnostic report to generate a quality control report, and generate a synthetic speech stream based on the follow-up question list or the quality control report. The voice preprocessing and medical entity extraction module comprises a dynamic entity graph generation unit, which is configured to: perform streaming speech recognition processing on the audio segment with medical labels based on a Faster-Whisper model based on an OpenAI Whisper architecture to generate a frame-by-frame incremental text sequence; perform medical entity boundary detection processing on the text sequence based on an entity extraction model to obtain a symptom starting position and an entity type label; the entity extraction model is constructed based on a bidirectional long short-term memory network and a conditional random field, and comprises a BiLSTM layer and a CRF layer; the entity type label comprises a symptom, a disease, and a medication; perform symptom description fragment extraction processing on the text sequence based on the entity type label to filter out a text fragment with the entity type label as the symptom, and obtain a symptom description fragment; perform semantic analysis on the symptom description fragment based on a Transformer encoder to output semantic information, and match corresponding symptom attribute key-value pairs based on a pre-set medical symptom attribute rule library to obtain a structured triple; perform entity disambiguation processing on the structured triple based on a pre-set medical term library by calculating semantic similarity and sorting term association weights to obtain a disambiguated structured triple; perform repeated item detection and merging on the disambiguated structured triple, integrate symptom interrelation, symptom-disease association weight, and disease-drug contraindication rules, and generate the dynamic entity graph comprising a symptom network, disease association, and drug contraindication relationship.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Personalized precise medical question-answering system based on data and knowledge
CN112863630A
Traditional Chinese medicine intelligent inquiry method and system based on AI big language model
CN120067279A