Medical questionnaire open question answer coding method, system and device and medium

Through document embedding model and condensation hierarchical clustering algorithm, the topic of open-ended questions answers in medical questionnaire was identified, combined with graph-based sorting algorithm and abstract text summary model, the problems of coding efficiency and accuracy of open-ended answers were solved, and efficient Accurate data analysis and research support.

CN119230037AInactive Publication Date: 2024-12-31RENMIN UNIVERSITY OF CHINA

Patent Information

Application Number
CN202411226531.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-31
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology cannot efficiently and accurately encode the answers to open questions in medical questionnaires, resulting in low efficiency and poor accuracy of data analysis, and it is difficult to deal with sparsity, irregularity and large-scale problems.

Method used

Use document embedding model to convert answer documents into vectors, use aggregation hierarchical clustering algorithm to identify answer documents topics, combine graph-based sorting algorithms and abstract text abstract models to form topics with hierarchical relationships, reduce manual intervention and improve data processing Consistency and reliability.

Benefits of technology

Quickly and accurately identify the topic of the answer document, structure complex information, provide rich analytical perspectives, improve the accuracy and depth of medical data analysis, shorten processing time, and improve the efficiency of medical questionnaires.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119230037A_ABST
    Figure CN119230037A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical care informatics, and discloses a medical questionnaire open question answer coding method, system and device and a medium, and the method comprises the steps: converting an answer document of a medical questionnaire open question into an answer document vector through a document embedding model; an aggregation hierarchical clustering algorithm is utilized to quickly and accurately identify answer document clusters with hierarchical relationships and different answer document themes in answer documents, so that complex information is structured, subsequent analysis is facilitated, and a richer view angle is provided for data analysis; in combination with a graph-based sorting algorithm for texts and an abstract text abstract model, encoding answer documents contained in answer document clusters of different answer document topics into answer document abstracts, and forming topic-abstract pairs with hierarchical relationships by the answer document topics and the answer document abstracts of the answer document clusters; manual intervention is reduced, human errors are avoided, the consistency and reliability of medical data processing are improved, and the medical data processing time is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical care informatics, and in particular to a method, system, device and medium for encoding answers to open-ended questions in a medical questionnaire. Background Art

[0002] In the field of medical health, medical questionnaire surveys are a very important quantitative research method. It can collect opinions and feedback from patients, medical staff, medical institutions and other parties, understand their needs, experiences and opinions, so as to better optimize medical services, improve medical experience, promote medical scientific research, etc. Open-ended questions are often set in medical questionnaire surveys, through which the respondents' more real experiences and feelings can be understood. The answers to these open-ended questions can provide rich qualitative data, helping researchers to gain a deeper understanding of the respondents' real thoughts, feelings and experiences.

[0003] It is worth noting that the lack of efficient methods for analyzing answers to open-ended questions has greatly limited the effectiveness of medical questionnaire surveys. Previous literature proposed four basic requirements when formulating guidelines for the design of medical questionnaires. One of them is that the design of questions and options needs to meet the needs of data analysis, emphasizing the importance of statistical analysis. This requirement also applies to open-ended questions. Although open-ended questions do not have fixed guiding rules and research methods, they can still be studied from the perspective of statistical analysis in combination with the nature of medical questionnaire surveys. Regarding the research methods of answers to open-ended questions in medical questionnaires, previous scholars have systematically proposed methods for coding answers to open-ended questions.

[0004] In actual scenarios, the coding of answers to open-ended questions in medical questionnaires is usually done manually. However, this manual coding method has some problems when the amount of data is large. First, a lot of manpower and time are required, and these tasks are often labor-intensive, repetitive and generalized tasks with relatively low labor value. This leads to a sharp contrast between the efficient analysis of answers to open-ended questions in medical questionnaires and answers to other questions. On the other hand, the answers to open-ended questions in medical questionnaires have the characteristics of large sample size and short single text, which means that when analyzing answers to open-ended questions in medical questionnaires, the labor-intensive characteristics are more prominent and it is difficult to ensure the accuracy of coding. In addition, the level of abstraction required for the analysis of open-ended questions in medical questionnaires is low. Traditional manual coding methods cannot cope with the needs of coding answers to open-ended questions in medical questionnaires with characteristics such as sparsity, irregularity, imbalanced distribution, large scale, and difficulty in marking.

[0005] Therefore, there is an urgent need for a new method, system, device and medium for encoding answers to open-ended questions in medical questionnaires, so as to efficiently and accurately encode the answers to open-ended questions in medical questionnaires and improve the efficiency of medical questionnaire surveys and research. Summary of the invention

[0006] The present invention provides a method, system, device and medium for encoding answers to open-ended questions in a medical questionnaire, so as to solve the defect that the prior art cannot efficiently and accurately encode answers to open-ended questions in a medical questionnaire.

