A urology consultation method and device based on LLM context embedding assistance

Through the LLM context embedding-based method, the problems of high resource consumption and lack of professional knowledge in the existing online consultation system in urology specialist auxiliary consultation are solved, open consultation and professional content organization are realized, voice input and examination report integration are supported, and the accuracy and efficiency of consultation are improved.

CN119811647BActive Publication Date: 2025-09-19TIANJIN UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510287371.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-09-19
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

The existing online consultation system has problems in urology specialist auxiliary consultation, such as the inability to realize open consultation, high resource consumption, lack of professional knowledge organization, no support for image examination report information input and inspection, lack of voice input and output functions, and inability to perform professional corrections, resulting in insufficient accuracy and effectiveness of consultation results.

Method used

Using a method based on LLM context embedding, by collecting and structuring urology consultation information, supporting the integration of voice input and examination reports, correcting professional terminology, and dynamically adjusting the auxiliary consultation process through context information embedding, a structured medical record is generated.

Benefits of technology

It realizes open assisted medical consultation without model training, reduces resource consumption and deployment difficulty, supports voice input and examination report integration, improves the professional content organization and correction capabilities of medical consultation, and improves the accuracy and efficiency of medical consultation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119811647B_ABST
    Figure CN119811647B_ABST
Patent Text Reader

Abstract

The present invention provides a urology specialist consultation method and device based on LLM context embedding assistance, comprising: step S1, collecting and structuring urology specialist consultation information; step S2, integrating through context information embedding to obtain structured task examples; step S3, correcting the recognized input information through context information embedding; step S4, determining whether it is necessary to upload an examination report; if so, guiding and waiting for the patient to upload the examination report, converting it into text input information and jumping to step S5; if not, jumping to step S6; step S5, generating structured examination report information corresponding to the examination report; step S6, scoring the achieved corrections and optimizing the assisted consultation process; step S7, integrating the corrected text information and generating a structured medical record. The present invention can effectively reduce resource consumption and deployment difficulty, providing a foundation for rapid iteration; it can support the integration of voice input and examination reports, and realize professional organization and correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an auxiliary consultation method in the field of medical information technology, and in particular to a urology specialist consultation method based on LLM context embedding assistance, and further to a urology specialist consultation device adopting the urology specialist consultation method based on LLM context embedding assistance. Background Art

[0002] Urology is a highly specialized medical field that involves a variety of complex diseases and symptoms. The assisted consultation process refers to the use of technologies such as artificial intelligence and big data analysis to help doctors and patients collect information beforehand. This provides a data foundation for the actual consultation process, thereby providing better technical support for the diagnosis and treatment of diseases. Currently, traditional consultation methods face many challenges, especially in terms of obtaining patient information and organizing data. There are no assisted consultation technology solutions for different professional departments and fields. Therefore, there are no assisted urology consultation methods and devices.

[0003] If the existing online consultation system is used to assist urology consultation, there are obviously the following problems: First, open consultation cannot be realized. The existing online consultation system generally adopts a rule-based question-and-answer model, which cannot flexibly respond to the diverse needs of patients and limits the comprehensive acquisition of urology-related information; Second, the model training cost is high. The existing online consultation system usually requires a lot of hardware resources and time for model training, resulting in high resource consumption and difficulty in deployment, which is not conducive to rapid iteration; Third, it cannot meet the actual needs of vertical specialties. The existing online consultation system often lacks professional knowledge for urology, which leads to the inaccurate consultation results. The accuracy and effectiveness are insufficient, and it cannot provide effective assistance to the actual urology specialist consultation process; fourth, it does not support the entry and inspection of image examination report information. The existing online consultation system cannot effectively integrate and interpret the patient's imaging examination report, which affects the comprehensiveness of urology specialist diagnosis; fifth, the lack of voice input and output functions makes the interactive experience between patients and the online consultation system less friendly, reducing the convenience of use; sixth, it does not support professional correction of oral content. When describing symptoms, patients often use colloquial descriptions. The existing online consultation system cannot perform effective professional correction and guidance, which affects the accurate transmission of information.

[0004] Therefore, there is an obvious need to provide new technical solutions for the auxiliary consultation process of urology to overcome the above technical problems. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a urology specialist consultation method based on LLM context embedding assistance. This method aims to implement an open-ended assisted consultation process for urology specialists without the need for model training to reduce resource consumption and deployment difficulty. It can support the integration of voice input and examination reports, and organize and correct specialized content for urology specialists, providing urology specialists with better assisted consultation technical solutions and technical support. On this basis, a urology specialist consultation device that adopts this urology specialist consultation method based on LLM context embedding assistance is further provided.

[0006] To this end, the present invention provides a urology specialist consultation method based on LLM context embedding assistance, comprising the following steps:

[0007] Step S1, collecting and structuring urology consultation information;

[0008] Step S2: Integrate the structured and organized urology consultation information through contextual information embedding to obtain structured task examples;

[0009] Step S3: responding to the patient's access request, identifying the patient's input information, and correcting the identified input information by embedding contextual information based on professional terminology correction examples to dynamically adjust the auxiliary consultation process;

[0010] Step S4: Determine whether the examination report needs to be uploaded. If so, guide the patient to upload the examination report and wait until a valid examination report image is obtained. Perform optical character recognition on the image to extract key information from the examination report, convert the key information into text input information in text format, and then jump to step S5. If not, jump directly to step S6.

[0011] Step S5: Create a template for structured examination report information, combine it with the text input information corresponding to the examination report, form context information and transmit it to the large language model LLM, generate structured examination report information corresponding to the examination report, and send it to the patient for review and confirmation;

[0012] Step S6, scoring the corrections achieved in step S3, and dynamically adjusting the context information embedded in the update iterative algorithm to optimize the assisted consultation process;

[0013] Step S7: Integrate all corrected text information to generate a structured medical record; the corrected text information includes the corrected input information and the structured examination report information.

[0014] A further improvement of the present invention is that step S1 includes the following sub-steps:

[0015] Step S101, collecting urology consultation information through an online webpage;

[0016] Step S102: defining a medical inquiry structure corresponding to urology consultation information, wherein the medical inquiry structure includes first-level diagnostic aspects and second-level medical questions, wherein the medical questions are associated with sublists of corresponding diagnostic aspects, and a question list corresponding to the medical inquiry structure is generated;

[0017] Step S103: setting interaction constraints for question asking.

[0018] A further improvement of the present invention is that step S102 includes the following sub-steps:

[0019] Step S1021, defining the first level of diagnostic aspects, including hematuria, frequent urination, painful urination, urinary incontinence, dysuria, low back pain, fever, nausea and vomiting, syncope, whether the patient has been to the hospital, general condition, and personal history;

[0020] Step S1022: in the question list, setting a question associated with each diagnostic aspect;

[0021] Step S1023, cross-correlating the questions between different diagnostic aspects through the keywords in the questions;

[0022] In step S103, the process of setting the interaction constraint conditions for the question inquiry includes the following sub-steps:

[0023] Step S1031: When asking questions, first ask a single question related to the diagnosis in the order of the question list. After completing the inquiry of the current question, record the question, answer content and timestamp, mark the status of the current question as asked, and determine whether the received answer content triggers the pre-set keyword. If so, jump to step S1032; if not, jump to step S1033;

[0024] Step S1032: jump to another medical question associated with the keyword according to the association relationship of the keyword, and return to step S1031 to perform a single inquiry;

[0025] Step S1033: Jump to the next medical question in the order of the question list and ask.

[0026] A further improvement of the present invention is that in step S1032, after returning to step S1031 for a single inquiry, if the received answer content does not trigger the preset keywords, then jump back to the diagnosis aspect of the previous question and continue to ask questions in sequence.

[0027] A further improvement of the present invention is that step S2 includes the following sub-steps:

[0028] Step S201: Collecting conversation record samples of urology consultation information and classifying the conversation record samples according to different symptoms, genders, and age groups;

[0029] Step S202: Analyze the conversation record sample using the Large Language Model (LLM) to extract information related to the urology consultation, including the patient's name, age, gender, chief complaint, current medical history, past medical history, personal history, and marital and reproductive history.

