Real-time interactive data collection and question answering method and device based on traditional Chinese medicine knowledge system and computer equipment
Patent Information
- Application Number
- CN202610679389.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-18
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-05-18
AI Technical Summary
这类系统的交互方式多为被动检索或静态匹配,缺乏与数据采集过程的实时协同机制:在采集过程中,用户无法基于当前已采集体征即时获得知识解释、补采建议或一致性校验提示;同时,新采集的临床数据难以实时锚定到知识结构并形成可追溯的推理背景,导致知识应用与数据沉淀之间无法形成闭环
[0018] In summary, the present invention has the following beneficial effects: the real-time interactive data collection and question-and-answer method based on the TCM knowledge system drives backend standardization processing, vital sign keyword generation and knowledge graph anchoring in real time through context update events, forming a conversational reasoning background, and then carrying out context-constrained RAG question-and-answer and sending back guidance feedback, thereby improving data quality, question-and-answer relevance and collection efficiency.
Smart Images

Figure CN122240681B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a method, apparatus, and computer equipment for real-time interactive data acquisition and question-and-answer based on the knowledge system of traditional Chinese medicine. Background Technology
[0002] Traditional Chinese medicine (TCM) diagnosis and treatment revolves around the four diagnostic methods of "inspection, auscultation and olfaction, inquiry, and palpation." Clinical diagnosis and treatment based on syndrome differentiation heavily rely on the comprehensive analysis of information such as tongue appearance, facial complexion, pulse, voice and breath, and chief complaints. With the development of smart healthcare and the informatization of clinical research, more and more scenarios require the digital collection and structured management of the above four diagnostic methods. During the collection process, knowledge interpretation, auxiliary judgment, and decision support should be provided to improve data collection efficiency and quality, supporting subsequent applications such as constitution identification, symptom analysis, efficacy evaluation, and scientific research statistics.
[0003] However, existing solutions related to this field mainly fall into two categories: one is general data collection platforms, such as general forms and questionnaire systems, and the other is traditional Chinese medicine knowledge bases or health management systems. These solutions generally suffer from a disconnect between data collection, knowledge management, and intelligent services when applied to traditional Chinese medicine scenarios.
[0004] General data acquisition platforms typically only provide common components such as single-choice, multiple-choice, text input, and image upload, which can complete the electronic entry and aggregation of basic information, but lack specialized acquisition and processing capabilities for TCM diagnostic data. On the one hand, tongue / facial images, pulse wave signals, and auscultation are high-dimensional, multimodal, and unstructured data, easily affected by factors such as lighting, equipment differences, acquisition posture, and noise interference. If data is collected only by uploading images / filling in text, the lack of standardized processing links such as color correction, image segmentation, signal denoising and alignment, and feature quantification often leads to unstable data quality, inconsistent representations, and difficulty in forming calculable, comparable, and reusable structured physical signs indicators. On the other hand, general platforms usually lack standardized physical sign keywords, semantic normalization, and entity mapping mechanisms corresponding to the medical knowledge system, making it difficult to effectively connect the collected results with subsequent knowledge reasoning, question-and-answer services, or scientific research statistical models.
[0005] Traditional Chinese medicine (TCM) knowledge base systems or some TCM health management systems often store classic literature, prescriptions, and symptoms using databases or full-text search, or conduct constitution assessments and match preset plans using questionnaires and limited physical examination data. These systems primarily rely on passive retrieval or static matching, lacking a real-time collaborative mechanism with the data collection process. During collection, users cannot immediately obtain knowledge explanations, supplementary data collection suggestions, or consistency verification prompts based on currently collected physical signs. Simultaneously, newly collected clinical data is difficult to anchor to the knowledge structure in real time and form a traceable reasoning context, resulting in a lack of a closed loop between knowledge application and data accumulation. Furthermore, existing systems generally lack mechanisms for structured utilization of real-world data (RWE) and expert review feedback to continuously update knowledge graphs or model parameters, hindering the dynamic evolution and self-optimization of the knowledge system and limiting its long-term usability.
[0006] In summary, existing technologies have at least the following shortcomings: on the one hand, they lack professional acquisition components and standardized processing procedures for multimodal data of TCM four diagnostic methods, making it difficult to reliably convert raw images / signals / speech into computable physical sign keywords and quantitative features; on the other hand, they lack context-aware real-time interaction protocols and session-level context management mechanisms, resulting in a disconnect between data acquisition and knowledge question answering / reasoning services. Summary of the Invention
[0007] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a real-time interactive data acquisition and question-and-answer method, device and computer equipment based on the traditional Chinese medicine knowledge system, so as to overcome the above-mentioned shortcomings.
[0008] The above-mentioned technical objective of this invention is achieved through the following technical solution: a real-time interactive data acquisition and question-and-answer method based on the traditional Chinese medicine knowledge system, comprising: S1. In the front-end interaction layer, TCM consultation data is collected through componentized forms, and at least one type of four diagnostic methods multimodal raw data is collected through medical components. The four diagnostic methods multimodal raw data includes at least one or more of the following: tongue image, pulse wave signal, facial image data, and voice audio. S2. When the consultation data or the original data of the four diagnostic methods are added, modified or confirmed, the front-end interaction layer generates a context update event and sends the context update event to the back-end through a real-time channel. The context update event carries at least a session identifier, a data type identifier, a data key or data resource identifier and a timestamp. S3. After receiving the context update event, the backend performs standardization processing and feature extraction on the original data of the four diagnostic methods and multimodal approaches to generate a structured physical sign result containing physical sign keywords and confidence levels. The backend's context engine updates the session-level diagnosis and treatment status cache according to the context update event and the structured physical sign result, performs conflict handling and key physical sign keyword filtering, and performs semantic normalization on the filtered key physical sign keywords to anchor them to entity nodes of the TCM knowledge graph to obtain the reasoning background corresponding to the session. S4. Based on the reasoning background, perform retrieval enhancement to generate and output question-and-answer responses; return the question-and-answer responses and the guidance feedback related to data collection to the front end through a real-time channel to drive the front end to provide prompts, supplementary data collection guidance, or adjust the questionnaire process.
[0009] In one embodiment, the standardization processing of the tongue image includes: color correction, tongue / tongue coating region segmentation, and quantification of color and coating thickness based on the segmented region, and mapping the quantization results to keywords related to tongue / tongue coating characteristics.
[0010] In one embodiment, the standardization processing of the pulse wave signal includes: denoising and baseline drift correction, time series alignment, and time-domain and frequency-domain feature extraction, and outputting pulse type keywords and / or pulse rate and pulse position numerical features based on the features.
[0011] In one embodiment, when the original data of the four diagnostic multimodal methods is large file data, the front end first uploads it to object storage to obtain a data resource identifier, and the back end writes the data resource identifier into a message queue to asynchronously trigger standardization processing and feature extraction.
[0012] In one embodiment, the conflict handling includes at least: when the self-reported questionnaire results conflict with the output results of the device / model, selecting a retained value or marking the conflicting item as deweighted according to confidence level or data source priority.
[0013] In one embodiment, the retrieval enhancement generation further includes: constructing a context feature vector, wherein the context feature vector is obtained by weighted fusion of natural language question vector, questionnaire progress vector and graph embedding vector of anchored entity nodes through an attention mechanism; using the context feature vector to rank the retrieved evidence by relevance, and aligning the context feature vector to the embedding space of a domain-adaptive large model through a projection layer.
[0014] In one embodiment, the guidance feedback includes one or more of the following: consistency verification prompts, missing item prompts, low confidence review prompts, recommended supplementary collection items, and questionnaire process adjustment suggestions; when the consistency verification prompts detect contradictions in the symptoms, the corresponding symptom inference results or sign keywords are recorded as low confidence, and supplementary collection guidance or prompts for doctor intervention are triggered.
[0015] A real-time interactive data acquisition and question-and-answer device based on the TCM knowledge system includes: The front-end interaction module is used to collect TCM consultation data through componentized forms in the front-end interaction layer, and to collect at least one type of four diagnostic methods multimodal raw data through medical components. The four diagnostic methods multimodal raw data include at least one or more of the following: tongue image, pulse wave signal, facial image data, and voice audio. The context update module is used to generate a context update event in the front-end interaction layer when the consultation data or the original data of the four diagnostic methods and multimodal data is added, modified or confirmed, and send the context update event to the back-end through a real-time channel. The context update event carries at least a session identifier, a data type identifier, a data key or data resource identifier and a timestamp. The context engine module is used to perform standardization processing and feature extraction on the original multimodal data of the four diagnostic methods after the backend receives the context update event, and generate structured physical sign results containing physical sign keywords and confidence levels; the backend context engine updates the session-level diagnosis and treatment state cache according to the context update event and the structured physical sign results, performs conflict handling and key physical sign keyword filtering, and performs semantic normalization on the filtered key physical sign keywords to anchor them to entity nodes of the TCM knowledge graph, thereby obtaining the reasoning background corresponding to the session; The real-time feedback module is used to perform retrieval enhancement based on the reasoning background, generate and output question-and-answer responses; and return the question-and-answer responses and collection-related guidance feedback to the front end through a real-time channel to drive the front end to provide prompts, supplementary collection guidance or adjust the questionnaire process.
[0016] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0017] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described above.
[0018] In summary, the present invention has the following beneficial effects: the real-time interactive data collection and question-and-answer method based on the TCM knowledge system drives backend standardization processing, vital sign keyword generation and knowledge graph anchoring in real time through context update events, forming a conversational reasoning background, and then carrying out context-constrained RAG question-and-answer and sending back guidance feedback, thereby improving data quality, question-and-answer relevance and collection efficiency. Attached Figure Description
[0019] Figure 1 This is a flowchart of the real-time interactive data acquisition and question-and-answer method based on the TCM knowledge system of the present invention.
[0020] Figure 2 This is a structural diagram of the real-time interactive data acquisition and question-and-answer device based on the traditional Chinese medicine knowledge system in an embodiment of the present invention.
[0021] Figure 3 This is an internal structural diagram of a computer device in an embodiment of the present invention.
[0022] In the diagram: 1. Front-end interaction module; 2. Context update module; 3. Context engine module; 4. Real-time feedback module. Detailed Implementation
[0023] To make the objectives, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein.
[0024] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0025] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0026] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0027] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a 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 to cause a device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0028] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.
[0029] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0030] Example 1 In existing technologies, data acquisition platforms are mainly divided into two categories: general-purpose data acquisition platforms and traditional Chinese medicine (TCM) knowledge base systems. General-purpose platforms only provide basic components, such as single-choice, multiple-choice, and text input, and cannot integrate professional medical components to achieve structured and standardized acquisition of these specific diagnostic and treatment data. This functional deficiency means that the need for structured data entry in TCM clinical research and practice cannot be met, resulting in low-quality data that is difficult to utilize by subsequent intelligent systems. Traditional TCM knowledge bases mainly digitize and retrieve knowledge such as classic literature, prescriptions, and symptoms, primarily for academic research and teaching reference. These knowledge bases are static, but they are severely disconnected from the data acquisition process, failing to integrate with new data acquired in real-time and dynamically during clinical practice. When using the knowledge base, users have a limited interaction method, passively searching only, lacking the ability to actively ask questions and engage in intelligent reasoning.
[0031] To address the aforementioned shortcomings, this invention proposes a real-time interactive data acquisition and question-and-answer system based on the traditional Chinese medicine knowledge system, aiming to solve the aforementioned technical problems. The system adopts a front-end and back-end separation architecture. The front-end uses technologies such as Vue3, Vite, and Element-Plus to build a user-friendly interactive interface, while the back-end is developed using Java (Spring framework) and Maven, and the database is MySQL.
[0032] The system comprises a three-layer architecture: a front-end interaction layer, a business logic middleware layer, and a knowledge service layer. The front-end interaction layer provides the user / doctor interface and interactive capabilities, serving as the entry point and presentation carrier for collecting TCM consultation information and multimodal data from the four diagnostic methods. This layer organizes the business interface in a component-based manner, supports questionnaire-style information entry and medical component integration, and is responsible for encapsulating and submitting user input and collected data using a unified data structure, thereby ensuring the availability, scalability, and consistency of the data collection process.
[0033] The business logic middleware layer is responsible for the core business orchestration and session-level context management of the system, transforming collected data into diagnostic states that can be used for reasoning and services. This layer performs unified access, rule constraints, data consistency and conflict handling for data from different sources, and maintains the organizational structure of the context state and key vital signs information of user sessions, forming a context description for knowledge reasoning and question-answering services, thereby achieving collaborative connection between data collection and knowledge services.
[0034] The knowledge service layer provides intelligent service capabilities based on the TCM knowledge system, including functions such as knowledge organization, retrieval reasoning, and question-and-answer generation. Based on the TCM knowledge graph and related knowledge bases, this layer outputs interpretable knowledge results and intelligent question-and-answer content for clinical and research scenarios. It also supports knowledge association and evidence generation under contextual constraints, thereby providing knowledge query, auxiliary analysis, and decision support services for different roles.
[0035] Based on the above system, this application further provides a real-time interactive data acquisition and question-and-answer method based on the traditional Chinese medicine knowledge system, such as... Figure 1 As shown, it includes: S1. In the front-end interaction layer, TCM consultation data is collected through componentized forms, and at least one type of four diagnostic methods multimodal raw data is collected through medical components. The four diagnostic methods multimodal raw data includes at least one or more of the following: tongue image, pulse wave signal, facial image data, and voice audio. In this embodiment, the system provides a set of componentized forms and a medical component library at the front-end interaction layer, designed for TCM business. This allows for the collection of consultation information and multimodal raw data from the four diagnostic methods within the same data collection interface, providing raw input for subsequent standardization processing, generation of vital sign keywords, and contextual question answering. The componentized forms are used to collect consultation information actively described or selected by the user. The data format is primarily structured fields, including but not limited to: basic information, chief complaint and accompanying symptoms, lifestyle and preferences, body sensations and temperature, excretion and menstrual cycle, etc.
[0036] Medical components are used to collect high-dimensional data that requires device / media input during the four diagnostic methods of traditional Chinese medicine, including tongue images, pulse wave signals, facial image data, and voice audio.
[0037] The tongue images are captured by using a mobile / web-based camera or a dedicated tongue diagnostic instrument. High-resolution image files serve as raw data, and shooting parameters such as resolution, exposure / white balance, and device model are recorded. Because ambient light and device white balance are difficult to control when capturing images on mobile or web-based devices, deviations in tongue color and coating can easily occur, directly affecting diagnostic results. The color correction module employs an algorithm based on reference color blocks, such as a standard color chart introduced during shooting, or adaptive correction in a specific color space such as the CIELAB color space. By calculating the color deviation vector between non-standard and standard lighting, the image is compensated in real time to eliminate color deviations caused by non-standard lighting and white balance, ensuring the clinical accuracy of tongue color and coating.
[0038] The pulse wave signal is accessed through a pulse diagnostic instrument or wearable device to obtain the raw pulse wave of at least one channel; preferably, it supports multiple working conditions such as cun / guan / chi and floating / zhong / sinking; the wearable device guides the subject to collect the pulse wave signal by prompting the collection duration, pressure intensity, collection progress and signal quality, and generates raw time series waveform data, and records metadata such as sampling rate, channel information, collection site, pressure level, etc.
[0039] Facial data can be obtained by calling a camera or facial diagnostic device. The image data can include facial images or short videos. The front-end interactive interface guides and prompts users to shoot a frontal face, without obstruction, under stable lighting, and with facial region localization, and provides prompts for face bounding box detection. Finally, the original facial image / video file is output, along with the acquisition time and device information.
[0040] The audio can be recorded by the user through voice description of their complaints, coughs / wheezing, etc., or by the doctor. The system will output the corresponding metadata such as audio file, sampling rate, and duration.
[0041] Within the same data collection session, both componentized forms and medical components are bound to the same session identifier (SessionID) and associated with the user identifier (UserID). This ensures that the backend can uniformly link the consultation fields and raw data such as tongue / pulse / face / voice to the same user and the same diagnostic context. In summary, the system receives two types of data input: structured consultation data, used to describe the user's subjective symptoms and lifestyle, and raw multimodal data from the four diagnostic methods or its resource references, used for subsequent standardization processing and feature extraction.
[0042] S2. When the consultation data or the original data of the four diagnostic methods are added, modified or confirmed, the front-end interaction layer generates a context update event and sends the context update event to the back-end through a real-time channel. The context update event carries at least a session identifier, a data type identifier, a data key or data resource identifier and a timestamp. To achieve context-aware real-time collaboration between the data acquisition module and the system backend, the system adopts an event-driven real-time interaction mechanism: when the original consultation data or multimodal raw data collected by the front-end interaction layer changes, the front-end interaction layer immediately generates and reports a context update event to trigger the backend context engine to update the session-level diagnosis and treatment status in real time, thereby ensuring that subsequent Q&A and verification are based on the latest collection status. The front-end interaction layer configures data listening logic for componentized forms and medical components respectively, triggering event generation when adding, modifying, or confirming: through this design, the system can transmit key changes during the collection process to the backend in real time, instead of waiting until all questionnaires are completed before submitting them all at once, avoiding context lag. After triggering, the front-end interaction layer encapsulates this change into an atomic context update event, which carries at least a session identifier, data type identifier, data key-value or data resource identifier, and timestamp, for the backend to complete session association, data location, and version management: in a preferred embodiment, the event can also carry extended fields such as data source, confidence level, and chapter identifier. After generating the context update event, the front-end pushes the event to the backend through a real-time channel. The real-time channel can use WebSocket or Server-Sent Events (SSE) to achieve low-latency, persistent event transmission capabilities. Through event-driven real-time reporting, the backend can continuously obtain the latest structured consultation data and multimodal data references from users during the collection process. Based on this, it can complete real-time updates of session-level consultation status cache and enhanced generation of context constraints when users ask questions in subsequent steps, providing a real-time triggering and data consistency foundation for realizing collection as a service.
[0043] S3. After receiving the context update event, the backend performs standardization processing and feature extraction on the original data of the four diagnostic methods and multimodal approaches, generates a structured physical sign result containing physical sign keywords and confidence levels, and writes it into structured storage; the backend context engine updates the session-level diagnosis and treatment status cache according to the context update event and the structured physical sign result, performs conflict handling and key physical sign keyword filtering, and performs semantic normalization on the filtered key physical sign keywords to anchor them to entity nodes of the TCM knowledge graph, thereby obtaining the reasoning background corresponding to the session; The backend system includes a business logic middleware layer and a knowledge service layer. When the backend receives a context update event, it completes the selection of session ownership and processing strategy for this change based on the session identifier and data type identifier. For events carrying data key values, such as consultation fields, the backend can directly enter them as structured information into the session cache. For events carrying data resource identifiers, such as tongue images, facial image data, pulse wave files, audio, etc., the backend obtains the corresponding raw data according to the resource identifier and enters the standardization processing and feature extraction process. For different types of multimodal raw data from the four diagnostic methods, the backend invokes corresponding standardized processing links to reduce the impact of lighting, equipment differences, noise, and individual differences on data quality, and extracts interpretable features related to TCM identification. After feature extraction, the backend further maps the quantified features to a unified system-wide expression of physical sign keywords, forming structured physical sign results. These structured physical sign results include at least: physical sign keywords: used to express TCM semantic concepts of physical signs, such as tongue / tongue coating categories, pulse types, facial features, and symptom entities; and confidence scores: used to characterize the reliability of the physical sign keyword, which can be generated from model output probabilities, signal quality indicators, or rule verification results. The context engine belongs to the business logic middleware layer. The context engine updates the session-level diagnosis and treatment state cache based on context update events and the latest structured physical sign results. This cache describes the set of diagnostic and treatment elements collected and usable for inference in the current session. When the same vital sign is inconsistent across different sources or at different times, such as when there is a conflict between self-reported questionnaires and device / AI output, the context engine executes a conflict handling strategy, which mainly includes: prioritizing by source (e.g., objective diagnostic and treatment device / model results take precedence over subjective self-reported data), prioritizing by time (e.g., using the latest data to overwrite older data), and weighted fusion or deweighted labeling based on confidence level (e.g., retaining multiple values but assigning different weights / confidence levels). Through conflict handling, the system avoids inconsistencies in vital signs within the same session that could lead to instability in inference and provides stable input for subsequent consistency checks and question answering. Secondly, a large number of vital sign keywords may appear in the session. The context engine further filters relatively key vital sign keywords to construct a compact and highly informative inference context. Specifically, this includes: retaining key entities that have a significant impact on syndrome differentiation and treatment based on a pre-set core diagnostic and treatment element dictionary, and prioritizing the retention of vital signs most relevant to different chapters and stages based on questionnaire progress / scenario constraints. For the filtered key feature keywords, the context engine performs semantic normalization and knowledge graph anchoring to ensure that different expressions can be mapped to unified knowledge entities. This includes semantic normalization and knowledge graph anchoring. Semantic normalization converts spoken expressions, synonyms, aliases, and descriptions of different granularities into standardized entities or attributes. Knowledge graph anchoring maps the normalized key feature keywords to entity node IDs in the knowledge graph, and can further obtain the first-order neighbor subgraph, key relationship edges, or related path set of the node.Through this step, the system can standardize, quantify, and compute unstructured diagnostic data. By filtering keywords and anchoring KG, a compact and reasonable context is formed, thus providing a stable foundation for subsequent context-constrained question answering, real-time verification, and data collection guidance.
[0044] S4. Based on the reasoning background, perform retrieval enhancement to generate and output question-and-answer responses; return the question-and-answer responses and the guidance feedback related to data collection to the front end through a real-time channel to drive the front end to provide prompts, supplementary data collection guidance, or adjust the questionnaire process.
[0045] In this embodiment, after the system has completed knowledge graph anchoring and formed a reasoning context based on key physical characteristics keywords within the session, the knowledge service layer, upon receiving a user's natural language question, uses the reasoning context to constrain the retrieval and generation process, thereby performing enhanced retrieval generation and outputting a question-and-answer response. Specifically, the system first limits and filters the knowledge retrieval scope based on the anchored entity node set, associated subgraph or path information, and the weight / confidence information of key physical characteristics keywords contained in the aforementioned reasoning context. Preferably, evidence is retrieved only from knowledge graph fragments and corresponding text knowledge base content related to the physical characteristics, physical predisposition, or symptom path of the current session, to avoid generalized answers unrelated to the current acquisition state. Subsequently, the system generates a question-and-answer response consistent with the current diagnosis and treatment context by combining the retrieved structured evidence, such as the key points of the association path of physical characteristics—symptoms—treatment principles—prescriptions and text evidence summaries, with a large model adapted to the user's question input domain. The response may include explanations of the user's question, summaries of key points related to the reasoning context, and traceable evidence summary information, thereby improving the relevance and reliability of the answer. In addition to the question-and-answer text, the system also generates guidance feedback information related to data collection based on the reasoning background and the session-level diagnosis and treatment status cache, which is used to intervene in the collection quality in real time. The guidance feedback includes one or more of the following: consistency verification prompts, missing item prompts, low confidence review prompts, recommended supplementary collection items, and questionnaire process adjustment suggestions. For example, when there are contradictions in the collected physical signs in dimensions such as cold and heat, and deficiency and excess, a review prompt is output; when key physical signs are missing and have a significant impact on reasoning, a supplementary collection suggestion is output; or when the score of a certain type of physical sign reaches a threshold, a conditional jump / hide / addition suggestion for subsequent questionnaire modules is output. The system pushes the question-and-answer responses and the guidance feedback to the front-end interaction layer through a real-time channel, preferably WebSocket or Server-Sent Events, to achieve low-latency data transmission during the data collection process. After receiving the pushed content, the front-end drives the interface presentation based on the returned structured guidance information, including displaying the question-and-answer results in the questionnaire interface, marking contradictory or low-confidence items, guiding users to locate the target field or target medical component to complete supplementary data collection and verification, and showing / hiding, sorting, or conditionally jumping the questionnaire module when returning suggestions for process adjustments. This achieves a "collection as a service" mode of simultaneous data collection and service, improves data collection efficiency and data quality, and ensures that subsequent knowledge service outputs are consistent with the current session context.
[0046] In this embodiment, in order to transform the original multimodal data of the four diagnostic methods into structured physical sign information that can be calculated, stored and aligned with the TCM knowledge system, the system performs standardization processing and feature extraction on the data of different modalities respectively, and further maps the obtained quantification results into physical sign keywords (with confidence and numerical features attached when necessary) so as to facilitate subsequent session context updates, knowledge graph anchoring and retrieval enhancement generation.
[0047] In some embodiments, the standardization processing of the tongue image includes: color correction, tongue / tongue coating region segmentation, and quantification of color and coating thickness based on the segmented region, and mapping the quantization results to keywords related to tongue / tongue coating characteristics. For tongue images, considering that differences in ambient lighting, device white balance shifts, and exposure variations directly affect the consistency of clinical interpretation of tongue color, the system preferentially performs color correction processing on the input image first, aligning the color distribution in the preset color space with standard lighting conditions, thereby reducing the impact of color deviation on subsequent recognition. Subsequently, the tongue image is segmented into tongue body and tongue coating regions, further separating typical pathological areas such as cracks, petechiae, and teeth marks, ensuring that subsequent quantification is performed only within the target area and reducing background interference. After segmentation, the system quantifies color parameters and coating thickness, roughness, and uniformity based on the tongue body and tongue coating regions respectively, generating comparable numerical results. Based on preset mapping rules or model outputs, the quantification results are converted into tongue / tongue coating related characteristic keywords, such as reddish, pale red, or purplish tongue body, and white, yellow, greasy, or thick / thin tongue coating, thus transforming image information into structured characteristic expressions that can be used for reasoning.
[0048] In some embodiments, the standardization processing of the pulse wave signal includes: denoising and baseline drift correction, time series alignment, and time-domain and frequency-domain feature extraction, and outputting pulse type keywords and / or pulse rate and pulse position numerical features based on the features. For pulse wave signals, given that pulse waves are time-series signals and are susceptible to motion artifacts, changes in contact pressure, and baseline drift, the system preferably first performs denoising and baseline drift correction on the original pulse wave to improve the signal-to-noise ratio and eliminate the interference of low-frequency drift on feature calculation. Subsequently, to address the incomparability of waveforms caused by differences in individual heart rates and the scaling of acquisition time, the system aligns and standardizes the pulse wave time series, ensuring that key waveform structures can be stably extracted within a unified reference framework. Based on this, the system extracts pulse wave features from both the time and frequency domains. The preferred time-domain features include pulse rate, rhythmicity, peak waveform intensity, pulse width, rise / fall time, amplitude or pressure-related indicators reflecting floating or sinking, etc. The preferred frequency-domain features include dominant frequency, energy distribution, bandwidth, and wavelet decomposition coefficients, used to characterize the spectral features corresponding to complex pulse patterns such as slippery, rough, and wiry. The system then outputs pulse pattern type keywords based on the features and can simultaneously output numerical features or grading results such as pulse rate and pulse position to form interpretable and verifiable structured pulse diagnosis results.
[0049] In some embodiments, the standardized processing of the facial images / videos includes: face region detection, extraction of facial color and skin detail features, and body constitution-related multi-label recognition, and outputs facial color and facial feature-related vital sign keywords. For facial images / videos, the system preferably first performs face region detection and key region localization to ensure that subsequent feature extraction is completed within a controlled area and to reduce the influence of background, pose, and occlusion; on this basis, facial color and skin detail features are extracted, which may include color distribution, brightness / saturation, texture roughness, oiliness / dryness, and subtle feature changes in local areas, such as around the eyes, lips, and nose; then, the above features are comprehensively judged by a body constitution-related multi-label recognition model, and facial color, such as sallow, pale, flushed, etc., and facial feature-related vital sign keywords, such as oily, dry, etc., are output, thereby expressing the facial diagnosis information in a structured semantic manner.
[0050] In some embodiments, the processing of the audio speech includes speech recognition and natural language understanding to extract symptom entities and perform semantic normalization before outputting keywords related to auscultation and olfaction. For the audio speech, considering that auscultation and olfaction information is usually represented by both natural language and sound features, the system preferably first performs speech recognition to obtain text transcription results. Then, it further uses natural language understanding to extract symptom entities and parse attributes from the transcribed text, such as extracting symptom entities like cough, shortness of breath, chest tightness, and thirst, along with their degree, frequency, and triggering factors. The extracted results are then semantically normalized to match the system's standard terminology system or knowledge graph entity identifiers, ultimately outputting keywords related to auscultation and olfaction. In optional embodiments, the system can also combine the acoustic features of the audio, such as fundamental frequency, energy, speech rate, and pauses, to perform auxiliary quantification of breath strength and voice pitch, further improving the stability and consistency of the generated keywords related to auscultation and olfaction. Through the standardized processing and feature extraction process for different modalities described above, the system can convert the original multimodal data into a unified expression of vital signs keywords and numerical features, which not only improves data quality and comparability, but also facilitates subsequent intelligent question answering and data collection guidance with conversation-level context management, knowledge graph anchoring, and context constraints.
[0051] In some embodiments, when the original data of the four diagnostic multimodal methods is large file data, the front end first uploads it to object storage to obtain a data resource identifier, and the back end writes the data resource identifier into a message queue to asynchronously trigger standardization processing and feature extraction.
[0052] Specifically, considering that high-resolution tongue images, facial videos, pulse wavelength time-series data, and audio recordings—the raw data from the four diagnostic methods (diagnosis, diagnosis, and treatment)—are typically characterized by large file sizes, long upload times, and high computational demands, directly transmitting them along with business requests via synchronous interfaces and processing them within the same transaction could easily lead to front-end page blocking, interface timeouts, and back-end thread resource consumption, thus affecting the real-time interactive experience of the system in high-concurrency scenarios. Therefore, when the raw data from the four diagnostic methods is large file data, the system preferentially adopts an asynchronous processing mechanism using object storage and message queues: the front-end interaction layer first uploads the large file raw data to the object storage service to obtain a unique data resource identifier. This data resource identifier can be an access address, file ID, or a signed temporary URL in the object storage service, and is bound to metadata such as a session identifier, data type identifier, and collection timestamp. Subsequently, the front-end submits only the data resource identifier, not the complete file content, along with the session identifier, data type identifier, and necessary metadata to the back-end. After receiving the data resource identifier, the backend encapsulates it into a task message and writes it to the message queue. The task message includes at least a session identifier, data type identifier, data resource identifier, timestamp, and optional priority or retry count fields to achieve decoupled scheduling and reliable delivery of tasks. The standardization processing and feature extraction module, acting as a consumer of the message queue, asynchronously pulls the task message. Based on the data resource identifier, it retrieves the corresponding large file data from object storage and performs corresponding standardization processing and feature extraction to generate structured vital sign results such as vital sign keywords, confidence levels, and optional evidence citations / numerical features. The results are then written to structured storage, and the context engine is notified to refresh the session-level diagnosis and treatment status cache. Through this asynchronous mechanism, the frontend can receive a rapid response after uploading and continue with subsequent questionnaire completion or initiating question-and-answer requests. The backend can also complete time-consuming calculation tasks without blocking the real-time interaction link, thereby improving the overall system throughput, reducing the risk of interface timeouts, and ensuring real-time performance and scalability in the data collection as a service scenario.
[0053] In some embodiments, the conflict handling includes at least: when the self-reported questionnaire results conflict with the output results of the device / model, selecting a retained value or marking the conflicting item as deweighted according to confidence level or data source priority.
[0054] Specifically, since the same diagnostic element may come from different sources simultaneously—for example, users may subjectively fill in questionnaires, while the system collects data through devices such as tongue diagnostic instruments, pulse diagnostic instruments, and facial diagnostic instruments, and outputs corresponding vital sign results from the model—the two may be semantically inconsistent or contradictory. Without processing, conflicting information will directly enter the session-level diagnostic state cache and participate in subsequent knowledge graph anchoring and retrieval enhancement generation, easily leading to unstable reasoning background, divergent retrieval scope, and inconsistent question-and-answer results, thereby reducing the reliability of the system output. Therefore, the system implements a conflict handling mechanism when updating the session-level diagnostic state: when a conflict is detected between the questionnaire self-filled result and the device / model output result on the same vital sign field or the same semantic entity, the system preferably first compares the confidence levels associated with each candidate value. These confidence levels can be derived from model output probability, signal quality score, image quality score, or rule consistency verification results. When the confidence level difference reaches a preset threshold, the system selects the candidate value with higher confidence as the reserved value and writes it into the session state, while recording the other candidate value as an alternative or historical version for traceability. If the confidence levels of the two data sources are close or insufficient for direct judgment, the system further prioritizes data sources, favoring objective diagnostic equipment / model results over subjective self-reported results and the latest timestamp over the oldest timestamp. This ensures that the session status relies more on quantifiable and verifiable objective data collection results. Simultaneously, to avoid information loss due to simple overwriting, the system can also perform a weight reduction marking for unselected conflict items: retaining their values in the session cache but reducing their weight or confidence level, thus weakening their impact on subsequent inference, retrieval, and generation. The conflict item is then marked as requiring verification or having low confidence, prompting the user to request additional data collection, verification, or doctor intervention for confirmation. Through this conflict handling and weight reduction marking mechanism based on confidence level and data source priority, the system can maintain consistency and stability in the expression of diagnostic status under multi-source data input conditions, reduce the interference of contradictory information on knowledge anchoring and question-and-answer output, and improve the overall reliability and interpretability of data collection and intelligent services.
[0055] In some embodiments, the retrieval enhancement generation includes: retrieving evidence from the knowledge graph and / or text knowledge base using the anchored entity node or anchored subgraph as filtering conditions, and then generating a question-and-answer response by adapting the evidence to the natural language question input domain adaptation model.
[0056] In this embodiment, to ensure that the output of the intelligent question-answering engine is highly consistent with the user's currently collected information on the four diagnostic methods, the progress of question filling, and the TCM knowledge system, the system does not perform broad searching and generation solely based on the user's input natural language questions during retrieval enhancement generation. Instead, it uses anchored entity nodes or anchored subgraphs formed by the context engine as filtering and constraint conditions for the search. This limits the search scope and evidence content to knowledge fragments strongly related to the current conversational diagnosis and treatment state, thereby providing verifiable factual evidence and clear contextual boundaries for the large model during the generation stage. Specifically, the context engine maintains the diagnosis and treatment state vector in real time during the conversation. When a user submits or updates key characteristic keywords, the system uses a semantic normalization module to map spoken or diverse descriptions into standard entity identifiers in a knowledge graph. It then uses these entity nodes as anchor points to obtain their first-order neighbor subgraphs or a set of paths related to the current scene, forming an anchored subgraph. For example, a user's description of feeling dizzy would be categorized as the knowledge graph entity "dizziness," and further, its associated edges and adjacent nodes connected to nodes such as symptoms, constitution, treatment principles, and prescriptions in the knowledge graph would be extracted as the reasoning context for the current session. In this case, the retrieval part generated by the retrieval enhancement adopts a context constraint strategy: As a filtering condition, evidence retrieval is performed on the knowledge graph and / or text knowledge base. Preferably, only nodes, paths, and entries that have a preset relationship type with the anchored entity or are reachable within a preset step size are retrieved. These can be sorted by key feature weights and confidence levels to avoid retrieving generalized knowledge irrelevant to the current session. If a text knowledge base such as textbooks, guides, medical records, or rule bases also exists, the standard terminology and synonym set of the anchored entity are used as the search key, and the topic tags or path relationships of the anchored subgraph are used as filtering conditions to screen the text candidate set, ensuring semantic alignment between textual evidence and graph evidence. To further enhance context awareness, the system also integrates user natural language questions, questionnaire progress, and KG anchor point information into a context feature vector, and fuses them using a domain-adapted hybrid coding model, enabling both retrieval sorting and generation to utilize the comprehensive semantics expressed by this vector. Specifically, natural language questions are encoded to obtain a natural language question vector. The questionnaire progress module ID is encoded using one-hot encoding or embedding to obtain the questionnaire progress vector. The graph embedding vector of the anchor entity node is obtained through the graph embedding model. And the final context vector is generated through an attention-based fusion layer: ; in, , , The projection matrix is learnable. , This is a gate coefficient that is dynamically adjusted based on the interaction state; for example, when the user is in the question-asking phase, This can enhance the impact of knowledge graph semantics on retrieval and generation decisions, and improve the questionnaire completion stage. This allows for greater focus on the current module's data collection context. The retrieval phase can further utilize... The candidate evidence is scored and ranked based on its relevance, for example, for each candidate path or text evidence. Calculate the correlation: The system selects the top K pieces of evidence with the highest scores as input for generation. Then, in the generation part, to enable the domain-adapted large model to effectively utilize the conversational diagnosis and treatment state information provided by the context feature vectors, the system aligns the context feature vectors to the embedding space of the domain-adapted large model through a projection layer, achieving dimensional consistency and semantic alignment of the vector space. Specifically, the system inputs the filtered evidence set, including path points and text fragment summaries, along with the user question into the domain-adapted large model for generation. The domain-adapted large model is preferably obtained by fine-tuning a general pre-trained language model with TCM domain data, and its embedding space is aligned with the model's, allowing the model to directly utilize the contextual information of the current diagnosis and treatment state to generate answers. The resulting question-and-answer response not only includes a direct answer to the user question but also includes evidence points and reasoning clues related to the anchored entity or anchored subgraph, making the answer traceable and consistent with the current conversational state. By using the above-mentioned evidence retrieval with anchored entity nodes or anchored subgraphs as filtering conditions, and adapting the evidence to the natural language question input domain to generate question-and-answer responses for large models, the system can achieve accurate question-and-answer with context constraints during the collection process, reduce interference from irrelevant information and reduce the risk of hallucinations in large models in medical scenarios, thereby supporting real-time knowledge support and decision assistance in the collection-as-a-service model.
[0057] In some embodiments, the domain-adapted base model employs a general pre-trained language model (such as Llama or ChatGLM). Domain fine-tuning (SFT) is performed using millions of TCM medical case data and data from the textbook "TCM Diagnostics". The adaptation layer design adds a lightweight context projection layer before the input layer of the base model, specifically designed to align the fused context feature vectors to the LLM embedding space. This enables the large model to directly understand the current diagnostic and treatment state vector, thereby generating highly relevant and professional answers.
[0058] In some embodiments, the guidance feedback includes one or more of the following: consistency check prompts, missing item prompts, low confidence review prompts, recommended supplementary collection items, and questionnaire process adjustment suggestions; when the consistency check prompts detect contradictions in the symptoms, the corresponding symptom inference results or sign keywords are recorded as low confidence, and supplementary collection guidance or prompts for doctor intervention are triggered.
[0059] In this embodiment, to promptly identify and correct clinical inconsistencies between key diagnostic data during the data acquisition phase, the system integrates a rule engine and a TCM-KG-driven verification module in the business logic middleware layer to perform real-time consistency verification of key physical sign keywords in the session-level diagnosis and treatment status cache. When a user submits or updates key physical sign keywords, the context engine has already formed a reasoning background and maintained the source, timestamp, and confidence level of each physical sign. Based on this, the verification module performs cross-modal and cross-dimensional contradiction detection on physical signs from different sources, preferably establishing consistency constraints around symptom dimensions such as cold / heat, deficiency / excess, exterior / interior, and yin / yang. For example, the question field "very afraid of cold" usually points to yang deficiency or cold syndrome tendency, while the pulse diagnosis AI output "slippery number" is more inclined to phlegm-dampness, damp-heat, or heat syndrome path in TCM semantics. The two conflict in symptom dimension; at this time, the verification module can judge it as a symptom contradiction event based on a preset conflict rule table or reasoning rules based on knowledge graph paths. In a preferred implementation, the system first maps each key physical sign to the symptom attribute space in the knowledge graph, obtaining its corresponding symptom vector or label set. For example, cold intolerance is mapped to the cold syndrome / yang deficiency related label, and a slippery and rapid pulse is mapped to the heat syndrome / damp-heat related label. Then, the degree of conflict is calculated, and a consistency verification prompt is triggered when the degree of conflict exceeds a threshold. When a contradiction in symptoms is detected, the system does not directly discard the conflicting data, but marks the corresponding physical sign or symptom inference result as low confidence to reduce its impact on subsequent knowledge graph anchoring, retrieval enhancement generation, and constitution / symptom scoring. Simultaneously, it triggers supplementary data collection guidance or prompts doctor intervention to achieve guided data collection. Through this mechanism, the system can detect symptom contradictions in real time during the collection phase and perform low-confidence marking and supplementary data collection / manual confirmation triggers, transforming data collection from passive recording to active verification and guidance, significantly improving the accuracy, usability, and stability of subsequent intelligent question-and-answer output of key diagnostic data.
[0060] In some embodiments, the method further includes: receiving review feedback from users or experts regarding the question-and-answer response and structured symptom results; converting the review feedback into structured reward signals or knowledge triples to incrementally update the TCM knowledge graph, or fine-tuning the domain-adaptive large model through a reinforcement learning mechanism to achieve dynamic evolution of the knowledge system.
[0061] Specifically, in this embodiment, to achieve closed-loop learning of data, knowledge, and services and enable the system's capabilities to continuously evolve with real-world data and expert experience, the method, after outputting question-and-answer responses and forming structured physical characteristic results, further receives user or expert feedback on the question-and-answer responses and structured physical characteristic results. This feedback is then transformed into computable, storable, and usable structured data for updating the knowledge system, driving the continuous optimization of the TCM knowledge graph and the domain-adaptive large model. Specifically, the system provides an approval entry point at the front-end interaction layer, allowing users to confirm or correct the correctness, completeness, and usability of the question-and-answer responses. Experts are also allowed to review, reject, supplement, or rewrite physical characteristic keywords, confidence levels, constitution / symptom tendencies, and suggested content.
[0062] In some embodiments, the review feedback is transformed into a structured reward signal for targeted fine-tuning of a domain-adaptive large model using reinforcement learning. The system preferably maps feedback to preference pairs or reward values; for example, a positive reward is assigned to a response when an expert marks it as correct / acceptable; a negative reward is assigned when it is marked as incorrect / risky; and when it is marked as needing correction, a preference sample pair can be constructed from the original response and the expert's revised reference response to enable the model to learn a better answer generation strategy.
[0063] In some embodiments, the review feedback is further transformed into knowledge triples for incremental updates to the TCM knowledge graph, enabling dynamic evolution at the knowledge structure level. Specifically, the system extracts the relationships between physical sign keywords—symptoms / constitution—treatment principles / prescriptions / suggestions, etc., in the review feedback into structured knowledge in the form of entity-relationship-entity, and adds attribute fields such as confidence level, source, and timestamp. For example, when an expert confirms a correlation between a slippery and rapid pulse and a tendency towards damp-heat syndrome, a triple (slippery and rapid pulse, suggestion / correlation, damp-heat syndrome) can be formed; when an expert denies a correlation, a conflict triple can be formed or the confidence level of the original relationship can be lowered.
[0064] In some embodiments, the system can simultaneously perform incremental graph updates and model fine-tuning: graph updates improve the coverage and accuracy of structured knowledge retrieval and path reasoning, while model fine-tuning enhances the professionalism, consistency, and security of natural language question answering generation. After completing the update, the system can write the updated results back to the index and cache of the knowledge service layer, enabling subsequent conversations to retrieve updated evidence and generate answers that better align with expert preferences in similar reasoning contexts. Through the aforementioned structured transformation and incremental learning mechanism of review feedback, the system can continuously absorb real-world data and expert experience, forming a traceable and verifiable closed-loop evolutionary capability, thereby achieving dynamic evolution of the knowledge system and improving the long-term reliability and adaptability of the question answering service.
[0065] Example 2 Please see Figure 2 A real-time interactive data acquisition and question-and-answer device based on the TCM knowledge system, comprising: Front-end interaction module 1 is used to collect TCM consultation data through componentized forms in the front-end interaction layer, and to collect at least one type of four diagnostic methods multimodal raw data through medical components. The four diagnostic methods multimodal raw data includes at least one or more of the following: tongue image, pulse wave signal, facial image data, and voice audio. Context update module 2 is used to generate a context update event in the front-end interaction layer when the consultation data or the original data of the four diagnostic methods is added, modified or confirmed, and send the context update event to the back-end through a real-time channel. The context update event carries at least a session identifier, a data type identifier, a data key or data resource identifier and a timestamp. The context engine module 3 is used to perform standardization processing and feature extraction on the original multimodal data of the four diagnostic methods after the backend receives the context update event, and generate a structured physical sign result containing physical sign keywords and confidence levels; the backend context engine updates the session-level diagnosis and treatment state cache according to the context update event and the structured physical sign result, performs conflict handling and key physical sign keyword filtering, and performs semantic normalization on the filtered key physical sign keywords to anchor them to the entity nodes of the TCM knowledge graph, thereby obtaining the reasoning background corresponding to the session; The real-time feedback module 4 is used to perform retrieval enhancement generation and output question-and-answer responses based on the reasoning background; the question-and-answer responses and the guidance feedback related to the collection are returned to the front end through a real-time channel to drive the front end to provide prompts, supplementary collection guidance or adjust the questionnaire process.
[0066] Specific limitations regarding the real-time interactive data acquisition and question-and-answer device based on the TCM knowledge system can be found in the limitations of the real-time interactive data acquisition and question-and-answer method based on the TCM knowledge system mentioned above, and will not be repeated here. Each module in the aforementioned real-time interactive data acquisition and question-and-answer device based on the TCM knowledge system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0067] Those skilled in the art will understand that Figure 2 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the present application. The specific real-time interactive data acquisition and question-and-answer device based on the TCM knowledge system may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0068] Example 3 A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the real-time interactive data acquisition and question-and-answer method based on the traditional Chinese medicine knowledge system as described in Embodiment 1.
[0069] Example 4 In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. When the computer program is executed by the processor, it implements a real-time interactive data acquisition and question-and-answer method based on the Traditional Chinese Medicine knowledge system.
[0070] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0071] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps: including: S1. In the front-end interaction layer, TCM consultation data is collected through componentized forms, and at least one type of four diagnostic methods multimodal raw data is collected through medical components. The four diagnostic methods multimodal raw data includes at least one or more of the following: tongue image, pulse wave signal, facial image data, and voice audio. S2. When the consultation data or the original data of the four diagnostic methods are added, modified or confirmed, the front-end interaction layer generates a context update event and sends the context update event to the back-end through a real-time channel. The context update event carries at least a session identifier, a data type identifier, a data key or data resource identifier and a timestamp. S3. After receiving the context update event, the backend performs standardization processing and feature extraction on the original data of the four diagnostic methods and multimodal approaches to generate a structured physical sign result containing physical sign keywords and confidence levels. The backend's context engine updates the session-level diagnosis and treatment status cache according to the context update event and the structured physical sign result, performs conflict handling and key physical sign keyword filtering, and performs semantic normalization on the filtered key physical sign keywords to anchor them to entity nodes of the TCM knowledge graph to obtain the reasoning background corresponding to the session. S4. Based on the reasoning background, perform retrieval enhancement to generate and output question-and-answer responses; return the question-and-answer responses and the guidance feedback related to the collection to the front end through a real-time channel to drive the front end to provide prompts, supplementary collection guidance, or adjust the questionnaire process.
[0072] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0073] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0074] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A real-time interactive data acquisition and question-and-answer method based on the TCM knowledge system, characterized in that, include: S1. In the front-end interaction layer, TCM consultation data is collected through componentized forms, and at least one type of four diagnostic methods multimodal raw data is collected through medical components. The four diagnostic methods multimodal raw data includes at least one or more of the following: tongue image, pulse wave signal, facial image data, and voice audio. S2. When the consultation data or the original data of the four diagnostic methods are added, modified or confirmed, the front-end interaction layer generates a context update event and sends the context update event to the back-end through a real-time channel. The context update event carries at least a session identifier, a data type identifier, a data key or data resource identifier and a timestamp. S3. After receiving the context update event, the backend performs standardization processing and feature extraction on the original data of the four diagnostic multimodal methods to generate structured physical sign results containing physical sign keywords and confidence levels. The backend context engine updates the session-level diagnosis and treatment status cache based on the context update event and the structured physical sign results, performs conflict handling and key physical sign keyword filtering, and performs semantic normalization on the filtered key physical sign keywords to anchor them to the entity nodes of the TCM knowledge graph, thereby obtaining the reasoning background corresponding to the session. S4. Based on the reasoning background, perform retrieval enhancement generation and output question-and-answer response. The retrieval enhancement generation further includes: constructing a context feature vector, which is obtained by weighted fusion of natural language question vector, questionnaire progress vector, and graph embedding vector of anchored entity nodes through an attention mechanism; using the context feature vector to rank the retrieved evidence by relevance, and aligning the context feature vector to the embedding space of the domain-adaptive large model through a projection layer; returning the question-and-answer response and collection-related guidance feedback to the front end through a real-time channel to drive the front end to provide prompts, supplementary collection guidance, or questionnaire process adjustments, and receiving review feedback from users or experts on the question-and-answer response and structured characteristics results. The review feedback is transformed into structured reward signals or knowledge triples, and the TCM knowledge graph is incrementally updated, or the domain-adaptive large model is fine-tuned through reinforcement learning mechanisms to achieve dynamic evolution of the knowledge system.
2. The real-time interactive data acquisition and question-and-answer method based on the TCM knowledge system according to claim 1, characterized in that, The standardization processing of the tongue image includes: color correction, tongue body / tongue coating region segmentation, and quantification of color and coating thickness based on the segmented region, and mapping the quantization results to keywords related to tongue body / tongue coating characteristics.
3. The real-time interactive data acquisition and question-and-answer method based on the TCM knowledge system according to claim 1, characterized in that, The standardization processing of the pulse wave signal includes: denoising and baseline drift correction, time series alignment, and time-domain and frequency-domain feature extraction, and outputs pulse type keywords and / or pulse rate and pulse position numerical features based on the features.
4. The real-time interactive data acquisition and question-and-answer method based on the TCM knowledge system according to claim 1, characterized in that, When the original data for the four diagnostic multimodal methods is large file data, the front end first uploads it to object storage to obtain a data resource identifier, and the back end writes the data resource identifier into a message queue to asynchronously trigger standardization processing and feature extraction.
5. The real-time interactive data acquisition and question-and-answer method based on the TCM knowledge system according to claim 1, characterized in that, The conflict handling includes at least the following: when the self-reported questionnaire results conflict with the output results of the device / model, select the retained value or mark the conflicting item as deweighted according to the confidence level or data source priority.
6. The real-time interactive data acquisition and question-and-answer method based on the TCM knowledge system according to claim 1, characterized in that, The guidance feedback includes one or more of the following: consistency check prompts, missing item prompts, low confidence review prompts, recommended supplementary data collection items, and questionnaire process adjustment suggestions; when the consistency check prompts detect contradictions in the symptoms, the corresponding symptom inference results or sign keywords are recorded as low confidence, and supplementary data collection guidance or prompts for doctor intervention are triggered.
7. A real-time interactive data acquisition and question-and-answer device based on the knowledge system of Traditional Chinese Medicine, characterized in that, The real-time interactive data acquisition and question-and-answer device based on the TCM knowledge system includes: The front-end interaction module is used to collect TCM consultation data through componentized forms in the front-end interaction layer, and to collect at least one type of four diagnostic methods multimodal raw data through medical components. The four diagnostic methods multimodal raw data include at least one or more of the following: tongue image, pulse wave signal, facial image data, and voice audio. The context update module is used to generate a context update event in the front-end interaction layer when the consultation data or the original data of the four diagnostic methods and multimodal data is added, modified or confirmed, and send the context update event to the back-end through a real-time channel. The context update event carries at least a session identifier, a data type identifier, a data key or data resource identifier and a timestamp. The context engine module is used to perform standardization processing and feature extraction on the original multimodal data of the four diagnostic methods after the backend receives the context update event, and generate structured physical sign results containing physical sign keywords and confidence levels; the backend context engine updates the session-level diagnosis and treatment state cache according to the context update event and the structured physical sign results, performs conflict handling and key physical sign keyword filtering, and performs semantic normalization on the filtered key physical sign keywords to anchor them to entity nodes of the TCM knowledge graph, thereby obtaining the reasoning background corresponding to the session; The real-time feedback module is used to perform retrieval enhancement generation and output question-and-answer responses based on the reasoning background. The retrieval enhancement generation further includes: constructing a context feature vector, which is obtained by weighted fusion of natural language question vectors, questionnaire progress vectors, and graph embedding vectors of anchored entity nodes through an attention mechanism; using the context feature vector to rank the retrieved evidence by relevance, and aligning the context feature vector to the embedding space of the domain-adaptive large model through a projection layer; returning the question-and-answer responses and collection-related guidance feedback to the front end through a real-time channel to drive the front end to provide prompts, supplementary collection guidance, or questionnaire process adjustments, and receiving review feedback from users or experts on the question-and-answer responses and structured physical characteristic results; converting the review feedback into structured reward signals or knowledge triples to incrementally update the TCM knowledge graph, or fine-tuning the domain-adaptive large model through a reinforcement learning mechanism to achieve dynamic evolution of the knowledge system.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the real-time interactive data acquisition and question-and-answer method based on the traditional Chinese medicine knowledge system as described in any one of claims 1-6.
Citation Information
Patent Citations
Interrogation method and device for assisting traditional Chinese medicine, equipment and storage medium
CN119132519A
Traditional Chinese medicine intelligent inquiry method and system based on AI big language model
CN120067279A