Artificial intelligence question answering system based on radiotherapy process
By designing an artificial intelligence question-and-answer system based on radiotherapy processes, using big models and word vector conversion technology, the existing system answers inaccurate questions are solved, timely and accurate answers to patient questions are achieved, and the timeliness and adaptability of the system is improved.
Patent Information
- Application Number
- CN202510452495.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-04-11
AI Technical Summary
The existing medical Q&A system lacks timeliness, context review and semantic comprehension when answering questions related to patients with radiotherapy, resulting in inaccurate answers.
An artificial intelligence question and answer system based on radiotherapy process was designed. Using the combination of server and information terminals, the initial answer was generated through the big model module. The word vector conversion module converted the initial answer into an answer vector, and the most accurate answers were filtered out from multiple answer bank through the classification module and the matching module.
It achieves timely and accurate answers to patient questions, improves the timeliness and accuracy of answers, adapts to patients' diverse questioning methods, and reviews the previous conversation content when necessary.
Smart Images

Figure CN119961426A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical system technology, and more specifically, to an artificial intelligence question-answering system based on radiotherapy process. Background Art
[0002] Radiotherapy uses high-energy rays (such as X-rays, gamma rays or proton beams) to precisely irradiate the tumor area. When a hospital performs radiotherapy on a patient, it generally goes through the following steps: Body position fixation: Ensure that the patient maintains a consistent position during treatment. CT positioning: Determine the specific location and range of the tumor through CT scanning. Outline the target area: Mark the tumor area and surrounding normal tissue that need to be irradiated based on the CT image. Design a radiotherapy plan: Develop a detailed radiotherapy plan, including irradiation dose, number of times and method. Review and confirm the radiotherapy plan: A professional team will evaluate and confirm the treatment plan. Radiotherapy plan verification: Ensure the accuracy of the treatment plan through simulation or actual testing. Treatment execution: Implement treatment according to the designed radiotherapy plan. In addition to the above steps, patients also need to insert some payment links during the treatment process. The entire radiotherapy process is long and involves multiple steps.
[0003] When patients receive radiotherapy, they usually complete various treatment tasks in sequence according to the instructions provided by the hospital, the information provided by the guide, and the guidance of the medical staff. However, in practice, many patients ask medical staff a lot of questions because they are more worried about their condition and unfamiliar with the treatment process. These questions cover many aspects such as specific treatment conditions and postoperative expectations, process arrangements, and payment matters. For example: When setting up a radiotherapy plan, the patient may ask the doctor: "Will this radiotherapy plan kill too many normal cells and affect my subsequent quality of life?" After completing CT positioning, the patient may ask: "What are the next steps in treatment? What stage has the current radiotherapy plan been implemented to?" These questions are not only numerous and varied, but also involve the individual needs of patients and process details. If medical staff fail to answer these questions in a timely manner, patients may not be able to complete treatment smoothly; on the contrary, if all questions require medical staff to answer them one by one, it will take up a lot of their time. At present, hospitals usually use some simple question-and-answer models to answer patients' questions. However, such systems often have the following shortcomings in practice: Lack of timeliness: When the patient's questioning style or wording does not match the preset database, the system may not be able to accurately find the corresponding answer.
[0004] Lack of context review capability: Existing question-answering models are usually unable to combine previous conversation history to provide more accurate answers; Lack of semantic understanding ability: Unable to understand the implicit semantics in the question information, only matching the corresponding answer through keyword matching, with low accuracy.
[0005] In summary, there is an urgent need for a medical information interaction system that can answer patients' information needs in a timely and accurate manner. This system should not only have an efficient question-and-answer function, but also be able to adapt to patients' diverse questioning methods and review previous conversations when necessary to provide more comprehensive services. Summary of the invention
[0006] The content of this application is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this application is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] As a first aspect of the present application, in order to solve the technical problem of inaccurate answers from a question-and-answer model, the present application provides an artificial intelligence question-and-answer system based on a radiotherapy process, comprising: a server and a plurality of information terminals, the information terminals being connected to the server by signals, the information terminals being used to input questions and output answers to corresponding questions; The server includes: Input module, used to input questions; The large model module deploys a trained large language model and generates initial answers based on input questions; The word vector conversion module converts the initial answer into the answer vector; The answer module deploys more than two answer question banks; The classification module matches the answer vector with the answer question bank with the highest similarity based on the similarity between the answer vector and each answer question bank; The matching module matches the answer vector with the corresponding answer question bank and selects the answer information of the corresponding question from the answer question bank; The output module sends the answer information to the terminal device.
[0008] In the technical solution provided by the present application: the patient inputs questions to the server through the information terminal, and the server will automatically match the answers to the questions, so that the patient's questions can be answered in a timely manner and the patient can be guided to complete the radiotherapy in a timely manner. At the same time, in this solution, the trained large language model is first used for processing to generate an initial answer. Because the large language model has strong information processing capabilities and can understand different sentence patterns, different emotional information, and sentences with some typos, the generated initial answer itself is the conventional answer to the patient's corresponding question. Then, after the initial answer is converted into an answer vector, it is matched with the answer question bank, and the answer to the question finally generated will have a higher accuracy. In this way, the solution provided by the present application has the good understanding ability of the large language model on the one hand, and on the other hand, it does not need to specifically train the large language model, and can better adapt to the work in the hospital at a low training cost.
[0009] Furthermore, the large language model is a locally deployed DeepSeek model.
[0010] The DeepSeek model is a large language model that can be deployed locally with relatively small computing resources. The model can well understand the semantic information of different users, accurately understand the user's intention from different questions, and obtain accurate initial answers. Therefore, only information related to the initial answer is required to meet the user's needs.
[0011] When converting the initial answer into a vector representation, because the length of the sentence is different, the length of the vector of the final sentence may be inconsistent, resulting in information redundancy and low matching accuracy. To this end, the present application provides the following technical solutions: Furthermore, the word vector conversion module includes: Tokenizer: divides the initial answer into several words; Word vector calculator: convert each word into a word vector and generate a word vector matrix for all words; Word vector pooling layer: pools the word vector matrix to generate pooled vectors; Vector output layer: Normalize the pooled vector to generate the answer vector.
[0012] In the technical solution provided by the present application, after the word vector matrix is generated, the word vector matrix is pooled. Therefore, whether it is a long sentence or a short sentence, its dimension can be reasonably reduced, and the accuracy is higher when similarity matching is performed later.
[0013] When converting words into word vectors, the conventional approach is to replace the words with numbers, which will result in the loss of the position information and semantic characteristics of the words. To address this problem, this application provides the following technical solutions: Furthermore, the calculation formula of the word vector in the word vector calculator is: ; where i represents the index of the word, E i represents the word vector of the i-th word in the initial answer, represents the position vector of the i-th word in the initial answer, represents the frequency vector of the i-th word in the initial answer, represents the part-of-speech vector of the i-th word in the initial answer, λ1 represents the position weight, λ2 represents the frequency weight, λ3 represents the part-of-speech weight, and λ1+λ2+λ3=1.
[0014] In the technical solution provided in the present application, the word vector is generated by weighting the three dimensional information of the word position, word frequency and part of speech. In this way, the final word vector can accurately represent the position characteristics and semantic role of the word in the sentence, and then when matching the sentence similarity, it can better capture the correlation information between words and improve the accuracy of similarity matching.
[0015] The current word frequency vector generation method usually requires the pre-collection of large-scale sentence samples, and the frequency of occurrence of each word is counted after word segmentation, and the corresponding label value is generated for each word. In practice, the label values of high-frequency words are often close. Although it can make the labels show a certain correlation, the labels generated in this way lack semantic directionality and it is difficult to accurately distinguish the specific meanings of high-frequency words in different contexts, especially in texts in different fields. The ability to distinguish high-frequency words is even more insufficient. In response to the above problems, this application provides the following technical solutions: Furthermore, each answer question bank is pre-set with a dictionary constructed based on word frequency; The combination vector generated by traversing each dictionary for the i-th word in the initial answer is the frequency vector of the i-th word.
[0016] In the technical solution provided in the present application, a dictionary is set up for each answer question bank. When generating a frequency vector, it is necessary to traverse each dictionary, so that the frequency vector finally generated can contain the frequency information of the word in different answer question banks, thereby accurately distinguishing the meaning of high-frequency words in different fields.
[0017] Patients' questions are generally highly targeted and directional. If the initial answers are directly matched to the patients' questions and then matched with the answers, it will result in a large number of matches, which is not conducive to quickly generating answers.
[0018] Further, the deployment has more than two answer question banks including a process answer question bank, a treatment expectation answer question bank, and a nursing suggestion answer question bank; Among them, the process answer question bank stores all process precautions and the answer information of the specific steps to be performed at each stage; The treatment expectation answer question bank stores all treatment-related answer information; The nursing advice answer question bank stores all answer information related to radiotherapy nursing.
[0019] In the technical solution provided by this application, possible patient questions are divided into three categories: one is process-related, one is treatment-related, and the other is nursing-related. The three categories have different words and sentences in their answers, so classification matching can improve accuracy. At the same time, it can use the directional information in the patient's questions to quickly reduce the scope of the question bank and improve matching efficiency.
[0020] When the classification module classifies the initial answer vector, if the classification is wrong, it will eventually generate an incorrect answer, and such errors cannot be corrected by the subsequent matching layer. Since the key information of the initial answer vector mainly depends on the word frequency feature, it may not be possible to achieve a reasonable question bank allocation based solely on word frequency information.
[0021] To address this problem, the present application provides the following technical solution: the words in the dictionary corresponding to the process answer question bank are arranged from low to high according to word frequency to generate a first dimension axis; Arrange the words in the dictionary corresponding to the treatment expectation answer question bank from low to high according to word frequency to generate the second dimension axis; Arrange the words in the dictionary corresponding to the nursing advice answer question bank from low to high according to word frequency to generate the third dimension axis; The first dimension axis, the second dimension axis and the third dimension axis are perpendicular to each other in space to construct a three-dimensional orthogonal coordinate system; Convert the frequency vector of the i-th word into the position of the i-th word in a three-dimensional orthogonal coordinate system.
[0022] In the technical solution provided in the present application, the frequency information of each word in the three dictionaries is converted into the three axes of a three-dimensional orthogonal coordinate system, and the frequency vector is converted into the position in the three-dimensional orthogonal coordinate system. Therefore, the frequency vector can clearly indicate the word frequency information in the three dictionaries, thereby increasing the accuracy of word frequency distribution.
[0023] There are many common words in the answers, and the frequency of these common words is also very high. These common words cannot actually distinguish the question banks corresponding to the initial answers. Therefore, relying solely on the frequency of words appearing in different question banks cannot accurately distinguish the question banks corresponding to the initial answers. For this reason, this application provides the following technical solutions: The midpoint of the first dimension axis, the midpoint of the second dimension axis, and the midpoint of the third dimension axis are used as the origin of the three-dimensional orthogonal coordinate system.
[0024] In the technical solution provided in the present application, the midpoint of the first dimensional axis, the midpoint of the second dimensional axis and the midpoint of the third dimensional axis are used as the origin of the three-dimensional orthogonal coordinate system. In this way, in the space of the spatial indicator coordinate system, the words close to the origin show more characteristics of common words. Therefore, whether the words are close to the origin can be used to further distinguish common words from feature words, thereby increasing the accuracy of the distinction.
[0025] When patients ask questions about the process, most of them want to get the next step of the process plan. However, the pre-trained language model can only understand the general meaning of the patient's question, and the initial answer provided is not regional and timely. And directly answering the questions matched from the process question bank will also lack timeliness. To this end, this application provides the following technical solutions: Furthermore, the output module also includes: The process progress query unit is used to query the patient's current process progress and obtain the patient's process node; An answer information monitoring unit, used for monitoring the answer question bank matched with the answer information; The answer information output unit, when the answer information is information in the process answer question bank, selects the information after the process node from the answer information according to the current process node as the answer information.
[0026] In the technical solution provided in the present application, by obtaining the patient's process nodes, the timeliness of the answer can be increased, avoiding the answering of questions that are too mechanical and unable to accurately let the patient understand the current situation.
[0027] Furthermore, the answer information output unit adds a contact window of the patient's attending physician in the answer information when the answer information is information in the treatment expectation answer question bank.
[0028] The technical solution provided by this application can provide a doctor's contact window in a targeted manner. When patients ask specific questions related to treatment, some standard answers are provided on the one hand, and on the other hand, a contact channel for the attending doctor is provided, so that patients can further inquire about the doctor's treatment. In this way, the number and scope of questions that the attending doctor needs to answer are reduced, and on the other hand, it can also make it easier for patients to understand changes in their condition and treatment expectations. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The illustrative embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application.
[0030] In addition, throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the components and elements are not necessarily drawn to scale.
[0031] In the attached picture: Figure 1 This is a schematic diagram of the structure of the artificial intelligence question-answering system based on the radiotherapy process.
[0032] Figure 2 A schematic diagram of the server structure.
[0033] Figure 3 Schematic diagram of a three-dimensional orthogonal coordinate system. DETAILED DESCRIPTION
[0034] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms, and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0035] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0036] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0037] Reference Figure 1 The artificial intelligence question-answering system based on the radiotherapy process includes a server and an information terminal. Multiple information terminals are deployed, all of which are communication devices, including mobile phones, notebooks, computers, etc. The server, as the back-end processing center of the information terminal, can be deployed in the cloud network. The information terminal and the server are connected through a wireless network.
[0038] The information terminal is mainly used for question input and corresponding answer output. The specific process is: after the user submits the question through the information terminal, the question is transmitted to the server, the server generates the corresponding answer after completing the question processing, and then transmits the answer back to the information terminal, and finally the information terminal displays the answer to the user.
[0039] For example, if a user asks: "Do I need to drink yogurt before radiotherapy?" the server will send the generated answer to the information terminal, and the information terminal will output the following text content to the user: "If there is no fasting requirement, you can drink yogurt." This content is the corresponding answer to the question.
[0040] It can be seen that the artificial intelligence question-and-answer system based on the radiotherapy process can realize remote and automatic response to patients' questions, effectively promote the radiotherapy process, alleviate patients' resistance to radiotherapy, and also have psychological counseling functions.
[0041] The core of this application is to ensure that the server can accurately generate answers to questions. Existing technical solutions usually adopt a question-answer library matching mechanism, that is, selecting the reply with the highest matching degree with the pre-stored answer. However, this matching method is not intelligent enough, the matching process is mechanical and rigid, and it is difficult to accurately understand the deep meaning of the user's question, resulting in a large deviation between the generated answer and the actual needs of the user.
[0042] If you want to enhance the problem parsing ability by building a language understanding model to generate answers that meet user needs, you have to face the problem of model training costs. In practice, the stronger the semantic parsing ability of the language understanding model, the greater the training investment required. If you want to achieve strong semantic parsing capabilities in the radiotherapy system, you must train the model for a large amount of professional data in the field of radiotherapy, which will lead to a substantial increase in model construction and training costs. In response to the above problems, this application proposes the following technical solutions: refer to Figure 2 The server includes: an input module, a large model module, a word vector conversion module, an answer module, a classification module, a matching module, and an output module. The input module is connected to the large model module, the large model module is connected to the word vector conversion module, the classification module is connected to the word vector conversion module, the classification module is connected to the answer module, the matching module is connected to the classification module, and the output module is connected to the matching module.
[0043] Input module, used to input questions; large model module, deployed with trained language large model, and generates initial answers according to input questions; word vector conversion module, converts initial answers into answer vectors; answer module, deployed with more than two answer question banks; classification module, based on the similarity between answer vectors and each answer question bank, matches answer vectors with the answer question bank with the highest similarity; matching module, matches answer vectors with corresponding answer question banks, and filters out answer information for corresponding questions from the answer question bank; output module, sends answer information to terminal devices. The large language model is the locally deployed DeepSeek model.
[0044] The core of this application is to parse user questions through the pre-trained language large model in the large model module to generate preliminary answers. This preliminary answer is generated based on a deep understanding of the user's question and is highly targeted. Compared with the original question, it contains higher-dimensional information supplements. Using such preliminary answers for subsequent matching can significantly improve the accuracy of the answer information. This solution only requires the deployment of lightweight hardware on the server side, and the configuration of pre-trained general large models such as the DeepSeek model or Wenxin Yiyan. No additional training is required. By comparing the initial answer with the question bank information, the required response can be generated.
[0045] The input module is connected to the terminal device through signals and is mainly responsible for receiving questions. The questions here refer to process consultations submitted by users through information terminals. For example, after a patient logs in to a designated APP to submit a question, the data is uploaded to the server and received by the input module.
[0046] After receiving the question, the input module passes it to the big model module, which generates an initial answer based on the pre-trained language big model. Although the big model is not retrained for a specific field, it can still understand the core semantics of the question and give a generalized response to the question.
[0047] Example: A user asked, "After the target area is delineated, what should be done next?" Initial answer: "After the target area is delineated, the treatment planning system (TPS) needs to be used to design beam parameters and optimize dose distribution to ensure accurate coverage of the tumor area and protect normal tissue. This is followed by plan verification, patient position reduction, and final treatment." It can be seen that although the initial answer outlines the subsequent process, it does not include specific implementation details (such as payment department instructions), and the process description is relatively general and does not reflect the hospital's personalized process. However, compared to the original question, the initial answer has provided a more accurate information framework, which can be used as a matching benchmark to significantly improve the accuracy of the final answer. At the same time, the solution entrusts the most critical semantic understanding task to the pre-trained large model, which only requires deployment without training, greatly reducing development costs.
[0048] The word vector conversion module is responsible for converting the initial answer into a vector representation to improve classification accuracy and optimize the matching efficiency of subsequent answers. The answer module deploys three independent question banks: process answer question bank, treatment expectation answer question bank, and nursing advice answer question bank. Among them, the process question bank stores the precautions and specific operation steps of each link; the treatment question bank covers all treatment-related information; and the nursing question bank contains radiotherapy nursing guidance content. The information crossover between the three question banks is low and the correlation is weak. Classification and matching based on the initial answer type can significantly improve the matching efficiency. Since computers cannot process text directly, the initial answer needs to be converted into a vector form through the word vector conversion module before classification and matching.
[0049] To this end, this application uses the following scheme to achieve preliminary answer vectorization: The word vector conversion module includes: Tokenizer: Divide the initial answer into several words.
[0050] Specifically, the initial answer is a piece of text, which is directly regarded as a sentence in this solution. In practice, the length of the initial answer can be controlled within a reasonable range, such as 300 words, by limiting the output length of the language model. After obtaining the initial answer, the initialization answer needs to be divided into several words, and the index of the word is i. Dividing the text into words is a common technical means, which will not be explained here. After dividing the sentence into words, the word vector is obtained, and then the vectors of all words are combined (concatenated) together to obtain the vector of the entire sentence, that is, the answer vector.
[0051] Word vector calculator: Convert each word into a word vector and generate a word vector matrix for all words.
[0052] The word vector calculator is used to convert each word into a word vector, and then combine all the word vectors together to get the word vector matrix H.
[0053] Specifically, the calculation formula of the word vector in the word vector calculator is: ; where i represents the index of the word, E i represents the word vector of the i-th word in the initial answer, represents the position vector of the i-th word in the initial answer, represents the frequency vector of the i-th word in the initial answer, represents the part-of-speech vector of the i-th word in the initial answer, λ1 represents the position weight, λ2 represents the frequency weight, and λ3 represents the part-of-speech weight.
[0054] The generation method is as follows: replace the position of the i-th word with the corresponding value. For example, if "sugar" is the third word in the sentence, the position vector of "sugar" is "3". The position vector here is used to indicate the position of the word in the sentence. It contains the position information of the word, so that the subsequent answer matching process can add more semantic information.
[0055] The generation method is as follows: according to the pre-marked content, the words are divided into nouns, verbs, adjectives, and pronouns, and the types of parts of speech are preset. In this scheme, the words are only divided into the above five types.
[0056] The prior tagging is based on the statistics of words appearing in all answers, and then a specific label is assigned to each word. For example, "diabetes" is defined as "noun", "rapid" is defined as "adjective", etc. In order to avoid the possibility of the same word having multiple parts of speech, this solution uses the part of speech frequency of words in all answer question banks as vector information.
[0057] Specific: , a1 is the proportion of nouns in the number of times the i-th word appears in all the answer question banks, a2 is the proportion of verbs in the number of times the i-th word appears in all the answer question banks, a3 is the proportion of adjectives in the number of times the i-th word appears in all the answer question banks, and a4 is the proportion of pronouns in the number of times the i-th word appears in all the answer question banks. Therefore, the part-of-speech vector basically indicates the role that the word plays in a sentence.
[0058] The position vector and part-of-speech vector in the above schemes both allow the word vector to contain more context information, while the most critical information itself needs to be represented by the word vector. In the current scheme, the Word2Vec model is used for conversion. The core idea of this model is that words with the same frequency have similar semantics, so the words are converted into their frequencies in the sample and represented by word frequencies.
[0059] This solution is not very accurate. In fact, it will confuse the meanings of words with similar frequencies and cannot accurately distinguish the nature of words. Figure 3 To this end, the present application provides the following technical solution: a dictionary constructed based on word frequency is pre-set for each answer question bank; the combination vector generated by traversing each dictionary for the i-th word in the initial answer is the frequency vector of the i-th word. The essence of this solution is to traverse the frequency of the i-th word in each dictionary to generate a frequency vector. The frequency vector contains the position information of the word in the three question banks.
[0060] In practice, this solution will confuse the frequency information of words in each question bank. To this end, this application provides the following technical solutions: Arrange the words in the dictionary corresponding to the process answer question bank from low to high according to word frequency to generate the first dimension axis; Arrange the words in the dictionary corresponding to the treatment expectation answer question bank from low to high according to word frequency to generate the second dimension axis; Arrange the words in the dictionary corresponding to the nursing advice answer question bank from low to high according to word frequency to generate the third dimension axis; The first dimension axis, the second dimension axis and the third dimension axis are perpendicular to each other in space to construct a three-dimensional orthogonal coordinate system; Specifically, after the process answer question bank, treatment expectation answer question bank, and nursing advice answer question bank are constructed, the samples inside are collected to establish the corresponding first dimension axis, second dimension axis, and third dimension axis.
[0061] The construction methods of the first dimension axis, second dimension axis, and third dimension axis are the same. Only the generation steps of the first dimension axis are provided below; S1: Obtain all the texts in the process answer question bank and divide all the texts into words; When dividing words, punctuation marks, special symbols, HTML tags, unified case, fonts, etc. need to be removed.
[0062] In addition, some modal particles and stop words need to be filtered out, such as words with little information content like "de" (的) and "shi" (是).
[0063] S2: Count the number of occurrences of all words, calculate the frequency of each word, and generate a word list; S3: Arrange the words in ascending order of frequency to obtain the first dimension axis. So each word becomes a position on the first dimension axis.
[0064] In this way, according to the above scheme, we can obtain the first dimension axis, second dimension axis, and third dimension axis. Most of the words in these three dimension axes overlap, except that the positions of the words on different axes are different. To further describe the positional relationship of the words on the three axes, the first dimension axis, second dimension axis, and third dimension axis are made perpendicular to each other in space to construct a three-dimensional orthogonal coordinate system.
[0065] In practice, to make the distribution of common words and feature words more regular, in this scheme, the midpoints of the first dimension axis, second dimension axis, and third dimension axis are used as the origin of the three-dimensional orthogonal coordinate system. In this way, common words will be distributed near the origin of the three-dimensional rectangular coordinate system, while feature words will be close to the corresponding axis endpoint positions. Here, common words refer to words that frequently appear in all three answer question banks (such as "radiotherapy"), and feature words refer to words that only frequently appear in the corresponding answer question bank (such as "CT positioning" in the process question bank).
[0066] Through the above processing, each word corresponds to a set of coordinate values in the three-dimensional orthogonal coordinate system. The frequency vector in this scheme is defined as the vector representation of these coordinate values.
[0067] ; Among them, g represents the unit vector along the positive direction of the first dimension axis, y represents the unit vector along the positive direction of the second dimension axis, k represents the unit vector along the positive direction of the third dimension axis, and (x, y, z) represents the coordinates of the i-th word in the three-dimensional orthogonal coordinate system.
[0068] After getting the word vector E of all words i After that, all the word vectors are concatenated to obtain the word vector matrix H, which has a dimension of m×d, where d is the dimension of the word vector and m is the length of the initial answer. It can be foreseen that the dimension of the word vector matrix H is too high and needs to be reduced. In this solution, the word vector matrix H is reduced in dimension.
[0069] Word vector pooling layer: pools the word vector matrix to generate pooled vectors.
[0070] The pooling process of the word vector pooling layer includes the following steps: Step 1: Perform principal component analysis on the word vector matrix H and reduce the word vector matrix to different dimensions u to obtain the data matrix Z u .
[0071] Principal component analysis (PCA) is an unsupervised dimensionality reduction method. The core idea is to project the original high-dimensional data into a low-dimensional space through orthogonal transformation, retaining the direction of maximum variance (i.e., the main features of the data). The PCA algorithm is an existing technology, and the specific implementation method is not described here. After using principal component analysis on the word vector matrix H, the word vector matrix H can be divided into multiple components, and then the word vector matrix H can be reduced in dimension based on the components. Therefore, in practice, the word vector matrix H can be reduced to the required dimension.
[0072] Step 2: Based on the Gaussian distribution assumption, calculate the log-likelihood function InL(u): ; ; ; Where n represents the number of samples of the word vector, b represents the traversal index of the sample, u represents the dimension of the word vector matrix H after reduction, and Z u is the data matrix after the word vector matrix H is reduced to the u dimension, Z b Represents Z u The bth row of β u Represents the data matrix Z u The mean vector of Represents the data matrix Z u The covariance matrix of represents the inverse matrix of the covariance matrix, tr() represents the trace of the matrix, S u Represents an intermediate variable.
[0073] Step 3: Calculate the number of parameters P; ; Step 4: Calculate the AIC value; AIC(u)=2P-2InL(u).
[0074] Step 5: Traverse all candidate dimensions u to find the dimension u that minimizes AIC.
[0075] By using steps 1 to 4, we can calculate the AIC value corresponding to each candidate dimension u, so we can calculate the AIC value under all dimensions, and then compare the AIC values of all dimensions, select the dimension with the smallest AIC value, and then reduce the word vector matrix to this dimension using principal component analysis.
[0076] In the technical solution provided in the present application, when performing vector dimensionality reduction on the word vector matrix, a target dimension is not directly selected for dimensionality reduction, but the optimal vector dimension is screened according to the AIC value, so that the vector dimension can be reduced without causing information loss.
[0077] Vector output layer: Normalize the pooled vector to generate the answer vector.
[0078] The answer vector finally output by the vector output layer is the vector representation of the initial answer, and the answer vector implies the information of each word in the initial answer.
[0079] The classification module will match the answer vector with the answer question bank with the highest similarity based on the similarity between the answer vector and each answer question bank. Specifically, the similarity of each answer question bank can be converted into an average vector using the word vector conversion module; then the similarity between the average vector and the answer vector is calculated, so as to select the corresponding answer question bank according to the similarity.
[0080] For example, the average vector of the process answer question bank is D1, the average vector of the treatment expectation answer question bank is D2, and the average vector of the nursing suggestion answer question bank is D3. The answer vector D4 has the highest similarity with D1, so the answer vector D4 is matched with the process answer question bank.
[0081] The matching module matches the answer vector with the corresponding answer question bank and selects the answer information of the corresponding question from the answer question bank.
[0082] The matching module and the classification module both select the question bank and match the answers based on similarity. The similarity is cosine similarity, and the specific calculation method is the existing technology and will not be elaborated here.
[0083] After matching the corresponding answer information from the answer question bank, it is sent to the corresponding terminal device through the output module. In practice, the current process of each patient is different, so each patient is to obtain the subsequent process information. However, identifying the patient's current process and then matching the answer information of the subsequent process requires a high answer matching accuracy. To this end, this application provides the following technical solutions: The output module also includes: The process progress query unit is used to query the patient's current process progress and obtain the patient's process node; An answer information monitoring unit, used for monitoring the answer question bank matched with the answer information; The answer information output unit, when the answer information is information in the process answer question bank, selects the information after the process node from the answer information according to the current process node as the answer information.
[0084] In this plan, when dealing with process issues, the complete process information will be summarized first. For example: the complete process is "body position fixation (modeling in the model room) → CT positioning (with model) → doctor outlines the treatment target area → physicist designs the radiotherapy plan → doctor reviews and confirms the plan → plan verification: [① doctor takes the patient to position before radiotherapy (in the CT room or in the 2D simulation positioning room); ② physicist verifies the radiotherapy plan] → treatment."
[0085] If the answer information monitoring unit detects that the answer information comes from the process answer question bank, it will query the patient's current process progress and obtain the patient's process node. For example, if the patient's current accuracy is "CT positioning", the answer information will be output as "Doctor outlines the treatment target area → Physicist designs the radiotherapy plan → Doctor reviews and confirms the plan → Plan verification: [① Doctor takes the patient to position before radiotherapy (in the CT room or in the 2D simulation positioning room); ② Physicist verifies the radiotherapy plan] → Treatment." In this way, the difficulty of identifying process-related issues is reduced.
[0086] Furthermore, the answer information output unit adds a contact window of the patient's attending physician to the answer information for information in the treatment expectation answer question bank. That is, when the answer information monitoring unit detects that the patient is asking questions about treatment expectations, it further retrieves the contact window of the attending physician, so that the attending physician can further explain to the patient and comfort the patient.
[0087] The above description is only some preferred embodiments of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present application is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present application to form a technical solution.
Claims
1. An artificial intelligence question-answering system based on radiotherapy process, comprising: A server and several information terminals, the information terminals are connected to the server by signals, and the information terminals are used to input questions and output answers to the corresponding questions; It is characterized in that The server includes: Input module, used to input questions; The large model module deploys a trained large language model and generates initial answers based on input questions; The word vector conversion module converts the initial answer into the answer vector; The answer module deploys more than two answer question banks; The classification module matches the answer vector with the answer question bank with the highest similarity based on the similarity between the answer vector and each answer question bank; The matching module matches the answer vector with the corresponding answer question bank and selects the answer information of the corresponding question from the answer question bank; The output module sends the answer information to the terminal device.
2. The artificial intelligence question-answering system based on radiotherapy process according to claim 1, characterized in that: The large language model is a locally deployed DeepSeek model.
3. The artificial intelligence question-answering system based on radiotherapy process according to claim 1, characterized in that: The word vector conversion module includes: A tokenizer that divides the initial answer into several words; Word vector calculator, which converts each word into a word vector and generates a word vector matrix for all words; The word vector pooling layer pools the word vector matrix to generate a pooled vector; The vector output layer normalizes the pooled vector to generate the answer vector.
4. The artificial intelligence question-answering system based on radiotherapy process according to claim 3, characterized in that: The calculation formula of word vector in the word vector calculator is: Among them, i represents the index of the word, E i represents the word vector of the i-th word in the initial answer, represents the position vector of the i-th word in the initial answer, represents the frequency vector of the i-th word in the initial answer, represents the part-of-speech vector of the i-th word in the initial answer, λ1 represents the position weight, λ2 represents the frequency weight, λ3 represents the part-of-speech weight, and λ1+λ2+λ3=1.
5. The artificial intelligence question-answering system based on radiotherapy process according to claim 4, characterized in that: Each answer question bank is pre-set with a dictionary constructed based on word frequency; The combination vector generated by traversing each dictionary for the i-th word in the initial answer is the frequency vector of the i-th word.
6. The artificial intelligence question-answering system based on radiotherapy process according to claim 5, characterized in that: The deployment has more than two answer question banks including a process answer question bank, a treatment expectation answer question bank and a nursing suggestion answer question bank; Among them, the process answer question bank stores all process precautions and the answer information of the specific steps to be performed at each stage; The treatment expectation answer question bank stores all treatment-related answer information; The nursing advice answer question bank stores all answer information related to radiotherapy nursing.
7. The artificial intelligence question-answering system based on radiotherapy process according to claim 6, characterized in that: Arrange the words in the dictionary corresponding to the process answer question bank from low to high according to word frequency to generate the first dimension axis; Arrange the words in the dictionary corresponding to the treatment expectation answer question bank from low to high according to word frequency to generate the second dimension axis; Arrange the words in the dictionary corresponding to the nursing advice answer question bank from low to high according to word frequency to generate the third dimension axis; The first dimension axis, the second dimension axis and the third dimension axis are perpendicular to each other in space to construct a three-dimensional orthogonal coordinate system; Convert the frequency vector of the i-th word into the position of the i-th word in a three-dimensional orthogonal coordinate system.
8. The artificial intelligence question-answering system based on radiotherapy process according to claim 7, characterized in that: The midpoint of the first dimension axis, the midpoint of the second dimension axis, and the midpoint of the third dimension axis are used as the origin of the three-dimensional orthogonal coordinate system.
9. The artificial intelligence question-answering system based on radiotherapy process according to any one of claims 1 to 8, characterized in that: The output module also includes: The process progress query unit is used to query the patient's current process progress and obtain the patient's process node; An answer information monitoring unit, used for monitoring the answer question bank matched with the answer information; The answer information output unit, when the answer information is information in the process answer question bank, selects the information after the process node from the answer information according to the current process node as the answer information.
10. The artificial intelligence question-answering system based on radiotherapy process according to claim 9, characterized in that: The answer information output unit adds a contact window of the patient's attending physician to the answer information when the answer information is information in the treatment expectation answer question bank.
Citation Information
Patent Citations
Text sentiment analysis method based on convolutional neural network
CN110362819A
Text classification method based on phrase vectors
CN110825848A
Medical text-oriented pre-training method
CN113674866A
Text feature extraction method and device and electronic equipment
CN114756676A
Intelligent nursing scheme response method and system
CN116992002A
Cited By
Radiotherapy equipment science popularization display interaction system based on image recognition
CN120599313A