Portable ai psychiatric assistant recording device

Through the collaborative processing of multimodal perception, terminology enhancement, context reconstruction, and template generation modules, the problem of processing unstructured speech information and professional terminology in portable AI-assisted psychiatric recording technology has been solved, achieving efficient and accurate medical record generation and adaptive capabilities.

CN122157925APending Publication Date: 2026-06-05BEIJING HAOXINQING MOBILE MEDICAL TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING HAOXINQING MOBILE MEDICAL TECH CO LTD
Filing Date
2026-02-28
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing portable AI-assisted psychiatric recording technology struggles to accurately process unstructured speech information and technical terminology during doctor-patient interactions, resulting in compromised semantic integrity and low efficiency in medical record generation.

Method used

A multimodal perception module is used to separate doctor and patient speech and extract acoustic features. Combined with a terminology enhancement module and knowledge graph matching, a context reconstruction module is used to establish long-range dialogue dependencies. A template generation module and a meta-learning adaptation module are used for dynamic optimization to generate standardized medical records.

Benefits of technology

It significantly improves the accuracy and efficiency of medical record generation, reduces the workload of manual review, and the system has the ability to dynamically evolve to adapt to complex clinical scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157925A_ABST
    Figure CN122157925A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of medical informatics, and in particular to a portable AI psychiatric auxiliary recording device, a multi-modal sensing module collects audio signals of doctor-patient conversations, separates the voices of doctors and patients and extracts labeled acoustic feature vectors. The term enhancement module converts the acoustic features into text and outputs standard term annotations in combination with a psychiatric knowledge graph. The context reconstruction module analyzes long-range conversation dependencies to generate a structured semantic abstract. The template generation module fills in the medical record template based on the abstract and outputs a standardized draft. The meta-learning adaptation module monitors the output of each module and dynamically updates the parameters through distributed learning. The device uses beamforming, graph attention networks, Transformer-XL architecture and federated learning, etc. to solve the problem of unstructured voice analysis in psychiatric conversations, achieve accurate term mapping and automatic generation of medical records, improve accuracy and efficiency, and reduce the burden of manual review.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical informatics technology, and more particularly to a portable AI-assisted psychiatric recording device. Background Technology

[0002] In real-time doctor-patient interaction and medical record generation scenarios in psychiatric outpatient clinics, portable AI psychiatric auxiliary recording technology integrates lightweight mobile devices and artificial intelligence systems. Its core artificial intelligence component adopts natural language processing algorithms to automatically identify symptom descriptions, emotional states, and medical history elements by analyzing the semantic content of doctor-patient dialogues. The speech recognition module simultaneously converts oral communication into text data streams, providing input for subsequent processing. The auxiliary recording function relies on machine learning models to extract structured clinical information from the dialogue.

[0003] Existing portable AI-assisted psychiatric recording technologies suffer from the following technical challenges: In real-time doctor-patient interactions during psychiatric outpatient visits, open-ended questions posed by doctors to guide patients in describing their symptoms often result in highly colloquial, illogical, and emotionally charged responses, forming an unstructured stream of speech information. Simultaneously, the ambiguity and context-dependent nature of psychiatric terminology and symptom descriptions make it difficult for general speech recognition and natural language processing models to accurately capture and distinguish key medical entities and their semantic relationships. For example, when a doctor asks "How have you been feeling lately?", a patient might answer "I feel suffocated, and I keep waking up at night." Such statements require precise mapping to standardized medical record entries like "anxiety" and "difficulty maintaining sleep," but existing technologies are prone to ambiguity in interpreting these vague descriptions, leading to compromised semantic integrity in the generated medical records and increased manual review workload. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a portable AI-assisted recording device for psychiatry. This invention solves the technical problem of semantic comprehension bias and low efficiency when AI automatically generates standardized medical records due to the unstructured nature of voice information and the density of professional terminology in psychiatric doctor-patient dialogues.

[0005] To solve the above-mentioned technical problems, the specific contents of the present invention are as follows:

[0006] The portable AI-assisted psychiatric recording device provided by this invention includes: A multimodal perception module is used to collect audio signals of doctor-patient dialogue, process the audio signals to separate the doctor's and patient's speech, and extract acoustic feature vectors with speaker labels. The terminology enhancement module is used to receive the acoustic feature vector output by the multimodal perception module, perform speech recognition on the acoustic feature vector to generate initial text, match the initial text with the psychiatric knowledge graph, and output annotated text with standard medical terminology codes and confidence scores. The context reconstruction module is used to receive the annotated text output by the terminology enhancement module, perform long-range dialogue dependency modeling on the annotated text to generate a structured semantic summary, the semantic summary including clinical information extracted from doctor-patient dialogue; The template generation module is used to receive the semantic summary generated by the context reconstruction module, fill in the fixed fields of the medical record template according to medical standards, and generate natural language description fields to output a standardized medical record draft. The meta-learning adaptation module is used to monitor the confidence score output by the terminology enhancement module, the semantic summary generated by the context reconstruction module, and the draft medical record output by the template generation module. Based on the monitoring results, the module updates the parameters in the terminology enhancement module, the context reconstruction module, and the template generation module through a distributed learning strategy.

[0007] Furthermore, in the portable AI-assisted psychiatric recording device of the present invention, the multimodal perception module is also used for: The raw, mixed audio stream is acquired using a beamforming microphone array; The generalized cross-correlation algorithm is used to calculate the time difference of arrival (TDOA) of the original mixed audio stream, and the sound source is located based on the TDOA. The environmental noise is eliminated by using a generalized sidelobe cancellation algorithm on the located sound source signal to obtain a clean speech signal; The pure speech signal is input into a deep clustering network, the voiceprint features are extracted through the deep clustering network, and the spectral mapping method is used to distinguish the vocal tract characteristics of doctors and patients, thereby completing speaker separation and obtaining the separated independent speech channels. The separated independent speech channels are input into an adversarial autoencoder. The encoder of the adversarial autoencoder encodes the speech signal into a latent space representation. The decoder reconstructs the signal from the latent space representation. At the same time, a discriminant network distinguishes between normal and abnormal pronunciation patterns. Driven by an adversarial loss function, the adversarial autoencoder outputs an acoustic feature vector that includes fundamental frequency and formant prosodic information.

