Medical demand customized dialogue method and device, equipment and storage medium

Through intelligent processing and conflict detection of medical demand documents and conference recordings, an intelligent dialogue model is built, which solves the problem of understanding deviation in traditional medical demand analysis, and achieves more accurate demand understanding and higher user satisfaction.

CN120524955AActive Publication Date: 2025-08-22JIHUA LAB

Patent Information

Application Number
CN202511028104.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-08-22
Estimated Expiration
2045-07-25

AI Technical Summary

Technical Problem

In the analysis of traditional medical projects demands, there are problems such as many professional terms, large deviations in understanding, fragmented information, and language barriers that lead to incomplete and inaccurate requirements, which increases project costs and user dissatisfaction.

Method used

By obtaining product requirements documents of medical institutions for pre-processing, converting them into semantic vectors and storing them in vector knowledge database, combining the search and enhancement generation framework to build an intelligent dialogue model, collecting conference recording data in real time for conflict detection, updating the knowledge base, receiving user questions and generating accurate answers, and displaying a visual answer page.

Benefits of technology

It improves the completeness and accuracy of requirements understanding, helps users better understand project requirements, reduces rework and cost losses caused by understanding differences, and improves user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120524955A_ABST
    Figure CN120524955A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information processing, in particular to a medical demand customized dialogue method, device and equipment and a storage medium, a preprocessed document is converted into a semantic vector and stored in a vector knowledge database, and an intelligent dialogue model is constructed in combination with the vector knowledge database and a retrieval enhancement generation framework. Recording data of conference communication between a medical institution and a product entrusting party are collected in real time, conflict detection is performed on the recording data and the vector knowledge database, and semantic vectors in the vector knowledge database are updated according to a detection result, so that voice session demand supplementation is supported, the completeness and accuracy of demand understanding are improved, and the user experience is improved. The question information is input into the intelligent dialogue model, the answer result is output, and the answer result is sent to the user side, so that the user side generates and displays the visual answer page based on the answer result, accurate reply can be given to the related demand information of the question item of the user, the user is helped to better and more accurately understand the item demand, and the user satisfaction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a method, device, equipment and storage medium for customized dialogue based on medical needs. Background Art

[0002] In traditional medical project requirements analysis, product developers must manually review requirements documents and record the content of docking meetings to understand customer needs and create medical products that meet these requirements. However, in reality, due to the excessive number of medical technical terms involved, developers' understanding of product functions is inevitably biased. At the same time, the requirements learned in meetings are unsystematic and fragmented, leading to the risk that some are not taken seriously or even ignored, greatly increasing project costs. Language is also a major difficulty in the professional medical field. Some professional vocabulary is difficult to understand, which makes it difficult to effectively extract medical needs, reducing the completeness and accuracy of understanding of needs and increasing the losses caused by differences in understanding. Therefore, product developers currently need a large language model to accurately answer customized medical needs. Summary of the Invention

[0003] In order to overcome the shortcomings of the existing technology, the purpose of the present invention is to provide a customized medical needs dialogue method, device, equipment and storage medium that supports voice conversation demand supplementation, improves the completeness and accuracy of demand understanding, can give accurate responses to user questions about project-related demand information, helps users better and more accurately understand project requirements, and improves user satisfaction.

[0004] The first aspect of the present invention provides a customized dialogue method for medical needs, including: obtaining a product requirement document provided by a medical institution, preprocessing the product requirement document to obtain a preprocessed document; converting the preprocessed document into a semantic vector and storing it in a vector knowledge database, combining the vector knowledge database with a retrieval enhancement generation framework to construct an intelligent dialogue model; real-time collection of recorded data of conference communications between the medical institution and the product entrusting party, performing conflict detection on the recorded data and the vector knowledge database to obtain a detection result; updating the semantic vector in the vector knowledge database according to the detection result to synchronously update the knowledge base of the intelligent dialogue model, and receiving question information input by the user terminal; inputting the question information into the intelligent dialogue model, and outputting an answer result, and sending the answer result to the user terminal so that the user terminal generates and displays a visual answer page based on the answer result.

[0005] Optionally, in a first implementation method of the first aspect of the present invention, the product requirement document provided by the medical institution is obtained, and the product requirement document is preprocessed to obtain a preprocessed document, including: obtaining the product requirement document provided by the medical institution; extracting the text information of the target requirement document through the PyMuPDF tool library, and extracting the image information of the target requirement document through the PaddleOCR tool library; removing noise from the text information and the image information, the noise including headers, footers, watermarks, numbers and repeated content; performing paragraph segmentation on the text information and the image information from which the noise has been removed to obtain multiple document paragraphs; performing structured processing on the multiple document paragraphs through natural language processing technology to obtain a preprocessed document, and the structured processing includes requirement extraction, entity recognition, key point summary and content clustering.

[0006] Optionally, in a second implementation method of the first aspect of the present invention, the pre-processed document is converted into a semantic vector and stored in a vector knowledge database, and an intelligent dialogue model is constructed in combination with the vector knowledge database and a retrieval enhancement generation framework, including: identifying the language category of the pre-processed document; when the language category is Chinese, the BGE model is used to convert the pre-processed document into a first semantic vector; when the language category is English, the BioBERT model is used to convert the pre-processed document into a second semantic vector; the first semantic vector or the second semantic vector is stored in a vector knowledge database; the intelligent dialogue model is constructed using Yi-34B as a basic model and in combination with the vector knowledge database and the retrieval enhancement generation framework; and the system prompt is used to define the behavioral norms and language style of the intelligent dialogue model.

[0007] Optionally, in a third implementation of the first aspect of the present invention, the recorded data of the communication between the medical institution and the product entrusting party is collected in real time, and a conflict detection is performed on the recorded data and the vector knowledge database to obtain a detection result, including: collecting the recorded data of the communication between the medical institution and the product entrusting party in real time, and using the Whisper general speech recognition model to convert the recorded data into a transcribed text with a timestamp; segmenting the transcribed text into paragraphs to obtain multiple text paragraphs, and performing structured processing on the multiple text paragraphs through natural language processing technology to obtain a new demand fragment; converting the new demand fragment into a third semantic vector; searching the vector knowledge database for historical semantic vectors similar to the third semantic vector, and calculating the similarity score; if the When the similarity score is less than or equal to a preset threshold, it is marked as a normal demand. If the similarity score is greater than the preset threshold and the new demand segment has the same semantics as the historical demand segment, it is marked as a duplicate demand. If the similarity score is greater than the preset threshold and the new demand segment has opposite semantics to the historical demand segment, it is marked as a contradictory demand. The semantic logic is identified by a preset natural language processing model to determine whether the semantics of the new demand segment is the same or opposite to that of the historical demand segment. When the semantic logic of the new demand segment is consistent with that of the historical demand segment, the semantics are the same. When the semantic logic of the new demand segment is inconsistent with that of the historical demand segment, the semantics are opposite. The detection result is generated according to the marking information of the normal demand, the marking information of the duplicate demand or the marking information of the contradictory demand.

[0008] Optionally, in a fourth implementation method of the first aspect of the present invention, the semantic vector in the vector knowledge database is updated according to the detection result to synchronously update the knowledge base of the intelligent dialogue model, and receive question information input by the user end, including: when the detection result is a normal requirement, a first update instruction is generated; when the detection result is a contradictory requirement, manual review information is sent to the management end; the review feedback information sent by the management end is received; when the content of the review feedback letter is to adopt a new requirement fragment or to correct a new requirement fragment, a second update instruction is generated; the semantic vector in the vector knowledge database is updated according to the first update instruction or the second update instruction to synchronously update the knowledge base of the intelligent dialogue model; and the question information is received from the user end.