[0007] The present invention provides a method for encoding answers to open-ended questions in a medical questionnaire, comprising: Obtain multiple answer documents for the same open-ended question of a target medical questionnaire; Based on multiple answer documents of the same open-ended question in the target medical questionnaire, multiple answer document vectors are obtained through a document embedding model; According to the multiple answer document vectors, using an agglomerative hierarchical clustering algorithm, a plurality of answer document clusters are obtained, wherein the answer document topics of each of the multiple answer document clusters are different; According to multiple answer document clusters, the answer document summary of each answer document cluster in the multiple answer document clusters is obtained through a graph-based sorting algorithm and an abstract text summarization model for text, and the answer document topic and answer document summary of each answer document cluster are formed into a topic-summary pair with a hierarchical relationship, which is used for the study of answers to open-ended questions in medical questionnaires.

[0008] In one embodiment, the document embedding model includes a BERT model and a pooling layer. The BERT model includes an input layer, an intermediate layer, and an output layer. The pooling layer in the document embedding model is connected to the output layer of the BERT model, and the document embedding model outputs an answer document vector of a fixed length through a pooling strategy, wherein the pooling strategy is any one of the following: using the output of the CLS position as the vector of the entire sentence, taking the output vectors of all tokens and taking the average as the vector of the sentence, and taking the maximum value of the output vector of the token over time as the vector of the sentence.

[0009] You can choose a pooling strategy based on actual conditions. If you need to perform text classification, use CLS pooling (that is, use the output of the CLS position as the vector of the entire sentence); if you need to focus on the similarity between texts, use average pooling (that is, take the output vectors of all tokens and take the average as the vector of the sentence). Average pooling is preferred in this embodiment.

[0010] In one embodiment, the document embedding model is trained based on the BERT model through a twin network and / or a triplet network according to a training strategy, wherein the training strategy includes any one of the following or any combination thereof: a classification objective function, an entropy loss function, and a regression objective function. When the classification objective function or the entropy loss function is used as the current training strategy, the document embedding model is trained based on the BERT model through a twin network; when the regression objective function is used as the current training strategy, the document embedding model is trained based on the BERT model through a triplet network.

[0011] In one embodiment, the classification objective function is expressed as: , In the expression of the classification objective function, , Represent an answer document vector and another answer document vector respectively, represents the weight matrix, Indicates the classification result.

[0012] In one embodiment, the entropy loss function is expressed as: , In the expression of entropy loss function, , Represent an answer document vector and another answer document vector respectively, Represents an answer document vector and another answer document vector The angle between The cosine similarity of Represents an answer document vector and another answer document vector The entropy loss between .

[0013] In one embodiment, the regression objective function is expressed as: , In the expression of regression objective function, Represents a given anchor sentence The sentence embedding vector of Affirmative sentences The sentence embedding vector of Negative sentences The sentence embedding vector of represents the measure of distance, Represents boundary parameters to ensure positive sentences The sentence embedding vector Negative sentences The sentence embedding vector Closer to the given anchor sentence The sentence embedding vector .

[0014] In one embodiment, the method uses an agglomerative hierarchical clustering algorithm based on multiple answer document vectors to obtain multiple answer document clusters, wherein the answer document topics of each answer document cluster in the multiple answer document clusters are different, including: Taking each of the multiple answer document vectors as an initial cluster, thereby obtaining multiple initial clusters; According to the multiple initial clustering clusters, a distance matrix between every two initial clustering clusters in the multiple initial clustering clusters is obtained; According to the distance matrix between each two initial clustering clusters in the multiple initial clustering clusters, the initial clustering clusters with the closest distance are merged in a bottom-up manner to obtain multiple new clustering clusters, and the distance matrix between each two new clustering clusters in the multiple new clustering clusters is updated, and this step is repeated until the preset clustering stop condition is reached to obtain the pedigree diagram of the agglomerative hierarchical clustering process; According to a preset distance threshold, the pedigree diagram of the agglomerative hierarchical clustering process is segmented and cross-sectionally intercepted to obtain multiple answer document clusters with hierarchical relationships, and the categories of the hierarchical relationships between the multiple answer document clusters are set to answer document topics corresponding to the multiple answer document clusters. Each of the multiple answer document clusters contains multiple answer documents corresponding to the answer document topics.

[0015] In one embodiment, updating the distance matrix between every two new clustering clusters in the plurality of new clustering clusters comprises: According to the distance update expression, the distance matrix between each two new clusters in the multiple new clusters is updated, where the distance update expression is: , , , , , Distance Metric = , In the distance update expression, Represents a new cluster and another new cluster among multiple new clusters. Indicates Clusters and The distance between clusters, Indicates Clusters and The distance between clusters, Indicates Clusters and The distance between clusters, Indicates the merge Clusters and After clustering, The distance between clusters, Indicates The center point of the clusters, Indicates The center point of the clusters, Indicates The number of cluster points, Represents parameters used to simplify calculations.

[0016] In one embodiment, the method of obtaining an answer document summary of each answer document cluster in the plurality of answer document clusters by using a graph-based sorting algorithm and an abstract text summary model for text, and forming a topic-summary pair with a hierarchical relationship between the answer document topic and the answer document summary of each answer document cluster for research on answers to open questions in medical questionnaires, comprises: For each of the multiple answer document clusters, using the Text Rank algorithm, keywords of the multiple answer documents contained in each of the multiple answer document clusters are obtained; According to the keywords of the multiple answer documents contained in each of the multiple answer document clusters, an answer document summary of each of the multiple answer document clusters is obtained through an abstract text summary model.