[0008] Furthermore, in the portable AI-assisted psychiatric recording device of the present invention, the terminology enhancement module is also used for: Receive the acoustic feature vector output by the multimodal sensing module; The received acoustic feature vectors are converted into preliminary text through the speech recognition submodule; The knowledge graph query engine is launched, and the graph attention network is used to traverse the symptom, sign and drug nodes to calculate the semantic similarity between the preliminary text and the knowledge graph nodes. The similarity threshold used for term recognition is dynamically adjusted by applying a course learning strategy. The course learning strategy adopts a difficulty sample ranking algorithm, which uses a loose similarity threshold to collect samples in the early stage of the dialogue and tightens the similarity threshold in the later stage of the dialogue. A bidirectional gated loop unit is used to analyze the contextual semantics of the preliminary text and generate multiple candidate term mappings for colloquial expressions; Based on dynamically adjusted similarity thresholds and multi-candidate term mapping, the output is labeled text with standard medical term codes, confidence scores, and knowledge graph paths. The confidence score output by the terminology enhancement module is passed as a weight parameter to the attention layer of the context reconstruction module.

[0009] Furthermore, in the portable AI-assisted psychiatric recording device of the present invention, the context reconstruction module is also used for: Receive the annotation text output by the terminology enhancement module; The annotated text stream is processed using the Transformer-XL architecture, which employs a fragment-level loop mechanism to combine the state vectors of the current dialogue fragment with those of the previous fragment, thereby modeling dependencies across multiple dialogue turns. The dialogue state is managed by a gating memory unit. The gating memory unit sets an information retention strategy based on the type of doctor’s question and controls the flow of information by updating and resetting the gate. Adversarial training is used to generate semantic embeddings. A generator produces semantic embedding representations of dialogues, and a discriminator judges the rationality of the semantic embedding representations based on a historical medical record database. Output a structured semantic summary of the dialogue, which includes symptom clusters, timeline, and severity assessment. The information generated by the context reconstruction module is transmitted back to the terminology enhancement module.

[0010] Furthermore, in the portable AI-assisted psychiatric recording device of the present invention, the template generation module is also used for: Receive the semantic summary generated by the context reconstruction module; A dual-path processing architecture based on a neural symbolic system is used to process semantic summaries: the symbolic path performs rule-based reasoning based on first-order logic to fill in fields with fixed structures in the medical record template; the neural network path uses a generative adversarial network, where the generator of the generative adversarial network generates natural language description fields based on the semantic summary, and the discriminator evaluates the authenticity of the generated fields. The generation process of symbolic paths and neural network paths is supervised by a proximal policy optimization algorithm. The proximal policy optimization algorithm adjusts the policy network parameters through importance sampling. The reward function of the proximal policy optimization algorithm is defined by field integrity, terminology standardization and logical consistency. Perform secondary logical verification on the draft medical record generated by dual-path processing, and output standardized medical record text; The template generation module compares the results of the symbol path with the results of the neural network path, and sends the resulting information to the meta-learning adaptation module.

[0011] Furthermore, in the portable AI-assisted psychiatric recording device of the present invention, the meta-learning adaptation module is also used for: The meta-learning adaptation module is also used for: The system continuously monitors the confidence score output by the terminology enhancement module, the semantic summary generated by the context reconstruction module, and the draft medical record output by the template generation module, and evaluates the system performance based on the monitoring data. When the evaluation results indicate that a rare symptom description has indeed been encountered, a model-agnostic meta-learning framework is adopted, and the parameters of the terminology enhancement module, the context reconstruction module, and the template generation module are quickly adjusted using a small number of historical similar cases through the gradient descent optimization algorithm. The knowledge distillation process is performed by generating soft tags through a large teacher model in the cloud, and the student model on the device imitates the output distribution of the teacher model to achieve model compression. A federated learning strategy is adopted for distributed parameter updates. After each deployment device updates its parameters locally, it sends the updated parameters to the server. The server aggregates the parameters from multiple deployment devices to generate a global model. The aggregated global model parameters are synchronously distributed to the terminology enhancement module, the context reconstruction module, and the template generation module, and their respective parameters are updated. The meta-learning adaptation module dynamically decides whether to perform parameter optimization locally or initiate a new round of federated aggregation based on system load and accuracy performance.

[0012] Furthermore, in the portable AI-assisted psychiatric recording device of the present invention, the course learning strategy applied in the terminology enhancement module dynamically adjusts the similarity threshold, including: In the initial stage of the dialogue, set a low initial similarity threshold; Using a graph attention network, preliminary text and knowledge graph nodes are matched with the initial similarity threshold to obtain matching results; As the number of dialogue rounds increases, the cumulative terminology mapping results and corresponding confidence scores output by the terminology enhancement module increase. When the cumulative number of samples reaches a first predetermined value and the average confidence score of the cumulative samples exceeds a second predetermined value, it is determined that sufficient preliminary learning samples have been obtained. Based on the aforementioned determination, the course learning strategy linearly increases the similarity threshold to obtain the adjusted similarity threshold; In subsequent dialogues, the graph attention network uses an adjusted similarity threshold for term matching.

[0013] Furthermore, in the portable AI-assisted psychiatric recording device of the present invention, the context reconstruction module enables a deep parsing mode based on the confidence score of the terminology enhancement module, including: The terminology enhancement module calculates the confidence score of each term mapping in the annotated text in real time; Each calculated confidence score is compared with a preset dynamic threshold, which is adjusted based on historical data; When the comparison results detect that the confidence scores of multiple consecutive terms are lower than the dynamic threshold, the current dialogue segment is determined to contain a complex symptom description. Send a parsing request signal to the context reconstruction module; The context reconstruction module receives a parsing request signal and activates an internal backup neural network, which is loaded with specially trained weight parameters. The activated standby neural network performs semantic disambiguation and deep reasoning on the context corresponding to low-confidence terms.

[0014] Furthermore, in the portable AI-assisted psychiatric recording device of the present invention, the reward function of the proximal strategy optimization algorithm used in the template generation module is calculated in the following manner: The medical record draft generated by the scan template generation module is checked for missing preset required fields, and the proportion of filled fields to the total required fields is calculated to obtain a completeness score. Extract all medical terms from the draft medical record, match the extracted medical terms with the standard medical terminology database, count the number of completely matched terms and calculate the average semantic similarity to obtain the normativity score. The system uses a predefined set of rules to check for inconsistencies between symptom descriptions and timelines, and uses a trained neural network model to analyze the plausibility of clinical associations between symptoms, outputting a consistency score. The integrity score, normalization score, and consistency score are weighted and summed to generate the single-step reward value of the near-end policy optimization algorithm; The single-step reward value is used to adjust the generation strategy of the generative adversarial network.

[0015] Furthermore, in the portable AI-assisted psychiatric recording device of the present invention, the meta-learning adaptation module is configured as follows: After training the model locally on each deployment device, Gaussian noise is added to the parameters that need to be uploaded to the server; The variance of the Gaussian noise is calculated based on a preset privacy budget parameter; The server receives local parameters with Gaussian noise added, and uses a secure aggregation algorithm to aggregate the noise-added parameters from multiple deployment devices to generate a noisy global model. Distribute the noisy global model to each deployed device; Each deployed device uses the received noisy global model for the next round of local training; By repeating the above process, the distributed iterative optimization of the complete device model is achieved.