[0009] Optionally, in a fifth implementation of the first aspect of the present invention, the question information is input into the intelligent dialogue model, and an answer result is output, and the answer result is sent to the user terminal so that the user terminal generates and displays a visual answer page based on the answer result, including: using a session buffer memory to retain the original records of multiple rounds of dialogues between users and the intelligent dialogue model, obtaining dialogue context cache information, using a session summary buffer memory to compress historical dialogues that exceed the round limit into a structured semantic summary; using entity recognition slot filling technology to extract medical key entities in each question asked by the user as structured fields to form a dynamically updated dialogue status. state table, marking the information to be supplemented in the dialogue state table, so that the intelligent dialogue model actively generates a follow-up question request based on the mark; establishing a retrievable long-term memory chain according to the context cache information, the structured semantic summary and the dialogue state table, converting the long-term memory chain into a semantic vector and storing it in the vector knowledge database; inputting the question information into the intelligent dialogue model, so that the intelligent dialogue model searches the semantic vector in the vector knowledge database based on the question information and outputs an answer result, and sending the answer result to the user terminal, so that the user terminal generates and displays a visual answer page based on the answer result.

[0010] Optionally, in a sixth implementation method of the first aspect of the present invention, after inputting the question information into the intelligent dialogue model and outputting the answer result, and sending the answer result to the user terminal so that the user terminal generates and displays a visual answer page based on the answer result, it also includes: summarizing the complete dialogue record; encrypting the complete dialogue record to obtain dialogue encrypted record information; and uploading the dialogue encrypted record information to the blockchain.

[0011] The second aspect of the present invention provides a customized dialogue device for medical needs, including: an acquisition and processing module for acquiring product requirement documents provided by medical institutions, preprocessing the product requirement documents to obtain preprocessed documents; a storage and construction module for converting the preprocessed documents into semantic vectors and storing them in a vector knowledge database, and combining the vector knowledge database with a retrieval enhancement generation framework to construct an intelligent dialogue model; an acquisition and detection module for real-time acquisition of recorded data of conference communications between medical institutions and product entrusting parties, performing conflict detection on the recorded data and the vector knowledge database to obtain detection results; an update and reception module for updating the semantic vectors in the vector knowledge database according to the detection results, so as to synchronously update the knowledge base of the intelligent dialogue model and receive question information input by the user terminal; an input and sending module for inputting the question information into the intelligent dialogue model, outputting the answer result, and sending the answer result to the user terminal so that the user terminal generates and displays a visual answer page based on the answer result.

[0012] Optionally, in a first implementation method of the second aspect of the present invention, the acquisition and processing module includes: an acquisition unit for acquiring a product requirement document provided by a medical institution; an extraction unit for extracting text information of the target requirement document through the PyMuPDF tool library, and extracting image information of the target requirement document through the PaddleOCR tool library; a removal unit for removing noise from the text information and the image information, wherein the noise includes headers, footers, watermarks, numbers and repeated content; a segmentation unit for performing paragraph segmentation on the noise-removed text information and the image information to obtain multiple document paragraphs; a structuring unit for performing structured processing on the multiple document paragraphs through natural language processing technology to obtain a preprocessed document, wherein the structuring processing includes requirement extraction, entity recognition, key point summary and content clustering.

[0013] Optionally, in a second implementation of the second aspect of the present invention, the storage construction module includes: an identification unit for identifying the language category of the preprocessed document; a first conversion unit for converting the preprocessed document into a first semantic vector using a BGE model when the language category is Chinese, and converting the preprocessed document into a second semantic vector using a BioBERT model when the language category is English; a storage unit for storing the first semantic vector or the second semantic vector in a vector knowledge database; a construction unit for using Yi-34B as a basic model and combining the vector knowledge database and the retrieval enhancement generation framework to construct an intelligent dialogue model; a definition unit for using a system prompt to define the behavioral norms and language style of the intelligent dialogue model.

[0014] Optionally, in a third implementation of the second aspect of the present invention, the acquisition and detection module includes: an acquisition and conversion unit, which is used to collect the recorded data of the communication between the medical institution and the product entrusting party in real time, and use the Whisper general speech recognition model to convert the recorded data into a transcribed text with a timestamp; a segmentation and structuring unit, which is used to segment the transcribed text into paragraphs to obtain multiple text paragraphs, and perform structured processing on the multiple text paragraphs through natural language processing technology to obtain new demand fragments; a second conversion unit, which is used to convert the new demand fragment into a third semantic vector; a retrieval and calculation unit, which is used to search the vector knowledge database for historical semantic vectors similar to the third semantic vector and calculate the similarity score; a marking unit, which is used to identify the new demand fragment if the similarity score is less than or equal to a preset threshold, it is marked as a normal demand; if the similarity score is greater than the preset threshold and the new demand segment has the same semantics as the historical demand segment, it is marked as a repeated demand; if the similarity score is greater than the preset threshold and the new demand segment has the opposite semantics to the historical demand segment, it is marked as a contradictory demand, wherein the semantic logic is identified by a preset natural language processing model to determine whether the semantics of the new demand segment is the same or opposite to that of the historical demand segment. When the semantic logic of the new demand segment is consistent with that of the historical demand segment, the semantics are the same; when the semantic logic of the new demand segment is inconsistent with that of the historical demand segment, the semantics are opposite; a first generating unit is used to generate a detection result according to the marking information of the normal demand, the marking information of the repeated demand or the marking information of the contradictory demand.

[0015] Optionally, in a fourth implementation of the second aspect of the present invention, the update receiving module includes: a second generating unit, used to generate a first update instruction when the detection result is a normal requirement; a sending unit, used to send manual review information to the management end when the detection result is a contradictory requirement; a first receiving unit, used to receive the review feedback information sent by the management end; a third generating unit, used to generate a second update instruction when the content of the review feedback letter is to adopt a new requirement fragment or to correct a new requirement fragment; an updating unit, used to update the semantic vector in the vector knowledge database according to the first update instruction or the second update instruction, so as to synchronously update the knowledge base of the intelligent dialogue model; and a second receiving unit, used to receive question information input by the user end.

[0016] Optionally, in a fifth implementation manner of the second aspect of the present invention, the input sending module includes: a retention and compression unit, which is used to use a session buffer memory to retain the original records of multiple rounds of conversations between the user and the intelligent dialogue model, obtain conversation context cache information, and use the session summary buffer memory to compress historical conversations that exceed the round limit into a structured semantic summary; an extraction and marking unit, which is used to use entity recognition slot filling technology to extract medical key entities in each question asked by the user as structured fields, form a dynamically updated conversation state table, and mark the information to be supplemented in the conversation state table so that the intelligent dialogue model actively generates a follow-up question request based on the mark; an establishment and storage unit, which is used to establish a retrievable long-term memory chain based on the context cache information, the structured semantic summary and the conversation state table, convert the long-term memory chain into a semantic vector and store it in the vector knowledge database; an input and sending unit, which is used to input the question information into the intelligent dialogue model, so that the intelligent dialogue model retrieves the semantic vector in the vector knowledge database based on the question information and outputs an answer result, and sends the answer result to the user terminal, so that the user terminal generates and displays a visual answer page based on the answer result.