[0017] In one embodiment, for each of the multiple answer document clusters, obtaining keywords of the multiple answer documents contained in each of the multiple answer document clusters by using a Text Rank algorithm includes: For each of the multiple answer document clustering clusters, concatenate the multiple answer documents contained in each answer document clustering cluster to obtain a concatenated document; The importance of each word in the concatenated document is calculated by the Text Rank algorithm, and the keywords of each concatenated document are obtained according to the importance of each word in the concatenated document, that is, the keywords of each answer document cluster in multiple answer document clusters are obtained.

[0018] In one embodiment, the importance of each word in the concatenated document is calculated by the Text Rank algorithm, and the keywords of each concatenated document are obtained according to the importance of each word in the concatenated document, that is, the keywords of each answer document cluster in the multiple answer document clusters are obtained, including: According to the importance expression, the importance of each word in the concatenated document is calculated by the Text Rank algorithm, where the importance expression is: , In the importance expression, Expressive words The importance of Expressive words The importance of Pointing words The word collection, Expressive words The set of words pointed to, Expressive words Pointing Word The weight of the edge, Expressive words Pointing Word The weight of the edge, d represents the damping coefficient, which is generally set to 0.85.

[0019] The present invention also provides a medical questionnaire open-ended question answer coding system, comprising: A data acquisition module is used to: acquire multiple answer documents of the same open-ended question of a target medical questionnaire; A document embedding module is used to obtain multiple answer document vectors based on multiple answer documents of the same open-ended question of the target medical questionnaire through a document embedding model; An agglomerative hierarchical clustering module is used to: obtain multiple answer document clusters based on multiple answer document vectors using an agglomerative hierarchical clustering algorithm, wherein the answer document topics of each answer document cluster in the multiple answer document clusters are different; The encoding module is used to: obtain the answer document summary of each answer document cluster in the multiple answer document clusters through a graph-based sorting algorithm and an abstract text summary model for text, and form the answer document topic and answer document summary of each answer document cluster into a topic-summary pair with a hierarchical relationship for the study of answers to open-ended questions in medical questionnaires.

[0020] The present invention also provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements any of the above-mentioned methods for encoding answers to open-ended questions in a medical questionnaire when executing the computer program.

[0021] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned methods for encoding answers to open-ended questions in a medical questionnaire.

[0022] The present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute any of the above-mentioned methods for encoding answers to open-ended questions in a medical questionnaire.

[0023] The present invention provides a method, system, device and medium for encoding answers to open-ended questions in a medical questionnaire. The answer documents of the open-ended questions in the medical questionnaire are converted into answer document vectors through a document embedding model. The answer document clusters with hierarchical relationships and different answer document themes in the answer document are quickly and accurately identified using an agglomerative hierarchical clustering algorithm, so that complex information is structured, which is convenient for subsequent analysis and provides a richer perspective for data analysis. In combination with a graph-based sorting algorithm and an abstract text summary model for text, the answer documents contained in the answer document cluster clusters with different answer document themes are encoded into answer document summaries, and the answer document themes and answer document summaries of each answer document cluster cluster are formed into a theme-summary pair with a hierarchical relationship, thereby reducing manual intervention, avoiding human errors, improving the consistency and reliability of medical data processing, and shortening the medical data processing time, improving efficiency, and enabling medical researchers to devote more energy to data interpretation and application. The present invention shows excellent performance in encoding answers to open-ended questions in medical questionnaires, which not only accelerates the encoding process, but also greatly improves the accuracy and depth of medical data analysis, and provides strong technical support for questionnaire survey research in the field of health care. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 This is one of the flow charts of a method for encoding answers to open-ended questions in a medical questionnaire provided by the present invention.

[0026] Figure 2 The present invention provides a second flow chart of a method for encoding answers to open-ended questions in a medical questionnaire.

[0027] Figure 3(Left) is a diagram of the model training of the document embedding model combined with the twin network and the classification objective function. Figure 3 (Right) Schematic diagram of model training of the document embedding model combined with the twin network and entropy loss function.

[0028] Figure 4 Example diagrams of slicing and cross-sectioning of a pedigree graph for an agglomerative hierarchical clustering process.

[0029] Figure 5 Schematic diagram of the architecture of the abstract text summarization model.

[0030] Figure 6 A schematic diagram of the structure of a medical questionnaire open-ended question answer coding system provided by the present invention.

[0031] Figure 7 This is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0033] Combine the following Figure 1-Figure 7 The present invention describes the method, system, device and medium for encoding answers to open-ended questions in medical questionnaires. It should be noted that the execution subject of the method for encoding answers to open-ended questions in medical questionnaires provided by the present invention can be any network-side device / terminal-side device that meets the technical requirements, such as a device for encoding answers to open-ended questions in medical questionnaires.

