Artificial intelligence-based virtual patient pathological style text dynamic generation method

By constructing a dynamic set of text rules and a pathological category mapping, the language of a virtual patient that matches the symptoms of aphasia is generated, which solves the problem of inaccurate simulation of virtual patient language output, achieves diversified language expression, and reduces development costs.

CN123050369APending Publication Date: 2026-11-06TIANJIN TELLYES SCI INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611551802.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-09
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing methods for constructing virtual patients are unable to effectively distinguish and simulate different types of aphasia symptoms, resulting in the fusion and interference of pathological language output performance, and failing to accurately simulate the language impairment of aphasia patients.

Method used

By constructing a dynamic text rule set, based on the mapping relationship between context feature vectors and pathological categories, pathological style text is generated, including part-of-speech recognition, syntactic role recognition, and dynamic text rule adjustment, to generate virtual patient language that conforms to different aphasia symptoms.

Benefits of technology

It enables diverse expressions of virtual patient language output, reduces development costs, improves user interaction experience, reduces interference from prompt words, and generates text that is closer to the language performance of real aphasic patients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123050369A_ABST
    Figure CN123050369A_ABST
Patent Text Reader

Abstract

The application discloses an artificial intelligence-based virtual patient pathological style text dynamic generation method, comprising the following steps: S1, acquiring an initial text and cutting the initial text into independent sentence sequences; S2, cutting each sentence into a word sequence of minimum word units, constructing a context feature vector at each position of the word sequence, wherein the context feature vector comprises word unit information, position information and context information vectors; S3, performing part-of-speech recognition and syntactic role recognition on each word unit in the word sequence based on the context feature vector, and obtaining part-of-speech information and role information of each word unit; and S4, acquiring pathological information of a virtual patient, selecting a corresponding text dynamic rule category based on a pre-constructed mapping relationship between pathological categories and text dynamic rule categories, performing corresponding dynamic adjustment, and generating a pathological style text. Through the application, different pathological style texts can be generated from the same text, and the application can be applied to medical communication to improve user interactive experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and medical education technology, and in particular to a method for dynamically generating virtual patient pathological style text based on artificial intelligence. Background Technology

[0002] Existing doctor-patient communication training and evaluation mainly rely on virtual patients centered around large language models, simulating different patients by configuring role data. Typically, based on different patient cases, the system constructs the virtual patient's emotional tendencies and tone style according to the patient's humanistic attributes and personality traits. Semantic and speech data of the virtual patient are generated through the large language model to simulate doctor-patient communication scenarios. However, existing doctor-patient communication systems primarily focus on constructing the virtual patient's tone, pitch, emotional tendencies, and dialects, lacking the construction of virtual patients with language system disorders, such as the language communication impairments that aphasia patients may exhibit, presenting with incomplete expressions, phrased or fragmented expressions, and forgetting words as a symptom of named aphasia, resulting in different pathological styles of text output.

[0003] Patients with aphasia experience a variety of symptoms related to language expression and comprehension, mainly including typical symptoms and other symptoms. Typical symptoms include Broca's aphasia, Wernicke's aphasia, conduction aphasia, transcortical motor aphasia, transcortical sensory aphasia, and transcortical mixed aphasia. Other symptoms include naming aphasia, mild aphasia, and amnesic aphasia. The symptoms vary depending on the type of aphasia. For example, both Broca's aphasia and mild aphasia can present with telegraphic speech, but other manifestations differ. Specifically, Broca's aphasia is characterized by prominent oral expression impairment, with conversations being non-fluent and telegraphic; oral comprehension is relatively preserved, with normal understanding of words and simple declarative sentences, but difficulties arise with complex sentence structures; repetition, naming, reading, and writing are all impaired to varying degrees; mild aphasia presents with language repetition, similar to telegraphic speech, where a word or syllable is involuntarily repeated after being spoken; patients still have the ability to write and recite silently.

[0004] In existing methods of constructing virtual patients, large language models are used to achieve language interaction of virtual patients by constructing a pathology-related cue word engineering architecture. However, various types of aphasia, including but not limited to those described above, have similarities and differences in their manifestations. Based on existing technologies, constructing virtual patients with different pathological characteristics of various types of aphasia under the same architecture by setting cue words can easily lead to the fusion and interference of pathological language output manifestations of various aphasia symptoms, resulting in unclear or difficult-to-distinguish manifestations of various symptoms.

[0005] Therefore, how to provide virtual patients with texts in different pathological styles is the problem that this application aims to solve. Summary of the Invention