[0017] Optionally, in the sixth implementation method of the second aspect of the present invention, it also includes: a summary module for summarizing the complete conversation record; an encryption module for encrypting the complete conversation record to obtain conversation encrypted record information; and an upload module for uploading the conversation encrypted record information to the blockchain.

[0018] The third aspect of the present invention provides a medical needs customized dialogue device, which includes: a memory and at least one processor, wherein the memory stores instructions; at least one processor calls the instructions in the memory to enable the medical needs customized dialogue device to execute each step of the medical needs customized dialogue method described above.

[0019] A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed by a processor, implement the various steps of any of the above-mentioned medical needs customized dialogue methods.

[0020] In the technical solution of the present invention, by converting preprocessed documents into semantic vectors and storing them in a vector knowledge database, an intelligent dialogue model is constructed by combining the vector knowledge database with a retrieval enhancement generation framework, and real-time collection of recording data of conference communications between medical institutions and product entrusting parties, conflict detection is performed on the recording data and the vector knowledge database, and the semantic vectors in the vector knowledge database are updated according to the detection results to synchronously update the knowledge base of the intelligent dialogue model, thereby supporting the supplement of voice conversation needs and improving the completeness and accuracy of the understanding of needs. Question information input by the user end is received, the question information is input into the intelligent dialogue model and the answer result is output, and the answer result is sent to the user end so that the user end generates and displays a visual answer page based on the answer result, which can give accurate replies to the user's question-related demand information, help users better and more accurately understand project needs, and improve user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A first flow chart of the medical needs customization dialogue method provided in an embodiment of the present invention; Figure 2 A second flow chart of the medical needs customized dialogue method provided in an embodiment of the present invention; Figure 3 A third flow chart of the medical needs customized dialogue method provided in an embodiment of the present invention; Figure 4 A fourth flow chart of the medical needs customized dialogue method provided in an embodiment of the present invention; Figure 5 A schematic diagram of the structure of a medical demand customized dialogue device provided by an embodiment of the present invention; Figure 6 Another structural diagram of the medical needs customized dialogue device provided by an embodiment of the present invention; Figure 7 A schematic diagram of the structure of a medical needs customized dialogue device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The present invention provides a method, device, equipment and storage medium for customized dialogue on medical needs, which supports voice conversation demand supplementation, improves the completeness and accuracy of demand understanding, and can give accurate replies to user questions about project-related demand information, helping users to better and more accurately understand project requirements and improve user satisfaction.