[0034] Figure 1-Figure 2 Schematic diagram of the process of encoding the answer of the open-ended question in the medical questionnaire provided by the present invention. Figure 1 The present invention provides a method for encoding answers to open-ended questions in a medical questionnaire, which may include: Step S110: Acquire multiple answer documents for the same open-ended question in the target medical questionnaire.

[0035] Step S120: Based on multiple answer documents of the same open-ended question in the target medical questionnaire, multiple answer document vectors are obtained through the document embedding model, that is, n answer documents are embedded into the document embedding model. Mapped into vector space, output n answer document vectors .

[0036] Before executing the method for encoding answers to open-ended questions in a medical questionnaire provided by the present invention, it is necessary to pre-train the document embedding model. The document embedding model in this embodiment includes a BERT model and a pooling layer (Pooling layer), which constitute a Sentence-BERT model, wherein the BERT model includes an input layer, an intermediate layer, and an output layer, and the pooling layer in the document embedding model is connected to the output layer of the BERT model, and the document embedding model is made to output a fixed-length answer document vector through a pooling strategy, wherein the pooling strategy is any of the following: using the output of the CLS position as the vector of the entire sentence, taking the average value of the output vectors of all Tokens as the vector of the sentence, and taking the maximum value of the output vector of the Token over time as the vector of the sentence. The pooling strategy can be selected according to the actual situation. If text classification is required, CLS pooling is used (i.e., the output of the CLS position is used as the vector of the entire sentence); if it is necessary to focus on the similarity between texts, average pooling is used (i.e., the average value of the output vectors of all Tokens is taken as the vector of the sentence). Average pooling is preferred in this embodiment.

[0037] Furthermore, the document embedding model is trained based on the BERT model through a twin network and / or a triplet network according to a training strategy, wherein the training strategy includes any one of the following or any combination thereof: a classification objective function, an entropy loss function, and a regression objective function. The classification objective function is for tasks that require text labels, such as reasoning; the regression objective function is for tasks that focus on semantic similarity, and the entropy loss is used for unsupervised or weakly supervised tasks. The selection needs to be determined in combination with text features. The entropy loss function is preferred in this embodiment. When the classification objective function or the entropy loss function is used as the current training strategy, the document embedding model is trained based on the BERT model through a twin network. When the regression objective function is used as the current training strategy, the document embedding model is trained based on the BERT model through a triplet network. For a training diagram, see Figure 3 .

[0038] Among them, the expression of the classification objective function is: , In the expression of the classification objective function, , Represent an answer document vector and another answer document vector respectively, represents the weight matrix, Indicates the classification result.

[0039] The expression of the entropy loss function is: , In the expression of entropy loss function, , Represent an answer document vector and another answer document vector respectively, Represents an answer document vector and another answer document vector The angle between The cosine similarity of Represents an answer document vector and another answer document vector The entropy loss between .

[0040] The expression of the regression objective function is: , In the expression of regression objective function, Represents a given anchor sentence The sentence embedding vector of Affirmative sentences The sentence embedding vector of Negative sentences The sentence embedding vector of represents the measure of distance, Represents boundary parameters to ensure positive sentences The sentence embedding vector Negative sentences The sentence embedding vector Closer to the given anchor sentence The sentence embedding vector .

[0041] Step S130: Based on the multiple answer document vectors, agglomerative hierarchical clustering algorithm is used to obtain multiple answer document clusters, wherein the answer document topics of each answer document cluster in the multiple answer document clusters are different.

[0042] In one embodiment, step S130 may include: Taking each of the multiple answer document vectors as an initial cluster, thereby obtaining multiple initial clusters; According to the multiple initial clustering clusters, a distance matrix between every two initial clustering clusters in the multiple initial clustering clusters is obtained; According to the distance matrix between each two initial clusters in multiple initial clusters, the initial clusters with the closest distance are merged in a bottom-up manner to obtain multiple new clusters, and according to the distance update expression, the distance matrix between each two new clusters in multiple new clusters is updated. This step is repeated until the preset clustering stop condition is reached, and the pedigree diagram of the agglomerative hierarchical clustering process is obtained, where the distance update expression is: , , , , , Distance Metric = , In the distance update expression, Represents a new cluster and another new cluster among multiple new clusters. Indicates Clusters and The distance between clusters, Indicates Clusters and The distance between clusters, Indicates Clusters and The distance between clusters, Indicates the merge Clusters and After clustering, The distance between clusters, Indicates The center point of the cluster, Indicates The center point of the cluster, Indicates The number of cluster points, Indicates parameters used to simplify calculations; According to a preset distance threshold, the pedigree diagram of the agglomerative hierarchical clustering process is segmented and cross-sectionally intercepted to obtain multiple answer document clusters with hierarchical relationships, and the categories of the hierarchical relationships between the multiple answer document clusters are set to answer document topics corresponding to the multiple answer document clusters. Each of the multiple answer document clusters contains multiple answer documents corresponding to the answer document topics.

