Urinary interrogation method and device based on LLM context embedding assistance

By adopting LLM-based context embedding technology in the urology specialist consultation system, the existing system cannot achieve open consultation, high cost of model training and cannot meet professional needs, and efficient integration of voice input and examination reports is achieved, which improves the professionalism and efficiency of consultation.

CN119811647AActive Publication Date: 2025-04-11TIANJIN UNIV
View PDF 18 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing online consultation system cannot achieve open consultation, the model training cost is high, it cannot meet the professional needs of urology, lacks voice input and output functions, cannot effectively integrate and interpret examination reports, and does not support professional correction of oral content.

Method used

The auxiliary consultation method based on LLM context embedding is adopted to collect and structure the urology specialist consultation information, integrate information using context information embedding, support voice input, carry out professional term correction, integrate examination reports, and extract key information through optical character recognition.

Benefits of technology

It realizes an open auxiliary consultation process, reduces the resource consumption and deployment difficulty of model training, supports the integration of voice input and examination reports, and can organize and correct professional content for urology specialists, improving the accuracy and work efficiency of consultation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119811647A_ABST
    Figure CN119811647A_ABST
Patent Text Reader

Abstract

The invention provides a urinary specialist interrogation method and device based on LLM context embedding assistance. The method comprises the steps that S1, urinary specialist interrogation information is collected and subjected to structured arrangement; s2, performing integration through context information embedding, and obtaining a structured task sample; s3, the recognized input information is corrected through context information embedding; s4, judging whether the examination report needs to be uploaded or not, if yes, guiding and waiting for the patient to upload the examination report, converting the examination report into text input information, and skipping to the step S5; if not, skipping to step S6; s5, generating structured inspection report information corresponding to the inspection report; s6, scoring the realized correction, and optimizing the auxiliary inquiry process; and S7, integrating the corrected character information, and generating a structured medical record. According to the method, resource consumption and deployment difficulty can be effectively reduced, and a basis is provided for rapid iteration; and the integration of voice input and inspection reports can be supported, and professional arrangement and correction are realized.
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 using 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 process of using technical means such as artificial intelligence and big data analysis to help doctors and patients collect information in advance, which is used to provide a data basis for the actual consultation process, so as to better provide technical support for the diagnosis and treatment of diseases. At present, the traditional consultation method faces many challenges, especially in terms of obtaining patient information and collating data. There are no assisted consultation technical 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 the urology specialist diagnosis; fifth, the lack of voice input and output functions makes the interaction experience between the patient and the online consultation system unfriendly, reducing the convenience of use; sixth, it does not support professional correction of spoken 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, which aims to realize an open auxiliary consultation process for urology specialists, and does not require model training to reduce resource consumption and deployment difficulty, and can support the integration of voice input and examination reports, and organize and correct specialized content for urology specialists, providing urology specialists with better auxiliary consultation technical solutions and technical support. On this basis, a urology specialist consultation device using the urology specialist consultation method based on LLM context embedding assistance is further provided.

[0006] In this regard, the present invention provides a urology specialist consultation method based on LLM context embedding assistance, comprising the following steps: Step S1, collecting and structuring urology consultation information; Step S2, integrating the structured and organized urology consultation information through context information embedding to obtain structured task samples; Step S3, responding to the patient's access request, identifying the patient's input information, and correcting the identified input information through context information embedding based on the professional terminology correction example, so as to dynamically adjust the auxiliary consultation process; Step S4, determine whether it is necessary to upload the examination report. If yes, guide and wait for the patient to upload the examination report until a valid examination report image is obtained, perform optical character recognition on the image to extract key information in the examination report, convert the key information into text input information in text format, and then jump to step S5; if no, directly jump to step S6; Step S5, creating a template of structured examination report information, combining the text input information corresponding to the examination report, forming context information and transmitting it to the large language model LLM, generating structured examination report information corresponding to the examination report, and sending it to the patient for review and confirmation; Step S6, scoring the corrections achieved in step S3, and calling the update iterative algorithm embedded with context information to make dynamic adjustments to optimize the auxiliary consultation process; Step S7, integrating all corrected text information to generate a structured medical record; the corrected text information includes the corrected input information and structured examination report information.

[0007] A further improvement of the present invention is that step S1 includes the following sub-steps: Step S101, collecting urology consultation information through an online web page; Step S102, defining a consultation information structure corresponding to the urology consultation information, wherein the consultation information structure includes a first-level diagnosis aspect and a second-level consultation question, wherein the consultation question is associated with a sub-list of the corresponding diagnosis aspect, and a question list corresponding to the consultation information structure is generated; Step S103, setting interaction constraints for question asking.

[0008] A further improvement of the present invention is that 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, back pain, fever, nausea and vomiting, syncope, whether to visit a hospital, general condition and personal history; Step S1022, in the question list, for each diagnostic aspect, setting a diagnostic question associated with the diagnostic aspect; Step S1023, cross-correlating the questions between different diagnostic aspects through the keywords in the questions; In step S103, the process of setting the interactive constraint conditions of 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 preset keyword, if yes, jump to step S1032; if not, jump to step S1033; Step S1032, according to the association relationship of the keyword, jump to another medical question associated with the keyword, and return to step S1031 to perform a single inquiry; Step S1033, jump to the next medical question in the order of the question list.

[0009] 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 the process jumps back to the diagnosis aspect of the previous question and continues to ask questions in sequence.