[0030] Step S203 , after the information extraction is completed, the extracted information is integrated according to a predefined JSON structure to generate a structured task sample, and the structured task sample is associated with the classification of the conversation record sample.

[0031] A further improvement of the present invention is that step S3 includes the following sub-steps:

[0032] Step S301: respond to the patient's access request and sequentially inquire and collect the patient's basic information, including the patient's name, gender, and age;

[0033] Step S302: Inquire about the patient's chief complaint using preset guidance information, receive and record the patient's inputted chief complaint information in real time. If the inputted chief complaint information is textual input information, the procedure directly jumps to step S303; if the inputted chief complaint information is voice input information, the procedure calls the voice recognition module for recognition, obtains the spoken content corresponding to the voice input information, and then jumps to step S303;

[0034] Step S303: Correcting the spoken content corresponding to the text input information and / or voice input information using pre-set professional term correction examples;

[0035] Step S304: Output the corrected information for the patient to review and confirm;

[0036] Step S305: After the patient has reviewed and confirmed the output information, questions are asked according to the set interaction constraints to dynamically adjust the auxiliary consultation process.

[0037] A further improvement of the present invention is that step S4 includes the following sub-steps:

[0038] Step S401: Determine the spoken content corresponding to the voice input information. If the spoken content is not relevant to the medical question, return to the default guidance information and ask again until the spoken content relevant to the medical question is obtained.

[0039] Step S402: retrieve the answers in the auxiliary medical consultation process to determine whether the patient has been treated before. If so, jump to step S403; if not, jump directly to step S6;

[0040] Step S403: Inquire whether the patient has relevant examinations and is able to upload examination reports. If so, guide and wait for the patient to upload the examination report; if not, jump to step S404;

[0041] Step S404: When there are relevant examinations but the examination report cannot be uploaded, the patient is asked whether to enter the relevant examination results by description. If so, the examination results are entered through the text input module or the voice recognition module, and the entered content is stored; if not, it is recorded that the examination record exists but the examination results are lost.

[0042] A further improvement of the present invention is that step S5 includes the following sub-steps:

[0043] Step S501, defining a report template in JSON format, the report template including fields such as report title, patient information, examination items, result description, doctor's advice, examination date, doctor's name and report number;

[0044] Step S502: Create a context example and define a context learning format. The content of the context example includes input text obtained through optical character recognition and populated output fields. The input text includes the patient's name, gender, age, result description, and doctor's advice. The output fields include the report title, patient information, and result description.

[0045] Step S503 , combining the context example with the input text obtained through optical character recognition to form context information;

[0046] In step S504, the context information is transmitted to the large language model (LLM), which performs content recognition and information extraction, and verifies the extracted information to ensure that key information is correctly filled in. After the filling is completed, the structured examination report information is sent to the patient for review and confirmation.

[0047] A further improvement of the present invention is that step S6 includes the following sub-steps:

[0048] Step S601, after each correction of the spoken content, the correction result is compared with the existing context, and when the correction result does not overlap with the existing context, the context information is updated;

[0049] Step S602: regularly analyzing the patient's input information and structured examination report information in the existing structured medical records to extract and integrate key information;

[0050] Step S603, by formula Score= w 1×Fluency+ w 2×Relevance+ w 3×Professionalism implements scoring for correction of input information, where Score represents the score for correction of spoken content; w 1. w 2 and w 3 represents the pre-set weight coefficients of language fluency, relevance and professionalism, w 1+ w 2+ w 3=1; Fluency refers to language fluency, Relevance refers to relevance, and Professionalism refers to professionalism;

[0051] Step S604: After obtaining the score, select the alternative expression with the highest score as the professional term correction example;

[0052] Step S605: Import the complete consultation dialogue record uploaded by the doctor and compare it with the existing structured task sample to obtain the newly added, modified and deleted information, mark the newly added and modified information as pending for review, and use the formula W = α ×Relevance+ β ×Frequency+ γ ×Impact assigns weight to newly added and modified information W ,in, α 、 β and γ Represents the preset weight coefficients of relevance, frequency and influence, α + β + γ =1; Frequency represents frequency, Impact represents influence;

[0053] Step S606: According to the weight W Sort the new and modified information to be reviewed and select the weight W The information with the highest or exceeding the preset weight threshold is appended to the existing context information to be included in the subsequent update iteration process; and other newly added and modified information is marked as a state to be observed.

[0054] The present invention also provides a urology specialist consultation device based on LLM context embedding assistance, which adopts the above-mentioned urology specialist consultation method based on LLM context embedding assistance and includes:

[0055] Information collection module, used to collect and structure urology consultation information;

[0056] The context information embedding module is used to integrate the structured and organized urology consultation information through context information embedding to obtain structured task examples;

[0057] The speech recognition module supports the patient's voice input, recognizes the patient's input information, and corrects the recognized input information by embedding contextual information based on professional terminology correction examples to dynamically adjust the auxiliary consultation process;

[0058] The examination report upload module is used to determine whether the examination report needs to be uploaded. If so, it guides the patient to upload the examination report and waits until a valid examination report image is obtained. The optical character recognition is performed on the image to extract the key information in the examination report, and the key information is converted into text input information in text format, and then jumps to the structured examination report generation module; if not, it jumps directly to the information integration module;

[0059] A structured examination report generation module is used to create a template for structured examination report information, combine the text input information corresponding to the examination report, form context information and transmit it to the large language model (LLM), generate structured examination report information corresponding to the examination report, and send it to the patient for review and confirmation;

[0060] The information integration module is used to integrate all corrected text information and generate structured medical records.

[0061] Compared with the prior art, the present invention has the following advantages: first, it collects and structures urology consultation information, and integrates the structured and organized urology consultation information through context information embedding to obtain structured task examples, so as to provide a better professional data foundation for the auxiliary consultation process by organizing the professional knowledge of urology, and realizes the integration of professional information through context information embedding without the need for model training; then, in response to the patient's access request, the patient's input information is recognized, and based on professional terminology correction examples, the recognized input information is corrected through context information embedding to dynamically adjust the auxiliary consultation process, and when the examination report needs to be uploaded, the key information in the examination report is extracted through optical character recognition to generate structured examination report information, thereby providing an open auxiliary consultation process for urology specialists, capable of professional organization and correction for urology specialists, and supporting the integration of voice input and examination reports; then, the corrections implemented above are scored, and the update iterative algorithm of context information embedding is called to dynamically adjust to optimize the auxiliary consultation process; finally, all corrected text information is integrated to generate a structured medical record.

[0062] Therefore, the present invention can target the special application scenario of urology auxiliary consultation, and realize an open auxiliary consultation technical solution for urology based on LLM context embedding assistance, without the need for model training, thereby effectively reducing resource consumption and deployment difficulty, and providing a basis for rapid iteration; and it can also support the integration of voice input and examination reports, can organize and correct professional content for urology, and can dynamically adjust by calling the update iterative algorithm of context information embedding, thereby providing urology with better auxiliary consultation technical solutions and technical support, so as to improve the accuracy and work efficiency of the subsequent actual consultation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 This is a schematic diagram of the workflow of an embodiment of the present invention;

[0064] Figure 2 This is a schematic diagram of the auxiliary medical consultation process according to an embodiment of the present invention;

[0065] Figure 3 This is a schematic diagram of a process for correcting colloquial expressions and non-standard terms according to an embodiment of the present invention;

[0066] Figure 4 It is a flowchart of calling an update iterative algorithm to perform dynamic adjustment according to an embodiment of the present invention. DETAILED DESCRIPTION

[0067] In the description of the present invention, if any directional description is involved, such as "upper", "lower", "front", "back", "left", "right", etc., the directions or positional relationships indicated are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, they should not be understood as limitations on the present invention. If a technical feature is referred to as being "disposed", "fixed", "connected", or "installed" on another technical feature, it can be directly disposed, fixed, or connected to the other technical feature, or it can be indirectly disposed, fixed, connected, or installed on the other technical feature.

[0068] In the description of the present invention, if "several" is used, it means more than one; if "plurality" is used, it means more than two; if "greater than," "less than," or "exceeds," it should be understood as excluding the number itself; if "above," "below," or "within" is used, it should be understood as including the number itself. If "first," "second," etc. is used, it should be understood that it is used only to distinguish the names of identical or similar technical features, and should not be understood to imply or indicate the relative importance of the technical features, the number of technical features, or the order of the technical features.