[0043] It should be noted that since the task of agglomerative hierarchical clustering is unsupervised, it does not conform to the task of hierarchical topic extraction in its specific implementation. Therefore, it needs to be modified to retain the pedigree diagram obtained by the agglomerative hierarchical clustering process, select different distances for segmentation on its basis, take several cross sections, and further obtain categories with hierarchical relationships based on their upper and lower subordinate relationships. The categories at different levels after unsupervised clustering are called answer document topics, and each answer document cluster contains multiple answer documents corresponding to the answer document topic. Figure 4As shown in the figure, the pedigree graph is segmented with 2.0, 1.5, and 1.0 as the distance thresholds, and each answer document belongs to an answer document topic at a specific level. Assuming that a three-level coding system is ultimately required, after obtaining the cluster pedigree graph, select , , ( ) as the distance threshold, and after segmentation, the first-level, second-level, and third-level topics are obtained respectively.

[0044] Step S140: Based on multiple answer document clusters, the answer document summary of each answer document cluster in the multiple answer document clusters is obtained through a graph-based sorting algorithm and an abstract text summary model for text, and the answer document topic and the answer document summary of each answer document cluster are formed into a topic-summary pair with a hierarchical relationship, which is used for the research on answers to open-ended questions in medical questionnaires.

[0045] In one embodiment, step S140 may include: For each answer document cluster in the multiple answer document clusters, the keywords of the multiple answer documents contained in each answer document cluster in the multiple answer document clusters are obtained by using the Text Rank algorithm. Specifically, for each answer document cluster in the multiple answer document clusters, the multiple answer documents contained in each answer document cluster can be concatenated to obtain a concatenated document, and then the importance of each word in the concatenated document is calculated according to the importance expression by using the Text Rank algorithm, and the keywords of each concatenated document are obtained according to the importance of each word in the concatenated document, that is, the keywords of each answer document cluster in the multiple answer document clusters are obtained, wherein the importance expression is: , In the importance expression, Expressive words The importance of Expressive words The importance of Pointing words The word collection, Expressive words The set of words pointed to, Expressive words Pointing Word The edge weights of Expressive words Pointing Word The weight of the edge, d represents the damping coefficient, which is generally set to 0.85; According to the keywords of the multiple answer documents contained in each of the multiple answer document clusters, an answer document summary of each of the multiple answer document clusters is obtained through an abstract text summary model.

[0046] Specifically, the abstract text summary model in this embodiment may be a PEGASUS model, and its architecture is as follows: Figure 5 Therefore, the basic idea of ​​the training task is to mask the important sentences of the answer document during input, extract information from the remaining sentences, and generate the missing important information, so as to simulate the task of "automatic summarization". There are three strategies for selecting masked sentences: Random: randomly select n sentences; Lead: directly select the first n sentences; Principal: select the first n sentences with the highest importance scores. Regarding the measurement of importance, let the set of all sentences be D, for one of the sentences , calculate the ROUGE1-F1 score of this sentence and the rest of the sentences .

[0047] The present invention provides a method, system, device and medium for encoding answers to open-ended questions in a medical questionnaire. The answer documents of the open-ended questions in the medical questionnaire are converted into answer document vectors through a document embedding model. The answer document clusters with hierarchical relationships and different answer document themes in the answer document are quickly and accurately identified using an agglomerative hierarchical clustering algorithm, so that complex information is structured, which is convenient for subsequent analysis and provides a richer perspective for data analysis. In combination with a graph-based sorting algorithm and an abstract text summary model for text, the answer documents contained in the answer document cluster clusters with different answer document themes are encoded into answer document summaries, and the answer document themes and answer document summaries of each answer document cluster cluster are formed into a theme-summary pair with a hierarchical relationship, thereby reducing manual intervention, avoiding human errors, improving the consistency and reliability of medical data processing, and shortening the medical data processing time, improving efficiency, and enabling medical researchers to devote more energy to data interpretation and application. The present invention shows excellent performance in encoding answers to open-ended questions in medical questionnaires, which not only accelerates the encoding process, but also greatly improves the accuracy and depth of medical data analysis, and provides strong technical support for questionnaire survey research in the field of health care.

[0048] The method, system, device and medium for encoding answers to open questions in a medical questionnaire provided by the present invention can be widely used in various surveys related to health care. For example, in health-related surveys, open questions allow respondents to freely express their views and understanding of health. By setting open questions, respondents provide information about various aspects of health, such as lifestyle, medical services, health habits, etc., and may propose some new perspectives, such as physical health status and self-health supervision. In diet-related surveys, open questions in the questionnaire allow respondents to describe their eating habits and preferences in detail, and provide detailed information about diet structure, food intake, etc. By analyzing the answers of the respondents, some new eating habits can be found, such as food combinations, meal times, etc., so as to explore new research areas in diet surveys. In health-related surveys, the open questions in the questionnaire can be used to understand the respondents' understanding and suggestions on hospital health issues, such as health evaluation, medical environment, improvement measures, etc. The respondents' answers may contain some novel viewpoints, which are very helpful for the study of health issues.