[0010] A further improvement of the present invention is that 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, analyzing the conversation record sample by using the large language model LLM to extract information related to the urology consultation information, 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 the predefined JSON structure to generate a structured task sample, and the structured task sample is associated with the classification of the conversation record sample.

[0011] A further improvement of the present invention is that step S3 includes the following sub-steps: Step S301, responding to the patient's access request, sequentially inquiring and collecting the patient's basic information, including the patient's name, gender and age; Step S302, inquiring the patient's chief complaint through preset guidance information, receiving and recording the patient's inputted chief complaint information in real time, if the inputted chief complaint information is text input information, directly jumping to step S303; if the inputted chief complaint information is voice input information, calling the voice recognition module for recognition, after obtaining the spoken content corresponding to the voice input information, jumping to step S303; Step S303, correcting the spoken content corresponding to the text input information and / or the voice input information by using pre-set professional term correction examples; Step S304, outputting the corrected information for the patient to review and confirm; Step S305, after the patient has viewed and confirmed the output information, questions are asked according to the set interaction constraints to dynamically adjust the auxiliary consultation process.

[0012] A further improvement of the present invention is that step S4 includes the following sub-steps: Step S401, judging the spoken content corresponding to the voice input information, if the spoken content is irrelevant to the medical question, returning to ask again through the preset guidance information until the spoken content related to the medical question is obtained; Step S402, retrieve the answer content in the auxiliary consultation process to determine whether the patient has been treated before, if yes, jump to step S403; if not, directly jump to step S6; Step S403, asking the patient whether he has relevant examinations and whether he can upload the examination report. If so, guiding and waiting for the patient to upload the examination report; if not, jumping to step S404; Step S404, when there are relevant examinations but the examination report cannot be uploaded, ask the patient whether to enter the relevant examination results by description. If so, enter the examination results through the text input module or the voice recognition module, and store the entered content; if not, record that the examination record exists but the examination result is lost.

[0013] A further improvement of the present invention is that 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, creating a context example and defining a context learning format, wherein the content of the context example includes input text obtained by optical character recognition and filled output fields, wherein the input text includes the patient's name, gender, age, result description and doctor's advice, and the output fields include a report title, patient information and result description; Step S503, combining the context example with the input text of the optical character recognition to form context information; Step S504, the context information is transmitted to the large language model LLM, content recognition and information extraction are performed through the large language model LLM, and the extracted information is verified to ensure the correct filling of key information. After the filling is completed, the structured examination report information is sent to the patient for review and confirmation.

[0014] A further improvement of the present invention is that step S6 includes the following sub-steps: Step S601, after correcting the spoken content each time, compare the correction result with the existing context, and when the correction result does not overlap with the content of the existing context, update the context information; Step S602, with respect to the existing structured medical records, regularly analyzing the patient's input information and structured examination report information to extract key information and integrate them; 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+ w3=1; Fluency means language fluency, Relevance means relevance, and Professionalism means professionalism; Step S604, after obtaining the score S, selecting the alternative expression with the highest score S as a professional term correction example; Step S605: import the complete consultation dialogue record uploaded by the doctor, compare it with the existing structured task sample, 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 new and modified information W ,in, α , β and γ Represent the preset weight coefficients of relevance, frequency and influence, respectively. α + β + γ =1; Frequency represents frequency, Impact represents influence; 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.

[0015] The present invention also provides a urology specialist consultation device based on LLM context embedding assistance, which adopts the urology specialist consultation method based on LLM context embedding assistance as described above, 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 samples; The speech recognition module is used to support the patient's speech input, recognize the patient's input information, and correct the recognized input information through context information embedding based on professional terminology correction examples to dynamically adjust the auxiliary consultation process; The examination report uploading module is used to determine whether the examination report needs to be uploaded. If yes, it guides and waits for the patient to upload the examination report until a valid examination report image is obtained, performs optical character recognition on the image to extract key information in the examination report, converts the key information into text input information in text format, and then jumps to the structured examination report generation module; if no, it directly jumps 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.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: first, urology consultation information is collected and structured, and the structured urology consultation information is integrated through context information embedding to obtain structured task samples, so as to provide a better professional data basis for the auxiliary consultation process through the organization of professional knowledge of urology, and the integration of professional information is realized 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 identified, and based on the professional terminology correction example, the identified 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, being able to perform professional organization and correction for urology, and supporting the integration of voice input and examination reports; then, the corrections implemented previously 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.

[0017] Therefore, the present invention can implement an open auxiliary consultation technical solution for urology based on the LLM context embedding assistance for the special application scenario of auxiliary consultation for urology, 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, organize and correct specialized content for urology, and dynamically adjust by calling the update iterative algorithm embedded with context information, 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

[0018] Figure 1 It is a schematic diagram of the working process of an embodiment of the present invention; Figure 2 is a schematic diagram of an auxiliary consultation process according to an embodiment of the present invention; Figure 3 It is a schematic diagram of a flow chart of correcting colloquial expressions and non-standard terms in one embodiment of the present invention; Figure 4 It is a flowchart of calling an update iterative algorithm for dynamic adjustment according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In the description of the present invention, if it involves a description of orientation, for example, the orientation or position relationship indicated by "upper", "lower", "front", "back", "left", "right", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. If a certain technical feature is referred to as "set", "fixed", "connected", or "installed" on another technical feature, it can be directly set, fixed, or connected to the other technical feature, or it can be indirectly set, fixed, connected, or installed on the other technical feature.