[0006] To address the aforementioned issues, this application provides a method for dynamically generating virtual patient pathological style text based on artificial intelligence, comprising the following steps: S1, Obtain the initial text and segment it into independent sentence sequences; S2, each sentence is segmented into a word sequence of minimum word units, and a context feature vector is constructed at each position of the word sequence. The context feature vector includes word unit information, position information, and context information vector. S3, based on the context feature vector, perform part-of-speech identification and syntactic role identification on each word element in the word sequence to obtain part-of-speech information and role information for each word element; S4: Obtain the pathological information of the virtual patient. Based on the pre-built mapping relationship between pathological categories and text dynamic rule categories, select the corresponding text dynamic rule category and perform corresponding dynamic adjustments to generate pathological style text.

[0007] Further, step S4 includes: S41, Construct a set of dynamic text rules, wherein the dynamic text rules are represented using a data structure: {condition, lexical entity, processing operation}; S42, obtain the pathology category of the virtual patient, and obtain the set of text dynamic rules for the current pathology category based on the pre-built mapping relationship between pathology categories and text dynamic rules; S43, in response to a random number, executes each text dynamic rule in the current text dynamic rule set to generate pathological style text for the current pathology category.

[0008] Furthermore, in step S41, the processing operation includes at least one of the following: retain, delete, replace, repeat, shuffle, and add.

[0009] Furthermore, step S41 also includes constructing a corpus set to provide corpus support when performing the processing operation.

[0010] Furthermore, in step S42, after obtaining the set of text dynamic rules for the current pathology category, the method further includes: performing conflict verification on each text dynamic rule in the current set of text dynamic rules; if a conflict exists, determining the correlation between each text dynamic rule with a conflict and the current pathology category; retaining the text dynamic rule with the highest correlation; and deleting the text dynamic rules in the current set of text dynamic rules that conflict with it.

[0011] Furthermore, conflict checks are performed on each dynamic text rule in the current set of dynamic text rules, including: Iterate through each word entity and filter the set of processing operations corresponding to each word entity in the current text dynamic rule set; If the number of processing operations in the processing operation set is greater than 1, it indicates that there is a conflict relationship between the processing operations of the word entity, and the dynamic rules of the text that have conflict relationships are marked as having conflict relationships. If the number of processing operations is less than or equal to 1, it means that there is no conflict relationship between the processing operations of the lexical entity, and it marks that there is no conflict relationship between the current dynamic rules of the text.

[0012] Furthermore, the lexical entity includes lexical information, location information, part-of-speech information, and role information.

[0013] The beneficial effects of this application are: This application provides an AI-based method for dynamically generating pathological style text for virtual patients. By introducing dynamic text rules and matching the pathological features of virtual patients in case studies with the corresponding dynamic text rules, different pathological style texts can be generated, improving the user's interactive experience, reducing the interference of prompt words under different pathological prompt word frameworks based on a large speech model, and reducing development costs. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating the method for dynamically generating virtual patient pathological style text based on artificial intelligence, as described in this application embodiment.

[0015] Figure 2 This is a flowchart illustrating step S4 of an embodiment of this application.

[0016] Figure 3 This is a schematic diagram of the design framework of an embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this application.

[0018] This application provides an AI-based method for dynamically generating pathologically styled text for virtual patients, applied to a doctor-patient communication simulation system / platform. The aim is to pre-construct pathological categories and dynamic text rules based on different pathological manifestations, such as language system disorders resulting in phrased or fragmented speech expressions, inability to form complete and comprehensible sentences, or named aphasia. After obtaining the pathological category of the virtual patient, the method matches the corresponding dynamic text rules to process the initial text (whether a pre-set script or a general response generated by a large language model) into text with a specific pathological style matching the virtual patient's pathological category. This text is then used as input to a large language model (LLM model) to generate pathologically styled speech output matching the pathological type, thereby simulating the diverse manifestations of language function in different language system diseases.

[0019] Specifically, such as Figure 1 As shown in the embodiments of this application, a method for dynamically generating virtual patient pathological style text based on artificial intelligence is provided, including: S1, Obtain the initial text and segment it into independent sentence sequences; In this step, the initial text can come from case scripts written by experienced teachers, or it can be based on a large language model and generated by constructing standardized virtual patients to generate general interactive question and answer text. S2, each sentence is segmented into a word sequence of the smallest units, and a context feature vector is constructed at each position of the word sequence. The context feature vector includes unit information, position information, and context information vector. S3, based on context feature vectors, performs part-of-speech and syntactic role recognition on each word element in the word sequence to obtain part-of-speech and role information for each word element; S4: Obtain the pathological information of the virtual patient. Based on the pre-built mapping relationship between pathological categories and text dynamic rule categories, select the corresponding text dynamic rule category and perform corresponding dynamic adjustments to generate pathological style text.

[0020] When constructing virtual patients with different pathological features, the corresponding interactive question-and-answer text is usually generated based on the patient's basic human attributes, including name, age, and gender, as well as the specific pathology. When constructing different virtual patients, it is necessary to construct different prompt word frameworks for each virtual patient. Through this application, we construct dynamic text rules, which can realize different pathological styles of text expression for the same initial text, reduce the mutual interference of prompt words between different pathological features, and also reduce the development cost of virtual patients with different pathological types.