[0016] Beneficial effects of this invention; This invention provides a portable AI-assisted recording device for psychiatric patients. Through a beamforming microphone array and adversarial autoencoder technology in a multimodal perception module, it effectively separates doctor-patient speech and extracts acoustic feature vectors with emotional prosody, significantly improving the processing quality of unstructured speech information. A terminology enhancement module, combining knowledge graphs and curriculum learning strategies, achieves dynamic and accurate mapping from colloquial expressions to standard medical terminology, resolving recognition bias caused by terminology ambiguity. A context reconstruction module, employing a Transformer-XL architecture and gated memory units, establishes a long-range dialogue dependency model, fully capturing the temporal correlation and severity evolution of symptoms. A template generation module, using a dual-path architecture of a neural symbol system, balances rule constraints with generation flexibility, outputting standardized medical records that conform to medical standards. A meta-learning adaptation module, based on federated learning and differential privacy technology, continuously optimizes the model while protecting patient privacy, enabling the system to dynamically evolve and adapt to complex clinical scenarios. Closed-loop feedback is formed between modules through confidence weight allocation, semantic embedding backpropagation, and parameter collaborative updates, comprehensively improving the accuracy, efficiency, and adaptability of psychiatric medical record generation, significantly reducing the workload of manual review. Attached Figure Description

[0017] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on the drawings without creative effort.

[0018] Figure 1 This is a system architecture diagram of the portable AI-assisted recording device for psychiatry of the present invention. Detailed Implementation

[0019] To make the technical solution of the present invention clearer, the present invention will be clearly and completely described below with reference to specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The present invention provided by various embodiments will be described in detail below with reference to the accompanying drawings. To better understand the purpose of the present invention, the present invention will be described in further detail below.

[0020] Please see Figure 1 The portable AI-assisted recording device for psychiatry provided by the present invention includes: A multimodal perception module is used to collect audio signals of doctor-patient dialogue, process the audio signals to separate the doctor's and patient's speech, and extract acoustic feature vectors with speaker labels. The terminology enhancement module is used to receive the acoustic feature vector output by the multimodal perception module, perform speech recognition on the acoustic feature vector to generate initial text, match the initial text with the psychiatric knowledge graph, and output annotated text with standard medical terminology codes and confidence scores. The context reconstruction module is used to receive the annotated text output by the terminology enhancement module, perform long-range dialogue dependency modeling on the annotated text to generate a structured semantic summary, the semantic summary including clinical information extracted from doctor-patient dialogue; The template generation module is used to receive the semantic summary generated by the context reconstruction module, fill in the fixed fields of the medical record template according to medical standards, and generate natural language description fields to output a standardized medical record draft. The meta-learning adaptation module is used to monitor the confidence score output by the terminology enhancement module, the semantic summary generated by the context reconstruction module, and the draft medical record output by the template generation module. Based on the monitoring results, the module updates the parameters in the terminology enhancement module, the context reconstruction module, and the template generation module through a distributed learning strategy.

[0021] A portable AI-assisted recording device for psychiatric patients utilizes a multi-module collaborative processing mechanism to automatically generate standardized medical records from audio signals of doctor-patient conversations. The multimodal perception module employs a beamforming microphone array to acquire the raw, mixed audio stream, and a generalized cross-correlation algorithm calculates the time difference of arrival (TDOA) to locate the sound source. A generalized sidelobe cancellation algorithm eliminates environmental noise, outputting a clean speech signal. A deep clustering network extracts voiceprint features, and a spectral mapping method distinguishes the vocal tract characteristics of doctors and patients, achieving speaker separation. An adversarial autoencoder encodes the separated speech signal into a latent spatial representation, and a discriminant network distinguishes between normal and abnormal pronunciation patterns, generating acoustic feature vectors that include fundamental frequency and formant prosodic information. These vectors are labeled with the speaker's name, providing structured input for subsequent modules.

[0022] The terminology enhancement module receives the acoustic feature vector output by the multimodal perception module, and the speech recognition submodule converts the acoustic feature vector into preliminary text. The knowledge graph query engine starts simultaneously, using a graph attention network to traverse the symptom, sign, and drug nodes in the psychiatry knowledge graph, calculating the semantic similarity between the preliminary text and the graph nodes. The course learning strategy dynamically adjusts the similarity threshold used for terminology recognition, employing a difficulty-sample ranking algorithm. A relaxed similarity threshold is used in the early stages of the dialogue to collect samples, while the threshold is tightened in the later stages to improve accuracy. A bidirectional gated recurrent unit analyzes the contextual semantics of the preliminary text, generating multiple candidate term mappings for colloquial expressions such as "feeling suffocated." The output is labeled text with standard medical terminology codes, confidence scores, and knowledge graph paths; the confidence scores are used as weight parameters and passed to the attention layer of subsequent modules.

[0023] The context reconstruction module receives the annotated text output by the terminology enhancement module and processes the annotated text stream using the Transformer-XL architecture. The Transformer-XL architecture's fragment-level loop mechanism combines the state vectors of the current dialogue fragment with those of the previous fragment, modeling dependencies across multiple turns. A gated memory unit manages the dialogue state, setting information retention strategies based on the doctor's question type and controlling information flow through update and reset gates. Adversarial training generates semantic embeddings; the generator produces semantic embedding representations of the dialogue, and the discriminator judges the reasonableness of these representations based on a historical medical record database. A structured semantic summary is output, including symptom clusters, timelines, and severity assessments. This semantic summary is then fed back to the terminology enhancement module to optimize the knowledge graph relation representation.

[0024] The template generation module receives the semantic summary generated by the context reconstruction module and employs a dual-path processing architecture based on a neural symbolic system. The symbolic path performs rule-based reasoning based on first-order logic, filling in structurally fixed fields in the medical record template, such as chief complaint and present illness. The neural network path uses a generative adversarial network; the generator produces natural language descriptive fields, such as personal history and family history, based on the semantic summary, and a discriminator evaluates the authenticity of the generated fields. A proximal policy optimization algorithm supervises the generation process of both the symbolic and neural network paths, adjusting the policy network parameters through importance sampling. The reward function is jointly defined by field completeness, terminology standardization, and logical consistency. A secondary logical check is performed on the draft medical record generated by the dual-path processing, outputting standardized medical record text. The template generation module compares the results of the symbolic path with those of the neural network path, and the resulting information is sent to the meta-learning adaptation module.