[0069] The preferred embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0070] like Figure 1 As shown, this embodiment provides a urology specialist consultation method based on LLM context embedding assistance, including the following steps:

[0071] Step S1, collecting and structuring urology consultation information;

[0072] Step S2: Integrate the structured and organized urology consultation information through contextual information embedding to obtain structured task examples;

[0073] Step S3: responding to the patient's access request, identifying the patient's input information, and correcting the identified input information by embedding contextual information based on professional terminology correction examples to dynamically adjust the auxiliary consultation process;

[0074] Step S4: Determine whether the examination report needs to be uploaded. If so, guide the patient to upload the examination report and wait until a valid examination report image is obtained. Perform optical character recognition on the image to extract key information from the examination report, convert the key information into text input information in text format, and then jump to step S5. If not, jump directly to step S6. The key information in the examination report includes the report title, patient information, examination items, result description, doctor's advice, examination date, doctor's name, and report number.

[0075] Step S5: Create a template for structured examination report information, combine it with the text input information corresponding to the examination report, form context information and transmit it to the large language model LLM, generate structured examination report information corresponding to the examination report, and send it to the patient for review and confirmation;

[0076] Step S6, scoring the corrections achieved in step S3, and dynamically adjusting the context information embedded in the update iterative algorithm to optimize the assisted consultation process;

[0077] Step S7: Integrate all corrected text information to generate a structured medical record; the corrected text information includes the corrected input information and the structured examination report information.

[0078] The LLM described in this embodiment refers to a large language model, that is, a large language model LLM or a large language model (LLM). The context information embedding is referred to as context embedding; the structured task example refers to a standardized dialogue template based on the JSON format, which is used to integrate fields such as patient name, age, symptom description, etc., and is used to train LLM to understand the logic of medical consultation. In the step S1, the front-line doctors of the urology department can be directly connected to the system to better collect and structure the urology consultation information. The step S2 is used to organize the collected urology information into professional context information embedding to provide support for subsequent question inquiries. Figure 3 As shown, step S3 supports the patient's voice input and corrects the recognized input information (including text, etc.) through the large language model LLM. Steps S4 and S5 are used to guide patients to upload pictures of examination reports when they need to describe historical examination results, rather than directly using text descriptions, to reduce errors in information transmission; in this process, optical character recognition (OCR) technology is used to identify key information in the uploaded examination reports. Figure 4 As shown, step S6 is used to introduce scoring of the correction process and call the update iterative algorithm for dynamic adjustment. Step S7 is used to integrate all text information to generate a professional structured medical record.

[0079] More specifically, step S1 in this embodiment preferably includes the following sub-steps:

[0080] Step S101, collecting urology consultation information through an online webpage;

[0081] Step S102: defining a medical inquiry structure corresponding to urology consultation information, wherein the medical inquiry structure includes first-level diagnostic aspects and second-level medical questions, wherein the medical questions are associated with sublists of corresponding diagnostic aspects, and a question list corresponding to the medical inquiry structure is generated;

[0082] Step S103: setting interaction constraints for question asking.

[0083] First, we define a method for structuring medical information to effectively collect and organize patient information. The medical information structure includes multiple first-level diagnostic aspects within the question list to ensure comprehensive coverage of possible symptoms and medical history. Under each first-level diagnostic aspect, multiple associated second-level questions can be set to form sublists corresponding to each diagnostic aspect.

[0084] The first-level diagnostic aspects of this embodiment include but are not limited to the following: hematuria, frequent urination, painful urination, urinary incontinence, dysuria, low back pain, fever, nausea and vomiting, syncope, whether the patient has been to the hospital, general condition and personal history.

[0085] In step S102, multiple next-level questions are predefined for each diagnostic aspect to provide a deeper understanding of the patient's condition. For example, for the diagnostic aspect of "hematuria," the following questions (partial) may be predefined: Have you recently observed blood in your urine? Did the hematuria develop suddenly? Are you experiencing other symptoms, such as pain or fever?

[0086] For the diagnosis of "frequent urination", the following questions (part of them) can be pre-set: How many times a day do you need to go to the toilet? Do you feel a strong urge to urinate? Do you get up frequently at night?

[0087] For the diagnostic aspect of "painful urination," the following questions (part of the questionnaire) can be pre-set: Do you experience pain or burning when urinating? How severe is the pain? Is it mild or severe? Is the pain constant or intermittent?

[0088] For the diagnosis of "fever," the following questions (partially) can be pre-set: Have you taken your temperature recently? If so, what was your highest temperature? Do you have other symptoms, such as chills or sweats? Are changes in your temperature associated with other symptoms?

[0089] For the "Personal History" diagnostic area, the following questions (partial) can be pre-set: Do you have a history of related medical conditions, such as kidney disease or urinary tract disease? Are you taking any medications? If so, please list the names. Is there a history of similar medical conditions in your family?

[0090] It should be noted that the various diagnostic aspects and their corresponding questions listed in this embodiment are for illustration and reference only. In actual application, various diagnostic aspects and their corresponding questions will be added or optimized as the question list is learned and improved.

[0091] In this embodiment, step S1 defines the inquiry information structure corresponding to the urology specialist inquiry information, and generates a question list corresponding to the inquiry information structure. In the subsequent questioning process, the question list defined in this step is used to ensure that the patient's relevant information is entered in plain language when asking questions, and the smoothness of the auxiliary consultation process is well guaranteed.

[0092] To ensure that only one question is asked at a time, this embodiment also sets interactive constraints for question asking in step S103. After asking a question to the patient, the system must wait for the patient's clear answer before continuing to the next question. The system performs a status check after each question to ensure that no further questions are asked if the patient has not responded.

[0093] Preferably, this embodiment also designs a jump relationship to ensure the smoothness of the consultation process. For example, if the patient answers "Have you been to the hospital?" with a "yes" answer, the question will jump to questions related to the hospital visit, such as: Which hospital did you go to? What tests did the doctor perform on you? Do you have relevant examination reports? Did you receive treatment? How effective was it?

[0094] Therefore, step S102 in this embodiment preferably includes the following sub-steps:

[0095] Step S1021, defining the first level of diagnostic aspects, including hematuria, frequent urination, painful urination, urinary incontinence, dysuria, low back pain, fever, nausea and vomiting, syncope, whether the patient has been to the hospital, general condition, and personal history;

[0096] Step S1022: For each diagnostic aspect, set a diagnostic question associated with the diagnostic aspect in the question list; the diagnostic questions associated with each diagnostic aspect can be pre-set to establish an association relationship, and related diagnostic questions can be added based on the scoring results during the subsequent doctor scoring process;

[0097] In step S1023, the questions of different diagnostic aspects are cross-correlated through the keywords in the medical questions; the keywords refer to pre-set guide words, such as being in the hospital, having a medical examination report, etc.; cross-correlation, also known as cross-diagnostic correlation, refers to the correlation between different diagnostic aspects and the same medical questions, thereby achieving indirect correlation.

[0098] In step S103 of this embodiment, the process of setting the interaction constraint conditions for the question inquiry preferably includes the following sub-steps:

[0099] Step S1031: When asking questions, first ask a single question related to the diagnosis in the order of the question list. After completing the inquiry of the current question, record the question, answer content and timestamp, mark the status of the current question as asked, and determine whether the received answer content triggers the pre-set keyword. If so, jump to step S1032; if not, jump to step S1033;

[0100] Step S1032: jump to another medical question associated with the keyword according to the association relationship of the keyword, and return to step S1031 to perform a single inquiry;

[0101] Step S1033: Jump to the next medical question in the order of the question list and ask.

[0102] like Figure 2 As shown, the specific implementation steps of user interaction will be described and explained through a specific auxiliary consultation process.

[0103] At the beginning of the consultation, the patient's basic information is collected, generally including age, gender, and medical history, to establish a trusting relationship. The conversation is then captured for each symptom, and the relevant diagnostic aspects and questions are asked one by one. For example, starting with the diagnostic aspect of "frequent urination," the question might be "How many times a day do you need to go to the bathroom?" After the patient answers, the question, answer, and timestamp are automatically recorded, and the next relevant question is prompted.

