Intelligent medical interaction method and system, storage medium and electronic device
The reply information in the intelligent medical interactive system is processed in blocks and transmitted in time through streaming, which solves the problems of low reply efficiency and memory overflow in the prior art, and improves the user's interactive experience.
Patent Information
- Application Number
- CN202311744523.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2025-06-20
AI Technical Summary
The existing intelligent medical interaction methods can easily lead to memory overflow, low reply efficiency and poor user interaction experience because they obtain and reply all reply information from medical problems at one time.
The target reply information is processed in blocks by streaming, multiple information blocks are obtained, and they are fed back to the client through time-sharing transmission to avoid memory overflow caused by one-time transmission.
It improves the efficiency of replying medical conversation texts, improves user interaction experience, and solves the memory overflow problem.
Smart Images

Figure CN120183655A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and medical technology. Specifically, it relates to an intelligent medical interaction method, a storage medium, a system, and an electronic device. Background Art
[0002] With the development of artificial intelligence technology, the application fields of artificial intelligence technology are becoming more and more extensive. At present, artificial intelligence technology has been applied to the medical field to improve medical efficiency. For example, a medical dialogue system for intelligent medical interaction with users is constructed based on artificial intelligence technology, and medical problems in medical dialogue texts are intelligently answered for users. However, existing intelligent medical interaction methods usually obtain all the reply information of a single medical problem at one time and reply at one time. This method is prone to memory overflow due to the length of the reply information exceeding the current memory space. Therefore, it is necessary to wait until the memory space is sufficient to transmit the reply information, which results in low reply efficiency and poor interaction experience between the user and the medical dialogue system.
[0003] In addition, due to the wide application scope of the artificial intelligence large model application function, involving data analysis in fields such as medical imaging, pathology, and physiological data, drug research and development, and medical management, it is necessary to connect external technologies in the medical dialogue system to meet the usage requirements of each field. However, existing medical dialogue systems are usually small in scale and specialized in application fields, and connecting external technologies in the medical dialogue system is likely to lead to high complexity and high cost of the intelligent medical interaction method.
[0004] From the above analysis, it can be seen that no effective solution has been proposed for the above problems. Summary of the Invention
[0005] Embodiments of the present invention provide an intelligent medical interaction method, a storage medium, a system, and an electronic device to at least solve the technical problem of low reply efficiency of the medical interaction method provided by the related art for medical problems.
[0006] According to one aspect of the embodiments of the present invention, an intelligent medical interaction method is provided, including:
[0007] Receiving a medical dialogue text to be replied from a client; processing the medical dialogue text to be replied using a target interaction model to obtain target reply information; and feeding back the target reply information to the client based on a streaming transmission method, where the streaming transmission method is used to perform block processing on the target reply information to obtain a plurality of information blocks and perform time-division transmission on the plurality of information blocks.
[0008] Optionally, the above intelligent medical interaction method further includes: training a to-be-trained interaction model based on a target data source to obtain a target interaction model, where the target data source includes medical data, and the to-be-trained interaction model is a regression model.
[0009] Optionally, train the interaction model to be trained based on the target data source to obtain the target interaction model, including: preprocess the target data source to obtain a standardized data set; divide the standardized data set to obtain a training set, a validation set, and a test set, where the training set is used for model training, the validation set is used to adjust model parameters, and the test set is used to evaluate model performance; train the interaction model to be trained based on the training set to obtain the target interaction model.
[0010] Optionally, the above intelligent medical interaction method further includes: use the test set to evaluate the performance of the target interaction model to obtain an evaluation result; in response to determining that the performance of the target interaction model is abnormal based on the evaluation result, adjust the parameters of the target interaction model based on the validation set to obtain an updated target interaction model.
[0011] Optionally, use the target interaction model to process the medical dialogue text to be replied to obtain a target reply message, including: use the target interaction model to identify and extract key information in the medical dialogue text to be replied to; match the key information with preset information in a preset data set to obtain a matching result, where the preset data set is a data set learned by the target interaction model from historical medical dialogue texts; in response to determining that the key information matches the preset information, determine the preset reply message as the target reply message, where the preset reply message is the reply message corresponding to the preset information in the preset data set.
[0012] Optionally, the above intelligent medical interaction method further includes: in response to determining that the key information does not match the preset information based on the matching result, perform semantic analysis and sentiment analysis on the key information based on the context information of the current medical dialogue text to generate multiple reply messages; perform a correlation analysis on the key information and the multiple reply messages to obtain an analysis result, where the analysis result is used to determine the degree of correlation between any one of the reply messages and the key information; sort the multiple reply messages according to the analysis result to obtain a sorting result; select the target reply message from the sorting result.
[0013] Optionally, feedback the target reply message to the client based on a streaming transmission method, including: based on the streaming transmission method, divide the target reply message into blocks to obtain multiple information blocks; feedback the multiple information blocks to the client according to the target feedback times, where the target feedback times are dynamically adjusted based on the transmission performance of the server; in response to receiving the confirmation information reported by the client, determine that all the multiple information blocks have been feedback.
[0014] According to another aspect of the embodiments of the present invention, there is also provided an intelligent medical interaction device, including:
[0015] A receiving module for receiving the medical dialogue text to be replied from a client; a processing module for processing the medical dialogue text to be replied by using a target interaction model to obtain a target reply message; a feedback module for feeding back the target reply message to the client based on a streaming transmission mode, wherein the streaming transmission mode is used for performing chunking processing on the target reply message to obtain a plurality of information chunks and performing time-division transmission on the plurality of information chunks.
[0016] Optionally, the above intelligent medical interaction device further includes: a training module for training a to-be-trained interaction model based on a target data source to obtain a target interaction model, wherein the target data source includes medical data, and the to-be-trained interaction model is a regression model.
[0017] Optionally, the above training module is further configured to: preprocess the target data source to obtain a standardized data set; divide the standardized data set to obtain a training set, a validation set, and a test set, wherein the training set is used for model training, the validation set is used for adjusting model parameters, and the test set is used for evaluating model performance; train the to-be-trained interaction model based on the training set to obtain a target interaction model.
[0018] Optionally, the above intelligent medical interaction device further includes: an evaluation module for evaluating the performance of the target interaction model by using the test set to obtain an evaluation result; in response to determining that the performance of the target interaction model is abnormal based on the evaluation result, adjusting the parameters of the target interaction model based on the validation set to obtain an updated target interaction model.
[0019] Optionally, the above processing module is further configured to: identify and extract key information in the medical dialogue text to be replied by using the target interaction model; match the key information with preset information in a preset data set to obtain a matching result, wherein the preset data set is a data set learned by the target interaction model from historical medical dialogue texts; in response to determining that the key information matches the preset information based on the matching result, determining the preset reply information as the target reply message, wherein the preset reply information is the reply information corresponding to the preset information in the preset data set.
[0020] Optionally, the above intelligent medical interaction device further includes: a matching module for, in response to determining that the key information fails to match the preset information based on the matching result, performing semantic analysis and sentiment analysis on the key information based on the context information of the current medical dialogue text to generate a plurality of reply messages; performing correlation analysis on the key information and the plurality of reply messages to obtain an analysis result, wherein the analysis result is used to determine the degree of correlation between any one of the reply messages and the key information; sorting the plurality of reply messages according to the analysis result to obtain a sorting result; and selecting the target reply message from the sorting result.
[0021] Optionally, the above feedback module is further configured to: chunk the target reply information based on a streaming transmission mode to obtain multiple information chunks; feedback the multiple information chunks to the client according to a target feedback count, where the target feedback count is dynamically adjusted based on the transmission performance of the server; and determine that all the multiple information chunks have been feedback in response to receiving the confirmation information reported by the client.
[0022] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program, where the computer program is configured to execute the intelligent medical interaction method in any one of the foregoing when being run by a processor.
[0023] According to another aspect of the embodiments of the present invention, there is also provided an intelligent medical interaction system, including:
[0024] A server, configured to receive a medical dialogue text to be replied from a client, process the medical dialogue text to be replied by using a target interaction model to obtain a target reply information, and feedback the target reply information to the client based on a streaming transmission mode, where the streaming transmission mode is used to chunk the target reply information to obtain multiple information chunks and perform time-division transmission on the multiple information chunks; and a client, configured to monitor the feedback progress of the multiple information chunks by using a preset monitoring function, generate a response information according to the feedback progress, determine that all the multiple information chunks have been feedback in response to the response information, integrate the multiple information chunks by using a preset decoding method, and display the target reply information corresponding to the multiple information chunks on a target display device.
[0025] According to another aspect of the embodiments of the present invention, there is also provided an electronic device including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the intelligent medical interaction method in any one of the foregoing.
[0026] In the embodiments of the present invention, first, a medical dialogue text to be replied from a client is received, then the medical dialogue text to be replied is processed by using a target interaction model to obtain a target reply information, and finally, the target reply information is feedback to the client based on a streaming transmission mode, where the streaming transmission mode is used to chunk the target reply information to obtain multiple information chunks and perform time-division transmission on the multiple information chunks. By feedbacking the target reply information of the medical dialogue text to be replied based on the streaming transmission mode, the purpose of improving the reply efficiency of the medical dialogue text to be replied is achieved, thereby realizing the technical effect of enhancing the user's interaction experience, and further solving the technical problem that the medical interaction method provided in the related art has a low reply efficiency for medical problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings described herein are used to provide a further understanding of the present invention and form a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0028] Figure 1 is a hardware structural block diagram of a mobile terminal for an optional intelligent medical interaction method according to an embodiment of the present invention;
[0029] Figure 2 is a flowchart of an intelligent medical interaction method according to an embodiment of the present invention;
[0030] Figure 3 is a schematic diagram of an optional intelligent medical interaction device according to an embodiment of the present invention;
[0031] Figure 4 is a structural block diagram of an optional intelligent medical interaction device according to an embodiment of the present invention;
[0032] Figure 5 is a structural block diagram of another optional intelligent medical interaction device according to an embodiment of the present invention;
[0033] Figure 6 is a structural block diagram of yet another optional intelligent medical interaction device according to an embodiment of the present invention;
[0034] Figure 7 is a structural block diagram of yet another optional intelligent medical interaction device according to an embodiment of the present invention. Detailed Embodiments
[0035] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0037] According to an embodiment of the present invention, a method embodiment of an intelligent medical interaction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0038] Figure 1 is a hardware structure block diagram of an optional mobile terminal for an intelligent medical interaction method according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal 10 (or mobile device 10) may include one or more processors 102 (the processor 102 may include, but is not limited to, processing devices such as a microcontroller unit (MCU) or a field programmable gate array (FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may further include: a display device 110, an input / output device 108 (i.e., an I / O device), a universal serial bus (USB) port (which may be included as one of the ports of a computer bus and is not shown in the figure), a network interface (not shown in the figure), a power supply (not shown in the figure), and / or a camera (not shown in the figure). Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned mobile terminal 10. For example, the mobile terminal 10 may further include more or fewer components than Figure 1 shown, or have a different configuration from Figure 1 shown.
[0039] It should be noted that one or more of the above-mentioned processors 102 and / or other data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuit may be a single independent processing module, or be incorporated in whole or in part into any one of other elements in the mobile terminal 10 (or mobile device).
[0040] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the intelligent medical interaction method in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned intelligent medical interaction method. The memory 104 may include a high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the mobile terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof.
[0041] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include the wireless network provided by the communication provider of the mobile terminal 10. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0042] Under the above operating environment, the embodiments of the present invention provide the intelligent medical interaction method as Figure 2 shown, Figure 2 which is a flowchart of an intelligent medical interaction method according to an embodiment of the present invention, as Figure 2 shown, and the method includes the following implementation steps:
[0043] Step S201, receiving the medical dialogue text to be replied from the client;
[0044] Step S202, processing the medical dialogue text to be replied using the target interaction model to obtain the target reply information;
[0045] Step S203, feeding back the target reply information to the client based on the streaming transmission method, where the streaming transmission method is used to perform block processing on the target reply information to obtain multiple information blocks, and perform time-division transmission on the multiple information blocks.
[0046] The above-mentioned client can interact with users. Specifically, users can input medical questions to be consulted (i.e., the above-mentioned medical dialogue text to be replied) through the client, and the client can transmit the medical questions input by users to the server. Further, the target interaction model in the server is used to process the medical questions to obtain corresponding target reply information. Furthermore, based on the streaming transmission method, the target reply information is divided into multiple information blocks, and the multiple information blocks are transmitted to the client at different times, so as to avoid memory overflow caused by the length of the target reply information exceeding the memory space when transmitting the target reply information at one time and waiting for the memory to be released to re-transmit the target reply message. That is, based on the streaming transmission method, the transmission efficiency of the target reply information is improved, the reply efficiency of the medical dialogue text to be replied is improved, and thus the user interaction experience is enhanced.
[0047] The above method of the embodiment of the present invention will be further introduced below.
[0048] In an optional embodiment, the above intelligent medical interaction method further includes:
[0049] Step S204, training the interaction model to be trained based on the target data source to obtain a target interaction model, where the target data source includes medical data, and the interaction model to be trained is a regression model.
[0050] Among them, training the interaction model to be trained based on the target data source to obtain a target interaction model includes:
[0051] Step S2041, preprocessing the target data source to obtain a standardized data set;
[0052] Step S2042, dividing the standardized data set into a training set, a validation set, and a test set, where the training set is used for model training, the validation set is used for adjusting model parameters, and the test set is used for evaluating model performance;
[0053] Step S2043, training the interaction model to be trained based on the training set to obtain a target interaction model.
[0054] The above target data source may include medical data applied to one or more medical fields. In an optional application scenario, the intelligent medical interaction method can be applied to the field of traditional Chinese medicine. Thus, the target data source can be a database containing traditional Chinese medicine knowledge data.
[0055] After selecting and determining the target data source, preprocess the data in the target data source, including but not limited to: data cleaning, deduplication, filling in missing values, and standardizing the data format, so as to obtain a standardized data set. Further, divide the standardized data set into multiple data sets with different functions. For example, divide the standardized data set into a training set for model training, a validation set for adjusting model parameters, and a test set for evaluating model performance.
[0056] Further, select the interactive model to be trained according to the problem type that the model solves. The problem type may include but not limited to: classification, regression, clustering. Specifically, since the medical problems in medical dialogue texts belong to regression problems and the target variable of the interactive model to be trained is continuous, one of the following regression models can be selected as the interactive model to be trained: linear regression, ridge regression, Lasso regression, polynomial regression. Then, use the above training set to train the selected interactive model to be trained to obtain the target interactive model.
[0057] In an optional embodiment, the above intelligent medical interaction method further includes:
[0058] Step S2051, use the test set to evaluate the performance of the target interactive model to obtain an evaluation result;
[0059] Step S2052, in response to determining that the performance of the target interactive model is abnormal based on the evaluation result, adjust the parameters of the target interactive model based on the validation set to obtain an updated target interactive model.
[0060] In the technical solution provided by the present invention, in order to determine the accuracy and various performance indicators of the target interactive model, use the above test set to evaluate the performance of the trained target interactive model. It should be noted here that the various performance indicators may include but not limited to: precision, recall rate, robustness, running efficiency, generalization ability.
[0061] As an optional implementation manner, the target interactive model is a neural network model trained based on the Gradio structure. The model parameters of this model may include but not limited to: weights, biases, learning rates, activation functions, number of iterations. When the evaluation result corresponding to this model determines that the performance of this model is abnormal, the above-mentioned model parameters can be adjusted using the validation set to optimize the performance of the target interactive model. Then, the updated target interactive model can be deployed to the server to perform intelligent medical interaction with users.
[0062] The following combines Figure 3 to further illustrate the above method.
[0063] Figure 3 is a schematic diagram of an optional intelligent medical interaction device according to an embodiment of the present invention, asFigure 3 As shown in the figure, the intelligent medical interaction device may include a server 310 on which a target interaction model 303 is deployed. The target interaction model 303 can be trained through a training set processed by a target data source, evaluated for model performance through a test set, and adjusted and optimized through a validation set.
[0064] In an alternative embodiment, the target interaction model is used to process the medical dialogue text to be replied, and target reply information is obtained, including:
[0065] Step S2021: Use the target interaction model to identify and extract key information in the medical dialogue text to be replied.
[0066] Step S2022: Match the key information with preset information in a preset data set to obtain a matching result, where the preset data set is a data set learned by the target interaction model from historical medical dialogue texts.
[0067] Step S2023: In response to determining that the key information matches the preset information according to the matching result, determine the preset reply information as the target reply information, where the preset reply information is the reply information corresponding to the preset information in the preset data set.
[0068] Still as Figure 3 As shown in the figure, the user can click the intelligent medical dialogue function button of the client 300 to enter the medical artificial intelligence dialogue window 301, and can input consultation information (i.e., the medical dialogue text to be replied) in the medical artificial intelligence dialogue window 301. After the user clicks to confirm, the client 300 sends the consultation information to the server 310. Then, the target interaction model 303 deployed on the server 310 processes the consultation information. Specifically, first, key information (words or keywords) in the consultation information is identified and extracted, preprocessed, and the processed key information is matched and verified with the preset information in the preset data set. When it is determined based on the matching result that the key information has a historical record, that is, when the key information matches the preset information in the preset data set, the reply information corresponding to the preset information in the preset data set can be used as the target reply information for the key information.
[0069] Optionally, the above intelligent medical interaction method further includes:
[0070] Step S2061: In response to determining that the key information fails to match the preset information according to the matching result, perform semantic analysis and sentiment analysis on the key information based on the context information of the current medical dialogue text to generate multiple reply information.
[0071] Step S2062: Perform a relevance analysis on the key information and multiple reply messages to obtain an analysis result, where the analysis result is used to determine the degree of relevance between any reply message and the key information.
[0072] Step S2063: Sort the multiple reply messages according to the analysis result to obtain a sorting result.
[0073] Step S2064: Select a target reply message from the sorting result.
[0074] When the key information in the user's consultation information fails to match the preset information in the preset dataset, the target interaction model can perform semantic analysis and sentiment analysis on the user's consultation information based on the context information of the current medical dialogue text, and generate multiple alternative reply messages based on the analyzed and understood user intention. Further, perform a relevance analysis on each alternative reply message and the preprocessed key information to obtain an analysis result, which can be used to determine the performance of each alternative reply message such as relevance, grammar correctness, coherence, etc. Furthermore, based on the analysis result, sort the relevance between each alternative reply message and the preprocessed key information from largest to smallest, and use the first alternative reply message in the sorting result as the target reply message.
[0075] As an alternative implementation, the target interaction model is a neural network model trained based on the Gradio structure. This model can automatically encode the consultation information input by the user. Specifically, decompose the consultation information into multiple column tags, convert the multiple column tags into vector representations, and during the process of processing the converted vectors, the model automatically learns the language patterns and rules in the consultation information, and matches the target reply message with the highest degree of relevance to the consultation information from the preset dataset that has been learned. Furthermore, according to the context information of the current medical dialogue text, generate a coherent and natural reply text for this target reply message to feedback to the user.
[0076] In the technical solution provided by the present invention, it should also be noted that the target interaction model can independently attempt to predict the next word or keyword in the consultation information to improve its accuracy and autonomous learning ability. And, in addition to being used to answer medical questions and interpret medical common sense, the target interaction model can also be used to generate consistent diagnostic and pharmacological results.
[0077] Optionally, feedback the target reply message to the client based on the streaming transmission method, including:
[0078] Step S2031: Based on the streaming transmission method, divide the target reply message into blocks to obtain multiple information blocks.
[0079] Step S2032: Feed back multiple information blocks to the client according to the target feedback times, where the target feedback times are dynamically adjusted based on the transmission performance of the server.
[0080] Step S2033: In response to receiving the confirmation information reported by the client, determine that all the information blocks have been fed back.
[0081] Still as Figure 3 shown, after the target interaction model 303 deployed in the server 310 generates the target reply information, the target reply information is fed back to the client 300 in a streaming transmission manner. As an alternative implementation, the streaming transmission can be based on Axios and Node.js. Specifically, the response type responseType of Axios can be set to "stream". After setting, Axios will return a readable stream (Readable Stream). Then, Node.js is used to further process the readable stream to feed the readable stream to the client 300 in time slices. Furthermore, when the server 310 receives the confirmation information reported by the client 300, it is determined that the target reply information has been fed back and the content is correct.
[0082] In the technical solution provided by the present invention, it should be noted that a historical conversation record unit 302 can also be set in the client 300. The historical conversation record unit 302 can record the historical conversation records in the current medical conversation text when the current medical artificial intelligence conversation window 301 is in the open state. The historical conversation records can be transmitted from the client 300 to the server 310, so that the target interaction model 303 can generate the target reply information for the medical conversation text to be replied according to the historical conversation records, thereby enhancing the context information connection of the current medical conversation text and improving the user's interaction experience. It should also be noted that when the current medical artificial intelligence conversation window 301 is closed, the client 300 sends a command to end the current conversation state to the server 310, and the server 310 terminates the current conversation process; when the medical artificial intelligence conversation window 301 is opened again, the historical conversation records in the historical conversation record unit 302 are in an empty state, which not only reduces the information processing pressure of the server 310, improves the computing efficiency of the target interaction model 303, but also improves the reply efficiency of the medical conversation text to be replied and enhances the user's medical interaction experience.
[0083] In addition, when processing long medical dialogue texts, the target interaction model 303 can dynamically adjust the historical dialogue records. As an alternative implementation, the target interaction model 303 can choose to retain several recent historical dialogue records, or retain the historical dialogue records related to the current dialogue content, so as to reduce the redundancy of the historical dialogue records, improve the computing efficiency of the target interaction model 303, and enhance the reply effect of the target reply information. As another alternative implementation, the target interaction model 303 can also clean up the irrelevant information in the historical dialogue records, including but not limited to: incorrect reply information directly pointed out by the user, greetings, and polite expressions, so as to further reduce the redundancy of the historical dialogue records and improve the computing efficiency of the target interaction model 303.
[0084] It should also be noted that prior information can be set in the target interaction model 303 in advance, including but not limited to: medical domain knowledge, dialogue rules, and restrictions on specific dialogue scenarios. During the process of generating the target reply information for the medical dialogue text to be replied, the target interaction model 303 can integrate this prior information with the historical dialogue records to improve the quality of the target reply information, thereby further enhancing the user's interaction experience.
[0085] In this embodiment, an intelligent medical interaction device is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be elaborated here. As used below, a "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0086] Figure 4 is a structural block diagram of an alternative intelligent medical interaction device according to an embodiment of the present invention. As Figure 4 shown, the device includes:
[0087] A receiving module 401, configured to receive the medical dialogue text to be replied from the client;
[0088] A processing module 402, configured to process the medical dialogue text to be replied using the target interaction model to obtain the target reply information;
[0089] A feedback module 403, configured to feedback the target reply information to the client based on a streaming transmission method, where the streaming transmission method is used to perform block processing on the target reply information to obtain multiple information blocks, and perform time-division transmission on the multiple information blocks.
[0090] Optionally, Figure 5 is a structural block diagram of another alternative intelligent medical interaction device according to an embodiment of the present invention. As Figure 5 shown, in addition to includingFigure 4 In addition to all the modules shown, it further includes: a training module 404, configured to train an interaction model to be trained based on a target data source to obtain a target interaction model, where the target data source includes medical data, and the interaction model to be trained is a regression model.
[0091] Optionally, the above-mentioned training module 404 is further configured to: preprocess the target data source to obtain a standardized data set; divide the standardized data set to obtain a training set, a validation set, and a test set, where the training set is used for model training, the validation set is used for adjusting model parameters, and the test set is used for evaluating model performance; train the interaction model to be trained based on the training set to obtain a target interaction model.
[0092] Optionally, Figure 6 is a structural block diagram of another optional intelligent medical interaction device according to an embodiment of the present invention. As Figure 6 shown, in addition to including all the modules shown Figure 5 it further includes: an evaluation module 405, configured to perform performance evaluation on the target interaction model using the test set to obtain an evaluation result; in response to determining that the performance of the target interaction model is abnormal based on the evaluation result, adjust the parameters of the target interaction model based on the validation set to obtain an updated target interaction model.
[0093] Optionally, the above-mentioned processing module 402 is further configured to: identify and extract key information in the medical dialogue text to be replied using the target interaction model; match the key information with preset information in a preset data set to obtain a matching result, where the preset data set is a data set learned by the target interaction model from historical medical dialogue texts; in response to determining that the key information matches the preset information according to the matching result, determine the preset reply information as the target reply information, where the preset reply information is the reply information corresponding to the preset information in the preset data set.
[0094] Optionally, Figure 7 is a structural block diagram of another optional intelligent medical interaction device according to an embodiment of the present invention. As Figure 7 shown, in addition to including all the modules shown Figure 6 it further includes: a matching module 405, configured to, in response to determining that the key information fails to match the preset information according to the matching result, perform semantic analysis and sentiment analysis on the key information based on the context information of the current medical dialogue text to generate multiple reply information; perform correlation analysis on the key information and the multiple reply information to obtain an analysis result, where the analysis result is used to determine the degree of correlation between any one of the reply information and the key information; sort the multiple reply information according to the analysis result to obtain a sorting result; select the target reply information from the sorting result.
[0095] Optionally, the above feedback module 403 is further configured to: based on the streaming transmission mode, divide the target reply information into blocks to obtain a plurality of information blocks; feedback the plurality of information blocks to the client according to the target feedback times, where the target feedback times are dynamically adjusted based on the transmission performance of the server; and in response to receiving the confirmation information reported by the client, determine that all the information blocks have been fed back.
[0096] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination form.
[0097] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium in which a computer program is stored. Wherein, the computer program is configured to execute the intelligent medical interaction method in any one of the foregoing when being run by a processor.
[0098] Optionally, in this embodiment, the above computer-readable storage medium can be configured to store a computer program for executing the following steps:
[0099] Step S1, receiving the medical dialogue text to be replied from the client;
[0100] Step S2, using the target interaction model to process the medical dialogue text to be replied to obtain the target reply information;
[0101] Step S3, feeding back the target reply information to the client based on the streaming transmission mode, where the streaming transmission mode is used to perform block processing on the target reply information to obtain a plurality of information blocks and perform time-sharing transmission on the plurality of information blocks.
[0102] Optionally, in this embodiment, the above storage medium may include but is not limited to: various media such as USB flash drives, read-only memories (ROM), random access memories (RAM), mobile hard disks, magnetic disks, or optical discs that can store computer programs.
[0103] According to another aspect of the embodiments of the present invention, there is also provided an intelligent medical interaction system, including:
[0104] A server, configured to receive the medical dialogue text to be replied from the client, use the target interaction model to process the medical dialogue text to be replied to obtain the target reply information, and feed back the target reply information to the client based on the streaming transmission mode, where the streaming transmission mode is used to perform block processing on the target reply information to obtain a plurality of information blocks and perform time-sharing transmission on the plurality of information blocks;
[0105] The client is used to monitor the feedback progress of multiple information blocks by using a preset monitoring function, generate a response message according to the feedback progress, determine that all the multiple information blocks have been fed back in response to the response message, integrate the multiple information blocks by using a preset decoding method, and display the target reply message corresponding to the multiple information blocks on a target display device.
[0106] The above preset monitoring function can be the onDownloadProgress() function encapsulated by Axios. The client can monitor multiple information blocks transmitted by the server based on this preset monitoring function. After confirming that the quantity and content of the multiple information blocks are correct, the client can use the preset decoding method to output the multiple information blocks to the target display device in a streaming output manner to provide the target reply message to the user.
[0107] As an optional implementation manner, the above preset decoding method can be a verbatim output loop. When generating the target reply message on the target display device, the target reply message can be decomposed into multiple characters, and the multiple characters can be gradually appended to the reply message composed of the characters that have been output, so as to avoid the technical problems that the length of the string corresponding to the target reply message is long, resulting in large memory consumption of character data, long processing time, and low reply efficiency.
[0108] As another optional implementation manner, the above preset decoding method can also be progressive decoding. First, generate a character based on the first information block transmitted by the server, use this character as the input for the next time step, and generate the next character, and so on in a loop until the complete target reply message is generated.
[0109] As yet another optional implementation manner, the above preset decoding method can also be to control the output speed of the information blocks. Specifically, after generating a character corresponding to the information in any information block, the sleep() function or other means can be used to pause for a period of time, and then generate the next character, so as to achieve the effect of verbatim output and avoid the technical problems of long waiting time and poor interaction experience caused by replying to all information blocks at once.
[0110] In the technical solution provided by the present invention, when the message characters corresponding to the target reply message are too long and cause the reply to be interrupted, the user can input and send a prompt message (such as "continue") in the dialog box provided by the client. The dialog model in the client (for example: a consistency model) continues to output the unfinished target reply message corresponding to the previous consultation message according to the context information connection of the current medical dialog text.
[0111] According to another aspect of the embodiments of the present invention, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the intelligent medical interaction method in any one of the foregoing items.
[0112] Optionally, in this embodiment, the foregoing processor may be configured to execute the following steps through a computer program:
[0113] Step S1, receive the medical dialogue text to be replied from the client;
[0114] Step S2, process the medical dialogue text to be replied by using the target interaction model to obtain the target reply information;
[0115] Step S3, feedback the target reply information to the client based on the streaming transmission mode, where the streaming transmission mode is used to perform block processing on the target reply information to obtain a plurality of information blocks, and perform time-sharing transmission on the plurality of information blocks.
[0116] Optionally, the specific examples in this embodiment may refer to the examples described in the foregoing embodiment and its optional implementation manners, and will not be elaborated herein.
[0117] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0118] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0119] In several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.
[0120] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] In addition, in each embodiment of the present invention, each functional unit may be integrated into a processing unit, may exist physically alone for each unit, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0122] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, read-only memory (ROM), random access memory (RAM), mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0123] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. An intelligent medical interaction method, characterized in that, Including: Receiving the medical dialogue text to be replied from the client; Processing the medical dialogue text to be replied using the target interaction model to obtain target reply information; Feeding back the target reply information to the client based on the streaming transmission method, wherein the streaming transmission method is used to perform block processing on the target reply information to obtain multiple information blocks, and perform time-sharing transmission on the multiple information blocks.
2. The intelligent medical interaction method according to claim 1, characterized in that, The intelligent medical interaction method further includes: Training the interaction model to be trained based on the target data source to obtain the target interaction model, wherein the target data source includes medical data, and the interaction model to be trained is a regression model.
3. The intelligent medical interaction method according to claim 2, characterized in that, Training the interaction model to be trained based on the target data source to obtain the target interaction model, including: Performing preprocessing on the target data source to obtain a standardized data set; Dividing the standardized data set to obtain a training set, a validation set, and a test set, wherein the training set is used for model training, the validation set is used for adjusting model parameters, and the test set is used for evaluating model performance; Training the interaction model to be trained based on the training set to obtain the target interaction model.
4. The intelligent medical interaction method according to claim 3, characterized in that, The method further includes: Performing performance evaluation on the target interaction model using the test set to obtain an evaluation result; In response to determining that the performance of the target interaction model is abnormal based on the evaluation result, adjusting the parameters of the target interaction model based on the validation set to obtain an updated target interaction model.
5. The intelligent medical interaction method according to claim 1, characterized in that, Processing the medical dialogue text to be replied using the target interaction model to obtain the target reply information, including: Using the target interaction model to identify and extract key information in the medical dialogue text to be replied; Matching the key information with preset information in the preset data set to obtain a matching result, wherein the preset data set is a data set learned by the target interaction model from historical medical dialogue texts; In response to determining that the key information matches the preset information according to the matching result, determining the preset reply information as the target reply information, wherein the preset reply information is the reply information corresponding to the preset information in the preset data set.
6. The method according to claim 5, characterized in that, The method further includes: In response to determining that the key information fails to match the preset information according to the matching result, performing semantic analysis and sentiment analysis on the key information based on the context information of the current medical dialogue text to generate multiple reply information; Performing correlation analysis on the key information and the multiple reply information to obtain an analysis result, wherein the analysis result is used to determine the degree of correlation between any reply information and the key information; Sorting the multiple reply information according to the analysis result to obtain a sorting result; Selecting the target reply information from the sorting result.
7. The method according to claim 1, characterized in that, Feeding back the target reply information to the client based on the streaming transmission method, including: Based on the streaming transmission method, dividing the target reply information into blocks to obtain multiple information blocks; Feedback the multiple information blocks to the client according to the target feedback times, where the target feedback times are dynamically adjusted based on the transmission performance of the server; In response to receiving the confirmation information reported by the client, determine that all of the multiple information blocks have been fed back.
8. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, where the computer program is configured to execute the intelligent medical interaction method according to any one of claims 1 to 7 when being run by a processor.
9. An intelligent medical interaction system, characterized in that, Including: A server, configured to receive a medical dialogue text to be replied from a client, process the medical dialogue text to be replied by using a target interaction model to obtain a target reply message, and feedback the target reply message to the client based on a streaming transmission mode, where the streaming transmission mode is used to perform block processing on the target reply message to obtain multiple information blocks, and perform time-division transmission on the multiple information blocks; A client, configured to monitor the feedback progress of the multiple information blocks by using a preset monitoring function, generate a response message according to the feedback progress, determine that all of the multiple information blocks have been fed back in response to the response message, integrate the multiple information blocks by using a preset decoding method, and display the target reply message corresponding to the multiple information blocks on a target display device.
10. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the intelligent medical interaction method according to any one of claims 1 to 7.