[0025] The meta-learning adaptation module continuously monitors the confidence scores output by the terminology enhancement module, the semantic summaries generated by the context reconstruction module, and the draft medical records output by the template generation module, evaluating system performance based on the monitoring data. The model-agnostic meta-learning framework uses a gradient descent optimization algorithm to quickly adjust the parameters of the terminology enhancement, context reconstruction, and template generation modules using a small number of historically similar cases. The knowledge distillation process generates soft labels using a large-scale teacher model in the cloud, while student models on the devices mimic the output distribution of the teacher model, achieving model compression. A federated learning strategy performs distributed parameter updates; each deployed device updates its parameters locally and sends the updated parameters to the server, which aggregates the parameters from multiple deployed devices to generate a global model. Differential privacy technology protects patient data security by adding Gaussian noise; the variance of the Gaussian noise is calculated based on a preset privacy budget parameter. The aggregated global model parameters are synchronously distributed to each module, updating their respective parameters. The meta-learning adaptation module dynamically decides whether to perform local parameter optimization or initiate a new round of federated aggregation based on system load and accuracy performance.

[0026] A multi-dimensional feedback mechanism is established among the modules. The confidence score output by the terminology enhancement module controls the attention allocation weight of the context reconstruction module. The semantic embedding generated by the context reconstruction module back-optimizes the relational representation of the knowledge graph. The rule engine of the template generation module forms a bidirectional verification with the neural network. The meta-learning adaptation module coordinates the parameter update direction of each module through gradient sharing. When the terminology enhancement module detects low-confidence complex terms, it sends a parsing request signal to the context reconstruction module, activating the internal backup neural network for deep parsing. This non-linear interaction mechanism enables the system to have dynamic evolution capabilities, improving the accuracy of medical record generation to address the unstructured characteristics of psychiatric dialogues.

[0027] The multimodal perception module of the portable AI-assisted psychiatric recording device uses a beamforming microphone array to acquire the raw mixed audio stream. The microphone array enhances the signal acquisition capability of the target sound source by adjusting the beam direction. A generalized cross-correlation algorithm calculates the time difference of arrival (TDOA) and uses the time difference of sound arrival at different microphones to complete the sound source localization, providing spatial information for subsequent speaker separation. A generalized sidelobe cancellation algorithm suppresses environmental noise and outputs a clean speech signal through adaptive filtering, improving speech quality. A deep clustering network extracts voiceprint features and uses unsupervised learning to cluster speech segments. A spectral mapping method analyzes the differences in vocal tract characteristics between doctors and patients to complete speaker separation and obtain independent speech channels. An adversarial autoencoder encodes the separated speech signal into a latent spatial representation. The encoder compresses speech features, the decoder attempts to reconstruct the signal, and the discriminant network distinguishes between normal and abnormal pronunciation patterns. Driven by an adversarial loss function, it outputs an acoustic feature vector including fundamental frequency and formant prosodic information. The vector carries speaker labels, providing structured input for subsequent modules.

[0028] The terminology enhancement module receives acoustic feature vectors output by the multimodal perception module. The speech recognition submodule converts these acoustic features into preliminary text, employing an end-to-end deep learning model for high-precision conversion. A knowledge graph query engine is launched simultaneously. The psychiatric knowledge graph includes nodes for symptoms, signs, and medications. A graph attention network traverses the nodes and calculates the semantic similarity between the preliminary text and the nodes, dynamically adjusting the node importance distribution. A course learning strategy manages the similarity threshold. Initially, a lower threshold is set to collect a wide range of samples. As the number of dialogue rounds increases, the terminology mapping results and confidence scores accumulate. When the number of samples reaches a predetermined threshold and the average confidence score is high, the similarity threshold is linearly increased to improve terminology recognition accuracy. A bidirectional gated recurrent unit analyzes the contextual semantics of the preliminary text, generating multiple candidate terminology mappings for colloquial expressions such as "feeling depressed," and outputting annotated text with standard medical terminology codes, confidence scores, and knowledge graph paths. The confidence score is used as a weight parameter and fed into the attention layer of the context reconstruction module to optimize information allocation.

[0029] The context reconstruction module receives annotated text from the terminology enhancement module. The Transformer-XL architecture processes the text stream, and a fragment-level loop mechanism combines the state vectors of the current dialogue fragment with those of the previous fragment, modeling long-term dependencies across multiple turns. A gated memory unit manages the dialogue state, setting information retention strategies based on the type of doctor's question (open-ended or closed-ended), controlling information flow through update and reset gates to retain key historical information. Adversarial training generates semantic embeddings. The generator produces semantic embedding representations of the dialogue, and the discriminator judges the reasonableness of the embeddings based on a historical medical record database. Mini-maximum game theory is used to improve embedding quality, outputting a structured semantic summary, including symptom clusters, timelines, and severity assessments. The semantic summary is then fed back to the terminology enhancement module to optimize knowledge graph node relationships, forming a feedback loop.

[0030] The template generation module receives the semantic summary generated by the context reconstruction module. The neural symbol system adopts a dual-path processing architecture. The symbol path performs rule-based reasoning based on first-order logic, filling in fixed fields such as chief complaint and present illness history in the medical record template, adhering to medical standards. The neural network path uses a generative adversarial network. The generator generates natural language descriptive fields such as personal history and family history based on the semantic summary. The discriminator evaluates the authenticity of the generated fields to ensure that the content conforms to clinical reality. The proximal policy optimization algorithm supervises the generation process, adjusting the policy network parameters through importance sampling. The reward function is jointly defined by field completeness, terminology standardization, and logical consistency. Scanning the draft medical record calculates the proportion of filled fields to obtain a completeness score, matching medical terms with the standard library to obtain a standardization score, checking for contradictions in symptom descriptions to obtain a consistency score, and weighted summation to generate a single-step reward value. The dual-path output undergoes secondary logical verification, outputting standardized medical record text, and the comparison results are sent to the meta-learning adaptation module.

[0031] The meta-learning adaptation module continuously monitors the confidence scores output by the terminology enhancement module, the semantic summaries generated by the context reconstruction module, and the draft medical records output by the template generation module, evaluating system performance based on the monitoring data. When encountering rare symptom descriptions, the model-agnostic meta-learning framework uses a gradient descent optimization algorithm to quickly adjust the parameters of the terminology enhancement, context reconstruction, and template generation modules using a small number of historically similar cases, achieving rapid adaptation. The knowledge distillation process generates soft labels using a large-scale teacher model in the cloud, while the student models on the devices mimic the output distribution of the teacher model, achieving model compression and improving portability. A federated learning strategy performs distributed parameter updates. After each deployed device trains its model locally, Gaussian noise is added to the parameters. The noise variance is calculated based on privacy budget parameters. The server uses a secure aggregation algorithm to aggregate the noisy parameters, generating a global model and distributing it to each device, achieving iterative optimization with privacy protection. The meta-learning adaptation module dynamically decides whether to optimize local parameters or initiate federated aggregation based on system load and accuracy performance, coordinating module updates.