[0021] Currently, methods for part-of-speech and syntactic role recognition can be: based on pre-stored dictionary matching; based on open-source part-of-speech tagging models based on Hidden Markov Models / Conditional Random Fields / Deep Learning; and based on semantic tagging based on large language models such as GLM5.3 / Kimi K3.

[0022] Specific part-of-speech recognition can include nouns (abstract nouns / concrete nouns) / verbs / adjectives / particles / prepositions / conjunctions / modal particles, etc., while syntactic role recognition can include subject, verb, object, attributive, adverbial, complement, etc.

[0023] like Figure 2 As shown, step S4 includes: S41, Construct a set of dynamic text rules. The dynamic text rules are represented using the data structure: {condition, lexical entity, processing operation}. S42, obtain the pathology category of the virtual patient, and obtain the set of text dynamic rules for the current pathology category based on the pre-built mapping relationship between pathology categories and text dynamic rules; S43, in response to a random number, executes each text dynamic rule in the current text dynamic rule set to generate pathological style text for the current pathology category.

[0024] In this step, the dynamic text rules are based on clinicopathological characteristics. Different dynamic text rules are set according to different aphasia manifestations, such as sentence length, coherence, presence of memory-related aphasia, presence of incoherence, syntactic inversion, and repetitive expressions. By setting corresponding dynamic text rules, appropriate pathological categories are matched. Specifically, for example... Figure 3 The diagram shown is a schematic representation of the design framework of an embodiment of this application. A standardized virtual patient is set up, whose patient information includes name, age, gender, etc., and the pathological category includes different pathological types of aphasia, including but not limited to... Figure 3 The categories shown include Broca aphasia, Wernicke aphasia, conduction aphasia, naming aphasia, and amnesia aphasia. The text dynamic rules set includes text dynamic rules such as α, β, and γ.

[0025] In step S41, the processing operation includes at least one of the following: retain, delete, replace, repeat, shuffle, and add.

[0026] Step S41 also includes constructing a corpus set to provide corpus support during processing operations.

[0027] Specifically, for example, Broca's aphasia presents as telegraphic language, which can be set up by retaining the subject and content verb and their core object, deleting modifiers such as attributives, adverbs, and complements, and not truncating words in the middle, but "rewriting" sentences at the syntactic level to the simplest core; nominative aphasia is characterized by patients forgetting words, mostly the names of objects, especially those rarely used, often describing the function of objects instead of the words they cannot say, and having more redundancy and empty talk.

[0028] Taking the two symptoms mentioned above as examples, the specific text dynamic rule settings are as follows, which can be used as a reference example and are not intended to be the only rules in the embodiments of this application.

[0029] (a) Broca's aphasia (1) Set the sentence length threshold L_base and the variable threshold α; (2) When the sentence length meets the sentence length threshold condition, the following rule is executed: Condition 1: Independently roll random() < α, perform Broca simplification: a) Extract sentence S i The subject; b) Extract the main verb chains [V1, V2, V3, ...]; c) Extract each verb V k The corresponding core object OBJ k ; d) Output Construction: Output = Subject + (V) k +OBJ k ); Condition 2: Independently roll random() ≥ α, retain each sentence S i constant; Where: the sentence length threshold L_base is the target sentence length value to be simplified; the variable threshold α controls the probability of performing Broca simplification; the independent random() roll is a random number; S i V is the i-th sentence in the sentence sequence; k The k-th verb in the verb chain; OBJ k This is the core object corresponding to the k-th verb.

[0030] This rule allows users to customize the subject, verb, and object to be retained, and adjust the sentence length threshold L_base and variable threshold α to generate text with varying degrees of pathological style for the given symptom. Adjusting the sentence length and variable thresholds, and controlling the output subject, verb, and core object, can control the simplification level of the virtual patient's speech output for that symptom. For example, if the initial text is "I got up at eight o'clock this morning, ate breakfast, and then went for a walk in the park" (20 characters), random number-triggered simplification results in the output "I got up and ate" (5 characters).

[0031] (ii) Naming aphasia (1) Set the naming aphasia threshold δ; (2) For each specific noun W j Independent random(): If the independent random() is less than δ, then W j replace; If the independent random() ≥ δ, retain W. j constant; Where: independent roll random() is a random number; named aphasia threshold δ controls the probability of a specific item being replaced, W j Let j be the j-th specific noun.

[0032] In this rule, the naming aphasia threshold δ can be adjusted to control the probability of a specific item being replaced. The replacement content can be pre-constructed with replacement words, such as "that thing," or selected from a pre-constructed corpus containing corpora that match the specific item to be replaced, making the performance of the virtual patient's naming aphasia more realistic. In some embodiments, pauses can also be inserted when this pathological feature is manifested.