[0104] To prevent repeated questions, this embodiment designs a method for recording and managing question-answer pairs. This method ensures that each question can be answered effectively, avoids unnecessary repeated questions, and improves the efficiency of the consultation.

[0105] First, after each question is asked, the question content is immediately stored. The stored records include the specific content of the question, the answer content and the timestamp of the question, and the status of the current medical question is marked as asked, so as to facilitate subsequent data retrieval and analysis.

[0106] After each question is asked, the inquiry status of the relevant symptoms is updated. The status of each symptom is divided into "asked" and "not asked". Before asking a question, the system will check the question and answer record of the current symptom. If the answer to the relevant question already exists in the record, or the question is marked as "asked", the question will be skipped to avoid repeated asking. Through this status management, the present embodiment can effectively track the questions that have been asked and avoid repeated asking, thereby improving the efficiency of asking.

[0107] For example, after asking questions related to the diagnosis of "frequent urination", the status of the diagnosis will be marked as "frequent urination has been asked", and this mark will be stored in the system.

[0108] In this embodiment, when storing medical questions (i.e., storing sub-questions), the system will store them in the smallest units to ensure that each medical question is recorded separately, so that when jumping to related questions in different diagnostic aspects, the status of each medical question can be quickly obtained, which is convenient for subsequent queries.

[0109] For example, when asking about the diagnostic aspect of "frequent urination," if you ask "Do you have a fever?" and the patient's response is recorded, then that inquiry question is individually marked as "asked."

[0110] Therefore, when the system subsequently asks questions related to the diagnostic aspect "hematuria," it will check the question and answer records. The diagnostic aspect "hematuria" includes the question "Do you have a fever?" Since the question about fever has already been asked in the diagnostic aspect "frequent urination" and marked as "asked," the question "Do you have a fever?" will be skipped when asking about "hematuria."

[0111] The question list implemented in this embodiment defines a sublist for each symptom. Each sublist is associated with a main question in the diagnosis aspect for easier management.

[0112] For example, when a patient answers a question, the Q&A record is updated based on their response. If they say yes to the question "Do you have difficulty urinating?", follow-up questions related to "dysuria" will be prioritized. The order of subsequent questions can then be adjusted based on the patient's response to ensure complete information.

[0113] If the patient mentions other symptoms in the answer, this embodiment will check the question and answer record again to confirm whether the relevant questions of the symptom have been asked.

[0114] To ensure a reasonable order for questioning, this embodiment implements an ordered consultation by defining the order of the question list. A queue data structure is used to manage pending questions. At the beginning of the consultation, all relevant questions are organized into a queue according to a certain logical order. This prioritizes individual questions in sequence, and jumps to related questions when they are relevant. Each question has a fixed position in the queue to ensure a coherent and systematic inquiry process.

[0115] When a question is asked about a specific medical aspect, such as a symptom description, all questions related to that diagnostic aspect are added to the queue in sequence based on the relationships in the question list. These related questions are considered priority questions within the current medical context. During the actual questioning process, questions are removed from the queue one at a time to ensure that the patient can answer them step by step. After the patient has answered the current question, the next question is removed from the queue and asked.

[0116] If, when asking a certain medical question, it is necessary to further inquire about other diagnostic aspects related to the question, these related diagnostic aspects and their questions will be inserted into the queue to be asked, and will be placed after the current question and before the next question. For example: in the queue to be asked, the current question is: 1. Is there hematuria? The next question is: 2. Is urination painful? When asked "1. Is there hematuria?", if the patient answers yes, the question about hematuria will be inserted before "2. Is urination painful?" This insertion operation ensures that the patient can answer the current question without missing out on important information related to it. This is one of the significances of setting the interactive constraint conditions for question asking in step S103 of this embodiment.

[0117] In this way, this embodiment can dynamically adjust the order of questions to ensure that all important information can be captured in a timely manner during the consultation process. It should be noted that this embodiment will continue to ask questions that were not completed after each question is completed to ensure the completeness and accuracy of the consultation.

[0118] Therefore, in step S1032 of this embodiment, after returning to step S1031 to conduct a single inquiry, if the received answer does not trigger the pre-set keywords, the system will jump back to the diagnostic aspect of the previous question and continue to ask questions in sequence, so as to return to the questions that were not asked previously and continue to ask, thus ensuring the integrity and reliability of the auxiliary consultation process. For example, according to the previously mentioned dynamic adjustment of the inquiry sequence, after completing the inserted inquiry question about hematuria, if the pre-set keywords are no longer triggered, the system will jump back and continue to ask "2. Is urination painful?"

[0119] Ultimately, this embodiment, through the management of this queue structure, can complete the auxiliary consultation process efficiently and orderly, ensuring that every answer from the patient can be fully utilized to provide more accurate diagnosis and suggestions.

[0120] At the end of the consultation, a complete Q&A record is generated. After obtaining the patient's complete conversation record in subsequent steps S2 and S3, the spoken conversation information is corrected, including identifying and replacing non-standard terms.

[0121] This embodiment uses a large language model (LLM) to embed an appropriate number of spoken descriptions and correction example datasets within its context. The correction example dataset refers to a dataset containing correction examples for specialized terminology, referred to as correction examples. These correction examples include common colloquial expressions and their corresponding specialized terms, helping the LLM identify appropriate replacement vocabulary and expressions. This is primarily used when processing patients' spoken descriptions.

[0122] This embodiment refers to context-embedded information when processing the patient's spoken description. For example, the colloquial expression "blood in urine for two months" corresponds to the professional term "hematuria"; the professional term for "the entire urination process" is "full process"; the professional term for "there is blood in the urine, so it is visible to the naked eye" is "full process gross hematuria"; and the professional term for "the pain is a burning sensation" is "burning sensation."

[0123] When processing quantifiers, this embodiment makes appropriate adjustments based on the context. For example, when a patient describes "three or four years" or "I've been there five or six times," the maximum number is used, expressed as "four years" or "six times." For descriptions of longer periods of time, such as "more than ten years," they are converted to "more than ten years" to conform to professional expression standards.

[0124] This embodiment integrates an appropriate number of corresponding examples of spoken descriptions and professional terms into the large language model (LLM) when embedding the context. These professional term correction examples are pre-set and continuously learned to include not only common spoken expressions but also relevant professional terms, which can effectively help the large language model (LLM) identify appropriate alternative vocabulary and expressions. In this way, the ability to understand patient descriptions can be improved, and colloquial expressions can be effectively corrected to meet medical professional standards.

[0125] Specifically, step S2 in this embodiment includes the following sub-steps:

[0126] Step S201: Collecting conversation record samples of urology consultation information and classifying the conversation record samples according to different symptoms, genders, and age groups;

[0127] Step S202: Analyze the conversation record sample using the Large Language Model (LLM) to extract information related to the urology consultation, including the patient's name, age, gender, chief complaint, current medical history, past medical history, personal history, and marital and reproductive history.

[0128] In step S203, after the information extraction is complete, the extracted information is integrated according to a predefined JSON structure to generate a structured task example, and the structured task example is associated with the classification of the conversation record example. The structured task example refers to an example based on the predefined JSON structure and filled with the extracted information related to the conversation record.

[0129] This embodiment preferably extracts relevant medical record column information from the conversation information and integrates it into a complete format. To this end, this embodiment pre-embeds an appropriate amount of conversation record samples and corresponding medical records that have been carefully modified and annotated by specialists in the large language model LLM as context information. During the context embedding process, about 500 conversation record samples are selected by default, covering common medical record information and various symptom descriptions. These conversation record samples have been reviewed and annotated by specialists to ensure their accuracy and professionalism, and serve as the data source for step S2. The embedded conversation records include information on patients of different ages, genders, and symptoms to ensure that the model can adapt to diverse clinical scenarios.

[0130] During embedding, step S2 of this embodiment first categorizes the conversation record samples, grouping them by disease, gender, and age group. Secondly, the system incorporates multi-layered contextual information during the embedding process to enhance the model's understanding of complex conversations. For example, for a conversation about a specific disease, this embodiment embeds not only the chief complaint and current medical history, but also the doctor's questions and the patient's detailed responses.