[0032] The terminology enhancement module employs a learning strategy that dynamically adjusts the similarity threshold. A lower initial similarity threshold is set at the beginning of the dialogue, and the graph attention network uses this initial threshold to match preliminary text with knowledge graph nodes, obtaining broad matching results. As the dialogue rounds increase, the accumulated terminology mapping results and corresponding confidence scores are analyzed. When the cumulative number of samples reaches a predetermined value and the average confidence score exceeds the threshold, it is determined that sufficient learning samples have been obtained. The learning strategy then linearly increases the similarity threshold. In subsequent dialogues, the graph attention network uses the adjusted threshold for terminology matching, improving recognition accuracy.

[0033] The context reconstruction module activates deep parsing mode based on the confidence scores from the terminology enhancement module. The terminology enhancement module calculates the confidence score of each term mapping in the annotated text in real time and compares it with a preset dynamic threshold, which is adjusted based on historical dialogue data. When multiple consecutive terms are detected to have confidence scores below the dynamic threshold, it is determined that the current dialogue segment contains complex symptom descriptions, and a parsing request signal is sent to the context reconstruction module. Upon receiving the signal, the context reconstruction module activates its internal backup neural network. This backup neural network loads specially trained weight parameters to perform semantic disambiguation and deep inference on the context corresponding to low-confidence terms, enhancing its understanding of complex scenarios.

[0034] The reward function of the proximal strategy optimization algorithm used in the template generation module checks for missing necessary fields by scanning the draft medical record and calculating the proportion of filled fields to the total required fields to obtain a completeness score. All medical terms are extracted from the draft and matched against a standard medical terminology database. The number of fully matched terms is counted, and the average semantic similarity is calculated to obtain a prescriptive score. A predefined rule set is used to check for contradictions between symptom descriptions and timelines. A trained neural network model is then used to analyze the clinical relevance of symptoms, outputting a consistency score. The completeness score, prescriptive score, and consistency score are weighted and summed to generate the single-step reward value of the proximal strategy optimization algorithm. This reward is used to adjust the generation strategy of the generative adversarial network and optimize the quality of generated medical records.

[0035] The meta-learning adaptation module is configured to add Gaussian noise to the parameters to be uploaded to the server after local model training on each deployed device. The variance of the Gaussian noise is calculated based on a preset privacy budget parameter to protect patient data privacy. After receiving the noisy parameters, the server uses a secure aggregation algorithm to aggregate parameters from multiple devices to generate a noisy global model. The noisy global model is distributed to each deployed device, and the device uses the model for the next round of local training. Through repeated processes, the distributed iterative optimization of the complete device model is achieved, balancing learning efficiency and privacy security.

[0036] A portable AI-assisted recording device for psychiatric outpatient settings addresses the challenge of parsing unstructured speech information from doctor-patient conversations through multi-module collaborative processing. The multimodal perception module uses a beamforming microphone array to directionally acquire the audio stream of the doctor-patient conversation, calculates the time difference of arrival (TDOA) using a generalized cross-correlation algorithm to localize the sound source, and then suppresses environmental noise using a generalized sidelobe cancellation algorithm to output a clean speech signal. A deep clustering network extracts speaker features from the clean speech and, combined with spectral mapping, distinguishes the vocal tract characteristics of doctors and patients, achieving speaker separation. An adversarial autoencoder encodes the separated speech into a latent spatial representation. The encoder compresses the speech features, the decoder reconstructs the signal, and a discriminant network distinguishes between normal and abnormal pronunciation patterns. Driven by an adversarial loss function, it generates acoustic feature vectors labeled with the speaker, including prosodic information such as fundamental frequency and formants, providing structured input for subsequent modules.

[0037] After receiving the acoustic feature vector, the terminology enhancement module converts it into preliminary text, employing an end-to-end deep learning model to ensure conversion accuracy. Simultaneously, the knowledge graph query engine starts, and the graph attention network traverses the symptom, sign, and drug nodes in the psychiatric knowledge graph, calculating the semantic similarity between the preliminary text and the graph nodes. The course learning strategy dynamically manages the similarity threshold. In the initial dialogue phase, a lenient threshold is used to widely collect spoken expression samples, such as mapping the patient's description of "feeling suffocated" as a candidate term. As the dialogue rounds increase, the term mapping results and confidence scores are accumulated. When the number of samples reaches a predetermined threshold and the average confidence score is high, the similarity threshold is linearly increased to improve terminology recognition accuracy. A bidirectional gated recurrent unit analyzes the contextual semantics, generates multiple candidate term mappings, and outputs annotated text with standard medical term codes, confidence scores, and knowledge graph paths. The confidence score is used as a weight parameter and fed into the attention layer of the context reconstruction module to optimize the semantic processing focus.

[0038] The context reconstruction module receives annotated text streams. The Transformer-XL architecture combines the current dialogue segment with the state vector of the previous segment through a segment-level loop mechanism to model cross-turn dependencies. The gated memory unit sets information retention strategies based on the type of doctor's question; for example, open-ended questions retain more historical information, while closed-ended questions focus on the current content. During adversarial training, the generator produces semantic embedding representations, and the discriminator judges the reasonableness of the embeddings based on a historical medical record database, outputting a structured semantic summary including symptom clusters, timelines, and severity assessments. The semantic summary is then fed back to the terminology enhancement module to optimize the relationships between knowledge graph nodes, forming a closed-loop feedback loop.

[0039] After receiving the semantic summary, the template generation module employs a dual-path architecture in the neural symbol system: the symbol path fills in fixed fields of the medical record template, such as chief complaint and present illness, based on first-order logical rule reasoning; the neural network path generates natural language description fields, such as personal history and family history, through a generative adversarial network, with a discriminator evaluating the authenticity of the content. A proximal policy optimization algorithm supervises the generation process, and the reward function calculates the single-step reward value based on field completeness, terminology standardization, and logical consistency, adjusting the generation strategy accordingly. A secondary logical check is performed on the generated medical record draft, outputting standardized medical record text, and the comparison results between the rule engine and the neural network path are sent to the meta-learning adaptation module.

[0040] The meta-learning adaptation module continuously monitors the output performance of each module. When rare symptom descriptions are detected, the model-agnostic meta-learning framework quickly adjusts parameters through gradient descent optimization. During knowledge distillation, the cloud-based teacher model generates soft labels, while the device-side student model mimics the output distribution to achieve model compression. The federated learning strategy adds Gaussian noise after local training to protect privacy; the noise variance is calculated based on privacy budget parameters, and the server aggregates the noise-added parameters to generate a global model and distributes updates. The system dynamically selects local parameter optimization or federated aggregation based on the load to ensure continuous learning efficiency.