[0020] In the description of the present invention, if "several" is involved, it means more than one; if "multiple" is involved, it means more than two; if "greater than", "less than", or "exceed" is involved, it should be understood as not including the number itself; if "above", "below", or "within" is involved, it should be understood as including the number itself. If "first", "second", etc. are involved, they should be understood as being used only to distinguish the names of the same or similar technical features, and should not be understood as implying / indicating the relative importance of the technical features, the number of the technical features, or the order of the technical features.

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

[0022] like Figure 1 As shown, this embodiment provides a urology specialist consultation method based on LLM context embedding assistance, including the following steps: Step S1, collecting and structuring urology consultation information; Step S2, integrating the structured and organized urology consultation information through context information embedding to obtain structured task samples; Step S3, responding to the patient's access request, identifying the patient's input information, and correcting the identified input information through context information embedding based on the professional terminology correction example, so as to dynamically adjust the auxiliary consultation process; Step S4, determine whether it is necessary to upload the examination report. If so, guide and wait for the patient to upload the examination report until a valid examination report image is obtained, perform optical character recognition on the image to extract key information in 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 report title, patient information, examination items, result description, doctor's advice, examination date, doctor's name and report number, etc.; Step S5, creating a template of structured examination report information, combining the text input information corresponding to the examination report, forming context information and transmitting it to the large language model LLM, generating structured examination report information corresponding to the examination report, and sending it to the patient for review and confirmation; Step S6, scoring the corrections achieved in step S3, and calling the update iterative algorithm embedded with context information to make dynamic adjustments to optimize the auxiliary consultation process; Step S7, integrating all corrected text information to generate a structured medical record; the corrected text information includes the corrected input information and structured examination report information.

[0023] 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 sample 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 urologist 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 the patient to upload pictures of the examination report when the patient is required to describe the historical examination results, instead of directly using text descriptions, so as to reduce errors in information transmission; in this process, the key information in the uploaded examination report is identified through optical character recognition (OCR) technology. 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.

[0024] More specifically, step S1 in this embodiment preferably includes the following sub-steps: Step S101, collecting urology consultation information through an online web page; Step S102, defining a consultation information structure corresponding to the urology consultation information, wherein the consultation information structure includes a first-level diagnosis aspect and a second-level consultation question, wherein the consultation question is associated with a sub-list of the corresponding diagnosis aspect, and a question list corresponding to the consultation information structure is generated; Step S103, setting interaction constraints for question asking.

[0025] First, a method for structuring the medical consultation information is defined so that the medical consultation information of the patient can be effectively collected and organized. In the question list of the medical consultation information structure, multiple first-level diagnostic aspects are included to ensure comprehensive coverage of possible symptoms and medical history; under each of the first-level diagnostic aspects, multiple associated second-level medical consultation questions can be set to form a sublist corresponding to each diagnostic aspect.

[0026] The first level of diagnosis of this embodiment includes but is 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.

[0027] In step S102, for each diagnostic aspect, multiple lower-level questions are predefined to gain a deeper understanding of the patient's condition. For example, for the diagnostic aspect of "hematuria", the following questions (parts) may be predefined: Have you recently observed blood in your urine? Did the hematuria occur suddenly? Do you have other symptoms, such as pain or fever? For the diagnosis of "frequent urination", the following questions (parts) 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? For the diagnostic aspect of "painful urination", the following questions (partial) can be pre-set: Do you feel pain or burning when urinating? How severe is the pain? Is it mild or severe? Is the pain constant or does it occur intermittently? For the diagnosis of "fever", the following questions (parts) can be pre-set: Have you taken your temperature recently? If so, what was the highest temperature? Do you have other symptoms, such as chills or sweats? Are your temperature changes related to other symptoms? For the diagnostic aspect of "personal history", the following questions (parts) can be pre-set: Do you have a history of related diseases? Such as kidney disease, urinary system diseases, etc. Are you taking any medications? If yes, please list the names of the medications. Is there a history of similar diseases in your family? It should be noted that the various diagnostic aspects and their corresponding questions listed in this embodiment are only for illustration and reference. In actual application, various diagnostic aspects and their corresponding questions will be added or optimized as the question list is learned and improved.

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

[0029] 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 ask the next question. The system will perform a status check after each question to ensure that the patient will not continue to ask questions without answering.

[0030] Preferably, this embodiment also designs a jump relationship to ensure the smoothness of the consultation process. For example, if the patient answers the question "Have you been to the hospital?" and answers "Yes", the question will jump to questions related to hospital visits, such as: Which hospital did you go to? What examinations did the doctor give you? Is there a relevant examination report? Did you receive treatment? How was the effect? Therefore, step S102 in this embodiment preferably includes the following sub-steps: Step S1021, defining the first level of diagnostic aspects, including hematuria, frequent urination, painful urination, urinary incontinence, dysuria, back pain, fever, nausea and vomiting, syncope, whether to visit a 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; the diagnostic questions associated with each diagnostic aspect can be established by presetting, and the associated diagnostic questions can be added according to the scoring results in the subsequent doctor scoring process; Step S1023, cross-correlating the medical questions between different diagnostic aspects through the keywords in the medical questions; the keywords refer to pre-set guide words, such as being in the hospital, having a test 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.

[0031] In step S103 of this embodiment, the process of setting the interactive constraint conditions of the question inquiry preferably 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 preset keyword, if yes, jump to step S1032; if not, jump to step S1033; Step S1032, according to the association relationship of the keyword, jump to another medical question associated with the keyword, and return to step S1031 to perform a single inquiry; Step S1033, jump to the next medical question in the order of the question list.

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