[0049] Take a questionnaire survey on health awareness and health behavior as an example. The questionnaire has an open question: "Under what circumstances will you go to the hospital for treatment?" The closed questions in the questionnaire investigated the extent to which the respondent's condition would cause them to go to the hospital, while the answers to the open questions supplemented key information such as "regular physical examinations", "emergencies", and "when you are not clear about your own condition". Applying the present invention to the automatic encoding of the answers to the open questions can efficiently extract and summarize the information of the respondents, comprehensively summarize the respondents' true thoughts, and expand the breadth and depth of the survey. Specifically, the automatic identification and classification of the respondents' answers achieved by the invention can, for example, extract the following key information: Regular medical check-ups: Many respondents mentioned that they would undergo regular medical check-ups even when they did not have a specific medical condition, which shows that they attach importance to preventive medical care.

[0050] Emergencies: When faced with sudden illness or emergency, respondents would choose to seek medical attention immediately, reflecting their demand for emergency medical services.

[0051] When they are unsure of their condition: Some respondents also chose to go to the hospital when they were unsure of their health status or felt unwell but could not identify the cause, which shows their decision-making process when faced with health concerns.

[0052] By automatically extracting and analyzing this information, this embodiment can not only summarize the medical behavior of respondents in different situations, but also reveal the health awareness and behavior patterns behind them. In summary, in health and medical related surveys, the present invention can realize efficient analysis and interpretation of complex and diverse information by automatically processing the answers to open questions, providing researchers with rich insights and new research directions, and greatly improving the quality and efficiency of survey research.

[0053] The following is a description of the medical questionnaire open-ended question answer coding system provided by the present invention. The medical questionnaire open-ended question answer coding system described below and the medical questionnaire open-ended question answer coding method described above can be referenced to each other.

[0054] Reference Figure 6 The present invention provides a medical questionnaire open-ended question answer coding system, which may include: A data acquisition module is used to: acquire multiple answer documents of the same open-ended question of a target medical questionnaire; A document embedding module is used to obtain multiple answer document vectors based on multiple answer documents of the same open-ended question of the target medical questionnaire through a document embedding model; An agglomerative hierarchical clustering module is used to: obtain multiple answer document clusters based on multiple answer document vectors using an agglomerative hierarchical clustering algorithm, wherein the answer document topics of each answer document cluster in the multiple answer document clusters are different; The encoding module is used to: obtain the answer document summary of each answer document cluster in the multiple answer document clusters through a graph-based sorting algorithm and an abstract text summary model for text, and form the answer document topic and answer document summary of each answer document cluster into a topic-summary pair with a hierarchical relationship for the study of answers to open-ended questions in medical questionnaires.

[0055] In one embodiment, the agglomerative hierarchical clustering module may include: An initialization submodule, used for: taking each of the multiple answer document vectors as an initial clustering cluster, thereby obtaining multiple initial clustering clusters; The distance matrix obtaining submodule is used to: obtain a distance matrix between every two initial clustering clusters in the multiple initial clustering clusters according to the multiple initial clustering clusters; A clustering submodule is used to: merge the initial clusters with the closest distance in a bottom-up manner according to the distance matrix between each two initial clusters in the multiple initial clusters to obtain multiple new clusters, and update the distance matrix between each two new clusters in the multiple new clusters, and repeat this step until a preset clustering stop condition is reached to obtain a pedigree diagram of the agglomerative hierarchical clustering process; The hierarchical relationship setting submodule is used to: split and cross-section the pedigree diagram of the agglomerative hierarchical clustering process according to a preset distance threshold, obtain multiple answer document clusters with hierarchical relationships, and set the categories of the hierarchical relationships between the multiple answer document clusters as answer document topics corresponding to the multiple answer document clusters, and each of the multiple answer document clusters contains multiple answer documents corresponding to the answer document topics.

[0056] In one embodiment, the encoding module may include: The keyword obtaining submodule is used to: for each of the multiple answer document clustering clusters, obtain keywords of the multiple answer documents contained in each of the multiple answer document clustering clusters by using the Text Rank algorithm; The summary obtaining submodule is used to obtain the answer document summary of each answer document cluster in the multiple answer document clusters through an abstract text summary model based on the keywords of the multiple answer documents contained in each answer document cluster in the multiple answer document clusters.

[0057] In one embodiment, the keyword obtaining submodule may include: A splicing submodule, used for: for each of the multiple answer document clustering clusters, splicing the multiple answer documents contained in each answer document clustering cluster to obtain a spliced ​​document; The importance calculation submodule is used to calculate the importance of each word in the concatenated document through the Text Rank algorithm, and obtain the keywords of each concatenated document according to the importance of each word in the concatenated document, that is, to obtain the keywords of each answer document cluster in multiple answer document clusters.

[0058] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the method for encoding answers to open questions in a medical questionnaire, and the method includes: Obtain multiple answer documents for the same open-ended question of a target medical questionnaire; Based on multiple answer documents of the same open-ended question in the target medical questionnaire, multiple answer document vectors are obtained through a document embedding model; According to the multiple answer document vectors, using an agglomerative hierarchical clustering algorithm, a plurality of answer document clusters are obtained, wherein the answer document topics of each of the multiple answer document clusters are different; According to multiple answer document clusters, the answer document summary of each answer document cluster in the multiple answer document clusters is obtained through a graph-based sorting algorithm and an abstract text summarization model for text, and the answer document topic and answer document summary of each answer document cluster are formed into a topic-summary pair with a hierarchical relationship, which is used for the study of answers to open-ended questions in medical questionnaires.