[0041] Modules exchange data via standardized interfaces. The confidence score of the terminology enhancement module controls the attention allocation of the context reconstruction module. The semantic embedding of the context reconstruction module back-optimizes the knowledge graph, and the dual-path verification signal of the template generation module is used for reinforcement learning adjustments. When the terminology enhancement module detects low-confidence complex terms, it triggers the context reconstruction module to activate a backup neural network for deep parsing, and the meta-learning adaptation module coordinates the direction of parameter updates. This dynamic evolution mechanism addresses the unstructured nature of psychiatric dialogues, improving the accuracy and efficiency of medical record generation while reducing the workload of manual review.

[0042] When a portable AI-assisted recording device for psychiatric use is implemented in a psychiatric outpatient setting, the multimodal perception module uses a beamforming microphone array to collect a mixed audio stream of the doctor asking "How has your sleep been lately?" and the patient responding "I wake up three or four times every night, and I can't sleep because of heart palpitations." A generalized cross-correlation algorithm calculates the time difference of arrival (TDOA) to locate the sound source, a generalized sidelobe cancellation algorithm filters out environmental noise, a deep clustering network extracts voiceprint features, and a spectral mapping method distinguishes the vocal tract characteristics of both the doctor and patient, thus achieving speaker separation. An adversarial autoencoder encodes the separated speech into a latent spatial representation, a discriminant network identifies abnormal pronunciation patterns, and outputs an acoustic feature vector labeled with the speaker, including emotional prosodic information such as fundamental frequency fluctuations.

[0043] After receiving the acoustic feature vector, the terminology enhancement module generates the initial text "I wake up three or four times every night, and my heart is racing so I can't sleep." The knowledge graph query engine is activated, and the graph attention network traverses sleep disorder-related nodes in the knowledge graph, calculating the semantic similarity between the initial text and terms such as "insomnia" and "heart palpitations." The course learning strategy uses a loose threshold at the beginning of the dialogue, mapping "heart palpitations" to the candidate term "heart palpitations." As the dialogue progresses, the similarity is tightened after the cumulative confidence score reaches the threshold, accurately matching the standard term. The bidirectional gated recurrent unit analyzes the context, confirms the association between "waking up three or four times" and "difficulty maintaining sleep," and outputs annotated text with medical terminology encoding. The confidence score is then fed into the attention layer of the context reconstruction module.

[0044] The context reconstruction module receives annotated text streams. The Transformer-XL architecture uses a fragment-level loop mechanism to associate the current dialogue with historical fragments, such as establishing a dependency relationship based on the patient's previous mention of "high work pressure." The gated memory unit retains the complete dialogue history based on the doctor's open-ended questions. Adversarial training generates semantic embeddings, and the discriminator verifies their validity based on historical medical records, outputting a timeline summary including the severity of the sleep disorder. The semantic summary is then fed back to the terminology enhancement module to strengthen the spectral association between "palpitations" and "anxiety."

[0045] After receiving the semantic summary, the template generation module uses a dual-path processing method with a neural symbolic system: the symbolic path fills in the chief complaint field "insomnia with palpitations" based on the DSM-5 standard, while the neural network path generates a description of the present illness: "The patient reports frequent nighttime awakenings accompanied by anxiety symptoms." A proximal policy optimization algorithm supervises the generation process, and the reward function checks field completeness, terminology standardization (e.g., "palpitations" conforms to the standard library), and logical consistency (e.g., no contradictions between symptoms and the timeline), outputting a standardized draft medical record. The dual-path comparison results are sent to the meta-learning adaptation module for optimizing the generation strategy.

[0046] The meta-learning adaptation module detects that "difficulty maintaining sleep" is a common symptom and optimizes local parameters accordingly. When the rare term "disintegration of reality" appears in subsequent conversations, the model-agnostic meta-learning framework is triggered, quickly adjusting parameters using similar historical cases. When federated learning aggregates data from multiple devices, Gaussian noise is added, and privacy budget parameters control the noise variance. After secure aggregation, the global model is distributed to achieve continuous learning under privacy protection.

[0047] In another embodiment, when processing complex comorbid cases, the patient describes "dizziness, hand tremors, and sometimes feeling like the room is spinning." The terminology enhancement module initially maps "dizziness" to the vertigo node, but the confidence score is below the dynamic threshold, triggering the deep parsing mode of the context reconstruction module. The backup neural network loads vestibular dysfunction-specific training weights, and combined with the context of "hand tremors" as associated with anxiety, reassesses it as "anxiety-related vertigo." The template generation module's dual-path verification detects a conflict between neurological and psychiatric terminology, and the proximal policy optimization algorithm adjusts the reward function weights, prioritizing the retention of psychiatric-related descriptions. The meta-learning adaptation module records the case and compresses the model through knowledge distillation for easy deployment on portable devices. The inter-module feedback loop continuously optimizes the knowledge graph, enabling the system to accurately map symptoms across multiple disciplines.

[0048] In a specific implementation of the portable AI-assisted psychiatric recording device, several computationally intensive processing steps are involved.

[0049] In the multimodal sensing module, the generalized cross-correlation algorithm is used to calculate the Time Difference of Arrival (TDOA). This algorithm localizes the sound source by comparing the time differences of audio signals received by multiple microphones. The specific calculation is as follows: Let the signals received by two microphones be... and their cross-correlation function Represented as: ; in, Indicates time delay. This represents a time variable. The time difference of arrival (TDO) is determined by the peak position of the cross-correlation function, i.e.: This value is used to calculate the direction of the sound source, which is then combined with the microphone array geometry to complete the localization. Symbol explanation: and It is a time-domain audio signal. It is a cross-correlation function. For time delay, This represents the peak latency.