[0033] When starting the consultation, the patient's basic information is first asked. Generally, basic information includes age, gender, and medical history, in order to establish a trusting relationship. Then, for each symptom, the conversation content is collected, and the relevant diagnostic aspects and questions are asked one by one. For example, starting with the diagnosis of "frequent urination", the question is asked, "How many times a day do you need to go to the toilet?" After the patient answers, the question, answer content, and timestamp are automatically recorded, and the next related question is prompted.

[0034] 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, and also avoids unnecessary repeated questions, thereby improving the efficiency of the consultation.

[0035] 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 question is marked as asked to facilitate subsequent data retrieval and analysis.

[0036] 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, so as to improve the efficiency of inquiry.

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

[0038] 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, which is convenient for jumping between related inquiries in different diagnostic aspects and for quickly obtaining the status of each medical question to facilitate subsequent queries.

[0039] For example, when asking about the diagnostic aspect of "frequent urination," if you ask "Do you have a fever?" and record the patient's response, then mark that inquiry question separately as "asked."

[0040] Therefore, when the question related to the diagnostic aspect "hematuria" is subsequently asked, the system will check the question and answer record, and the diagnostic aspect "hematuria" includes the question "Do you have a fever?". Since the question about fever has been asked in the previous diagnostic aspect "frequent urination" and marked as "asked", the question "Do you have a fever?" will be skipped when asking "hematuria".

[0041] 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 ease of management.

[0042] For example, when a patient answers a question, the Q&A record will be updated based on the patient's answer. If the patient says yes when answering "Do you have difficulty urinating?", follow-up questions related to "difficulty urinating" will be asked first. Then, the order of subsequent questions can be adjusted based on the patient's answer to ensure the completeness of the information.

[0043] 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.

[0044] To ensure the rationality of the order of questions, this embodiment implements orderly consultation by defining the order of the question list. A queue data structure is used to manage the questions to be asked. At the beginning of the consultation, all related questions are sorted into a queue to be asked in a certain logical order, that is, individual questions are asked in sequence in priority, and jumps are made when there is a connection. Each question has a fixed position in the queue to be asked to ensure the coherence and systematic conduct of the inquiry.

[0045] When asking about a specific aspect of the diagnosis, such as a symptom description, all questions related to the diagnosis aspect are added to the queue to be asked in sequence according to the associations in the question list. These related questions will be considered priority questions in the current context of the inquiry. During the actual inquiry process, one inquiry question is taken out of the queue to be asked each time to ensure that the patient can answer step by step. After the patient has answered the current inquiry question, the next question is taken out of the queue to be asked.

[0046] If when asking a certain medical question, it is necessary to further inquire about other diagnostic aspects related to the medical 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, and the next question is: 2. Is urination painful; when asking "1. Is there hematuria", if the patient answers that there is hematuria, 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 important information related to it. Regarding this point, it is one of the meanings of setting the interactive constraint conditions for question asking in step S103 of this embodiment.

[0047] In this way, the present embodiment can dynamically adjust the order of the inquiries to ensure that all important information can be captured in time during the consultation process. It should be noted that after each inquiry is completed, the present embodiment will continue to ask the questions that were not completed just now to ensure the completeness and accuracy of the consultation.

[0048] Therefore, in step S1032 of this embodiment, after returning to step S1031 for a single inquiry, if the received answer content does not trigger the preset keyword, then 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 before and continue to ask, to ensure the integrity and reliability of the auxiliary consultation process. For example: according to the previous dynamic adjustment of the order of inquiries, after completing the inserted inquiry question about hematuria, if the preset keyword is no longer triggered, then jump back and continue to ask "2. Is urination painful?"

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

[0050] At the end of the consultation, a complete question and answer 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.

[0051] This embodiment uses a large language model LLM to embed an appropriate number of spoken descriptions and correction example data sets in its context. The correction example data set refers to a data set that includes professional terminology correction examples, which are referred to as correction examples. These professional terminology correction examples include common colloquial expressions and their corresponding professional terms, which help the large language model LLM identify appropriate alternative vocabulary and expressions, and are mainly used when processing the patient's colloquial description.

[0052] This embodiment refers to the information embedded in the context when processing the patient's colloquial description. For example, the colloquial expression "hematuria for 2 months" corresponds to the professional term "hematuria"; the professional term "whole process of urination" corresponds to the professional term "whole process"; the professional term "blood in urine, so it is visible to the naked eye" corresponds to the professional term "whole process of naked eye hematuria"; and the professional term "burning sensation" corresponds to the professional term "burning sensation".

[0053] When processing quantifiers, this embodiment will make appropriate adjustments according to 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 directly used, expressed as "four years" or "six times". For descriptions of longer periods of time, such as "more than ten years", it is converted to "more than ten years" to meet the standards of professional expression.

[0054] 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, and include not only common spoken expressions, but also relevant professional terms, which can well help the large language model LLM identify appropriate alternative vocabulary and expressions. In this way, the ability to understand the patient's description can be improved, and the spoken expressions can be effectively corrected to meet medical professional standards.

[0055] Specifically, step S2 in this embodiment 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, analyzing the conversation record sample by using the large language model LLM to extract information related to the urology consultation information, 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 the predefined JSON structure to generate a structured task sample, and the structured task sample is associated with the classification of the conversation record sample. The structured task sample refers to a sample based on the predefined JSON structure and filled with the extracted information related to the conversation record.

[0056] 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 finely 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 patient information of different ages, genders, and symptoms to ensure that the model can adapt to a variety of clinical scenarios.