[0023] The terms "first," "second," "third," "fourth," and so on (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that shown or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, product, or apparatus.

[0024] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 An embodiment of the medical demand customized dialogue method in the embodiment of the present invention includes: 101. Obtain product requirement documents provided by medical institutions, pre-process the product requirement documents, and obtain pre-processed documents; In this embodiment, the product requirement documents provided by medical institutions may contain multiple formats, such as PDF, Word, scanned images, etc. The preprocessing process first extracts the text content through document parsing technology, and uses OCR tools to identify image information in the document, such as flow charts, tables, handwritten notes, etc. Then, the system will remove noise information such as headers and footers, watermarks, irrelevant numbers, repeated paragraphs, etc., and then segment the document into paragraphs based on semantic and format features. Finally, each paragraph is structured, including identifying key medical entities, such as diseases, drugs, and equipment names, extracting specific demand points, such as functional requirements, performance indicators, and compliance standards, summarizing the core points of the paragraphs, and clustering the content based on topic similarity to form a standardized and structured preprocessed document.

[0025] 102. Convert the pre-processed documents into semantic vectors and store them in a vector knowledge database. Combine the vector knowledge database with the retrieval enhancement generation framework to build an intelligent dialogue model. In this embodiment, the system first identifies the primary language of the preprocessed document. For Chinese documents, the BGE model, which excels in Chinese semantic understanding, is used for vectorization. For English documents, the BioBERT model, pre-trained in the biomedical field, is used for vectorization to better capture medical terminology and concepts. The generated semantic vectors are stored in a specialized vector knowledge database (such as FAISS and Milvus). The core of the intelligent dialogue model is based on the large language model Yi-34B and integrates the Retrieval Augmented Generation (RAG) framework, which allows the model to retrieve the document fragments most relevant to the user's question from the vector knowledge database (through vector similarity matching) before generating an answer. At the same time, through carefully designed system prompts, the model's behavioral norms are clearly defined. For example, answers should only be based on knowledge base information, no fabrication, and a professional, objective, and cautious tone should be maintained. Questions outside the scope of the knowledge base should be clearly stated as unanswerable, and the language style, such as a cautious language style, should be clearly defined.

[0026] 103. Real-time collection of audio recordings of meetings between medical institutions and product entrusting parties, performing conflict detection between the audio recordings and the vector knowledge database, and obtaining the detection results; In this embodiment, during the project requirements communication process, the system collects voice data from both parties of the meeting in real time, and uses advanced general speech recognition models such as Whisper to transcribe the recording into a text record with an accurate timestamp in real time. Subsequently, the transcribed text is segmented and structured to extract new requirement fragments generated in the meeting. These new requirement fragments are also converted into semantic vectors. In the vector knowledge database, the system retrieves the historical requirement vectors that are most similar to the new requirement vector and calculates their cosine similarity scores. Based on the comparison of the similarity score with the preset threshold and the semantic analysis results, if the similarity is very low, it is marked as a normal requirement; if the similarity is high and the semantics are highly consistent, it is marked as a duplicate requirement; if the similarity is high but there is an obvious contradiction in the semantics, it is marked as a contradictory requirement. The final detection result is composed of these marking information.

[0027] 104. Update the semantic vector in the vector knowledge database according to the detection results to synchronously update the knowledge base of the intelligent dialogue model and receive the question information input by the user end; In this embodiment, the system dynamically updates the knowledge base and model based on the results of conflict detection. When the detection result is a normal demand, an instruction is automatically generated to add the new demand fragment and its semantic vector to the vector knowledge database. When the detection result is a contradictory demand, the system will send manual review information containing details of the contradictory points to the administrator. After the administrator reviews, it will send review feedback information, such as adopting the new demand, revising the new demand, maintaining the old demand, requiring further discussion, etc. If the feedback information indicates adopting or revising the new demand fragment, a second update instruction is generated to update the vector knowledge database accordingly, replace or revise the old demand, add the new demand, and receive question information input by the user in real time.

[0028] 105. Input the question information into the intelligent dialogue model, output the answer result, and send the answer result to the user terminal so that the user terminal generates and displays a visual answer page based on the answer result; In this embodiment, the user's question information is input into the intelligent dialogue model integrated with the RAG framework. The model uses a session buffer memory to retain the original multi-round dialogue records to ensure that the context of the current question is understood. For dialogues with a long history, the system uses a session summary buffer memory technology to compress the dialogue content that exceeds the round limit into a structured semantic summary (retaining key entities, conclusions, to-do items, etc.). At the same time, it uses entity recognition and slot filling technology to accurately extract key medical entities from user questions, such as specific diseases, surgical names, equipment models, and regulatory standards, to form and dynamically update a dialogue status table, which clearly marks which information is confirmed and which is to be supplemented or clarified, combined with the current dialogue context. , historical conversation summaries and conversation status tables, the system builds a retrievable long-term memory chain and stores it in the vector knowledge database, so that the model can recall earlier key information in subsequent conversations. The intelligent conversation model generates accurate answer results based on user questions, retrieved relevant document fragments (from the vector knowledge database), current conversation context, structured summaries and conversation status tables. The results are sent back to the user end. After receiving the answer results, the user-end application (such as web interface, mobile app) will parse and render them, and then combine charts, highlight key information, display links to relevant requirement document fragments, etc. to generate and display intuitive and easy-to-read visual answer pages to help users quickly and accurately understand project requirements.

[0029] In an embodiment of the present invention, an intelligent dialogue model based on a vector knowledge base and retrieval-augmented generation (RAG) is constructed, and conference communication recording data is integrated in real time to automatically detect conflicts (normal, repeated, and contradictory) in new requirements. The model knowledge base is dynamically updated based on the detection results, effectively solving the pain points of fragmented information, easy omissions, and large understanding deviations in traditional demand analysis. It then supports obtaining accurate answers based on the latest and most comprehensive project knowledge through natural language questions, and intuitively presents them through visual pages, significantly improving the completeness, accuracy, and efficiency of understanding complex medical project requirements, helping users (product manufacturers) to quickly and accurately grasp core requirements, reduce rework and cost losses caused by differences in understanding, and improve user satisfaction.

[0030] See also Figure 2 In the second embodiment of the medical demand customized dialogue method according to the embodiment of the present invention, S101 and S102 include: 201. Obtain product requirement documents provided by medical institutions; In this embodiment, the product requirement document submitted by the medical institution is received through a system interface (such as API, file upload).

[0031] 202. Extract text information of the target requirement document through the PyMuPDF tool library, and extract image information of the target requirement document through the PaddleOCR tool library; In this embodiment, for documents in formats such as PDF, PyMuPDF is used to accurately parse and extract the text content and metadata. For images contained in the document (such as scanned pages, schematics, and photos), the PaddleOCR engine is called to perform optical character recognition to extract the text information.

[0032] 203. Remove noise from text and image information, including headers, footers, watermarks, numbers and repeated content; In this embodiment, rule matching (such as regular expression matching of header and footer patterns), location filtering, content deduplication algorithm and other technologies are applied to remove headers, footers, document numbers, watermark texts, and semantically repeated paragraphs or sentences identified from text and image OCR results to ensure the purity of core content requirements.

[0033] 204. Segment the noise-removed text information and image information into paragraphs to obtain multiple document paragraphs; In this embodiment, the integrated text (original text + OCR text) is segmented into logically independent paragraph units based on natural paragraph markers (such as line breaks), heading levels, bulleted lists, and semantic coherence analysis.

[0034] 205. Using natural language processing technology to structure multiple document paragraphs to obtain pre-processed documents. The structured processing includes demand extraction, entity recognition, key point summary and content clustering; In this embodiment, multiple document paragraphs are structured using natural language processing technology. The structured processing includes requirement extraction, entity recognition, key point summary, and content clustering. Requirement extraction is to identify and mark clear functional requirements (such as "what the system should support", "what the equipment should have"), non-functional requirements (such as "response time is less than 2 seconds", "comply with ISO 13485 standard"), constraints (such as "compatible with existing HIS systems" and "budget not exceeding X yuan"), etc. Entity recognition uses a medical named entity recognition (NER) model to identify and label medical-related entities in paragraphs, such as disease names (ICD codes), drug names, medical device names (UDIs), body parts, examination items, departments, etc. Key point summarization generates a concise summary of each paragraph, summarizing its core appeal or key information. Content clustering analyzes the themes and semantics of all paragraphs, aggregating paragraphs discussing the same or highly related topics into groups to form more macro-demand modules (such as "user management requirements", "data security requirements", and "report generation requirements"). Finally, structured pre-processed documents are output. Requirements extraction can be achieved through pre-trained language models (such as BERT) combined with sequence annotation (such as BIO annotation) or extractive question Answer framework, locate and extract user's core needs such as functional demands and improvement suggestions from the text. Entity recognition can specifically use Transformer-based pre-training models (such as RoBERTa) for sequence labeling, or combine with CRF layer to optimize label consistency to identify specific entities such as names of people, organizations, and products in the text. Key points summary can specifically use Encoder-Decoder architecture pre-training models (such as BART, T5), capture the global semantics of the text through the self-attention mechanism, generate a condensed summary that fits the core of the original text, or use an extractive method to filter key sentences. Content clustering can specifically use models such as Sentence-BERT to convert the text into semantic vectors, and then combine with clustering algorithms such as K-Means and DBSCAN to group the text according to semantic similarity to achieve automatic classification of unlabeled text.

[0035] 206. Identify the language category of the preprocessed document; In this embodiment, a language detection library is used or text features are analyzed to determine whether the dominant language of the pre-processed document is Chinese or English, providing a basis for subsequent selection of a correct vectorization model.

[0036] 207. When the language category is Chinese, the BGE model is used to convert the preprocessed document into a first semantic vector. When the language category is English, the BioBERT model is used to convert the preprocessed document into a second semantic vector. In this embodiment, based on the language recognition results, Chinese documents are fed into the BGE model for encoding to generate a first semantic vector, and English documents are fed into the BioBERT model fine-tuned on biomedical text for encoding to generate a second semantic vector to better capture the semantics of medical terms.

[0037] 208. Storing the first semantic vector or the second semantic vector in a vector knowledge database; In this embodiment, a suitable vector database system (such as FAISS, Milvus, etc.) is selected according to the needs, and according to the semantic vector features to be stored later (such as dimension, vectors generated by models such as BGE and BioBERT usually have fixed dimensions), the basic parameters such as the vector dimension and index type of the database are configured. The selected vector database system is deployed and initialized in the server, and the basic software and hardware environment configuration is completed to enable it to have the ability to receive and store vector data. At this time, the vector database system is a vector knowledge database without data, waiting for subsequent vector insertion. When the language category is Chinese, the generated first semantic vector is stored in the vector knowledge database. When the language category is English, the generated second semantic vector is stored in the vector knowledge database.

[0038] 209. Using Yi-34B as the base model and combining it with a vector knowledge database and a retrieval-enhanced generation framework to build an intelligent dialogue model; In this embodiment, the open source large model Yi-34B is selected as the core of the generation engine, and the retrieval-augmented generation (RAG) mode is integrated. When a user asks a question, the system first searches the vector knowledge base for the document fragments (Top-K) that are most relevant to the question semantics. The retrieved relevant fragments (as "evidence" or "reference") are input into the Yi-34B model together with the user question to guide it to generate accurate and reliable answers based on the knowledge base content.

[0039] 210. Use system prompt to define the behavior norms and language style of the intelligent dialogue model; In this embodiment, before calling Yi-34B to generate an answer, a system prompt is pre-set to clearly define the role of the constraint model (for example, "You are a medical project requirements analysis assistant"), the source of knowledge (for example, "Answer questions only based on the provided project requirements documents and meeting record knowledge base"), the code of conduct (for example, "Cite knowledge base fragments, clearly state that uncertain or out-of-scope questions cannot be answered, avoid guessing and fabricating information, and prompt users to consult professionals for information involving medical risks"), and the language style (for example, "Professional, clear, objective, and cautious").

[0040] In an embodiment of the present invention, accurate information extraction from multi-format documents is achieved through PyMuPDF and PaddleOCR. Combined with strict noise removal, intelligent paragraph segmentation and deep structured processing, the original messy demand documents are converted into highly structured, machine-understandable pre-processed documents. The domain optimization model is intelligently selected according to the document language for semantic vectorization to build a high-quality vector knowledge base. Finally, the RAG framework is integrated based on a powerful basic model, and the system prompt is used to accurately control the model behavior norms and language style, laying a solid foundation for the subsequent provision of professional, reliable, knowledge-based medical demand questions and answers, effectively improving the degree of automation, structural level and semantic representation ability of knowledge base construction.

[0041] See also Figure 3 In the third embodiment of the medical demand customized dialogue method according to the embodiment of the present invention, S103 and S104 include: 301. Real-time collection of audio recordings of meetings between medical institutions and product clients, and conversion of these recordings into time-stamped transcripts using the Whisper general speech recognition model. In this embodiment, the conference audio stream is captured in real time using the recording function of the conference system or a dedicated recording device, and the audio stream is input into the Whisper speech recognition model, which transcribes the speech into text in real time and marks the precise start and end timestamps for each sentence or paragraph.

[0042] 302. Segment the transcribed text into paragraphs to obtain multiple text paragraphs. Use natural language processing technology to perform structured processing on the multiple text paragraphs to obtain new requirement fragments. In this embodiment, the continuous transcribed text is segmented into meaningful text paragraphs based on timestamps, speaker changes (which can be achieved through voiceprint recognition or manual marking), topic pauses, or keywords. Each text paragraph is structured using natural language processing technology. The structured processing method is as shown in step 205, which identifies and extracts specific new demand fragments raised in the meeting.

[0043] 303. Convert the new requirement fragment into a third semantic vector; In this embodiment, the same vectorization strategy as step 207 is adopted (BGE is used for Chinese and BioBERT is used for English) to convert the new demand fragment after structured processing into the corresponding third semantic vector.

[0044] 304. Search the vector knowledge database for historical semantic vectors similar to the third semantic vector, and calculate a similarity score. In this embodiment, the third semantic vector of the new demand segment is submitted to the vector knowledge database for similarity retrieval (such as cosine similarity), and the database returns the most similar historical demand segment vector and its corresponding similarity score.

[0045] 305. If the similarity score is less than or equal to a preset threshold, it is marked as a normal demand. If the similarity score is greater than the preset threshold and the new demand segment has the same semantics as the historical demand segment, it is marked as a duplicate demand. If the similarity score is greater than the preset threshold and the new demand segment has opposite semantics to the historical demand segment, it is marked as a contradictory demand. The semantic logic of the new demand segment and the historical demand segment is identified by a preset natural language processing model to determine whether the semantics of the new demand segment and the historical demand segment are the same or opposite. When the semantic logic of the new demand segment and the historical demand segment are consistent, they are semantically identical. When the semantic logic of the new demand segment and the historical demand segment are inconsistent, they are semantically opposite. In this embodiment, a similarity threshold is set. If the similarity score is less than or equal to the preset threshold, it indicates that this is a completely new or very different requirement, and it is marked as a normal requirement. If the similarity score is greater than the preset threshold and the new requirement segment has the same semantics as the historical requirement segment, it is marked as a duplicate requirement. If the similarity score is greater than the preset threshold and the new requirement segment has opposite semantics to the historical requirement segment, it is marked as a contradictory requirement. The preset natural language processing model is used to identify the semantic logic to determine whether the semantics of the new requirement segment and the historical requirement segment are the same or opposite. When the semantic logic of the new requirement segment is consistent with that of the historical requirement segment, they are semantically identical. When the semantic logic of the new requirement segment is inconsistent with that of the historical requirement segment, they are semantically opposite. For example, "report needs to be modified" and "report must be modified" are logically consistent and are semantically identical, while "modifiable report" and "unmodifiable report" are logically inconsistent and are semantically opposite.

[0046] 306. Generate a detection result based on the marking information of the normal demand, the marking information of the repeated demand, or the marking information of the contradictory demand; In this embodiment, the detection result is generated according to the marking information of normal requirements, the marking information of repeated requirements or the marking information of contradictory requirements. For repeated and contradictory requirements, the corresponding historical requirement segments are associated as references.

[0047] 307. When the detection result is normal demand, a first update instruction is generated; In this embodiment, when the detection result is a duplicate requirement, the new requirement fragment is discarded and there is no need to update the vector knowledge database. If the detection result marks the new requirement fragment as a normal requirement, the system automatically generates a first update instruction, which contains the content of the new requirement fragment that needs to be added to the vector knowledge database and its corresponding semantic vector.

[0048] 308. When the test result is a conflicting requirement, a manual review message is sent to the management end; In this embodiment, if the detection results include a new segment marked as a conflicting requirement, the system will generate manual review information and send it to the designated administrator. The manual review information lists the conflicting points in detail, including the content of the new requirement segment, the content of the historical requirement segment that conflicts with it, the similarity score, and the reason why the system judges the conflict.

[0049] 309. Receive review feedback information sent by the management terminal; In this embodiment, after reviewing the conflicting information, the administrator makes a judgment through the management interface and submits review feedback information. Possible feedback includes confirming the adoption of the new requirement (overwriting the old requirement), revising the new requirement (providing a revised version), maintaining the old requirement (rejecting the new requirement), or marking it as requiring further discussion.

[0050] 310. When the content of the review feedback letter is to adopt the new requirement segment or to revise the new requirement segment, a second update instruction is generated; In this embodiment, the system parses the administrator's review feedback information. If the feedback is to adopt the new requirement fragment (adopt it as is) or to revise the new requirement fragment (adopt the administrator's revised version), the system generates a second update instruction, which contains the final requirement content to be added to the knowledge base (the original new requirement fragment or the revised version) and its semantic vector, and instructs how to deal with the historical fragments that conflict with it (replace or mark invalid).

