Cognitive disorder prediction method based on automatic dialogue
Through the cognitive impairment prediction method based on automatic dialogue, using voice message and semantic analysis technology, the low accuracy problem caused by the single questionnaire problem in the traditional method is solved, achieving higher accuracy and flexibility in predicting cognitive impairment.
Patent Information
- Application Number
- CN202411751052.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-25
AI Technical Summary
The traditional cognitive impairment prediction method uses a single questionnaire, lacks flexibility, and cannot be adjusted according to the actual situation of the subject being tested, resulting in low accuracy.
Using an automatic dialogue method, the preliminary test voice message is output, the reply voice message is judged and converted into text, and the semantic analysis is performed, the preliminary evaluation score for cognitive impairment is calculated, and the voice test templates with different test difficulties are selected according to the scores, and the voice test questions are output one by one until the target number is received, and the final score is calculated to obtain the prediction result.
It realizes flexible preliminary judgment and follow-up evaluation of the cognitive impairment of the subject being tested, improves the accuracy of prediction, and further improves the reliability of the prediction results through the gradient-hierarchical score evaluation system.
Smart Images

Figure CN119884293A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cognitive impairment research, and in particular to a cognitive impairment prediction method based on automatic dialogue. Background Art
[0002] Traditional cognitive impairment prediction methods generally adopt a questionnaire approach, in which some preset questions are established. The subjects' answers to the preset questions are used to analyze, predict and evaluate their cognitive impairment. However, the preset questions set in these questionnaires are relatively simple and lack flexibility. The questions cannot be changed according to the actual situation of the subjects, which makes the accuracy of traditional cognitive impairment prediction methods low. Summary of the invention
[0003] Based on this, it is necessary to provide a cognitive impairment prediction method based on automatic dialogue to address the problem that the preset questions set in the questionnaire used in the traditional cognitive impairment prediction method based on automatic dialogue are relatively single questions, lack flexibility, and cannot be changed according to the actual situation of the subjects, resulting in low accuracy.
[0004] The present application provides a method for predicting cognitive impairment based on automatic dialogue, the method comprising:
[0005] Output a preliminary test voice message;
[0006] Determining whether a reply voice message is received within a first preset time period;
[0007] If a reply voice message is received within the first preset time period, converting the reply voice message into text to obtain a reply text;
[0008] Perform semantic analysis on the response text and calculate the preliminary evaluation score of cognitive impairment based on the results of semantic analysis;
[0009] According to the preliminary evaluation score of cognitive impairment, a speech test template matching the preliminary evaluation score of cognitive impairment is extracted from the database; different speech test templates correspond to different test questions with different difficulty levels;
[0010] Output each voice message in the voice test template one by one until the target number of reply voice messages is obtained, and perform semantic analysis on each reply voice message, and calculate the subsequent evaluation score of cognitive impairment corresponding to each reply voice message based on the result of the semantic analysis;
[0011] Calculate the initial evaluation score of cognitive impairment and the sum of the subsequent evaluation scores of cognitive impairment corresponding to all replied voice messages, and use the sum as the final cognitive impairment score;
[0012] The prediction results of cognitive impairment were obtained based on the final cognitive impairment scores.
[0013] The present application relates to a method for predicting cognitive impairment based on automatic dialogue, which uses automatic voice dialogue to output a preliminary test voice message to the subject under test, and calculates the preliminary evaluation score of cognitive impairment after semantic analysis based on the reply voice message returned by the subject under test, so as to make a preliminary judgment on the cognitive impairment of the subject under test, and select voice test templates of different test difficulty according to the preliminary judgment of the preliminary evaluation score of cognitive impairment, so as to select different voice test templates for the subsequent situation when the preliminary evaluation score of cognitive impairment is different, which is more in line with the actual situation of the subject under test than the traditional method of using the same set of test questions. The accuracy of cognitive impairment prediction is high. In addition, the final score of cognitive impairment is obtained by calculating the preliminary evaluation score of cognitive impairment and the sum of the subsequent evaluation scores of cognitive impairment corresponding to all reply voice messages, and the score evaluation system is gradient-layered, which further improves the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A method flow chart of a cognitive impairment prediction method based on automatic dialogue provided in one embodiment of the present application.
[0015] Figure 2 A schematic diagram of the structure of a cognitive impairment prediction system based on automatic dialogue provided in one embodiment of the present application.
[0016] Figure 3 A single sentence structure of a random MASK for a pre-trained language model in a cognitive impairment prediction method based on automatic dialogue provided in an embodiment of the present application.
[0017] Figure 4 A schematic diagram of the process of randomizing the MASK of a pre-trained language model in a cognitive impairment prediction method based on automatic dialogue provided in one embodiment of the present application.
[0018] Reference numerals:
[0019] Processing end - 100; Voice-text conversion module - 200; Pre-trained language model - 300;
[0020] Evaluation module - 400 ; - Database 500 . DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of this application more clear, the following is a further detailed description of this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain this application and are not used to limit this application.
[0022] The present application provides a method for predicting cognitive impairment based on automatic dialogue. It should be noted that the method for predicting cognitive impairment based on automatic dialogue provided by the present application is applicable to any type of subject. Any type of subject refers to a subject of any age group and any occupation.
[0023] In addition, the cognitive impairment prediction method based on automatic dialogue provided by the present application does not limit its execution subject. Optionally, the execution subject of the cognitive impairment prediction method based on automatic dialogue provided by the present application can be a cognitive impairment prediction system based on automatic dialogue. Specifically, the execution subject of the cognitive impairment prediction method based on automatic dialogue provided by the present application can be the processing end in the cognitive impairment prediction system based on automatic dialogue.
[0024] like Figure 2 As shown, the cognitive impairment prediction system based on automatic dialogue may include a processing end 100, a speech-text conversion module 200, a pre-trained language model 300, an evaluation module 400 and a database 500.
[0025] like Figure 1 As shown, in one embodiment of the present application, the cognitive impairment prediction method based on automatic dialogue includes:
[0026] S100, outputting a preliminary test voice message.
[0027] S200, determining whether a reply voice message is received within a first preset time period.
[0028] S300: If a reply voice message is received within a first preset time period, the reply voice message is converted into text to obtain a reply text.
[0029] S400, performing semantic analysis on the reply text, and calculating a preliminary evaluation score of cognitive impairment based on the result of the semantic analysis.
[0030] S500: extracting a voice test question template that matches the preliminary evaluation score of cognitive impairment from a database according to the preliminary evaluation score of cognitive impairment. Different voice test question templates correspond to different test questions of different difficulty.
[0031] S600, output each voice message in the voice test template one by one until the target number of reply voice messages are obtained, and perform semantic analysis on each reply voice message, and calculate the subsequent evaluation score of cognitive impairment corresponding to each reply voice message based on the result of the semantic analysis.
[0032] S700, calculating the sum of the preliminary evaluation score of cognitive impairment and the subsequent evaluation scores of cognitive impairment corresponding to all the reply voice messages, and taking the sum as the final cognitive impairment score.
[0033] S800, obtain the cognitive impairment prediction result according to the final cognitive impairment score.
[0034] Specifically, in S800, the cognitive impairment prediction results include two types: one is that the subject has cognitive impairment, and the other is that the subject does not have cognitive impairment.
[0035] The first preset time period may be 5 seconds. Optionally, if no reply voice message is received within the first preset time period, the cognitive impairment prediction result indicating that the subject has cognitive impairment is directly output. At this time, it can be considered that the subject has not given feedback for a long time, and it can be considered that the subject cannot understand the preliminary test voice message, which is a serious cognitive impairment situation, and subsequent tests are of little significance, so the cognitive impairment prediction result indicating that the subject has cognitive impairment is directly output.
[0036] The principle of semantic analysis of each reply voice message in S600 is the same as that of S300 to S400, that is, the reply voice message is first converted into text to obtain the reply text, and then the reply text is semantically analyzed to obtain the result of semantic analysis. The conversion between voice message and text, and the conversion between text and voice message can be realized by the voice-text mutual conversion module 200.
[0037] Semantic analysis of the reply text can be specifically achieved by inputting the reply text into a pre-trained language model. The pre-trained language model can be any one of the ERNIE pre-trained language model, the RoBERTa pre-trained language model, the BERT pre-trained language model, or other Chinese pre-trained language models trained to understand Chinese semantics.
[0038] The pre-trained language model may be trained using MASK. First, a data set for a specific field is generated. In this embodiment, the data set for a specific field may be a Q&A pair consisting of a large number of question texts and answer texts related to cognitive impairment tests.
[0039] The question and answer set can be input into a pre-trained language model for training.
[0040] like Figure 4 As shown, before training, some preprocessing operations are performed, including data cleaning, word segmentation and sentence segmentation. Then, a CLS symbol is placed at the beginning of the text, a SEP symbol is placed at the end of each sentence, and an END symbol is placed at the end of the text.
[0041] Data clarity can be one or more of URL filtering, data format unification, and special symbol normalization. Word segmentation and sentence segmentation can use existing tools, such as HTML word segmentation tools and HTML sentence segmentation tools, which will not be described in detail in this application.
[0042] Optionally, a training method using random masking is employed in the pre-trained language model. Such training tasks can help the model deeply understand the semantic content of the text by performing a masking operation on a single word or phrase, which is an important part of the pre-trained language model.
[0043] Figure 3 This is the single-sentence structure of the random masking of the pre-trained language model in the cognitive impairment prediction method based on automatic dialogue provided by an embodiment of the present application. During the training process, the pre-trained language model will randomly mask a word or a phrase (such as Figure 3 the word "month" in it) with a certain probability, and then let the pre-trained language model predict the masked word or phrase. After training with a large amount of unlabeled data, the model can often very well master the semantic information of a word or a phrase in the text. However, at this time, the basic segments of the pre-trained language model are words or phrases, so it cannot well understand the semantic information of the segments and can only recognize it by splicing the meanings of the words. Therefore, in addition to single-sentence masking, we also need to perform masking training on multiple words or phrases in large chunks of text, especially continuous multiple words or phrases.
[0044] Figure 4 This is the schematic flow diagram of the random masking of the pre-trained language model in the cognitive impairment prediction method based on automatic dialogue provided by an embodiment of the present application. As Figure 4 shown, the masking training can be understood as the task of [Cloze Test] often done in English exams. For an article or a sentence, we randomly cover up several words (such as Figure 3 the words corresponding to the [M] symbol in it), and then input these sentences into the model for training. The training objective is to predict what the masked word is through the semantics of the words before and after in the sentence. This can enable the model to have a good understanding of the semantics of each word or phrase even if there is no masking in the input content. Because there is an Embedding layer in the pre-trained language model, each word can be transformed into a vector. Words with similar semantics and similar words can be understood as the vectors obtained by their transformation being very close, and the vectors of words that have nothing to do with each other are far apart.
[0045] The preliminary evaluation score of cognitive impairment in S400 is calculated by the evaluation module 400. The subsequent evaluation score of cognitive impairment in S600 is calculated by the evaluation module 400, and the final score of cognitive impairment in S700 is also calculated by the evaluation module 400. In this embodiment, all mathematical calculations involving scores can be calculated by the evaluation module 400.
[0046] In this embodiment, by outputting a preliminary test voice message to the subject in the form of automatic voice dialogue, and calculating the preliminary evaluation score of cognitive impairment after semantic analysis based on the reply voice message returned by the subject, a preliminary judgment of the cognitive impairment of the subject can be achieved. According to the preliminary judgment, the preliminary evaluation score of cognitive impairment is obtained, and voice test templates of different test questions are selected. Different voice test templates can be selected for subsequent situations where the preliminary evaluation scores of cognitive impairment are different. Compared with the traditional method of using the same set of test questions, it is more in line with the actual situation of the subject, and the accuracy of cognitive impairment prediction is high. In addition, the final score of cognitive impairment is obtained by calculating the preliminary evaluation score of cognitive impairment and the sum of the subsequent evaluation scores of cognitive impairment corresponding to all reply voice messages. The score evaluation system is gradient-layered, which further improves the prediction accuracy.
[0047] In addition, this embodiment adopts automatic dialogue, and the subject can use the mobile phone APP for testing. There is no need for professional technicians to conduct questionnaire testing, nor does the subject need to fill out the questionnaire.
[0048] In one embodiment of the present application, after S200, that is, after determining whether a reply voice message is received within the first preset time period, the method for predicting cognitive impairment based on automatic dialogue further includes:
[0049] S311, if no reply voice message is received within the first preset time period, start a timer and increase the value of the counter by 1 based on the original value.
[0050] S312, read the value of the counter, and determine whether the value of the counter is greater than or equal to the attempt number threshold.
[0051] S313a, if the value of the counter is less than the trial number threshold, return to output the preliminary test voice message.
[0052] S313b, if the value of the counter is greater than or equal to the trial number threshold, the value of the counter is cleared to zero, and a cognitive impairment prediction result indicating that the subject has cognitive impairment is output.
[0053] Specifically, the attempt number threshold may be 3.
[0054] In addition, when S300 is executed, that is, if a reply voice message is received within the first preset time period, the reply voice message is converted into text, and when the reply text is obtained, the value of the counter is cleared.
[0055] In this embodiment, multiple attempts are made instead of outputting the result that the subject has cognitive impairment only when a reply voice message is not received once, so that the cognitive impairment prediction result is more accurate.
[0056] In one embodiment of the present application, before S100, that is, before outputting the preliminary test voice message, the method further includes:
[0057] S010, creating a speech test question bank, wherein the speech test question bank includes a test bank and a formal bank.
[0058] S010 includes, that is, the creation of a speech test database includes:
[0059] S011a, create a test library.
[0060] S011b, obtaining a plurality of orientation type test question texts, converting each orientation type test question text into a voice file, and obtaining a voice file corresponding to each orientation type test question text.
[0061] S011c, storing the voice file corresponding to each orientation type test text in the test library.
[0062] Specifically, the created voice test question bank is located in the database 500. Orientation is a relatively important element in the cognitive impairment evaluation system. Orientation refers to the subject's own recognition of time, place, people and his own state. In the MMSE (Mini-mental State Examination) and the AD8 self-assessment scale for memory impairment, the score of orientation has always been the highest, and the test questions are the most advanced in the test position order in the scale.
[0063] Therefore, this embodiment adopts the orientation type test question text as the source of the preliminary test voice message, which can more scientifically show the preliminary identification results of cognitive impairment.
[0064] Orientation-type test texts may include:
[0065] Orientation type test text 1: What year, month and day is today?
[0066] Orientation type test text 2: What season is it now?
[0067] Orientation type test text 3: In which district and street of which city are you now?
[0068] In this embodiment, the orientation type test question text is used as the source of the preliminary test voice message, which can more scientifically show the preliminary identification results of cognitive impairment.
[0069] In one embodiment of the present application, S100 includes, that is, the outputting of the preliminary test voice message includes:
[0070] S110, randomly selecting a voice file from the test library as a preliminary test voice message output.
[0071] Specifically, after responding to the instruction to start the test, S110 is executed.
[0072] When the user presses the start test button on the test device interface, an instruction to start the test is triggered, and after the cognitive impairment prediction system based on automatic dialogue responds to the instruction to start the test, S110 is executed.
[0073] In this embodiment, a voice file is randomly selected from the test library as a preliminary test voice message output to achieve a preliminary identification of the cognitive impairment of the subject. This is a preliminary screening mechanism that can improve the prediction efficiency of cognitive impairment. When the cognitive impairment results of the subject are poor, the subsequent prediction steps can be omitted and the subject can be directly identified as having cognitive impairment.
[0074] In one embodiment of the present application, S010 further includes, that is, the creating of the speech test database further includes:
[0075] S012a, create a formal library.
[0076] S012b, obtaining multiple test question texts.
[0077] S012c, grading the difficulty of the multiple test texts according to a preset difficulty grading rule, so as to assign a difficulty level to each test text.
[0078] S012d, for each test question text, generate a preset number of sample answer texts.
[0079] S012e, converting each test question text into a voice file, and obtaining a voice file corresponding to each test question text.
[0080] S012f, merging multiple test texts with the same difficulty level, multiple voice files corresponding to the test texts with the same difficulty level, and all answer sample texts corresponding to the test texts with the same difficulty level into one voice test template.
[0081] S012g, all speech test templates are stored in the official library.
[0082] Specifically, the test texts obtained by S012b need to ensure diversity, for example, including test texts of memory type, test texts of calculation type, test texts of recall type, test texts of language ability, etc. The answer sample text is the set "standard answer". Why is the standard answer in quotation marks? Because some answers that are not perfectly correct, but are basically correct can also be considered standard answers and can also be used as examples of answers.
[0083] Example of a memory-type test text: Please listen carefully to the three words I say and repeat them after 10 seconds: moon, dust, and sea. Its corresponding answer sample text 1: moon, dust, and sea. Its corresponding answer sample text 2: moon, dust, and sea. Yes, although one word in answer sample text 2 is not completely accurate, on the one hand, only one of the three words is not completely accurate, and on the other hand, although ocean and sea are not completely the same, they have similar meanings. At this time, this flaw should be ignored and it can also be used as a answer sample text.
[0084] An example of a math question is: Subtract 3 from 100 and tell me the result. Then subtract 3 from 100 and tell me the result. The corresponding answer is: 94. This is the only answer for a math question.
[0085] Example of recall type test text: What are the three words I just said?
[0086] Example of language ability test text: Please read after me the following content “Eat grapes without spitting out the skins”.
[0087] S010 also includes, S012i, pre-generating a correspondence table between the preliminary evaluation score of cognitive impairment and the voice test template. Specifically, the higher the preliminary evaluation score of cognitive impairment, the greater the difficulty level of the test text in the corresponding voice test template, so that the difficulty level of the test text is intelligently adjusted according to the difference in the preliminary evaluation score of cognitive impairment.
[0088] Through the above settings, when executing S500, that is, extracting a voice test question template matching the preliminary evaluation score of cognitive impairment from the database based on the preliminary evaluation score of cognitive impairment, the higher the preliminary evaluation score of cognitive impairment, the greater the difficulty level of the test question text in the corresponding voice test question template.
[0089] For example, the difficulty level is set to 1, 2, 3, 4, 5. That is, there are 5 difficulty levels in total.
[0090] The difficulty level of all test texts in speech test template A is 1, corresponding to the test subjects whose preliminary obstacle evaluation score is less than 2 points.
[0091] The difficulty level of all test texts in speech test template B is 2, corresponding to the test subjects whose preliminary obstacle evaluation scores are greater than or equal to 2 points and less than 4 points.
[0092] The difficulty level of all test texts in speech test template C is 3, corresponding to the test subjects whose preliminary obstacle evaluation scores are greater than or equal to 4 points and less than 6 points.
[0093] The difficulty level of all test texts in speech test template D is 4, corresponding to the test subjects whose preliminary obstacle evaluation scores are greater than or equal to 6 points and less than 8 points.
[0094] The difficulty level of all test texts in speech test template E is 5, corresponding to the test subjects whose preliminary obstacle evaluation scores are greater than or equal to 8 points and less than or equal to 10 points.
[0095] In this embodiment, multiple test texts are graded in difficulty according to preset difficulty grading rules to assign a difficulty level to each test text, so that the difficulty of the test texts presented to the test subjects is effectively graded, so that the test texts subsequently obtained by the test subjects with different preliminary evaluation scores for cognitive impairment are of different difficulty levels.
[0096] In one embodiment of the present application, S600 includes outputting each voice message in the voice test template one by one until a target number of reply voice messages are obtained, and performing semantic analysis on each reply voice message, and calculating a subsequent evaluation score of cognitive impairment corresponding to each reply voice message based on the result of the semantic analysis, including:
[0097] S610, selecting a voice file corresponding to a test question text without a proposed label in a voice test question template that matches the preliminary evaluation score of cognitive impairment as a voice message output.
[0098] S630, assigning a proposed label to the test question text selected in the previous step.
[0099] S650: Determine whether a reply voice message is received within a second preset time period.
[0100] S670: If no reply voice message is received within the second preset time period, a basic score having a first preset value is generated, and the basic score is used as the basic score corresponding to the reply voice message.
[0101] S690, return to S610, that is, return the voice file corresponding to a test question text without the proposed label in the voice test question template selected to match the preliminary evaluation score of cognitive impairment as a voice message output.
[0102] Specifically, by executing S630, that is, by assigning a proposed label to the test question text selected in the previous step, the test question text that has been selected can be prevented from being selected repeatedly.
[0103] The second preset time period may be equal to the first preset time period, or may not be equal to the first preset time period.
[0104] In this embodiment, when no reply voice message is received within the second preset time period, a basic score with a first preset value is generated and the basic score is used as the basic score corresponding to the reply voice message. This ensures that even when no reply voice message is received, a certain basic score is maintained, thereby eliminating some situations such as not hearing the question clearly, or the question is too difficult to understand or other incidental situations, thereby further ensuring the accuracy of cognitive impairment prediction.
[0105] In one embodiment of the present application, S600 further includes, that is, outputting each voice message in the voice test question template one by one until the target number of reply voice messages are obtained, and performing semantic analysis on each reply voice message, and calculating the cognitive impairment subsequent evaluation score corresponding to each reply voice message based on the result of the semantic analysis, and also includes:
[0106] S671: If a reply voice message is received within a second preset time period, generate a basic score with a second preset value, and use the basic score as the basic score corresponding to the reply voice message. The second preset value is greater than the first preset value.
[0107] S672: Perform semantic analysis on the reply voice message.
[0108] S673, matching the result of semantic analysis with all the example answer texts corresponding to the selected test question text one by one, and determining whether there is at least one example answer text that matches the result of semantic analysis.
[0109] S674, if there is at least one reply example text that matches the result of the semantic analysis, a reply score with a third preset value is generated, and the reply score is used as the reply score corresponding to the reply voice message, and the process returns to S690, that is, a voice file corresponding to a test text without a proposed label in the voice test template that matches the preliminary evaluation score of cognitive impairment is returned as a voice message output. The third preset value is greater than the second preset value.
[0110] S675, if there is no reply sample text matching the result of semantic analysis, then generate a reply score with a fourth preset value, use the reply score as the reply score corresponding to the reply voice message, and return to S690, that is, return the voice file corresponding to the test text without the proposed label in the voice test template that matches the preliminary evaluation score of cognitive impairment as the voice message output. The fourth preset value is less than the third preset value.
[0111] Specifically, the first preset value may be 1. The second preset value may be 3. The third preset value may be set according to the different difficulty levels of the test texts and the difference between the answer sample texts. A basic score may also be set, and different weight levels may be set for different types of test texts. The higher the weight level, the higher the preset value. The fourth preset value may be 0.
[0112] For example, the basic score weight accounts for 10%, the memory type test text weight accounts for 30%, the calculation type test text weight accounts for 10%, the recall type test text weight accounts for 20%, and the language ability test text weight accounts for 30%. The total is 100%.
[0113] S673, there are multiple specific implementation methods for determining whether there is at least one reply example text that matches the result of semantic analysis. Optionally, the match can be determined by the text similarity between the result of semantic analysis and the reply example text. This is an Intention Classifier process, and the similarity calculation can be implemented by keyword hits.
[0114] For example, the test text is: Which street are you on now?
[0115] #keywords [
[0117] ['street', 'road', 'road'],
[0118] ['alley', 'lane', 'hutong'], ]
[0120] #positive samples [
[0122] 'I run $1.',
[0123] 'I run $2',
[0124] 'I'll take $1',
[0125] 'I'll take $2', ]
[0127] #negative samples [
[0129] 'I want to eat $1',
[0130] The keywords are the keywords that may appear in the reply voice message given by the test object. This keyword is used to replace the ${} placeholder in samples. For example, the first positive sample can be expanded to "I run on the street." or "I walk on the street.".
[0131] Positive samples are positive examples that contain keywords. Although the logic of the response may be a little problematic, they have certain positive significance and similarity. Negative samples are negative examples that contain keywords but have confusing response logic. This can avoid missing some responses that are highly similar but may be the same as the questions in the test text.
[0132] In this embodiment, basic scores of different values are generated by whether a reply voice message is received within a second preset time period, and reply scores of different values are generated by whether there is at least one reply example text that matches the result of semantic analysis, thereby diversifying the scores corresponding to each reply voice message.
[0133] In one embodiment of the present application, before returning the voice file corresponding to the test question text without the proposed label in the voice test question template selected to match the preliminary evaluation score of cognitive impairment as the voice message output, the method further includes:
[0134] S681, determine whether the number of response scores is greater than or equal to the target number.
[0135] S682, if the number of reply scores is greater than or equal to the target number, the sum of the basic score and the reply score corresponding to each reply voice message is calculated, and the sum is used as the subsequent evaluation score of cognitive impairment corresponding to each reply voice message.
[0136] S683, if the number of response scores is less than the target number, execute S690, that is, execute the step of returning the voice file corresponding to a test text without the proposed label in the voice test template selected to match the preliminary evaluation score of cognitive impairment as a voice message output.
[0137] Specifically, the target number may be 10. This target number may be understood as the number of valid reply voice messages.
[0138] Optionally, when executing S671, if a reply voice message is received within the second preset time period, and at least one reply voice message is received within the adjacent third preset time period, when executing S674 or S675 to generate a reply score, the first reply voice message received shall prevail. Optionally, when executing S671, if a reply voice message is received within the second preset time period, and at least one reply voice message is received within the adjacent third preset time period, after executing S674 or S675 to generate a reply score, the reply score is further reduced by a preset value based on the original reply score. The preset value may be 1.
[0139] At this point, it can be considered that the subject has answered one test question multiple times, and there may be some confusion in the language logic, so the response score needs to be lowered.
[0140] In this embodiment, when calculating the subsequent evaluation score of cognitive impairment corresponding to each reply voice message, the sum of the basic score and the reply score corresponding to each reply voice message is calculated, and the sum is used as the subsequent evaluation score of cognitive impairment corresponding to each reply voice message, so that the subsequent evaluation score of cognitive impairment corresponding to each reply voice message is diversified and the score is more in line with the actual situation.
[0141] In one embodiment of the present application, after S012c, the method further includes: grading the difficulty of the plurality of test texts according to the preset difficulty grading rule to assign a difficulty level to each test text; and further includes:
[0142] S012h: performing sub-difficulty grading on the multiple test question texts according to a preset sub-difficulty grading rule, so as to assign a sub-difficulty level to each test question text.
[0143] Specifically, each difficulty level may include 5 sub-difficulty levels. For example, the test text of difficulty level 3 specifically includes 3 test texts of sub-difficulty level 3.1, 3 test texts of sub-difficulty level 3.1, 3 test texts of sub-difficulty level 3.2, 3 test texts of sub-difficulty level 3.3, 3 test texts of sub-difficulty level 3.4, and 3 test texts of sub-difficulty level 3.5.
[0144] In this embodiment, by setting a plurality of sub-difficulty levels under one difficulty level, the difficulty of the test question text is further graded.
[0145] In one embodiment of the present application, S100 includes, that is, selecting a voice file corresponding to a question text without a proposed label in a voice question template matching the preliminary evaluation score of cognitive impairment as a voice message output, including:
[0146] S111a, determining whether there is at least one test question text with a proposed label in the speech test question template that matches the preliminary evaluation score of cognitive impairment.
[0147] S111b, if there is at least one test question text with a proposed label in the voice test question template that matches the preliminary evaluation score of cognitive impairment, then obtain the subsequent evaluation score of cognitive impairment corresponding to the reply voice message corresponding to the last selected test question text.
[0148] S111c, determining whether the subsequent evaluation score of cognitive impairment corresponding to the reply voice message corresponding to the last selected test question text is greater than or equal to the evaluation score threshold corresponding to the last selected test question text.
[0149] S111d, if the subsequent evaluation score of cognitive impairment corresponding to the reply voice message corresponding to the last selected test text is less than the evaluation score threshold corresponding to the last selected test text, then a voice file corresponding to a test text without a proposed label in the voice test template that matches the preliminary evaluation score of cognitive impairment is selected as the voice message output, and when selecting the test text this time, a test text with a lower sub-difficulty level than the last selected test text is selected.
[0150] Specifically, in S111d, when selecting a test question text with a lower sub-difficulty level than the last selected test question text, a test question text with a sub-difficulty level one level lower is randomly selected.
[0151] The purpose of setting S111d is that when the test subject's answer result for the previous test text is not very ideal, that is, the corresponding subsequent evaluation score of cognitive impairment is relatively low, we can select a test text with a lower sub-difficulty level than the previous selected test text when selecting the test text next time. This can make the final score of cognitive impairment obtained by the cognitive impairment prediction method more accurate and avoid certain test questions with too high difficulty due to human factors, such as poor state when answering questions, age factors, physical factors, or the test subject did not hear clearly or other accidental factors, resulting in the test subject's score being too low.
[0152] For example, the test text of difficulty level 3 specifically includes 3 test texts of sub-difficulty level 3.1, 3 test texts of sub-difficulty level 3.1, 3 test texts of sub-difficulty level 3.2, 3 test texts of sub-difficulty level 3.3, 3 test texts of sub-difficulty level 3.4, and 3 test texts of sub-difficulty level 3.5. If the last selected test text has a sub-difficulty level of 4.2, then when executing S111d, the selected test text should be a test text of a level lower than 4.2, that is, one is randomly selected from the 3 test texts of sub-difficulty level 3.4.
[0153] The S100 also includes:
[0154] S111e, if the subsequent evaluation score of cognitive impairment corresponding to the reply voice message corresponding to the last selected test text is greater than or equal to the evaluation score threshold corresponding to the last selected test text, then a voice file corresponding to a test text without a proposed label in the voice test template that matches the preliminary evaluation score of cognitive impairment is selected as the voice message output, and when selecting the test text this time, a test text with the same sub-difficulty level as the last selected test text is selected, or a test text with a higher sub-difficulty level than the last selected test text is selected.
[0155] In this embodiment, when selecting a test question text, by selecting a test question text with a lower sub-difficulty level than the last selected test question text, the system can temporarily change the test question according to the actual situation of the subject, which is highly flexible.
[0156] Of course, S100 may include: S121a, determining whether there is at least one test question text with a proposed label in the voice test question template that matches the preliminary evaluation score of cognitive impairment.
[0157] S121b, if there is at least one test text with a proposed label in the voice test template that matches the preliminary evaluation score of cognitive impairment, then obtain the subsequent evaluation score of cognitive impairment corresponding to the reply voice message corresponding to the last selected test text, and calculate the cumulative sum of the subsequent evaluation scores of cognitive impairment of all previously answered test texts. Determine whether the cumulative sum is less than the real-time cumulative sum threshold. The real-time cumulative sum threshold is the preset cumulative sum coefficient multiplied by the total number of all previously answered test texts. The preset cumulative sum coefficient can be 2.5. The real-time cumulative sum threshold changes in real time and increases as the total number of all previously answered test texts increases.
[0158] S121c, determining whether the cumulative sum is less than the real-time cumulative sum threshold.
[0159] S121d, if the cumulative sum is less than the real-time cumulative sum threshold, a voice file corresponding to a question text without a proposed label in a voice question template that matches the preliminary evaluation score of cognitive impairment is selected as a voice message output, and when selecting the question text this time, a question text with a smaller sub-difficulty level than the last selected question text is selected.
[0160] This embodiment directly calculates the cumulative sum of the cognitive impairment subsequent evaluation scores of all previously answered test texts each time a new test text is selected for the subject to answer, and then compares it with the real-time cumulative sum threshold. When the cumulative sum is less than the real-time cumulative sum threshold, a test text with a lower difficulty level is selected the next time a test text is selected. In this way, the difficulty of the test text can be gradually reduced when the subject's answer result is not good, making the cognitive impairment prediction result softer.
[0161] The technical features of the above-described embodiments may be arbitrarily combined, and the execution order of the method steps is not limited. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for predicting cognitive impairment based on automatic dialogue, characterized in that: The method comprises: Output a preliminary test voice message; Determining whether a reply voice message is received within a first preset time period; If a reply voice message is received within the first preset time period, converting the reply voice message into text to obtain a reply text; Perform semantic analysis on the response text and calculate the preliminary evaluation score of cognitive impairment based on the results of semantic analysis; According to the preliminary evaluation score of cognitive impairment, a speech test template matching the preliminary evaluation score of cognitive impairment is extracted from the database; different speech test templates correspond to different test questions with different difficulty levels; Output each voice message in the voice test template one by one until the target number of reply voice messages is obtained, and perform semantic analysis on each reply voice message, and calculate the subsequent evaluation score of cognitive impairment corresponding to each reply voice message based on the result of the semantic analysis; Calculate the initial evaluation score of cognitive impairment and the sum of the subsequent evaluation scores of cognitive impairment corresponding to all replied voice messages, and use the sum as the final cognitive impairment score; The prediction results of cognitive impairment were obtained based on the final cognitive impairment scores.
2. The method for predicting cognitive impairment based on automatic dialogue according to claim 1, characterized in that: After determining whether a reply voice message is received within the first preset time period, the method further includes: If no reply voice message is received within the first preset time period, a timer is started and the value of the counter is increased by 1 based on the original value; Read the value of the counter and determine whether the value of the counter is greater than or equal to the number of attempts threshold; If the value of the counter is less than the trial number threshold, returning the output preliminary test voice message; If the value of the counter is greater than or equal to the trial number threshold, the value of the counter is reset to zero, and a cognitive impairment prediction result indicating that the subject has cognitive impairment is output.
3. The method for predicting cognitive impairment based on automatic dialogue according to claim 2, characterized in that: Before outputting the preliminary test voice message, the method further includes: Creating a voice test question bank; the voice test question bank includes a test bank and a formal bank; The creation of a voice test database comprises: Create a test library; Acquire multiple orientation type test question texts, convert each orientation type test question text into a voice file, and obtain a voice file corresponding to each orientation type test question text; The voice file corresponding to each orientation type test text is stored in the test library.
4. The method for predicting cognitive impairment based on automatic dialogue according to claim 3, characterized in that: The output of the preliminary test voice message includes: A voice file is randomly selected from the test library as the initial test voice message output.
5. The method for predicting cognitive impairment based on automatic dialogue according to claim 3, characterized in that: The creating of the voice test question bank also includes: Create a formal library; Get multiple test texts; The difficulty of the multiple test texts is graded according to the preset difficulty grading rules, so as to assign a difficulty level to each test text; For each test question text, generate a preset number of sample answer texts; Convert each test question text into a voice file to obtain a voice file corresponding to each test question text; Merging multiple test texts with the same difficulty level, multiple voice files corresponding to the test texts with the same difficulty level, and all answer sample texts corresponding to the test texts with the same difficulty level into one voice test template; All speech test templates are stored in the official library.
6. The method for predicting cognitive impairment based on automatic dialogue according to claim 5, characterized in that: Outputting each voice message in the voice test question template one by one until a target number of reply voice messages are obtained, and performing semantic analysis on each reply voice message, and calculating a subsequent evaluation score of cognitive impairment corresponding to each reply voice message based on the result of the semantic analysis, including: Selecting a voice file corresponding to a test question text without a proposed label in a voice test question template matching the preliminary evaluation score of cognitive impairment as a voice message output; Assign a proposed label to the test question text selected in the previous step; Determining whether a reply voice message is received within a second preset time period; If no reply voice message is received within the second preset time period, generating a basic score with a first preset value, and using the basic score as the basic score corresponding to the reply voice message; The voice file corresponding to a test question text without the proposed label in the voice test question template selected to match the preliminary evaluation score of cognitive impairment is returned as a voice message output.
7. The method for predicting cognitive impairment based on automatic dialogue according to claim 6, characterized in that: The method further includes: outputting each voice message in the voice test question template one by one until a target number of reply voice messages are obtained, and performing semantic analysis on each reply voice message, and calculating a subsequent evaluation score of cognitive impairment corresponding to each reply voice message based on the result of the semantic analysis, and further includes: If a reply voice message is received within a second preset time period, a basic score having a second preset value is generated and the basic score is used as the basic score corresponding to the reply voice message; the second preset value is greater than the first preset value; Performing semantic analysis on the reply voice message; Matching the result of semantic analysis with all the sample answer texts corresponding to the selected test question texts one by one, and determining whether there is at least one sample answer text that matches the result of semantic analysis; If there is at least one reply example text that matches the result of the semantic analysis, a reply score with a third preset value is generated, the reply score is used as the reply score corresponding to the reply voice message, and a voice file corresponding to a test text without the proposed label in the voice test template selected to match the preliminary evaluation score of cognitive impairment is returned as a voice message output; the third preset value is greater than the second preset value; If there is no reply example text that matches the result of the semantic analysis, a reply score with a fourth preset value is generated, and the reply score is used as the reply score corresponding to the reply voice message, and a voice file corresponding to a test text without a proposed label in the voice test template selected to match the preliminary evaluation score of cognitive impairment is returned as a voice message output; the fourth preset value is less than the third preset value.
8. The method for predicting cognitive impairment based on automatic dialogue according to claim 7, characterized in that: Before returning the voice file corresponding to the test question text without the proposed label in the voice test question template selected to match the preliminary evaluation score of cognitive impairment as the voice message output, the method further includes: Determine whether the number of response scores is greater than or equal to the target number; If the number of reply scores is greater than or equal to the target number, the sum of the basic score and the reply score corresponding to each reply voice message is calculated, and the sum is used as the subsequent evaluation score of cognitive impairment corresponding to each reply voice message; If the number of answer scores is less than the target number, the method of returning the voice file corresponding to a question text without the proposed label in the voice question template selected to match the preliminary evaluation score of cognitive impairment is output as a voice message.
9. The method for predicting cognitive impairment based on automatic dialogue according to claim 8, characterized in that: After the difficulty of the plurality of test texts is graded according to the preset difficulty grading rules so as to assign a difficulty level to each test text, the method further includes: The multiple test question texts are sub-difficulty graded according to a preset sub-difficulty grade rule, so as to assign a sub-difficulty grade to each test question text.
10. The method for predicting cognitive impairment based on automatic dialogue according to claim 9, characterized in that: The step of selecting a voice file corresponding to a question text without a proposed label in a voice question template matching the preliminary evaluation score of cognitive impairment as a voice message output includes: Determine whether there is at least one test text with the proposed label in the speech test template that matches the preliminary evaluation score of cognitive impairment; If there is at least one test question text with a proposed label in the voice test question template that matches the preliminary evaluation score of cognitive impairment, then obtaining the subsequent evaluation score of cognitive impairment corresponding to the reply voice message corresponding to the last selected test question text; Determine whether the cognitive impairment subsequent evaluation score corresponding to the reply voice message corresponding to the last selected test question text is greater than or equal to the evaluation score threshold corresponding to the last selected test question text; If the subsequent evaluation score of cognitive impairment corresponding to the reply voice message corresponding to the last selected test text is less than the evaluation score threshold corresponding to the last selected test text, then a voice file corresponding to a test text without a proposed label in the voice test template that matches the preliminary evaluation score of cognitive impairment is selected as the voice message output, and when selecting the test text this time, a test text with a lower sub-difficulty level than the last selected test text is selected.