[0057] When embedding step S2 in this embodiment, the conversation record samples are first classified and grouped according to different symptoms, genders and age groups. Secondly, during the embedding process, the system uses multi-level context information to improve the model's ability to understand complex conversations. For example, for a conversation about a specific disease, this embodiment not only embeds the chief complaint and current medical history, but also includes the doctor's questions and the patient's detailed answers.

[0058] During the information extraction process, this embodiment analyzes the conversation records, identifies and extracts information related to the medical record, including 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 will be 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: { "Name": "Zhang San", "Age": 30, "Gender": "Male", "Main complaint": "Frequent urination", "Current medical history": "Frequent urination and urgency have occurred in the past week.", "Patient History": "No history of major illness.", "Personal History": "No smoking or drinking habits.", "Marriage and childbearing history": "Married, with one child." }.

[0059] Step S3 in this embodiment includes the following sub-steps: Step S301, responding to the patient's access request, sequentially inquiring and collecting the patient's basic information, including the patient's name, gender and age; Step S302, inquiring the patient's chief complaint through preset guidance information, receiving and recording the patient's inputted chief complaint information in real time, if the inputted chief complaint information is text input information, directly jumping to step S303; if the inputted chief complaint information is voice input information, calling the voice recognition module for recognition, after obtaining the spoken content corresponding to the voice input information, jumping to step S303; Step S303, correcting the spoken content corresponding to the text input information and / or the voice input information by using pre-set professional term correction examples; Step S304, outputting the corrected information for the patient to review and confirm; Step S305, after the patient has viewed and confirmed the output information, questions are asked according to the set interaction constraints to dynamically adjust the auxiliary consultation process.

[0060] Step S3 described in 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.

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

[0062] Specifically, if Figure 3As shown, the implementation steps of the present embodiment for the recognition and correction of colloquial expressions and non-standard terms are as follows: first, a complete consultation dialogue record is imported; second, a professional term correction example is embedded in a contextual manner to correct the colloquial expression, that is, context understanding is performed, and the conversation record is contextually understood by the large language model LLM, the patient's intentions and emotions are analyzed, and which expressions may not be professional or accurate are judged by the context. This process preferably uses context samples as a reference; then, the colloquial expression is identified. 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, the expressions and their positions that do not meet the medical standards are marked; then, comparison options are generated. 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 the training process, and are intended to provide a variety of alternatives; finally, the applicability is evaluated. The large language model LLM will then evaluate the applicability of each alternative option, considering factors including context information, the patient's specific situation, and the frequency of use of medical professional terms. The selection is made 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 below 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.

[0063] For example, when a patient describes "hematuria for 2 months", the large language model LLM may generate the following professional terminology alternatives: "hematuria", "gross hematuria", "hematuria symptoms", etc. Or if a patient says "I am a little bit holding back urine", the large language model LLM may generate alternative options including: "urinary urgency", "urgent feeling of urination", "urgent urge to urinate", etc.

[0064] 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 refers to language fluency, Relevance refers to relevance, and Professionalism refers to 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 according to actual conditions and needs. The default values ​​are 0.4, 0.3, and 0.3, respectively, to emphasize the naturalness and understandability of the expression, and to ensure that the options are closely related to the symptoms described by the patient and that the terms used meet medical standards. After obtaining the score, the alternative expression with the highest score is selected as the professional term correction example, and then the context information embedding is dynamically adjusted according to the patient feedback and the doctor's score to ensure the timeliness and accuracy of the information.

[0065] Finally, in step S3, professional correction suggestions can be generated through the large language model LLM. These suggestions will be directly applied to the patient's conversation records to automatically replace irregular expressions.

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

[0067] The patient accesses the consultation platform through a browser and enters the patient interface. The system first displays a welcome interface and prompts the patient to enter basic information. The system asks the patient's name, gender, and age in turn.

[0068] At this time, the system first displays a prompt: "Please enter your name." The patient enters the name in the input box and clicks the "Send" button. 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 the "Send" button. Subsequently, the system displays a prompt: "Please enter your age." The patient enters the age in the input box and clicks the "Send" button again. After completing the input of basic information, the system stores this information in the patient information set.

[0069] The system then begins to ask the patient about their chief complaint. The system displays a guide message: "Please describe your current symptoms in detail, including the duration and severity of the symptoms, and any relevant information you think is important." The patient freely enters the chief complaint information in the input box, and the system receives and records the patient's input in real time.

[0070] Based on the patient's open-ended answers, this embodiment can intelligently generate dialogue sentences in combination with professional information. For example, if the patient mentions "abdominal pain", the system may 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, click the "Send" button, and the system will organize all the collected information and prepare it for subsequent processing.

[0071] 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.

[0072] The system detects the type of content input by the patient. If the patient inputs a text message, the system directly proceeds to the next step, that is, jumps to step S303; if the patient inputs a voice message, the voice recognition service is called. After the patient enters the voice message, the system sends the voice content to the voice recognition service for real-time transcription and converts the voice into text. The system receives the text content returned by the voice recognition service and records it.

[0073] Next, in step S303, the recognized text content is professionally corrected and optimized through pre-set professional terminology correction examples. The pre-set professional terminology correction examples refer to pre-set correction examples between daily language and professional terminology. The correction model can be pre-trained, and the correction model will analyze the recognition results, ensure the accuracy and professionalism of the information, and make necessary adjustments.

[0074] The corrected content will then be output to the conversation interface for the patient to view. At the same time, the system calls text-to-speech (TTS) technology to convert the generated content into speech and play it through the system so that the patient can hear the corrected information. The patient continues to input relevant information based on the content output by the system. The system receives and records the patient's input information in real time, and recognizes and corrects it.