[0131] During the information extraction process, this embodiment analyzes the conversation logs to identify and extract information related to the medical record. The extracted relevant information includes the patient's name, age, gender, chief complaint, current medical history, past medical history, personal history, and marital and reproductive history. After the extraction is completed, the electronic medical record is generated according to the predefined JSON structure to ensure that each field is accurately filled. For example, the generated JSON format structured task sample is as follows:

[0132] {

[0133] "Name": "Zhang San",

[0134] "Age": 30,

[0135] "Gender": "Male",

[0136] "Main complaint": "frequent urination",

[0137] "Current medical history": "Frequent urination and urgency have occurred in the past week.",

[0138] "Patient History": "No history of major illness.",

[0139] "Personal History": "No smoking or drinking habits.",

[0140] "Marriage and childbearing history": "Married, with one child."

[0141] }.

[0142] Step S3 in this embodiment includes the following sub-steps:

[0143] Step S301: respond to the patient's access request and sequentially inquire and collect the patient's basic information, including the patient's name, gender, and age;

[0144] Step S302: Inquire about the patient's chief complaint using preset guidance information, receive and record the patient's inputted chief complaint information in real time. If the inputted chief complaint information is textual input information, the procedure directly jumps to step S303; if the inputted chief complaint information is voice input information, the procedure calls the voice recognition module for recognition, obtains the spoken content corresponding to the voice input information, and then jumps to step S303;

[0145] Step S303: Correcting the spoken content corresponding to the text input information and / or voice input information using pre-set professional term correction examples;

[0146] Step S304: Output the corrected information for the patient to review and confirm;

[0147] Step S305: After the patient has reviewed and confirmed the output information, questions are asked according to the set interaction constraints to dynamically adjust the auxiliary consultation process.

[0148] Step S3 of this embodiment is used to respond to the patient's access request, and to identify and professionally correct the patient's input information, especially including professional correction of voice input information based on professional terminology correction examples.

[0149] In this embodiment, the patient's conversation record is analyzed in step S3 to identify colloquial expressions and non-standard terms. Each colloquial expression is marked and its specific location is recorded.

[0150] Specifically, if Figure 3As shown, the implementation steps of this embodiment for identifying and correcting colloquial expressions and non-standard terms are as follows: first, import a complete medical consultation conversation record; second, embed professional term correction examples in a contextual manner to correct colloquial expressions, that is, perform contextual understanding, and use the large language model LLM to understand the conversation record in context, analyze the patient's intentions and emotions, and judge which expressions may not be professional or accurate based on the context. This process preferably uses context samples as a reference; then, identify colloquial expressions. After understanding the context, the large language model LLM will identify the colloquial expressions in the conversation, and by analyzing the grammatical structure and vocabulary usage, mark the expressions and their locations that do not meet medical standards; then, generate comparison options. For each identified colloquial expression, the large language model LLM generates multiple possible professional term replacement options. These options are based on the professional knowledge and language patterns learned by the model during training, and are intended to provide diverse alternatives; finally, evaluate applicability. The large language model LLM will then evaluate the applicability of each alternative option, considering factors including contextual information, the patient's specific situation, and the frequency of use of medical professional terms, and make a selection by analyzing the relevance and applicability of each option in a specific situation. In this process, after correcting the colloquial expression, it is also preferred to determine whether the user is a patient. If so, it is directly displayed in the conversation page after correction; if not, each colloquial correction result is checked, and scored from three perspectives: language fluency, relevance, and professionalism. The correction examples are sorted according to the scoring formula, and the top five correction examples with the highest scores are regularly selected for similarity judgment to determine whether they are lower than the preset similarity threshold. If so, they are added to the existing correction example data set and the professional term correction example is updated; if not, the process ends.

[0151] For example, when a patient describes "hematuria for two months," the Large Language Model (LLM) might generate the following alternative terms: "hematuria," "gross hematuria," "hematuria symptoms," etc. Or if a patient says, "I feel like I'm holding my urine," the Large Language Model (LLM) might generate alternative terms: "urgent urination," "urgent feeling to urinate," "urgent need to urinate," etc.

[0152] At this time, it is preferred to use the scoring formula Score= w 1×Fluency+ w 2×Relevance+ w 3×Professionalism implements scoring for correction of input information, where Score represents the score for correction of spoken content; w 1. w 2 and w 3 represents the pre-set weight coefficients of language fluency, relevance and professionalism, w 1+ w2+ w 3=1 to ensure the relative influence balance in scoring; Fluency represents language fluency, Relevance represents relevance, and Professionalism represents professionalism. The specific values ​​of language fluency, relevance, and professionalism are determined according to the scores of urologists. In actual application, w 1. w 2 and w The value of 3 can be set based on actual needs. The default values ​​are 0.4, 0.3, and 0.3, respectively. This emphasizes the naturalness and understandability of expression, ensures that the options are closely related to the symptoms described by the patient, and ensures that the terminology used complies with medical standards. After obtaining the score, the alternative expression with the highest score is selected as the example for professional term correction. Based on patient feedback and doctor ratings, the contextual information embedding is dynamically adjusted to ensure the timeliness and accuracy of the information.

[0153] Finally, in step S3, the Large Language Model (LLM) generates professional correction suggestions. These suggestions are directly applied to the patient's conversation record to automatically replace irregular expressions.

[0154] The system corresponding to the urology consultation method described in this embodiment preferably provides services in the form of a Web display, and is divided into a patient side and a doctor side.

[0155] Patients access the consultation platform through a browser and enter the patient interface. The system first displays a welcome screen, prompting the patient to enter basic information. The system then asks the patient's name, gender, and age.

[0156] At this point, the system first displays a prompt: "Please enter your name." The patient enters their name in the input box and clicks "Send." Next, the system displays a prompt: "Please enter your gender (male or female). The patient enters "male" or "female" in the input box and clicks "Send." The system then displays a prompt: "Please enter your age." The patient enters their age in the input box and clicks "Send" again. After completing the basic information entry, the system stores it in the patient information collection.

[0157] The system then asks the patient about their chief complaint. A prompt appears: "Please describe your current symptoms in detail, including their duration, severity, and any relevant information you consider important." The patient then enters their chief complaint in the input box, and the system receives and records the patient's input in real time.

[0158] Based on the patient's open-ended responses, this embodiment can intelligently generate dialogue statements by combining professional information. For example, if a patient mentions "abdominal pain," the system might generate: "Please describe the location and nature of the abdominal pain. Is it continuous or intermittent?" After the patient completes the description of the main complaint and clicks the "Send" button, the system will organize all collected information and prepare it for subsequent processing.

[0159] This embodiment will convert the generated content into speech and broadcast it through the system so that the patient can confirm the accuracy of the information.

[0160] The system checks the type of content entered by the patient. If the patient entered a text message, the system proceeds directly to the next step, jumping to step S303. If the patient entered a voice message, the system invokes the voice recognition service. After the patient enters the voice message, the system sends the voice content to the voice recognition service for real-time transcription, converting the voice into text. The system receives the text content returned by the voice recognition service and records it.

[0161] Next, in step S303, the recognized text is corrected and optimized for professional purposes using pre-set professional terminology correction examples. These pre-set professional terminology correction examples refer to pre-set correction examples between everyday language and professional terminology. A correction model can be pre-trained to analyze the recognition results, ensure the accuracy and professionalism of the information, and make necessary adjustments.

[0162] The corrected content is then output to the conversational interface for the patient to review. Simultaneously, the system uses text-to-speech (TTS) technology to convert the generated content into speech, which is then played back through the system so that the patient can hear the corrected information. The patient continues to input relevant information based on the system's output. The system receives and records the patient's input in real time, and then recognizes and corrects it.

[0163] Furthermore, this embodiment also includes the step of determining the type of training samples:

[0164] Step A: taking the first type of conversation segments and their corresponding annotated medical records as first type training samples;

[0165] Step B: After receiving the patient's input information each time, the system first verifies the validity of the input information.

[0166] During the verification process, the system determines the relevance of the patient's response based on pre-set criteria. Specifically, it uses a pre-set knowledge base to determine whether the patient's response is irrelevant to the question. If the system detects that the patient's response is invalid or seriously incorrect, it will continue to guide the patient, generating targeted guidance questions based on pre-set questions in the knowledge base to help the patient more accurately express their symptoms or needs. This process is repeated until the patient provides a valid and relevant response.