[0050] In the terminology enhancement module, a graph attention network is used to calculate the semantic similarity between the initial text and knowledge graph nodes. The graph attention mechanism dynamically adjusts node importance, and its calculation process is as follows: Let the features of a knowledge graph node be... (in (for node indexing), node and Attention coefficient between Through weight vector calculate: ; in, For learnable weight matrix, This represents the concatenation operation. The attention coefficient is normalized using the softmax function. ; node Output characteristics The weighted sum of the features of neighboring nodes: ; Symbol explanation: For nodes Input features, For attention weight vectors, It is a linear transformation matrix. For nodes The neighborhood group, For activation functions (such as ReLU). This is the normalized attention weight. The output is used for similarity matching, dynamically adjusting the term recognition threshold.

[0051] In the context reconstruction module, the Transformer-XL architecture models long-range dependencies through a fragment-level loop mechanism.

[0052] Its core is the attention calculation based on relative positional encoding. Given a query vector Key vector Sum value vector Attention score Represented as: ; in, It is a relative position encoding vector. and For learnable parameters, The dimension is vector. The attention weights are normalized using softmax and then summed using a weighted average: ; Symbol explanation: For the first A query vector for each position. For the first A key vector at each position, For value vectors, For relative position encoding, and For bias parameters, This is the scaling factor. This mechanism allows the model to capture dependencies across multiple talk rounds.

[0053] In the template generation module, the Proximity Policy Optimization (PPO) algorithm is used to adjust the generation strategy. Its reward function calculates the single-step reward value based on field completeness, terminology standardization, and logical consistency. Let the completeness score be... The normative score is The consistency score is The weighted sum is: ; in, , , Let be the weighting coefficient, satisfying The objective function of PPO is to maximize expected reward while limiting the policy update step size: ; Symbol explanation: This is the single-step reward value. , , Scores for each dimension, , , As weight, For strategy ratio, For the dominant function, These are the cropping parameters. This optimization process ensures the quality and stability of the generated content.

[0054] In the meta-learning adaptation module, differential privacy technology protects data privacy by adding Gaussian noise. The formula for adding noise is: ; in, These are the original model parameters. These are the parameters after adding noise. This indicates that the mean is zero and the variance is... Gaussian noise, The identity matrix. Noise variance. Based on privacy budget parameters and sensitivity calculate: ; Symbol explanation: For parameter vectors, For adding noise parameters, Standard deviation, For privacy budget, The probability of failure. To ensure query sensitivity, this mechanism protects patient privacy during federated learning aggregation.

[0055] The data processing path of the portable AI-assisted recording device for psychiatry begins with the multimodal perception module acquiring audio signals from doctor-patient dialogues. After obtaining the raw mixed audio stream through a beamforming microphone array, a generalized cross-correlation algorithm calculates the time difference of arrival to locate the sound source, and a generalized sidelobe cancellation algorithm suppresses environmental noise to output a clean speech signal. A deep clustering network extracts voiceprint features, and a spectral mapping method distinguishes the vocal tract characteristics of doctors and patients to achieve speaker separation, resulting in independent speech channels. An adversarial autoencoder encodes the separated speech into a latent spatial representation, and a discriminant network distinguishes pronunciation patterns. Driven by an adversarial loss function, an acoustic feature vector with speaker labels is generated, including prosodic information such as fundamental frequency and formants. After receiving the acoustic feature vector, the terminology enhancement module converts it into preliminary text. Simultaneously, the knowledge graph query engine starts, and the graph attention network traverses the nodes of the psychiatric knowledge graph to calculate semantic similarity. The course learning strategy dynamically adjusts the similarity threshold, initially using a lenient threshold to collect samples and later tightening it to improve accuracy. A bidirectional gated recurrent unit analyzes the contextual semantics to generate multiple candidate term mappings, outputting annotated text with standard medical terminology codes, confidence scores, and knowledge graph paths. The confidence score is used as a weight parameter and passed to subsequent modules. The context reconstruction module receives the annotated text stream. The Transformer-XL architecture models long-range dependencies by combining the current and previous segment state vectors through a segment-level recurrent mechanism. The gated memory unit manages the dialogue state based on the doctor's question type. Adversarial training generates semantic embeddings, and the discriminator verifies their rationality based on historical medical records, outputting a semantic summary containing symptom clusters, timelines, and severity assessments. This summary is then fed back to the terminology enhancement module to optimize the knowledge graph. After receiving the semantic summary, the template generation module employs a dual-path processing method using a neural symbol system: the symbol path fills in fixed fields based on first-order logic, while the neural network path generates natural language descriptions through a generative adversarial network. A proximal policy optimization algorithm supervises the generation process, and a reward function calculates single-step reward values ​​based on field completeness, terminology standardization, and logical consistency. The generation strategy is adjusted, and the draft undergoes secondary verification to output standardized medical record text. The comparison results are then sent to the meta-learning adaptation module. The meta-learning adaptation module continuously monitors the outputs of each module. When rare symptoms are detected, the model-agnostic meta-learning framework quickly adjusts parameters, knowledge distillation compresses the model, federated learning combines differential privacy with Gaussian noise to protect the data, and the server aggregates parameters to generate a global model and distributes updates. This dynamic coordination of local optimization and federated aggregation forms a closed-loop feedback path, ensuring the system continuously adapts to complex clinical scenarios.

Claims

1. A portable AI-assisted psychiatric recording device, characterized in that, include: A multimodal perception module is used to collect audio signals of doctor-patient dialogue, process the audio signals to separate the doctor's and patient's speech, and extract acoustic feature vectors with speaker labels. The terminology enhancement module is used to receive the acoustic feature vector output by the multimodal perception module, perform speech recognition on the acoustic feature vector to generate initial text, match the initial text with the psychiatric knowledge graph, and output annotated text with standard medical terminology codes and confidence scores. The context reconstruction module is used to receive the annotated text output by the terminology enhancement module, perform long-range dialogue dependency modeling on the annotated text to generate a structured semantic summary, the semantic summary including clinical information extracted from doctor-patient dialogue; The template generation module is used to receive the semantic summary generated by the context reconstruction module, fill in the fixed fields of the medical record template according to medical standards, and generate natural language description fields to output a standardized medical record draft. The meta-learning adaptation module is used to monitor the confidence score output by the terminology enhancement module, the semantic summary generated by the context reconstruction module, and the draft medical record output by the template generation module. Based on the monitoring results, the module updates the parameters in the terminology enhancement module, the context reconstruction module, and the template generation module through a distributed learning strategy.

2. The portable AI-assisted psychiatric recording device according to claim 1, characterized in that, The multimodal sensing module is also used for: The raw, mixed audio stream is acquired using a beamforming microphone array; The generalized cross-correlation algorithm is used to calculate the time difference of arrival (TDOA) of the original mixed audio stream, and the sound source is located based on the TDOA. The environmental noise is eliminated by using a generalized sidelobe cancellation algorithm on the located sound source signal to obtain a clean speech signal; The pure speech signal is input into a deep clustering network, the voiceprint features are extracted through the deep clustering network, and the spectral mapping method is used to distinguish the vocal tract characteristics of doctors and patients, thereby completing speaker separation and obtaining the separated independent speech channels. The separated independent speech channels are input into an adversarial autoencoder. The encoder of the adversarial autoencoder encodes the speech signal into a latent space representation. The decoder reconstructs the signal from the latent space representation. At the same time, a discriminant network distinguishes between normal and abnormal pronunciation patterns. Driven by an adversarial loss function, the adversarial autoencoder outputs an acoustic feature vector that includes fundamental frequency and formant prosodic information.

3. The portable AI-assisted psychiatric recording device according to claim 2, characterized in that, The terminology enhancement module is also used for: Receive the acoustic feature vector output by the multimodal sensing module; The received acoustic feature vectors are converted into preliminary text through the speech recognition submodule; The knowledge graph query engine is launched, and the graph attention network is used to traverse the symptom, sign and drug nodes to calculate the semantic similarity between the preliminary text and the knowledge graph nodes. The similarity threshold used for term recognition is dynamically adjusted by applying a course learning strategy. The course learning strategy adopts a difficulty sample ranking algorithm, which uses a loose similarity threshold to collect samples in the early stage of the dialogue and tightens the similarity threshold in the later stage of the dialogue. A bidirectional gated loop unit is used to analyze the contextual semantics of the preliminary text and generate multiple candidate term mappings for colloquial expressions; Based on dynamically adjusted similarity thresholds and multi-candidate term mapping, the output is labeled text with standard medical term codes, confidence scores, and knowledge graph paths. The confidence score output by the terminology enhancement module is passed as a weight parameter to the attention layer of the context reconstruction module.

4. The portable AI-assisted psychiatric recording device according to claim 3, characterized in that, The context reconstruction module is also used for: Receive the annotation text output by the terminology enhancement module; The annotated text stream is processed using the Transformer-XL architecture, which employs a fragment-level loop mechanism to combine the state vectors of the current dialogue fragment with those of the previous fragment, thereby modeling dependencies across multiple dialogue turns. The dialogue state is managed by a gating memory unit. The gating memory unit sets an information retention strategy based on the type of doctor’s question and controls the flow of information by updating and resetting the gate. Adversarial training is used to generate semantic embeddings. A generator produces semantic embedding representations of dialogues, and a discriminator judges the rationality of the semantic embedding representations based on a historical medical record database. Output a structured semantic summary of the dialogue, which includes symptom clusters, timeline, and severity assessment. The information generated by the context reconstruction module is transmitted back to the terminology enhancement module.

5. The portable AI-assisted psychiatric recording device according to claim 4, characterized in that, The template generation module is also used for: Receive the semantic summary generated by the context reconstruction module; A dual-path processing architecture based on a neural symbolic system is used to process semantic summaries: the symbolic path performs rule-based reasoning based on first-order logic to fill in fields with fixed structures in the medical record template; the neural network path uses a generative adversarial network, where the generator of the generative adversarial network generates natural language description fields based on the semantic summary, and the discriminator evaluates the authenticity of the generated fields. The generation process of symbolic paths and neural network paths is supervised by a proximal policy optimization algorithm. The proximal policy optimization algorithm adjusts the policy network parameters through importance sampling. The reward function of the proximal policy optimization algorithm is defined by field integrity, terminology standardization and logical consistency. Perform secondary logical verification on the draft medical record generated by dual-path processing, and output standardized medical record text; The template generation module compares the results of the symbol path with the results of the neural network path, and sends the resulting information to the meta-learning adaptation module.

6. The portable AI-assisted psychiatric recording device according to claim 5, characterized in that, The meta-learning adaptation module is also used for: The meta-learning adaptation module is also used for: The system continuously monitors the confidence score output by the terminology enhancement module, the semantic summary generated by the context reconstruction module, and the draft medical record output by the template generation module, and evaluates the system performance based on the monitoring data. When the evaluation results indicate that a rare symptom description has indeed been encountered, a model-agnostic meta-learning framework is adopted, and the parameters of the terminology enhancement module, the context reconstruction module, and the template generation module are quickly adjusted using a small number of historical similar cases through the gradient descent optimization algorithm. The knowledge distillation process is performed by generating soft tags through a large teacher model in the cloud, and the student model on the device imitates the output distribution of the teacher model to achieve model compression. A federated learning strategy is adopted for distributed parameter updates. After each deployment device updates its parameters locally, it sends the updated parameters to the server. The server aggregates the parameters from multiple deployment devices to generate a global model. The aggregated global model parameters are synchronously distributed to the terminology enhancement module, the context reconstruction module, and the template generation module, and their respective parameters are updated. The meta-learning adaptation module dynamically decides whether to perform parameter optimization locally or initiate a new round of federated aggregation based on system load and accuracy performance.

7. The portable AI-assisted psychiatric recording device according to claim 6, characterized in that, The course learning strategies applied in the terminology enhancement module dynamically adjust the similarity threshold, including: In the initial stage of the dialogue, set a low initial similarity threshold; Using a graph attention network, preliminary text and knowledge graph nodes are matched with the initial similarity threshold to obtain matching results; As the number of dialogue rounds increases, the cumulative terminology mapping results and corresponding confidence scores output by the terminology enhancement module increase. When the cumulative number of samples reaches a first predetermined value and the average confidence score of the cumulative samples exceeds a second predetermined value, it is determined that sufficient preliminary learning samples have been obtained. Based on the aforementioned determination, the course learning strategy linearly increases the similarity threshold to obtain the adjusted similarity threshold; In subsequent dialogues, the graph attention network uses an adjusted similarity threshold for term matching.

8. The portable AI-assisted psychiatric recording device according to claim 7, characterized in that, The context reconstruction module enables a deep parsing mode based on the confidence score of the terminology enhancement module, including: The terminology enhancement module calculates the confidence score of each term mapping in the annotated text in real time; Each calculated confidence score is compared with a preset dynamic threshold, which is adjusted based on historical data; When the comparison results detect that the confidence scores of multiple consecutive terms are lower than the dynamic threshold, the current dialogue segment is determined to contain a complex symptom description. Send a parsing request signal to the context reconstruction module; The context reconstruction module receives a parsing request signal and activates an internal backup neural network, which is loaded with specially trained weight parameters. The activated standby neural network performs semantic disambiguation and deep reasoning on the context corresponding to low-confidence terms.

9. The portable AI-assisted psychiatric recording device according to claim 8, characterized in that, The reward function of the near-end strategy optimization algorithm used in the template generation module is calculated in the following way: The medical record draft generated by the scan template generation module is checked for missing preset required fields, and the proportion of filled fields to the total required fields is calculated to obtain a completeness score. Extract all medical terms from the draft medical record, match the extracted medical terms with the standard medical terminology database, count the number of completely matched terms and calculate the average semantic similarity to obtain the normativity score. The system uses a predefined set of rules to check for inconsistencies between symptom descriptions and timelines, and uses a trained neural network model to analyze the plausibility of clinical associations between symptoms, outputting a consistency score. The integrity score, normalization score, and consistency score are weighted and summed to generate the single-step reward value of the near-end policy optimization algorithm; The single-step reward value is used to adjust the generation strategy of the generative adversarial network.

10. The portable AI-assisted psychiatric recording device according to claim 9, characterized in that, The meta-learning adaptation module is configured as follows: After training the model locally on each deployment device, Gaussian noise is added to the parameters that need to be uploaded to the server; The variance of the Gaussian noise is calculated based on a preset privacy budget parameter; The server receives local parameters with Gaussian noise added, and uses a secure aggregation algorithm to aggregate the noise-added parameters from multiple deployment devices to generate a noisy global model. Distribute the noisy global model to each deployed device; Each deployed device uses the received noisy global model for the next round of local training; By repeating the above process, the distributed iterative optimization of the complete device model is achieved.