[0033] For different aphasia symptoms, there are typical symptoms and other symptoms. When matching text dynamic rules, it is possible to filter out text dynamic rules with conflicting processing operations under the same pathological category. Therefore, in this embodiment, after obtaining the set of text dynamic rules for the current pathological category in step S42, it also includes: performing conflict verification on each text dynamic rule in the current text dynamic rule set. If there is a conflict, the correlation between each text dynamic rule with the current conflict and the current pathological category is judged. The text dynamic rule with the highest correlation is retained, and the text dynamic rules with conflict with the current text dynamic rule set are deleted.

[0034] Specifically, conflict checks are performed on each dynamic text rule in the current set of dynamic text rules, including: Iterate through each word entity and filter the set of processing operations corresponding to each word entity in the current text dynamic rule set. The word entity includes word information, position information, part-of-speech information, and role information. If the number of processing operations in the processing operation set is greater than 1, it indicates that there is a conflict relationship between the processing operations of the word entity, and the dynamic rules of the text that have conflict relationships are marked as having conflict relationships. If the number of processing operations is less than or equal to 1, it means that there is no conflict relationship between the processing operations of the lexical entity, and it marks that there is no conflict relationship between the current dynamic rules of the text.

[0035] This step involves filtering the processing operations corresponding to each lexical entity in each text dynamic rule set, detecting any conflicting relationships between the current processing operations, and matching the correlation with the pathology category. If the correlation is high, the text dynamic rule is considered to be the pathological style text representation that is closest to the pathology category. The pathology category correlation matching can be based on medical pathology knowledge to make the pathological style text more closely resemble the pathological condition.

[0036] This application can be used in doctor-patient communication systems / platforms. Teachers can add dynamic text rules based on experience to simulate different pathological text styles, and through verification steps, make the output closer to the pathological style of real virtual patients.

Claims

1. A method for dynamically generating virtual patient pathological style text based on artificial intelligence, characterized in that, Includes the following steps: S1, Obtain the initial text and segment it into independent sentence sequences; S2, each sentence is segmented into a word sequence of minimum word units, and a context feature vector is constructed at each position of the word sequence. The context feature vector includes word unit information, position information, and context information vector. S3, based on the context feature vector, perform part-of-speech identification and syntactic role identification on each word element in the word sequence to obtain part-of-speech information and role information for each word element; S4. Obtain the pathological information of the virtual patient. Based on the pre-built mapping relationship between pathological categories and text dynamic rule categories, select the corresponding text dynamic rule category and perform corresponding dynamic adjustments to generate pathological style text, including: S41, Construct a set of dynamic text rules, wherein the dynamic text rules are represented using a data structure: {condition, lexical entity, processing operation}; S42, obtain the pathology category of the virtual patient, and obtain the set of text dynamic rules for the current pathology category based on the pre-built mapping relationship between pathology categories and text dynamic rules; S43, in response to a random number, executes each text dynamic rule in the current text dynamic rule set to generate pathological style text for the current pathology category.

2. The method for dynamically generating virtual patient pathological style text based on artificial intelligence according to claim 1, characterized in that, In step S41, the processing operation includes at least one of the following: retain, delete, replace, repeat, shuffle the order, and add.

3. The method for dynamically generating virtual patient pathological style text based on artificial intelligence according to claim 1, characterized in that, Step S41 also includes constructing a corpus set to provide corpus support when performing the processing operation.

4. The method for dynamically generating virtual patient pathological style text based on artificial intelligence according to claim 1, characterized in that, In step S42, after obtaining the set of text dynamic rules for the current pathology category, the following steps are also included: performing conflict verification on each text dynamic rule in the current set of text dynamic rules; if there is a conflict, determining the correlation between each text dynamic rule with a conflict and the current pathology category, retaining the text dynamic rule with the highest correlation, and deleting the text dynamic rules with a conflict with the current set of text dynamic rules.

5. The method for dynamically generating virtual patient pathological style text based on artificial intelligence according to claim 4, characterized in that, Perform conflict checks on all dynamic text rules in the current set of dynamic text rules, including: Iterate through each word entity and filter the set of processing operations corresponding to each word entity in the current text dynamic rule set; If the number of processing operations in the processing operation set is greater than 1, it indicates that there is a conflict relationship between the processing operations of the word entity, and the dynamic rules of the text that have conflict relationships are marked as having conflict relationships. If the number of processing operations is less than or equal to 1, it means that there is no conflict relationship between the processing operations of the lexical entity, and it marks that there is no conflict relationship between the current dynamic rules of the text.

6. The method for dynamically generating virtual patient pathological style text based on artificial intelligence according to any one of claims 1 to 5, characterized in that, The lexical entity includes lexical information, location information, part-of-speech information, and role information.