[0167] Once the system confirms the patient's response is valid, it will further determine whether the patient is required to upload examination reports. If the patient is asked during the consultation process whether they have been to the hospital before and the patient confirms that they have had relevant examinations, the system will ask the patient whether they can upload these examination reports.

[0168] If the patient indicates that they have relevant examination reports, the system will guide the patient to upload the relevant examination reports on the page; the system prompts the patient: "Please upload the examination report related to your symptoms. You can take a photo and upload it." If the patient fails to upload or cannot complete the upload, the system will ask the patient whether they can describe the relevant examination results in text; if the patient can describe in text, the system will record the text description information provided by the patient. If the patient indicates that he cannot provide a text description, the system will record it as "examination records exist, but the examination results are lost. If the patient is visiting the doctor for the first time, there is no need to upload the examination report.

[0169] During this time, this embodiment will continue to guide the patient to ensure that the patient has uploaded all relevant examination reports. The system will then further check whether the reports uploaded by the patient meet the requirements. This process will continue until all reports uploaded by the patient are relevant to the current issue and have been uploaded.

[0170] Next, the system uses optical character recognition (OCR) technology to identify the characters in the patient's uploaded medical report. Specifically, the system passes the uploaded medical report image to the OCR service for text extraction. OCR technology analyzes the text within the image, recognizes it, and converts it into editable text.

[0171] After completing character recognition, the system passes the recognized text content to the correction model for error correction. Furthermore, this embodiment will analyze the OCR recognition results to identify possible spelling errors, grammatical errors and improper use of professional terms.

[0172] In addition, for key examination indicators, the system will automatically extract relevant fields and conduct secondary confirmation with the patient on these key data to ensure the accuracy of the information.

[0173] Therefore, step S4 in this embodiment includes the following sub-steps:

[0174] Step S401: Determine the spoken content corresponding to the voice input information. If the spoken content is not relevant to the medical question, return to the default guidance information and ask again until the spoken content relevant to the medical question is obtained.

[0175] Step S402: retrieve the answers in the auxiliary medical consultation process to determine whether the patient has been treated before. If so, jump to step S403; if not, jump directly to step S6;

[0176] Step S403: Inquire whether the patient has relevant examinations and is able to upload examination reports. If so, guide and wait for the patient to upload the examination report; if not, jump to step S404;

[0177] Step S404: When there are relevant examinations but the examination report cannot be uploaded, the patient is asked whether to enter the relevant examination results by description. If so, the examination results are entered through the text input module or the voice recognition module, and the entered content is stored; if not, it is recorded that the examination record exists but the examination results are lost.

[0178] Next, this embodiment integrates the OCR-recognized and error-corrected examination report information in step S5. This information will serve as supplementary examination content in the medical record. Predefined JSON format constraints are used to constrain the format of the content generated by the large model. A structured medical record (i.e., structured examination report information) is generated based on the OCR-recognized and error-corrected information. This allows the OCR-recognized information to be organized into supplementary examination content, ensuring the accuracy of each piece of information.

[0179] Specifically, step S5 of this embodiment is used to generate structured inspection report information corresponding to the inspection report. Step S5 preferably includes the following sub-steps:

[0180] Step S501, defining a report template in JSON format, the report template including fields such as report title, patient information, examination items, result description, doctor's advice, examination date, doctor's name and report number;

[0181] Step S502: Create a context example and define a context learning format. The content of the context example includes input text obtained through optical character recognition and populated output fields. The input text includes the patient's name, gender, age, result description, and doctor's advice. The output fields include the report title, patient information, and result description.

[0182] Step S503 , combining the context example with the input text obtained through optical character recognition to form context information;

[0183] In step S504, the context information is transmitted to the large language model (LLM), which performs content recognition and information extraction, and verifies the extracted information to ensure that key information is correctly filled in. After the filling is completed, the structured examination report information is sent to the patient for review and confirmation.

[0184] In order to structure the examination report information, this embodiment defines a report template in JSON format, which includes the following fields: report title, patient information, examination items, result description, doctor's advice, examination date, doctor's name, report number, etc.

[0185] In addition, this embodiment provides a function call mechanism based on a large language model (LLM). The implementation steps of the function call mechanism include:

[0186] First, in step S501 , a report template in JSON format is defined, describing in detail the purpose and format requirements of each field.

[0187] Then, in step S502, using Instant Context Learning (ICL) technology, multiple context examples are created to demonstrate how to extract and populate template content. During implementation, the context learning format is first defined. Each context example should contain a clear structure of input and output. The input is the OCR-recognized text, and the output is the populated template fields.

[0188] Next, create at least 5-10 context examples. A simple example of the context example is as follows:

[0189] Example 1: The input is "Patient Zhang San, male, 35 years old, urine routine test results show that the white blood cell count is high, and further examination may be needed." The output is `{"Report Title": "Urinalysis", "Patient Information": {"Name": "Zhang San", "Gender": "Male", "Age": 35}, "Result Description": "White blood cell count is high"}`.

[0190] Example 2: The input is "Examination item: Blood routine test, result: Red blood cell count is normal, doctor recommends continued observation." The output is `{"Examination item": "Blood routine test", "Result description": "Red blood cell count is normal", "Doctor's recommendation": "Continue observation"}`.

[0191] Example 3: The input is "Patient information: Li Si, female, 29 years old, examination item: liver function, the result shows elevated ALT, further evaluation is required." The output is `{"Patient information": {"Name": "Li Si", "Gender": "Female", "Age": 29}, "Examination item": "Liver function", "Result description": "ALT elevated", "Doctor's advice": "Further evaluation is required"}`.

[0192] Finally, in step S503, these context examples are combined with the text content recognized by OCR to form context information, using the following concatenation format: [

[0194] {"Input": "Patient Zhang San, male, 35 years old, urine routine test results show that the white blood cell count is high, and further examination may be needed.", "Output": {"Report Title": "Urinalysis", "Patient Information": {"Name": "Zhang San", "Gender": "Male", "Age": 35}, "Result Description": "White blood cell count is high"}},

[0195] {"Input": "Examination item: Blood routine, Result: Red blood cell count is normal, doctor recommends continued observation.", "Output": {"Examination item": "Blood routine", "Result description": "Red blood cell count is normal", "Doctor's recommendation": "Continue observation"}},

[0196] {"Input": "Patient information: Li Si, female, 29 years old. Examination item: Liver function. The result showed elevated ALT, requiring further evaluation.", "Output": {"Patient information": {"Name": "Li Si", "Gender": "Female", "Age": 29},"Examination item": "Liver function", "Result description": "Elevated ALT", "Doctor's advice": "Requires further evaluation"}}

[0197] ].

[0198] Next, step S504 of this embodiment passes the context information to the large language model (LLM) and calls a function to extract information. Specifically, the LLM analyzes the context information, identifies content that matches the report template fields, and automatically adjusts it to improve the accuracy of the extraction.

[0199] The Large Language Model (LLM) then parses the recognized content according to the template format and populates the corresponding fields. Furthermore, this embodiment verifies the extracted fields to ensure that all key information has been correctly populated. Once the information is populated, the structured examination report information is displayed to the patient for confirmation and review.

[0200] like Figure 4 As shown, this embodiment first imports a complete consultation conversation record, and the doctor updates and supplements new structured information, including patient information, examination items, result descriptions, doctor's recommendations, examination date, doctor's name, etc., and compares it with the existing structured task examples. Through the text similarity algorithm, the system will identify new, modified and deleted information to ensure the effective connection between the conversation record and the structured task example. For the identified modifications and supplementary information, it is first marked as "pending review" and the source and importance of each modification are recorded. Then, a large language model is preferably used to weight each modification based on relevance, frequency and influence. W Scoring and weighting W Sort the review and modification scores and determine the weights W Is it lower than the preset weight threshold? If so, mark it as to be observed; if not, add it to the existing context information.

[0201] Therefore, step S6 of this embodiment can be dynamically adjusted by calling the update iterative algorithm embedded with context information to optimize the auxiliary consultation process. Preferably, step S6 includes the following sub-steps:

[0202] Step S601, after each correction of the spoken content, the correction result is compared with the existing context, and when the correction result does not overlap with the existing context, the context information is updated;

[0203] Step S602: regularly analyzing the patient's input information and structured examination report information in the existing structured medical records to extract and integrate key information;

[0204] Step S603, by formula Score= w 1×Fluency+ w 2×Relevance+ w 3×Professionalism implements scoring for correction of input information, where Score represents the score for correction of spoken content; w 1. w 2 and w 3 represents the pre-set weight coefficients of language fluency, relevance and professionalism, w 1+ w 2+ w 3=1; Fluency refers to language fluency, Relevance refers to relevance, and Professionalism refers to professionalism;

[0205] Step S604: After obtaining the score, the alternative expression with the highest score is selected as the professional term correction example. Then, based on the patient feedback and the doctor's score, the context information embedding is dynamically adjusted to ensure the timeliness and accuracy of the information.

[0206] Step S605: Import the complete consultation dialogue record uploaded by the doctor and compare it with the existing structured task sample to obtain the newly added, modified and deleted information, mark the newly added and modified information as pending for review, and use the formula W = α ×Relevance+ β ×Frequency+ γ ×Impact assigns weight to newly added and modified information W ,in, α 、 β and γ Represents the preset weight coefficients of relevance, frequency and influence, α + β + γ =1; Frequency represents frequency, Impact represents influence;

[0207] Step S606: According to the weight W Sort the new and modified information to be reviewed and select the weight W The information with the highest or higher weight threshold is added to the existing context information to be added to the subsequent update iteration process; and other newly added and modified information is marked as pending. W The threshold can be set and adjusted according to actual conditions and needs.

[0208] In this embodiment, α 、 β and γ Represents the preset weight coefficients of relevance, frequency and influence respectively. In practical applications, α 、 β and γ The value of can be set according to the actual situation and needs. In step S605, the weight WThe default calculation formulas are 0.5, 0.3, and 0.2 respectively. Frequency is preferably determined by counting the number of occurrences of specific terms or expressions in the consultation conversation records uploaded by the doctor. In order to improve the accuracy of the evaluation, a time window is preferably set for the statistical optimization of Frequency, such as the frequency of occurrence in the past week or month. Impact is scored by the doctor based on the importance of specific terms or expressions to the patient's understanding and treatment effect. The score range can be set by default to 1 to 5, with 1 indicating a small impact and 5 indicating a large impact. By combining the three parameters of relevance, frequency, and impact, the weight of new and modified information can be more comprehensively evaluated, thereby optimizing the information review and update process.

[0209] In this embodiment, the doctor will review the correction examples of the historically accumulated input information from time to time. During the review process, the doctor can modify the score of the correction example, that is, by using the formula Score= w 1×Fluency+ w 2×Relevance+ w 3×Professionalism implements scoring of corrections to input information to achieve adjustments to the scores to improve the accuracy and reliability of the correction instances.

[0210] Once a doctor modifies a score, the corrected examples are reordered to ensure that the updated examples are displayed first. Furthermore, multiple doctors can participate in the scoring of similar examples, automatically calculating the average of their scores to reflect a more comprehensive range of professional opinions.

[0211] In this embodiment, the top five correction examples with the highest scores are selected and compared with the existing embedded context information in an orthogonal manner. The orthogonal comparison step includes: calculating the similarity between the new correction example and the existing context information. The similarity calculation can be performed using methods such as cosine similarity or Jaccard similarity. The similarity calculation formula is as follows: Similarity = | A ∪ B ∣∣ A ∩ B ∣, A and B Represent the new correction instance and the existing context information respectively. If the calculated similarity is lower than the set similarity threshold, it means that the information content is sufficiently orthogonal, that is, there is no duplicate information. Then the existing embedding context will be updated and the new correction example will be added to the context information, that is, added to the existing correction example dataset.

[0212] Step S7 of this embodiment is used to integrate all corrected text information to generate a structured medical record; the corrected text information includes the corrected input information and the structured examination report information. The structured medical record also uses the JSON format, and one example format is:

[0213] The patient completed bladder examination (date: xxxx-xx-xx, hospital: xxxx hospital): multiple lesions were seen in the bladder, the largest of which was 4 cm in diameter.

[0214] The patient completed color Doppler ultrasound of the urinary system (date: xxxx-xx-xx, hospital: xxxx Hospital): results.

[0215] Finally, the generated structured medical records are verified, including: checking whether the format complies with the JSON format and confirming that the information is accurate.

[0216] The verified structured examination report information is stored in the patient's electronic medical record under the "Auxiliary Examination" column. This embodiment preferably invokes an update algorithm after the structured examination report information is generated to enter the iterative update phase. For a complete consultation conversation record, the specialist will export the conversation record and perform detailed verification and corrections. The doctor's feedback and modifications will be used to update the existing urology specialist structured information and constraints.

[0217] In summary, first, this embodiment collects and structures urology specialist consultation information, and integrates the structured and organized urology specialist consultation information through context information embedding to obtain structured task examples, so as to provide a better professional data foundation for the auxiliary consultation process by organizing the professional knowledge of urology specialists. The integration of professional information is achieved through context information embedding without the need for model training. Then, in response to the patient's access request, the patient's input information is recognized, and based on the professional terminology correction example, the recognized input information is corrected through context information embedding to dynamically adjust the auxiliary consultation process. When the examination report needs to be uploaded, the key information in the examination report is extracted through optical character recognition to generate structured examination report information, thereby providing an open auxiliary consultation process for urology specialists, capable of professional organization and correction for urology specialists, and supporting the integration of voice input and examination reports. Next, the corrections implemented above are scored, and the update iterative algorithm of context information embedding is called for dynamic adjustment to optimize the auxiliary consultation process. Finally, all corrected text information is integrated to generate a structured medical record.

[0218] Therefore, this embodiment can target the special application scenario of urology auxiliary consultation, and implement an open auxiliary consultation technical solution for urology based on LLM context embedding assistance, without the need for model training, thereby effectively reducing resource consumption and deployment difficulty, and providing a basis for rapid iteration; and it can also support the integration of voice input and examination reports, can organize and correct specialized content for urology, and can dynamically adjust by calling the update iterative algorithm of context information embedding, thereby providing better auxiliary consultation technical solutions and technical support for urology.

[0219] This embodiment further provides a urology specialist consultation device based on LLM context embedding assistance, which adopts the above-mentioned urology specialist consultation method based on LLM context embedding assistance and includes:

[0220] Information collection module, used to collect and structure urology consultation information;

[0221] The context information embedding module is used to integrate the structured and organized urology consultation information through context information embedding to obtain structured task examples;

[0222] The speech recognition module supports the patient's voice input, recognizes the patient's input information, and corrects the recognized input information by embedding contextual information based on professional terminology correction examples to dynamically adjust the auxiliary consultation process;

[0223] The examination report upload module is used to determine whether the examination report needs to be uploaded. If so, it guides the patient to upload the examination report and waits until a valid examination report image is obtained. The optical character recognition is performed on the image to extract the key information in the examination report, and the key information is converted into text input information in text format, and then jumps to the structured examination report generation module; if not, it jumps directly to the information integration module;

[0224] A structured examination report generation module is used to create a template for structured examination report information, combine the text input information corresponding to the examination report, form context information and transmit it to the large language model (LLM), generate structured examination report information corresponding to the examination report, and send it to the patient for review and confirmation;

[0225] The information integration module is used to integrate all corrected text information and generate structured medical records.

[0226] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.

Claims