[0051] 311. Update the semantic vector in the vector knowledge database according to the first update instruction or the second update instruction to synchronously update the knowledge base of the intelligent dialogue model; In this embodiment, when the first update instruction is executed, the new segment marked as normal demand and its vector are added to the vector knowledge database. When the second update instruction is executed, the demand segment and its vector confirmed to be adopted or revised by the administrator are added to the vector knowledge database, and the historical demand segment and its vector that conflict with it are updated or discarded according to the instruction.

[0052] 312. Receive question information input by the user terminal; In this embodiment, the system open interface receives natural language question information about medical project requirements input by product production users (user end).

[0053] In an embodiment of the present invention, Whisper is used to achieve high-precision, time-stamped conference speech transcription, combined with intelligent paragraph segmentation and structured processing to extract new demand fragments, and semantic vectorization and similarity retrieval and deep semantic analysis are performed in the vector knowledge base to automatically and intelligently identify and mark the properties of the new demand fragments. Different update processes are triggered based on the detection results, normal requirements are automatically added, duplicate requirements are marked and ignored, and a manual review mechanism is introduced for key conflicting requirements to ensure decision accuracy. Finally, the knowledge base and model are updated according to the review results or automatic instructions to ensure that the knowledge relied on by the intelligent dialogue model is always up-to-date, consistent and conflict-free. This process significantly improves the efficiency of conference demand recording, the degree of automation and the reliability of conflict resolution, ensures the timeliness and accuracy of the knowledge base, and provides a continuously updated source of knowledge for accurate question and answer.