[0059] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0060] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the method for encoding answers to open questions in a medical questionnaire provided by the above methods, the method comprising: Obtain multiple answer documents for the same open-ended question of a target medical questionnaire; Based on multiple answer documents of the same open-ended question in the target medical questionnaire, multiple answer document vectors are obtained through a document embedding model; According to the multiple answer document vectors, using an agglomerative hierarchical clustering algorithm, a plurality of answer document clusters are obtained, wherein the answer document topics of each of the multiple answer document clusters are different; According to multiple answer document clusters, the answer document summary of each answer document cluster in the multiple answer document clusters is obtained through a graph-based sorting algorithm and an abstract text summarization model for text, and the answer document topic and answer document summary of each answer document cluster are formed into a topic-summary pair with a hierarchical relationship, which is used for the study of answers to open-ended questions in medical questionnaires.

[0061] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the method for encoding answers to open questions in a medical questionnaire provided by the above methods, the method comprising: Obtain multiple answer documents for the same open-ended question of a target medical questionnaire; Based on multiple answer documents of the same open-ended question in the target medical questionnaire, multiple answer document vectors are obtained through a document embedding model; According to the multiple answer document vectors, using an agglomerative hierarchical clustering algorithm, a plurality of answer document clusters are obtained, wherein the answer document topics of each of the multiple answer document clusters are different; According to multiple answer document clusters, the answer document summary of each answer document cluster in the multiple answer document clusters is obtained through a graph-based sorting algorithm and an abstract text summarization model for text, and the answer document topic and answer document summary of each answer document cluster are formed into a topic-summary pair with a hierarchical relationship, which is used for the study of answers to open-ended questions in medical questionnaires.

[0062] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0063] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for encoding answers to open-ended questions in a medical questionnaire, characterized in that: include: Obtain multiple answer documents for the same open-ended question of a target medical questionnaire; Based on multiple answer documents of the same open-ended question in the target medical questionnaire, multiple answer document vectors are obtained through a document embedding model; According to the multiple answer document vectors, using an agglomerative hierarchical clustering algorithm, a plurality of answer document clusters are obtained, wherein the answer document topics of each of the multiple answer document clusters are different; According to multiple answer document clusters, the answer document summary of each answer document cluster in the multiple answer document clusters is obtained through a graph-based sorting algorithm and an abstract text summarization model for text, and the answer document topic and answer document summary of each answer document cluster are formed into a topic-summary pair with a hierarchical relationship, which is used for the study of answers to open-ended questions in medical questionnaires.

2. The method for encoding answers to open-ended questions in a medical questionnaire according to claim 1, characterized in that: The document embedding model includes a BERT model and a pooling layer. The BERT model includes an input layer, an intermediate layer and an output layer. The pooling layer in the document embedding model is connected to the output layer of the BERT model, and the document embedding model outputs an answer document vector of a fixed length through a pooling strategy. The pooling strategy is any of the following: using the output of the CLS position as the vector of the entire sentence, taking the output vectors of all tokens and taking the average as the vector of the sentence, and taking the maximum value of the output vector of the token over time as the vector of the sentence.

3. The method for encoding answers to open-ended questions in a medical questionnaire according to claim 2, characterized in that: The document embedding model is trained based on the BERT model through a twin network and / or a triplet network according to the training strategy, wherein the training strategy includes any one of the following or any combination thereof: classification objective function, entropy loss function, regression objective function. When the classification objective function or the entropy loss function is used as the current training strategy, the document embedding model is trained based on the BERT model through a twin network. When the regression objective function is used as the current training strategy, the document embedding model is trained based on the BERT model through a triplet network.

4. The method for encoding answers to open-ended questions in a medical questionnaire according to claim 3, characterized in that: The expression of the classification objective function is: , In the expression of the classification objective function, , Represent an answer document vector and another answer document vector respectively, represents the weight matrix, Indicates the classification result; The expression of the entropy loss function is: , In the expression of entropy loss function, , Represent an answer document vector and another answer document vector respectively, Represents an answer document vector and another answer document vector The angle between The cosine similarity of Represents an answer document vector and another answer document vector The entropy loss between The expression of the regression objective function is: , In the expression of regression objective function, Represents a given anchor sentence The sentence embedding vector of Affirmative sentences The sentence embedding vector of Negative sentences The sentence embedding vector of represents the measure of distance, Represents boundary parameters to ensure positive sentences The sentence embedding vector Negative sentences The sentence embedding vector Closer to the given anchor sentence The sentence embedding vector .