1. A urology consultation method based on LLM context embedding assistance, characterized by: The following steps are involved: Step S1, collecting and structuring urology consultation information; The step S1 includes the following sub-steps: Step S101, collecting urology consultation information through an online webpage; Step S102: defining a medical inquiry structure corresponding to urology consultation information, wherein the medical inquiry structure includes first-level diagnostic aspects and second-level medical questions, wherein the medical questions are associated with sublists of corresponding diagnostic aspects, and a question list corresponding to the medical inquiry structure is generated; Step S103: Set interactive constraints for question inquiries. After each inquiry is completed, the inquiry question, answer content, and timestamp are stored separately in the smallest unit, so that the status of each inquiry question can be quickly obtained when jumping to related inquiries. The step S102 includes the following sub-steps: Step S1021, defining the first level of diagnostic aspects, including hematuria, frequent urination, painful urination, urinary incontinence, dysuria, low back pain, fever, nausea and vomiting, syncope, whether the patient has been to the hospital, general condition, and personal history; Step S1022: in the question list, for each diagnostic aspect, set a diagnostic question associated with the diagnostic aspect, and establish an association relationship between the diagnostic question and the diagnostic aspect; Step S1023, cross-correlating the questions between different diagnostic aspects through keywords in the questions; the keywords refer to pre-set guide words; Cross-correlation refers to the indirect correlation between different diagnostic aspects through the same questions; In step S103, the process of setting the interaction constraint conditions for the question inquiry includes the following sub-steps: Step S1031: When asking questions, first ask a single question related to the diagnosis in the order of the question list. After completing the inquiry of the current question, record the question, answer content and timestamp, mark the status of the current question as asked, and determine whether the received answer content triggers the pre-set keyword. If so, jump to step S1032; if not, jump to step S1033; Step S1032: jump to another medical question associated with the keyword based on the association relationship of the keyword, add the associated medical question to the queue to be asked as a priority question, and return to step S1031 to perform a single inquiry; Step S1033: jump to the next question in the order of the question list; Step S2: integrating the structured and organized urology consultation information through contextual information embedding to obtain structured task examples, and associating the structured task examples with the classification of the conversation record examples; Structured task examples are based on a predefined JSON structure and are filled with extracted information related to conversation records. Conversation record examples are categorized by disease, gender, and age group. Step S3: responding to the patient's access request, identifying the patient's input information, and correcting the identified input information by embedding contextual information based on professional terminology correction examples to dynamically adjust the auxiliary consultation process; Step S4: Determine whether the examination report needs to be uploaded. If so, guide the patient to upload the examination report and wait until a valid examination report image is obtained. Perform optical character recognition on the image to extract key information from the examination report, convert the key information into text input information in text format, and then jump to step S5. If not, jump directly to step S6. Step S5: Create a template for structured examination report information, combine it with the text input information corresponding to the examination report, form context information and transmit it to the large language model LLM, generate structured examination report information corresponding to the examination report, and send it to the patient for review and confirmation; The step S5 includes the following sub-steps: Step S501, defining a report template in JSON format, the report template including fields such as report title, patient information, examination items, result description, doctor's advice, examination date, doctor's name and report number; Step S502: Create a context example and define a context learning format. The content of the context example includes input text obtained through optical character recognition and populated output fields. The input text includes the patient's name, gender, age, result description, and doctor's advice. The output fields include the report title, patient information, and result description. Step S503 , combining the context example with the input text obtained through optical character recognition to form context information; Step S504: The context information is transmitted to the large language model (LLM), which performs content recognition and information extraction. The extracted information is then verified to ensure that key information is correctly filled in. After the filling is completed, the structured examination report information is sent to the patient for review and confirmation. Step S6: Score the corrections achieved in step S3 and dynamically adjust the context-based information embedding update iterative algorithm to optimize the assisted consultation process; The step S6 includes the following sub-steps: Step S601, after each correction of the spoken content, the correction result is compared with the existing context, and when the correction result does not overlap with the existing context, the context information is updated; Step S602: regularly analyzing the patient's input information and structured examination report information in the existing structured medical records to extract and integrate key information; Step S603, by formula Score= w 1×Fluency+ w 2×Relevance+ w 3×Professionalism implements scoring for correction of input information, where Score represents the score for correction of spoken content. w 1+ w 2+ w 3=1; Step S604: After obtaining the score, select the alternative expression with the highest score as the professional term correction example; Step S605: Import the complete consultation dialogue record uploaded by the doctor and compare it with the existing structured task sample to obtain the newly added, modified and deleted information, mark the newly added and modified information as pending for review, and use the formula W = α ×Relevance'+ β ×Frequency+ γ ×Impact assigns weight to newly added and modified information W ,in, α + β + γ =1; Step S606: According to the weight W Sort the new and modified information to be reviewed and select the weight W The information with the highest or higher weight threshold is added to the existing context information to be included in the subsequent update iteration process; and other newly added and modified information is marked as pending. Step S7: Integrate all corrected text information to generate a structured medical record; the corrected text information includes the corrected input information and the structured examination report information.

2. The urology specialist consultation method based on LLM context embedding assistance according to claim 1 is characterized in that: The step S2 includes the following sub-steps: Step S201: Collecting conversation record samples of urology consultation information and classifying the conversation record samples according to different symptoms, genders, and age groups; Step S202: Analyze the conversation record sample using the Large Language Model (LLM) to extract information related to the urology consultation, including the patient's name, age, gender, chief complaint, current medical history, past medical history, personal history, and marital and reproductive history. Step S203 , after the information extraction is completed, the extracted information is integrated according to a predefined JSON structure to generate a structured task sample, and the structured task sample is associated with the classification of the conversation record sample.

3. The urology consultation method based on LLM context embedding assistance according to claim 1 is characterized in that: The step S3 includes the following sub-steps: Step S301: respond to the patient's access request and sequentially inquire and collect the patient's basic information, including the patient's name, gender, and age; Step S302: Inquire about the patient's chief complaint using preset guidance information, receive and record the patient's inputted chief complaint information in real time. If the inputted chief complaint information is textual input information, the procedure directly jumps to step S303; if the inputted chief complaint information is voice input information, the procedure calls the voice recognition module for recognition, obtains the spoken content corresponding to the voice input information, and then jumps to step S303; Step S303: Correcting the spoken content corresponding to the text input information and / or voice input information using pre-set professional term correction examples; Step S304: Output the corrected information for the patient to review and confirm; Step S305: After the patient has reviewed and confirmed the output information, questions are asked according to the set interaction constraints to dynamically adjust the auxiliary consultation process.

4. The urology consultation method based on LLM context embedding assistance according to claim 3 is characterized in that: The step S4 includes the following sub-steps: Step S401: Determine the spoken content corresponding to the voice input information. If the spoken content is not relevant to the medical question, return to the default guidance information and ask again until the spoken content relevant to the medical question is obtained. Step S402: retrieve the answers in the auxiliary medical consultation process to determine whether the patient has been treated before. If so, jump to step S403; if not, jump directly to step S6; Step S403: Inquire whether the patient has relevant examinations and is able to upload examination reports. If so, guide and wait for the patient to upload the examination report; if not, jump to step S404; Step S404: When there are relevant examinations but the examination report cannot be uploaded, the patient is asked whether to enter the relevant examination results by description. If so, the examination results are entered through the text input module or the voice recognition module, and the entered content is stored; if not, it is recorded that the examination record exists but the examination results are lost.

5. A urology consultation device based on LLM context embedding assistance, characterized in that: The urology specialist consultation method based on LLM context embedding assistance according to any one of claims 1 to 4 is adopted, and includes: Information collection module, used to collect and structure urology consultation information; The context information embedding module is used to integrate the structured and organized urology consultation information through context information embedding to obtain structured task examples; The speech recognition module supports the patient's voice input, recognizes the patient's input information, and corrects the recognized input information by embedding contextual information based on professional terminology correction examples to dynamically adjust the auxiliary consultation process; The examination report upload module is used to determine whether the examination report needs to be uploaded. If so, it guides the patient to upload the examination report and waits until a valid examination report image is obtained. The optical character recognition is performed on the image to extract the key information in the examination report, and the key information is converted into text input information in text format, and then jumps to the structured examination report generation module; if not, it jumps directly to the information integration module; A structured examination report generation module is used to create a template for structured examination report information, combine the text input information corresponding to the examination report, form context information and transmit it to the large language model (LLM), generate structured examination report information corresponding to the examination report, and send it to the patient for review and confirmation; The information integration module is used to integrate all corrected text information and generate structured medical records.

Citation Information

Patent Citations

  • Inquiry method and device and electronic equipment

    CN110941696A

  • Household intelligent inquiry system based on multifunctional household health care equipment

    CN113066575A

  • Method and device for generating medical record in real time

    CN116913450A

  • Medical inquiry diagnosis system based on intelligent voice interaction

    CN117438070A

  • Large model question and answer method and device based on domain knowledge

    CN117609477A