[0054] See also Figure 4 In the fourth embodiment of the medical demand customized dialogue method according to the embodiment of the present invention, S105 and S105 onwards include: 401. Using a conversation buffer to store original records of multiple rounds of conversations between the user and the intelligent conversation model, obtaining conversation context cache information, and using a conversation summary buffer to compress historical conversations that exceed the round limit into a structured semantic summary; In this embodiment, the system maintains a fixed-size conversation buffer memory, which sequentially stores the original questions and answers of the user's most recent N rounds of interaction with the model (conversation context cache information). When the number of conversation rounds exceeds N, the system activates the conversation summary buffer memory function, using the summary model to compress and refine the earlier historical conversation content that has been moved out of the original buffer into a structured semantic summary containing core facts, conclusions, action items, and key entities. This summary retains the key information of long-term conversations.

[0055] 402. Utilize entity recognition slot filling technology to extract key medical entities from each user's question as structured fields, forming a dynamically updated conversation state table. Mark the information to be supplemented in the conversation state table so that the intelligent conversation model can proactively generate follow-up questions based on the markings. In this embodiment, for each question asked by the user, the system applies the medical NER model to identify the key entities in the question. At the same time, the system predefines the slots that may be involved in the conversation, such as focus modules, functional requirements, performance indicators, compliance standards, time nodes, etc. The system attempts to fill the identified entities into the corresponding slots to form and continuously update a conversation status table, which clearly records the confirmed information in the current conversation (slots filled) and information that is not yet clear or requires further clarification from the user (slots marked as to be supplemented). The information to be supplemented in the conversation status table is marked so that the intelligent conversation model can actively generate follow-up questions based on the mark to complete the medical demand parameters.

[0056] 403. Establish a retrievable long-term memory chain based on the context cache information, the structured semantic summary, and the conversation state table, convert the long-term memory chain into a semantic vector, and store it in a vector knowledge database; In this embodiment, the currently valid conversation context cache information (the most recent N rounds), structured semantic summaries (earlier conversation summaries), and the current conversation state table (including filled slots and slots to be filled) are integrated to form a long-term memory chain representing the current complete conversation state. This long-term memory chain is also converted into a semantic vector and stored in the vector knowledge database. This enables the intelligent conversation model to not only retrieve project requirement knowledge in subsequent conversations, but also retrieve information that is highly relevant to the current conversation history and state, achieving true "memory" and contextual coherence.

[0057] 404. Input the question information into the intelligent dialogue model, so that the intelligent dialogue model searches the semantic vectors in the vector knowledge database based on the question information and outputs an answer result, and sends the answer result to the user terminal, so that the user terminal generates and displays a visual answer page based on the answer result; In this embodiment, the user's current question information, together with the relevant project requirement document fragments retrieved from the vector knowledge base through the RAG framework and the retrieved relevant long-term memory chain information (i.e., conversation history and status), are input into the intelligent conversation model. The intelligent conversation model integrates all this information to generate an accurate and coherent answer result, which is sent to the user end. The user end applies the parsed result and uses front-end technology (such as HTML / CSS / JS, chart library) to render it into a visual answer page. The visual answer page can include key information highlights, reference links to relevant document fragments, and even simple charts generated based on the answer content (such as a demand satisfaction comparison chart), greatly improving user understanding efficiency and experience.

[0058] 405. Summarize the complete conversation record; In this embodiment, at the end of the dialogue session, the system aggregates the original records (questions, answers, timestamps) of all rounds of interaction between the user and the intelligent dialogue model, the generated conversation summary, and the final conversation status table into a complete conversation record.

[0059] 406. Encrypt the complete conversation record to obtain encrypted conversation record information; In this embodiment, due to medical data privacy and security compliance requirements, a strong encryption algorithm (such as AES-256) is used to encrypt the complete conversation record to generate encrypted conversation record information.

[0060] 407. Upload the encrypted conversation record information to the blockchain; In this embodiment, the hash value of the encrypted conversation record information is uploaded to a pre-selected blockchain network (such as Hyperledger Fabric, Ethereum private chain). The blockchain's immutability and traceability are utilized to provide evidence storage and audit functions for the conversation record. Even if the local storage is damaged, the integrity and authenticity of the record can be verified on the chain. The encrypted data or hash is stored on the chain, protecting the privacy of the original content.

[0061] In an embodiment of the present invention, the collaborative work of the session buffer memory and the summary buffer memory is used to achieve accurate maintenance of the context of multiple rounds of conversations and efficient compression of historical information. The entity recognition slot filling technology is used to dynamically construct and update the conversation state table, clearly mark the information to be supplemented, and significantly improve the coherence and goal orientation of the conversation. By integrating the context cache, structured summary and conversation state table, a retrievable long-term memory chain is constructed and stored in the knowledge base, so that the model has the ability to remember the key conversation context, greatly enhancing the depth and consistency of understanding of complex and long-term demand conversations. Finally, combined with the retrieval enhancement generation framework, accurate answers are output and intuitively presented through the user-side visualization page, greatly optimizing the user experience. In addition, the encryption of the complete conversation record and blockchain notarization ensure the non-tamperability and traceability of sensitive medical communication data, provide solid security and compliance guarantees for the process, and comprehensively improve the intelligence, precision and credibility of medical demand communication.

[0062] The above describes the method for customized dialogue on medical needs in the embodiment of the present invention. The following describes the device for customized dialogue on medical needs in the embodiment of the present invention. Figure 5 In one embodiment of the present invention, a medical demand customized dialogue device includes: The acquisition processing module 501 is used to obtain a product requirement document provided by a medical institution, pre-process the product requirement document, and obtain a pre-processed document; A storage construction module 502 is used to convert the pre-processed documents into semantic vectors and store them in a vector knowledge database, and to build an intelligent dialogue model by combining the vector knowledge database with the retrieval enhancement generation framework; The collection and detection module 503 is used to collect the recorded data of the communication between the medical institution and the product entrusting party in real time, perform conflict detection on the recorded data and the vector knowledge database, and obtain the detection result; An update receiving module 504 is used to update the semantic vectors in the vector knowledge database according to the detection results, so as to synchronously update the knowledge base of the intelligent dialogue model and receive question information input by the user end; The input sending module 505 is used to input question information into the intelligent dialogue model, output the answer result, and send the answer result to the user end so that the user end generates and displays a visual answer page based on the answer result.

[0063] In this embodiment, by converting preprocessed documents into semantic vectors and storing them in a vector knowledge database, an intelligent dialogue model is constructed by combining the vector knowledge database with a retrieval enhancement generation framework, and real-time recording data of conference communications between medical institutions and product entrusting parties is collected. Conflict detection is performed on the recording data and the vector knowledge database, and the semantic vectors in the vector knowledge database are updated according to the detection results to synchronously update the knowledge base of the intelligent dialogue model, thereby supporting the supplement of voice conversation needs and improving the completeness and accuracy of the understanding of needs. Question information input by the user end is received, the question information is input into the intelligent dialogue model and the answer result is output, and the answer result is sent to the user end so that the user end generates and displays a visual answer page based on the answer result, which can give accurate replies to the user's question-related demand information, help users better and more accurately understand project needs, and improve user satisfaction.