5. The method for encoding answers to open-ended questions in a medical questionnaire according to any one of claims 1 to 4, characterized in that: The method uses an agglomerative hierarchical clustering algorithm based on multiple answer document vectors to obtain multiple answer document clusters, wherein the answer document topics of each answer document cluster in the multiple answer document clusters are different, including: Taking each of the multiple answer document vectors as an initial cluster, thereby obtaining multiple initial clusters; According to the multiple initial clustering clusters, a distance matrix between every two initial clustering clusters in the multiple initial clustering clusters is obtained; According to the distance matrix between each two initial clustering clusters in the multiple initial clustering clusters, the initial clustering clusters with the closest distance are merged in a bottom-up manner to obtain multiple new clustering clusters, and the distance matrix between each two new clustering clusters in the multiple new clustering clusters is updated, and this step is repeated until the preset clustering stop condition is reached to obtain the pedigree diagram of the agglomerative hierarchical clustering process; According to a preset distance threshold, the pedigree graph of the agglomerative hierarchical clustering process is segmented and cross-sectionally intercepted to obtain multiple answer document clusters with hierarchical relationships, and the categories of the hierarchical relationships between the multiple answer document clusters are set as answer document topics corresponding to the multiple answer document clusters, and each of the multiple answer document clusters contains multiple answer documents corresponding to the answer document topics; Preferably, updating the distance matrix between every two new clusters in the plurality of new clusters comprises: According to the distance update expression, the distance matrix between each two new clusters in the multiple new clusters is updated, where the distance update expression is: , , , , , Distance Metric = , In the distance update expression, Represents a new cluster and another new cluster among multiple new clusters. Indicates Clusters and The distance between clusters, Indicates Clusters and The distance between clusters, Indicates Clusters and The distance between clusters, Indicates the merge Clusters and After clustering, The distance between clusters, Indicates The center point of the cluster, Indicates The center point of the cluster, Indicates The number of cluster points, Represents parameters used to simplify calculations.

6. The method for encoding answers to open-ended questions in a medical questionnaire according to claim 5, characterized in that: The method comprises: obtaining an answer document summary of each answer document cluster in the plurality of answer document clusters by using a graph-based sorting algorithm and an abstract text summary model for text, and forming a topic-summary pair with a hierarchical relationship between the answer document topic and the answer document summary of each answer document cluster, which is used for the research on answers to open questions in medical questionnaires, including: For each of the multiple answer document clusters, using the Text Rank algorithm, keywords of the multiple answer documents contained in each of the multiple answer document clusters are obtained; According to the keywords of the multiple answer documents contained in each of the multiple answer document clusters, an answer document summary of each of the multiple answer document clusters is obtained through an abstract text summary model.

7. The method for encoding answers to open-ended questions in a medical questionnaire according to claim 6, characterized in that: For each of the multiple answer document clusters, the keywords of the multiple answer documents contained in each of the multiple answer document clusters are obtained by using the Text Rank algorithm, including: For each of the multiple answer document clustering clusters, concatenate the multiple answer documents contained in each answer document clustering cluster to obtain a concatenated document; The importance of each word in the concatenated document is calculated by the Text Rank algorithm, and the keywords of each concatenated document are obtained according to the importance of each word in the concatenated document, that is, the keywords of each answer document cluster in the multiple answer document clusters are obtained; Preferably, the importance of each word in the concatenated document is calculated by the Text Rank algorithm, and the keywords of each concatenated document are obtained according to the importance of each word in the concatenated document, that is, the keywords of each answer document cluster in the multiple answer document clusters are obtained, including: According to the importance expression, the importance of each word in the concatenated document is calculated by the Text Rank algorithm, where the importance expression is: , In the importance expression, Expressive words The importance of Expressive words The importance of Pointing words The word collection, Expressive words The set of words pointed to, Expressive words Pointing Word The edge weights of Expressive words Pointing Word The weight of the edge, d represents the damping coefficient.

8. A coding system for answers to open-ended questions in a medical questionnaire, characterized in that: include: A data acquisition module is used to: acquire multiple answer documents of the same open-ended question of a target medical questionnaire; A document embedding module is used to obtain multiple answer document vectors based on multiple answer documents of the same open-ended question of the target medical questionnaire through a document embedding model; An agglomerative hierarchical clustering module is used to: obtain multiple answer document clusters based on multiple answer document vectors using an agglomerative hierarchical clustering algorithm, wherein the answer document topics of each answer document cluster in the multiple answer document clusters are different; The encoding module is used to: obtain the answer document summary of each answer document cluster in the multiple answer document clusters through a graph-based sorting algorithm and an abstract text summary model for text, and form the answer document topic and answer document summary of each answer document cluster into a topic-summary pair with a hierarchical relationship for the study of answers to open-ended questions in medical questionnaires.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for encoding answers to open-ended questions in a medical questionnaire as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for encoding answers to open-ended questions in a medical questionnaire as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Single-document extraction type text abstract identification method and system

    CN114840661A

  • Unsupervised graph clustering learning framework system and method for generating financial news abstract

    CN115048520A

  • Abstract generation method and device

    CN115221311A

Cited By

  • Knowledge graph entity duplicate removal and cross-document fusion method and device

    CN122285889A

  • Knowledge graph entity deduplication and cross-document fusion method and apparatus

    CN122285889B