[0075] Furthermore, this embodiment also includes the step of determining the type of training samples: Step A, taking the first type of conversation fragments and their corresponding annotated medical records as the first type of training samples; Step B: After receiving the patient's input information each time, the system first verifies the validity of the input information.

[0076] During the verification process, the system determines whether the patient's answer is relevant to the question based on the preset standards, that is, combined with the preset knowledge base, to determine whether the patient's answer is irrelevant to the question. If the system detects that the patient's answer is invalid or seriously wrong, the system will continue to guide the patient; the system calls the preset questions in the knowledge base to generate targeted guiding questions to help patients express their symptoms or needs more accurately. This process will be repeated until the patient provides a valid and relevant answer.

[0077] Once the system confirms that the patient's answer is valid, it will further determine whether the patient needs to upload the examination report. If the patient is asked during the consultation process whether he has been to the doctor and the patient confirms that he has had relevant examinations, the system will ask the patient whether he can upload these examination reports.

[0078] If the patient indicates that there are 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 he 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 describe in text, 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.

[0079] During this period, the present embodiment will continue to guide the patient to ensure that the patient uploads all relevant examination reports. Then, the system will further check whether the reports uploaded by the patient meet the requirements. This process will continue until all reports uploaded by the patient are related to this issue and have been uploaded.

[0080] Next, for the examination report uploaded by the patient, the system first uses optical character recognition (OCR) technology to perform character recognition. That is, the system passes the uploaded examination report image to the OCR service for text extraction. OCR technology analyzes the text in the image, recognizes it, and converts it into an editable text format.

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

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

[0083] Therefore, step S4 in this embodiment includes the following sub-steps: Step S401, judging the spoken content corresponding to the voice input information, if the spoken content is irrelevant to the medical question, returning to ask again through the preset guidance information until the spoken content related to the medical question is obtained; Step S402, retrieve the answer content in the auxiliary consultation process to determine whether the patient has been treated before, if yes, jump to step S403; if not, directly jump to step S6; Step S403, asking the patient whether he has relevant examinations and whether he can upload the examination report. If so, guiding and waiting for the patient to upload the examination report; if not, jumping to step S404; Step S404, when there are relevant examinations but the examination report cannot be uploaded, ask the patient whether to enter the relevant examination results by description. If so, enter the examination results through the text input module or the voice recognition module, and store the entered content; if not, record that the examination record exists but the examination result is lost.

[0084] Next, this embodiment will integrate the inspection report information after OCR recognition and error correction through step S5. This information will be used as auxiliary inspection content in the medical record. Use the predefined JSON format constraints to limit the content format generated by the large model. Generate a structured medical record (i.e., structured inspection report information) based on the OCR and error-corrected information so that the information recognized by OCR can be organized into auxiliary inspection content to ensure that each piece of information is accurate.

[0085] 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: 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, creating a context example and defining a context learning format, wherein the content of the context example includes input text obtained by optical character recognition and filled output fields, wherein the input text includes the patient's name, gender, age, result description and doctor's advice, and the output fields include a report title, patient information and result description; Step S503, combining the context example with the input text of the optical character recognition to form context information; Step S504, the context information is transmitted to the large language model LLM, content recognition and information extraction are performed through the large language model LLM, and the extracted information is verified to ensure the correct filling of key information. After the filling is completed, the structured examination report information is sent to the patient for review and confirmation.

[0086] 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.

[0087] 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: First, in step S501, a report template in JSON format is defined to describe in detail the purpose and format requirements of each field.

[0088] Then, in step S502, the instant context learning (ICL) technology is used to create multiple context examples to show how to extract and fill in the template content. In the implementation process, the context learning format is first defined, and each context example should contain a clear structure of input and output. The input is the text recognized by OCR, and the output is the filled template field.

[0089] Next, create at least 5-10 context examples. A simple example of the context example is as follows: 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"}`.

[0090] Example 2: The input is "Examination items: blood routine test, result: red blood cell count is normal, doctor recommends continued observation." The output is `{"Examination items": "blood routine test", "Result description": "red blood cell count is normal", "Doctor's recommendation": "continue observation"}`.

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

[0092] 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: [ {"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"}}, {"Input": "Examination items: Blood routine, Result: Red blood cell count is normal, doctor recommends continued observation.", "Output": {"Examination items": "Blood routine", "Result description": "Red blood cell count is normal", "Doctor's recommendation": "Continue observation"}}, {"Input": "Patient information: Li Si, female, 29 years old, examination items: liver function, the result shows that ALT is elevated, further evaluation is required.", "Output": {"Patient information": {"Name": "Li Si", "Gender": "Female", "Age": 29},"Examination items": "Liver function", "Result description": "ALT is elevated", "Doctor's advice": "Further evaluation is required"}} ].

[0093] 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 large language model LLM analyzes the context information, identifies the content matching the report template field, and automatically adjusts it to improve the accuracy of extraction.

[0094] Subsequently, the large language model LLM parses the recognition content according to the template format and fills in the corresponding fields. Furthermore, the present embodiment also verifies the extracted fields to ensure that all key information has been correctly filled in; after the information is filled in, the structured examination report information is displayed to the patient for confirmation and review.

[0095] 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 examples. 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, the large language model is preferably used to weight each modification in terms of relevance, frequency, and influence. W Score and assign weights W Sort the review and modification scores and determine the weights WIs it lower than the preset weight threshold? If so, mark it as to be observed; if not, add it to the existing context information.