[0064] See also Figure 6 Another embodiment of the medical demand customized dialogue device in the embodiment of the present invention includes: The acquisition processing module 501 is used to obtain a product requirement document provided by a medical institution, pre-process the product requirement document, and obtain a pre-processed document; A storage construction module 502 is used to convert the pre-processed documents into semantic vectors and store them in a vector knowledge database, and to build an intelligent dialogue model by combining the vector knowledge database with the retrieval enhancement generation framework; The collection and detection module 503 is used to collect the recorded data of the communication between the medical institution and the product entrusting party in real time, perform conflict detection on the recorded data and the vector knowledge database, and obtain the detection result; An update receiving module 504 is used to update the semantic vectors in the vector knowledge database according to the detection results, so as to synchronously update the knowledge base of the intelligent dialogue model and receive question information input by the user end; The input and sending module 505 is used to input the question information into the intelligent dialogue model, output the answer result, and send the answer result to the user terminal so that the user terminal generates and displays a visual answer page based on the answer result; In this embodiment, the acquisition processing module 501 includes: an acquisition unit 5011, which is used to acquire product requirement documents provided by medical institutions; an extraction unit 5012, which is used to extract text information of the target requirement document through the PyMuPDF tool library, and to extract image information of the target requirement document through the PaddleOCR tool library; a removal unit 5013, which is used to remove noise from text information and image information, and the noise includes headers, footers, watermarks, numbers and repeated content; a segmentation unit 5014, which is used to segment the noise-removed text information and image information into paragraphs to obtain multiple document paragraphs; a structuring unit 5015, which is used to perform structured processing on multiple document paragraphs through natural language processing technology to obtain a preprocessed document, and the structuring processing includes requirement extraction, entity recognition, key point summary and content clustering.

[0065] In this embodiment, the storage construction module 502 includes: an identification unit 5021, which is used to identify the language category of the preprocessed document; a first conversion unit 5022, which is used to use the BGE model to convert the preprocessed document into a first semantic vector when the language category is Chinese, and to use the BioBERT model to convert the preprocessed document into a second semantic vector when the language category is English; a storage unit 5023, which is used to store the first semantic vector or the second semantic vector in the vector knowledge database; a construction unit 5024, which is used to use Yi-34B as a basic model and combine the vector knowledge database and the retrieval enhancement generation framework to construct an intelligent dialogue model; a definition unit 5025, which is used to use the system prompt to define the behavioral norms and language style of the intelligent dialogue model.

[0066] In this embodiment, the collection and detection module 503 includes: an acquisition and conversion unit 5031, which is used to collect the recorded data of the communication between the medical institution and the product entrusting party in real time, and use the Whisper general speech recognition model to convert the recorded data into a transcribed text with a timestamp; a segmentation and structuring unit 5032, which is used to segment the transcribed text into paragraphs to obtain multiple text paragraphs, and structure the multiple text paragraphs through natural language processing technology to obtain new demand fragments; a second conversion unit 5033, which is used to convert the new demand fragment into a third semantic vector; a retrieval calculation unit 5034, which is used to search the vector knowledge database for historical semantic vectors similar to the third semantic vector and calculate the similarity score; a marking unit 5035, which is used to identify the similarity. When the similarity score is less than or equal to the preset threshold, it is marked as a normal demand. If the similarity score is greater than the preset threshold and the new demand segment has the same semantics as the historical demand segment, it is marked as a duplicate demand. If the similarity score is greater than the preset threshold and the new demand segment has the opposite semantics to the historical demand segment, it is marked as a contradictory demand, wherein the semantic logic is identified by a preset natural language processing model to determine whether the semantics of the new demand segment is the same or opposite to that of the historical demand segment. When the semantic logic of the new demand segment is consistent with that of the historical demand segment, the semantics are the same. When the semantic logic of the new demand segment is inconsistent with that of the historical demand segment, the semantics are opposite. The first generation unit 5036 is used to generate detection results based on the marking information of normal demands, the marking information of duplicate demands or the marking information of contradictory demands.

[0067] In this embodiment, the update receiving module 504 includes: a second generation unit 5041, which is used to generate a first update instruction when the detection result is a normal requirement; a sending unit 5042, which is used to send manual review information to the management end when the detection result is a contradictory requirement; a first receiving unit 5043, which is used to receive the review feedback information sent by the management end; a third generation unit 5044, which is used to generate a second update instruction when the content of the review feedback letter is to adopt a new requirement fragment or to correct a new requirement fragment; an update unit 5045, which is used to update the semantic vector in the vector knowledge database according to the first update instruction or the second update instruction to synchronously update the knowledge base of the intelligent dialogue model; a second receiving unit 5046, which is used to receive question information input by the user end.

[0068] In this embodiment, the input sending module 505 includes: a retention and compression unit 5051, which is used to use a session buffer memory to retain the original records of multiple rounds of conversations between the user and the intelligent dialogue model, obtain dialogue context cache information, and use the session summary buffer memory to compress historical conversations that exceed the round limit into a structured semantic summary; an extraction and marking unit 5052, which is used to use entity recognition slot filling technology to extract medical key entities in each question asked by the user as structured fields, form a dynamically updated dialogue state table, and mark the information to be supplemented in the dialogue state table so that the intelligent dialogue model actively generates follow-up question requests based on the marks; an establishment and storage unit 5053, which is used to establish a retrievable long-term memory chain based on the context cache information, the structured semantic summary, and the dialogue state table, convert the long-term memory chain into a semantic vector, and store it in a vector knowledge database; an input sending unit 5054, which is used to input question information into the intelligent dialogue model, so that the intelligent dialogue model searches the semantic vector in the vector knowledge database based on the question information and outputs an answer result, and sends the answer result to the user end, so that the user end generates and displays a visual answer page based on the answer result.

[0069] In this embodiment, it also includes: a summary module 506 for summarizing the complete conversation record; an encryption module 507 for encrypting the complete conversation record to obtain conversation encrypted record information; and an upload module 508 for uploading the conversation encrypted record information to the blockchain.

[0070] above Figure 5 and Figure 6 The medical needs customized dialogue device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The medical needs customized dialogue device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0071] Figure 7Figure 6 is a schematic diagram of the structure of a medical needs customized dialogue device provided by an embodiment of the present invention. This medical needs customized dialogue device 600 may vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 610 (e.g., one or more processors), memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) storing applications 633 or data 632. The memory 620 and storage medium 630 may be either transient or persistent storage. The program stored in the storage medium 630 may include one or more modules (not shown), each of which may include a series of instructions operating on the medical needs customized dialogue device 600. Furthermore, the processor 610 may be configured to communicate with the storage medium 630, executing the series of instructions stored in the storage medium 630 on the medical needs customized dialogue device 600 to implement the steps of the medical needs customized dialogue method provided in the aforementioned method embodiments.

[0072] The medical needs customized dialogue device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and / or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 7 The structure of the medical needs customized dialogue device shown does not constitute a limitation on the medical needs customized dialogue device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0073] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of the medical needs customized dialogue method.

[0074] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0075] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0076] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A customized dialogue method for medical needs, characterized by: include: Obtaining a product requirement document provided by a medical institution, and preprocessing the product requirement document to obtain a preprocessed document; Converting the preprocessed documents into semantic vectors and storing them in a vector knowledge database, and building an intelligent dialogue model by combining the vector knowledge database with a search enhancement generation framework; Real-time collection of audio recordings of communications between the medical institution and the product entrusting party, performing conflict detection between the audio recordings and the vector knowledge database, and obtaining detection results; updating the semantic vectors in the vector knowledge database according to the detection results, so as to synchronously update the knowledge base of the intelligent dialogue model and receive question information input by the user terminal; The question information is input into the intelligent dialogue model, and an answer result is output, and the answer result is sent to the user terminal, so that the user terminal generates and displays a visual answer page based on the answer result.