[0096] 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: Step S601, after correcting the spoken content each time, compare the correction result with the existing context, and when the correction result does not overlap with the content of the existing context, update the context information; Step S602, with respect to the existing structured medical records, regularly analyzing the patient's input information and structured examination report information to extract key information and integrate them; 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 means language fluency, Relevance means relevance, and Professionalism means professionalism; Step S604, after obtaining the score, select the alternative expression with the highest score as the professional term correction example, and then dynamically adjust the context information embedding according to the patient feedback and the doctor's score to ensure the timeliness and accuracy of the information; Step S605: import the complete consultation dialogue record uploaded by the doctor, compare it with the existing structured task sample, 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 new and modified information W ,in, α , β and γ Represent the preset weight coefficients of relevance, frequency and influence, respectively. α + β + γ=1; Frequency represents frequency, Impact represents influence; 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. W The threshold can be set and adjusted according to actual conditions and needs.

[0097] In this embodiment, α , β and γ Represent 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 requirements. In step S605, the weight W The 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 doctors based on the importance of specific terms or expressions to patient understanding and treatment effectiveness. 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 review and update process of information.

[0098] 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, through 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.

[0099] Once a doctor modifies the score, the corrected instances will be re-sorted to ensure that the instances with updated scores are displayed first. At the same time, multiple doctors can participate in the scoring of similar instances, and the average score of each doctor for similar instances will be automatically calculated to reflect a more comprehensive professional opinion.

[0100] In this embodiment, the first five correction examples with the highest scores are preferably selected and orthogonalized compared with the existing embedded context information. The orthogonalized comparison step includes: calculating the similarity between the new correction instance 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 repeated 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.

[0101] 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 structured examination report information. The structured medical record also uses the JSON format, and one of the example formats is: The patient completed bladder examination (date: xxxx-xx-xx, hospital: xxxx hospital): multiple lesions were seen in the bladder, the largest of which was 4cm in diameter.

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

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

[0104] The verified structured examination report information is stored in the auxiliary examination column of the patient's electronic medical record. This embodiment preferably calls the update iteration algorithm to enter the iterative update phase after the structured examination report information is generated. For a complete consultation conversation record, the specialist will export the conversation record and perform detailed verification and correction. The doctor's feedback and modifications will be used to update the existing urology specialist structured information and constraints.

[0105] In summary, first, this embodiment collects and organizes urology consultation information in a structured manner, and integrates the structured and organized urology consultation information through context information embedding to obtain structured task samples, so as to provide a better professional data foundation for the auxiliary consultation process through the organization of 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 identified, and based on the professional terminology correction example, the identified input information is corrected through context information embedding to dynamically adjust the auxiliary consultation process, and when it is necessary to upload the examination report, 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, being able to perform professional organization and correction for urology, and supporting the integration of voice input and examination reports; then, the corrections implemented previously 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.

[0106] 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. Therefore, it can effectively reduce resource consumption and deployment difficulty, and provide a basis for rapid iteration; and it can also support the integration of voice input and examination reports, organize and correct specialized content for urology, and dynamically adjust by calling the update iterative algorithm embedded with context information, thereby providing better auxiliary consultation technical solutions and technical support for urology.

[0107] This embodiment also provides a urology specialist consultation device based on LLM context embedding assistance, which adopts the urology specialist consultation method based on LLM context embedding assistance as described above, 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 samples; The speech recognition module is used to support the patient's speech input, recognize the patient's input information, and correct the recognized input information through context information embedding based on professional terminology correction examples to dynamically adjust the auxiliary consultation process; The examination report uploading module is used to determine whether the examination report needs to be uploaded. If yes, it guides and waits for the patient to upload the examination report until a valid examination report image is obtained, performs optical character recognition on the image to extract key information in the examination report, converts the key information into text input information in text format, and then jumps to the structured examination report generation module; if no, it directly jumps 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.

[0108] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A urology consultation method based on LLM context embedding assistance, characterized in that: The following steps are involved: Step S1, collecting and structuring urology consultation information; Step S2, integrating the structured and organized urology consultation information through context information embedding to obtain structured task samples; Step S3, responding to the patient's access request, identifying the patient's input information, and correcting the identified input information through context information embedding based on the professional terminology correction example, so as to dynamically adjust the auxiliary consultation process; Step S4, determine whether it is necessary to upload the examination report. If yes, guide and wait for the patient to upload the examination report until a valid examination report image is obtained, perform optical character recognition on the image to extract key information in the examination report, convert the key information into text input information in text format, and then jump to step S5; if no, directly jump to step S6; Step S5, creating a template of structured examination report information, combining the text input information corresponding to the examination report, forming context information and transmitting it to the large language model LLM, generating structured examination report information corresponding to the examination report, and sending it to the patient for review and confirmation; Step S6, scoring the corrections achieved in step S3, and calling the update iterative algorithm embedded with context information to make dynamic adjustments to optimize the auxiliary consultation process; Step S7, integrating all corrected text information to generate a structured medical record; the corrected text information includes the corrected input information and structured examination report information.

2. The urology consultation method based on LLM context embedding assistance according to claim 1 is characterized in that: The step S1 comprises the following sub-steps: Step S101, collecting urology consultation information through an online web page; Step S102, defining a consultation information structure corresponding to the urology consultation information, wherein the consultation information structure includes a first-level diagnosis aspect and a second-level consultation question, wherein the consultation question is associated with a sub-list of the corresponding diagnosis aspect, and a question list corresponding to the consultation information structure is generated; Step S103, setting interaction constraints for question asking.

3. The urology consultation method based on LLM context embedding assistance according to claim 2 is characterized in that: 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, back pain, fever, nausea and vomiting, syncope, whether to visit a hospital, general condition and personal history; Step S1022, in the question list, for each diagnostic aspect, setting a diagnostic question associated with the diagnostic aspect; Step S1023, cross-correlating the questions between different diagnostic aspects through the keywords in the questions; In step S103, the process of setting the interactive constraint conditions of 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 preset keyword, if yes, jump to step S1032; if not, jump to step S1033; Step S1032, according to the association relationship of the keyword, jump to another medical question associated with the keyword, and return to step S1031 to perform a single inquiry; Step S1033, jump to the next medical question in the order of the question list.

4. The urology consultation method based on LLM context embedding assistance according to claim 3 is characterized in that: In step S1032, after returning to step S1031 to conduct a single inquiry, if the received answer content does not trigger the preset keywords, the process jumps back to the diagnosis aspect of the previous question and continues to ask questions in sequence.

5. The urology consultation method based on LLM context embedding assistance according to any one of claims 1 to 4, characterized in that: The step S2 comprises 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, analyzing the conversation record sample by using the large language model LLM to extract information related to the urology consultation information, 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 the predefined JSON structure to generate a structured task sample, and the structured task sample is associated with the classification of the conversation record sample.

6. The urology consultation method based on LLM context embedding assistance according to any one of claims 1 to 4, characterized in that: The step S3 comprises the following sub-steps: Step S301, responding to the patient's access request, sequentially inquiring and collecting the patient's basic information, including the patient's name, gender and age; Step S302, inquiring the patient's chief complaint through preset guidance information, receiving and recording the patient's inputted chief complaint information in real time, if the inputted chief complaint information is text input information, directly jumping to step S303; if the inputted chief complaint information is voice input information, calling the voice recognition module for recognition, after obtaining the spoken content corresponding to the voice input information, jumping to step S303; Step S303, correcting the spoken content corresponding to the text input information and / or the voice input information by using pre-set professional term correction examples; Step S304, outputting the corrected information for the patient to review and confirm; Step S305, after the patient has viewed and confirmed the output information, questions are asked according to the set interaction constraints to dynamically adjust the auxiliary consultation process.

7. The urology consultation method based on LLM context embedding assistance according to claim 6, characterized in that: The step S4 comprises the following sub-steps: Step S401, judging the spoken content corresponding to the voice input information, if the spoken content is irrelevant to the medical question, returning to ask again through the preset guidance information until the spoken content related to the medical question is obtained; Step S402, retrieve the answer content in the auxiliary consultation process to determine whether the patient has been treated before, if yes, jump to step S403; if not, directly jump to step S6; Step S403, asking the patient whether he has relevant examinations and whether he can upload the examination report. If so, guiding and waiting for the patient to upload the examination report; if not, jumping to step S404; Step S404, when there are relevant examinations but the examination report cannot be uploaded, ask the patient whether to enter the relevant examination results by description. If so, enter the examination results through the text input module or the voice recognition module, and store the entered content; if not, record that the examination record exists but the examination result is lost.

8. The urology consultation method based on LLM context embedding assistance according to any one of claims 1 to 4, characterized in that: The step S5 comprises 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, creating a context example and defining a context learning format, wherein the content of the context example includes input text obtained by optical character recognition and filled output fields, wherein the input text includes the patient's name, gender, age, result description and doctor's advice, and the output fields include a report title, patient information and result description; Step S503, combining the context example with the input text of the optical character recognition to form context information; Step S504, the context information is transmitted to the large language model LLM, content recognition and information extraction are performed through the large language model LLM, and the extracted information is verified to ensure the correct filling of key information. After the filling is completed, the structured examination report information is sent to the patient for review and confirmation.

9. The urology consultation method based on LLM context embedding assistance according to any one of claims 1 to 4, characterized in that: The step S6 comprises the following sub-steps: Step S601, after correcting the spoken content each time, compare the correction result with the existing context, and when the correction result does not overlap with the content of the existing context, update the context information; Step S602, with respect to the existing structured medical records, regularly analyzing the patient's input information and structured examination report information to extract key information and integrate them; 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 means language fluency, Relevance means relevance, and Professionalism means professionalism; Step S604, after obtaining the score S, selecting the alternative expression with the highest score S as a professional term correction example; Step S605: import the complete consultation dialogue record uploaded by the doctor, compare it with the existing structured task sample, 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 γ Represent the preset weight coefficients of relevance, frequency and influence, respectively. α + β + γ =1; Frequency represents frequency, Impact represents influence; 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.

10. A urology consultation device based on LLM context embedding assistance, characterized in that: The method for urology consultation based on LLM context embedding assistance as claimed in any one of claims 1 to 9 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 samples; The speech recognition module is used to support the patient's speech input, recognize the patient's input information, and correct the recognized input information through context information embedding based on professional terminology correction examples to dynamically adjust the auxiliary consultation process; The examination report uploading module is used to determine whether the examination report needs to be uploaded. If yes, it guides and waits for the patient to upload the examination report until a valid examination report image is obtained, performs optical character recognition on the image to extract key information in the examination report, converts the key information into text input information in text format, and then jumps to the structured examination report generation module; if no, it directly jumps 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

  • Error correction method and device for speech recognition

    CN115588429A

  • Intelligent hospital guide report generation method

    CN116386805A

  • Method and device for generating medical record in real time

    CN116913450A