2. The medical needs customized dialogue method according to claim 1, characterized in that: The step of obtaining a product requirement document provided by a medical institution and preprocessing the product requirement document to obtain a preprocessed document includes: Obtain product requirement documents provided by medical institutions; Extract the text information of the target requirement document through the PyMuPDF tool library, and extract the image information of the target requirement document through the PaddleOCR tool library; Removing noise from the text information and the image information, the noise including headers and footers, watermarks, numbers, and repeated content; Performing paragraph segmentation on the text information and the image information after noise removal to obtain a plurality of document paragraphs; The plurality of document paragraphs are subjected to structural processing by natural language processing technology to obtain a preprocessed document, wherein the structural processing includes demand extraction, entity recognition, key point summary and content clustering.

3. The medical needs customized dialogue method according to claim 1, characterized in that: The converting the pre-processed document into a semantic vector and storing it in a vector knowledge database, and combining the vector knowledge database with a search enhancement generation framework to construct an intelligent dialogue model, includes: Identifying a language category of the pre-processed document; When the language category is Chinese, the BGE model is used to convert the preprocessed document into a first semantic vector; when the language category is English, the BioBERT model is used to convert the preprocessed document into a second semantic vector; storing the first semantic vector or the second semantic vector in a vector knowledge database; Using Yi-34B as the base model and combining the vector knowledge database and the retrieval-enhanced generation framework to build an intelligent dialogue model; Use system prompt to define the behavior norms and language style of the intelligent dialogue model.

4. The medical needs customized dialogue method according to claim 1, characterized in that: The real-time collection of audio data of the communication between the medical institution and the product entrusting party, and the conflict detection between the audio data and the vector knowledge database to obtain the detection results include: Collect audio recordings of meetings between medical institutions and product clients in real time, and convert them into time-stamped transcripts using the Whisper general speech recognition model. Segmenting the transcribed text into paragraphs to obtain multiple text paragraphs, and performing structured processing on the multiple text paragraphs using natural language processing technology to obtain new demand fragments; Converting the new requirement fragment into a third semantic vector; Searching the vector knowledge database for historical semantic vectors similar to the third semantic vector, and calculating a similarity score; If the similarity score is less than or equal to a preset threshold, it is marked as a normal demand; if the similarity score is greater than the preset threshold and the semantics of the new demand segment are the same as those of the historical demand segment, it is marked as a repeated demand; if the similarity score is greater than the preset threshold and the semantics of the new demand segment are opposite to those of the historical demand segment, it is marked as a contradictory demand, wherein the semantic logic is identified by a preset natural language processing model to determine whether the semantics of the new demand segment and the historical demand segment are the same or opposite; when the semantic logic of the new demand segment and the historical demand segment are consistent, they are semantically identical; when the semantic logic of the new demand segment and the historical demand segment are inconsistent, they are semantically opposite; A detection result is generated according to the marking information of the normal requirement, the marking information of the repeated requirement, or the marking information of the contradictory requirement.

5. The medical needs customized dialogue method according to claim 1, characterized in that: The updating of the semantic vector in the vector knowledge database according to the detection result to synchronously update the knowledge base of the intelligent dialogue model and receive the question information input by the user terminal includes: When the detection result is a normal demand, a first update instruction is generated; When the detection result is a conflicting requirement, a manual review message is sent to the management end; Receiving review feedback information sent by the management terminal; When the content of the review feedback letter is to adopt the new requirement segment or to revise the new requirement segment, a second update instruction is generated; updating the semantic vectors in the vector knowledge database according to the first update instruction or the second update instruction to synchronously update the knowledge base of the intelligent dialogue model; Receive question information input by the user.

6. The medical needs customized dialogue method according to claim 1, characterized in that: The step of inputting the question information into the intelligent dialogue model, outputting an answer result, and sending the answer result to the user terminal so that the user terminal generates and displays a visual answer page based on the answer result includes: Using a conversation buffer to store original records of multiple rounds of conversations between the user and the intelligent conversation model to obtain conversation context cache information, and using a conversation summary buffer to compress historical conversations that exceed the round limit into a structured semantic summary; Utilizing entity recognition slot filling technology, key medical entities in each user's question are extracted as structured fields to form a dynamically updated conversation state table. The information to be supplemented in the conversation state table is marked so that the intelligent conversation model can proactively generate follow-up questions based on the markings. Establishing a retrievable long-term memory chain based on the context cache information, the structured semantic summary, and the dialog state table, converting the long-term memory chain into a semantic vector and storing the semantic vector in the vector knowledge database; The question information is input into the intelligent dialogue model so that the intelligent dialogue model searches the semantic vectors in the vector knowledge database based on the question information and outputs an answer result, and sends the answer result to the user end so that the user end generates and displays a visual answer page based on the answer result.

7. The medical needs customized dialogue method according to claim 1, characterized in that: After inputting the question information into the intelligent dialogue model, outputting an answer result, and sending the answer result to the user terminal so that the user terminal generates and displays a visual answer page based on the answer result, the method further includes: Summarize the complete conversation record; Encrypting the complete conversation record to obtain encrypted conversation record information; The encrypted conversation record information is uploaded to the blockchain.

8. A medical demand customized dialogue device, characterized by: include: An acquisition and processing module is used to acquire a product requirement document provided by a medical institution, and pre-process the product requirement document to obtain a pre-processed document; A storage construction module, configured to convert the pre-processed documents into semantic vectors and store them in a vector knowledge database, and to construct an intelligent dialogue model by combining the vector knowledge database with a search enhancement generation framework; The collection and detection module is used to collect the recorded data of the communication between the medical institution and the product entrusting party in real time, perform conflict detection on the recorded data and the vector knowledge database, and obtain the detection result; An update receiving module, configured to update the semantic vectors in the vector knowledge database according to the detection results, so as to synchronously update the knowledge base of the intelligent dialogue model and receive question information input by the user terminal; The input sending module is used to input the question information into the intelligent dialogue model, output the answer result, and send the answer result to the user terminal so that the user terminal generates and displays a visual answer page based on the answer result.

9. A medical needs customized dialogue device, characterized by: The medical demand customized dialogue device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors calls the instructions in the memory to enable the medical needs customized dialogue device to execute each step of the medical needs customized dialogue method as described in any one of claims 1-7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the various steps of the medical needs customized dialogue method as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Audio retrieval method and device, electronic equipment and storage medium

    CN118535762A

  • LLM-based intelligent data retrieval method

    CN119621929A

  • Ambiguity identification method, device and equipment, computer readable storage medium and computer program product

    CN120046615A

  • Retrieval joint optimization method for retrieval enhancement generation system

    CN120234386A

  • Multi-granularity video retrieval method and device based on multi-modal large model, computer equipment and readable storage medium

    CN120353962A

Cited By

  • Demand analysis and dynamic inquiry method and system based on cognitive reasoning

    CN121094137A

  • Multi-round questioning method and system around story theme

    CN121119147A

  • Demand specification generation method and system based on multi-modal understanding

    CN121525656A