Online consultation method, device, equipment and storage medium
By building a diagnosis and treatment path database and using neural network models, the problems of low efficiency and high misdiagnosis rate in the online consultation process are solved, and efficient and accurate diagnosis results are achieved.
Patent Information
- Application Number
- CN202210212654.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-03-04
AI Technical Summary
The existing online consultation process is inefficient, mainly because the traditional consultation process ignores the user's choices at each node, resulting in duplicate nodes and irrelevant options, increasing labor costs and a high misdiagnosis rate.
User behavior data is obtained through the preset diagnosis and treatment path model, the diagnosis and treatment path database is constructed, and the prediction probability is generated using the timing sequence and neural network model, matching the user's disease type and querying candidate doctors to generate consultation results.
It improves the efficiency of online consultation, reduces repetitive nodes, reduces labor costs, and improves the accuracy and efficiency of consultation through machine learning and neural networks.
Smart Images

Figure CN114566295B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular, to an online consultation method, device, equipment and storage medium. Background Art
[0002] In recent years, with the development of the medical industry, the application of Internet-based intelligent medical technology in daily medical practice has been gradually accepted by the public and the industry. However, at present, online consultations are still largely based on artificial guidance and annotation, resulting in huge labor costs. In addition, the online misdiagnosis rate has always been a difficult problem in Internet medical consultations.
[0003] The existing automatic consultation process generally proposes preset questions through a preset consultation flow chart. In this way, preset consultation questions (i.e., nodes) are thrown out in sequence through a template, but the choices of users at each node are ignored, resulting in the consultation path under the preset medical template often covering duplicate nodes and irrelevant options, and these irrelevant options will seriously reduce the consultation efficiency, that is, the efficiency of the existing solution is low. Summary of the Invention
[0004] The present invention provides an online consultation method, device, equipment and storage medium for improving the efficiency of online consultations.
[0005] In a first aspect of the present invention, an online consultation method is provided. The online consultation method includes: obtaining the diagnosis and treatment behavior data corresponding to an online user through a preset diagnosis and treatment path model, and constructing a diagnosis and treatment path database according to the diagnosis and treatment behavior data; extracting the diagnosis and treatment behavior data from the diagnosis and treatment path database, performing standardization processing on the diagnosis and treatment behavior data to obtain standard diagnosis and treatment behavior data, and performing encoding processing on the standard diagnosis and treatment behavior data to obtain encoded data; generating a time sequence according to the encoded data in accordance with a preset time sequence to obtain an input sequence, and performing vector conversion on the input sequence to obtain an input hidden vector; inputting the input hidden vector into a preset diagnosis data processing model for disease data processing to obtain a prediction probability, wherein the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer and an output layer; generating a consultation result corresponding to the online user according to the prediction probability.
[0006] Optionally, in the first implementation manner of the first aspect of the present invention, obtaining the diagnosis and treatment behavior data corresponding to the online user through the pre-set diagnosis and treatment path model, and constructing a diagnosis and treatment path database according to the diagnosis and treatment behavior data, includes: matching the consultation path corresponding to the online user through the pre-set diagnosis and treatment path model to obtain the consultation path; extracting the problem nodes and option nodes in the consultation path, and obtaining the problem data corresponding to the problem nodes and the option data corresponding to the option nodes; crawling the basic information and the chief complaint information corresponding to the online user through the pre-set crawler; taking the problem data, the option data, the basic information and the chief complaint information as the diagnosis and treatment behavior data corresponding to the online user, and storing the diagnosis and treatment behavior data into the pre-set database to obtain the diagnosis and treatment path database.
[0007] Optionally, in the second implementation manner of the first aspect of the present invention, extracting the diagnosis and treatment behavior data from the diagnosis and treatment path database, performing standardization processing on the diagnosis and treatment behavior data to obtain standard diagnosis and treatment behavior data, and performing encoding processing on the standard diagnosis and treatment behavior data to obtain encoded data, includes: extracting the diagnosis and treatment behavior data from the diagnosis and treatment path database; performing data cleaning on the diagnosis and treatment behavior data through the pre-set data warehouse tool to obtain the diagnosis and treatment behavior data after data cleaning; calling the pre-set function to perform normalization processing on the diagnosis and treatment behavior data after data cleaning to obtain standard diagnosis and treatment behavior data; respectively extracting the problem data and the option data in the standard behavior data to obtain target problem data and target option data; performing normalization encoding processing on the target problem data and the target option data through the pre-set natural language processing model to obtain encoded data.
[0008] Optionally, in the third implementation manner of the first aspect of the present invention, performing normalization encoding processing on the target problem data and the target option data through the pre-set natural language processing model to obtain encoded data, includes: performing text recognition on the target problem data and the target option data through the pre-set natural language processing model to obtain problem text data and option text data; extracting the same problems in the problem text data, and encoding the same problems in the problem text data as one problem to obtain the processed problem text data, and extracting the same problems in the option text data, and encoding the same options in the option text data as one option to obtain the processed option text data; performing unified encoding processing on the processed problem text data and the processed option text data to obtain encoded data.
[0009] Optionally, in the fourth implementation manner of the first aspect of the present invention, generating a timing sequence according to the preset timing sequence and based on the encoded data to obtain an input sequence, and performing vector conversion on the input sequence to obtain an input hidden vector, includes: extracting multiple questions from the encoded data, and extracting multiple options from the encoded data; matching each question with the option corresponding to each question to obtain a question-option pair corresponding to each question; sorting the question-option pairs according to the preset timing sequence to obtain an input sequence; performing implicit vector encoding processing on the input sequence to obtain an input hidden vector.
[0010] Optionally, in the fifth implementation manner of the first aspect of the present invention, inputting the input hidden vector into a preset diagnostic data processing model for disease data processing to obtain a prediction probability, where the diagnostic data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer, includes: inputting the input hidden vector into a preset diagnostic data processing model, where the diagnostic data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer; performing one-hot vector encoding on the input hidden vector through the input layer to obtain an initial vector; performing multi-layer stacking calculation on the initial vector through the double-layer feedforward neural network to obtain a feature vector; performing normalization processing on the feature vector through the embedding layer to obtain a standard vector; performing probability calculation on the standard vector through the output layer to obtain a prediction probability.
[0011] Optionally, in the sixth implementation manner of the first aspect of the present invention, generating a consultation result corresponding to the online user according to the prediction probability, includes: matching the disease type corresponding to the online user based on the prediction probability to obtain the disease type corresponding to the online user; querying the doctor corresponding to the online user from a preset candidate doctor library based on the disease type; taking the disease type and the doctor as the consultation result.
[0012] In a second aspect of the present invention, an online consultation device is provided. The online consultation device includes: an acquisition module, configured to obtain the diagnosis and treatment behavior data corresponding to an online user through a preset diagnosis and treatment path model, and construct a diagnosis and treatment path database according to the diagnosis and treatment behavior data; a processing module, configured to extract the diagnosis and treatment behavior data from the diagnosis and treatment path database, perform standardization processing on the diagnosis and treatment behavior data to obtain standard diagnosis and treatment behavior data, and perform encoding processing on the standard diagnosis and treatment behavior data to obtain encoded data; a conversion module, configured to generate a time series sequence according to the encoded data in accordance with a preset time series sequence to obtain an input sequence, and perform vector conversion on the input sequence to obtain an input hidden vector; a prediction module, configured to input the input hidden vector into a preset diagnosis data processing model for disease data processing to obtain a prediction probability, wherein the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer; and a generation module, configured to generate a consultation result corresponding to the online user according to the prediction probability.
[0013] Optionally, in a first implementation manner of the second aspect of the present invention, the acquisition module is specifically configured to: match a consultation path corresponding to the online user through a preset diagnosis and treatment path model to obtain a consultation path; extract question nodes and option nodes in the consultation path, and obtain question data corresponding to the question nodes and option data corresponding to the option nodes; crawl basic information and chief complaint information corresponding to the online user through a preset crawler; use the question data, the option data, the basic information, and the chief complaint information as the diagnosis and treatment behavior data corresponding to the online user, and store the diagnosis and treatment behavior data in a preset database to obtain a diagnosis and treatment path database.
[0014] Optionally, in a second implementation manner of the second aspect of the present invention, the processing module further includes: an extraction unit, configured to extract the diagnosis and treatment behavior data from the diagnosis and treatment path database; a cleaning unit, configured to perform data cleaning on the diagnosis and treatment behavior data through a preset data warehouse tool to obtain the diagnosis and treatment behavior data after data cleaning; a processing unit, configured to call a preset function to perform normalization processing on the diagnosis and treatment behavior data after data cleaning to obtain standard diagnosis and treatment behavior data; a configuration unit, configured to respectively extract question data and option data in the standard behavior data to obtain target question data and target option data; and an encoding unit, configured to perform normalization encoding processing on the target question data and the target option data through a preset natural language processing model to obtain encoded data.
[0015] Optionally, in the third implementation manner of the second aspect of the present invention, the encoding unit is specifically configured to: perform text recognition on the target question data and the target option data through a preset natural language processing model to obtain question text data and option text data; extract the same questions in the question text data, and encode the same questions in the question text data into one question to obtain processed question text data, and extract the same questions in the option text data, and encode the same options in the option text data into one option to obtain processed option text data; perform unified encoding processing on the processed question text data and the processed option text data to obtain encoded data.
[0016] Optionally, in the fourth implementation manner of the second aspect of the present invention, the conversion module is specifically configured to: extract multiple questions from the encoded data, and extract multiple options from the encoded data; match each question with the option corresponding to each question to obtain a question-option pair corresponding to each question; sort the question-option pairs according to a preset time sequence to obtain an input sequence; perform implicit vector encoding processing on the input sequence to obtain an input hidden vector.
[0017] Optionally, in the fifth implementation manner of the second aspect of the present invention, the prediction module is specifically configured to: input the input hidden vector into a preset diagnostic data processing model, where the diagnostic data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer; perform one-hot vector encoding on the input hidden vector through the input layer to obtain an initial vector; perform multi-layer stacking calculation on the initial vector through the double-layer feedforward neural network to obtain a feature vector; perform normalization processing on the feature vector through the embedding layer to obtain a standard vector; perform probability calculation on the standard vector through the output layer to obtain a prediction probability.
[0018] Optionally, in the sixth implementation manner of the second aspect of the present invention, the generation module is specifically configured to: match the disease type corresponding to the online user based on the prediction probability to obtain the disease type corresponding to the online user; query the doctor corresponding to the online user from a preset candidate doctor library based on the disease type; use the disease type and the doctor as the consultation result.
[0019] The third aspect of the present invention provides an online consultation device, including: a memory and at least one processor, where instructions are stored in the memory; the at least one processor calls the instructions in the memory to enable the online consultation device to execute the above-mentioned online consultation method.
[0020] The fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when the instructions run on a computer, the computer is caused to execute the above-mentioned online consultation method.
[0021] In the technical solution provided by the present invention, the diagnosis and treatment behavior data corresponding to the online user is obtained through a preset diagnosis and treatment path model, and a diagnosis and treatment path database is constructed according to the diagnosis and treatment behavior data; the diagnosis and treatment behavior data is extracted from the diagnosis and treatment path database, the diagnosis and treatment behavior data is standardized to obtain standard diagnosis and treatment behavior data, and the standard diagnosis and treatment behavior data is encoded to obtain encoded data; a time series is generated according to the encoded data in accordance with a preset time series sequence to obtain an input sequence, and the input sequence is vector-converted to obtain an input hidden vector; the input hidden vector is input into a preset diagnosis data processing model for disease data processing to obtain a prediction probability, wherein the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer and an output layer; an inquiry result corresponding to the online user is generated according to the prediction probability. By integrating machine learning and neural networks and using a time series prediction model to take the user's consultation path as the acquisition path of the user's diagnosis and treatment data, the present invention improves the efficiency of online consultation. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of an embodiment of the online consultation method in an embodiment of the present invention;
[0023] Figure 2 It is a schematic diagram of another embodiment of the online consultation method in an embodiment of the present invention;
[0024] Figure 3 It is a schematic diagram of an embodiment of the online consultation device in an embodiment of the present invention;
[0025] Figure 4 It is a schematic diagram of another embodiment of the online consultation device in an embodiment of the present invention;
[0026] Figure 5 It is a schematic diagram of an embodiment of the online consultation device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The embodiments of the present invention provide an online consultation method, device, equipment and storage medium, which are used to improve the efficiency of online consultation. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and the above-mentioned drawings of the present invention are used to distinguish similar objects, and do not 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 described here can be implemented in an order different from that shown or described here. In addition, the term "including" or "having" and any variation thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or equipment that includes a series of steps or units does not 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 equipment.
[0028] For ease of understanding, the specific process of the embodiments of the present invention will be described below. Please refer to Figure 1 , the first embodiment of the online consultation method in the embodiments of the present invention includes:
[0029] 101. Obtain the diagnosis and treatment behavior data corresponding to the online user through a preset diagnosis and treatment path model, and construct a diagnosis and treatment path database according to the diagnosis and treatment behavior data;
[0030] It should be noted that online users will store a large amount of online real user diagnosis and treatment behavior data through a preset diagnosis and treatment path model. The medical diagnosis and treatment path is a consultation path manually summarized through historical experience and relevant medical knowledge. For common symptoms, a cluster of skill trees is formed, including question nodes, option nodes, and path-dependent diagnoses. A set of complete diagnosis and treatment path plans is formed by the collection of multiple clusters of skill trees. Therefore, the user behavior data will include the sequence of answering questions on one of the diagnosis and treatment paths, the corresponding sequence of answer options, the description of the user's basic information, and the description of the user's basic chief complaint.
[0031] It can be understood that the execution entity of the present invention can be an online consultation device, or a terminal or a server, and specific limitations are not made here. In the embodiments of the present invention, the server is taken as an example of the execution entity for illustration. The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, robotics technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery network (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0032] 102. Extract the diagnosis and treatment behavior data from the diagnosis and treatment path database, perform standardization processing on the diagnosis and treatment behavior data to obtain standard diagnosis and treatment behavior data, and perform encoding processing on the standard diagnosis and treatment behavior data to obtain encoded data;
[0033] Specifically, the server standardizes, characterizes, and knowledgeizes the diagnosis and treatment path database. The server performs standardization processing by building a distributed big data processing platform. Among them, the optional solutions for building a big data platform are to perform data cleaning, normalization, merging, etc. operations using the distributed data warehouse HIVE and user-defined functions UDF. It should be noted that the same or similar problem nodes and option nodes are distributed in different skill trees. The server normalizes and encodes the problem options through a natural language processing model. For example, the two questions "May I ask how old you are this year?" and "May I ask your age this year?" can be uniformly encoded into one question, and the fixed options "Thirty-six years old" and "36 years old" can be uniformly encoded into one option. Each piece of user behavior data can be organized into a unified encoded question sequence, a unified encoded option sequence, a unified encoded diagnosis information, and other personal basic information and symptom descriptions.
[0034] 103. Generate a time series according to the preset time series and based on the encoded data to obtain an input sequence, and perform vector conversion on the input sequence to obtain an input hidden vector;
[0035] Specifically, through the feature scaling process of the deep learning model by the server, the diagnosis and treatment path database can be transformed into the prediction data required by the deep learning model. The model inputs are [user basic information (age, gender, disease), [Question 1, Option 1], [Question 2, Option 2], …, [Question n, Option n]], and the model outputs are [Question n, Option n, Diagnosis n]. In actual user behavior, there are significant differences in the frequencies of different skill trees and diagnosis results. Therefore, in actual operation, oversampling and undersampling methods are used for sample balancing. Thus, the server generates a time series according to the preset time series sequence and based on the encoded data, obtains the input sequence, and performs vector conversion on the input sequence to obtain the input hidden vector.
[0036] 104. Input the input hidden vector into the preset diagnosis data processing model for disease data processing to obtain the prediction probability. Among them, the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer;
[0037] Specifically, the diagnosis data processing model preset by the server can be based on the pre-trained neural network Transformer model to develop a time series prediction model. The server makes the user answer the question Q and the option C sequence as: S qc =[q1c1; q2c2; …; q n c n , which represents the user's behavior of selecting the diagnosis and treatment path arranged in time series sequence. The server's prediction of the next time series can be simply represented as a hidden vector. For the above input sequence, we can transform it into multiple implicit vector representations, that is, at the i-th moment of the vector representation layer l, using the Transformer characteristics, the neural network layer is stacked and calculated multiple times to obtain the prediction probability.
[0038] 105. Generate the corresponding consultation result for the online user according to the prediction probability.
[0039] Specifically, the server matches the disease type corresponding to the online user based on the prediction probability. The server pre-matches the probability with the disease type in advance, that is, each prediction probability corresponds to a disease type. The server can query the disease type according to the prediction probability to obtain the disease type corresponding to the online user; the server queries the doctor corresponding to the online user from the preset candidate doctor library based on the disease type. The server queries the doctor matching the disease type in the preset candidate doctor database; finally, the server transmits the disease type and the doctor as the consultation result to the preset display terminal and pushes it to the online user.
[0040] Furthermore, the server stores the consultation result in the blockchain database, and the specific details are not limited here.
[0041] In an embodiment of the present invention, diagnostic behavior data corresponding to an online user is obtained through a pre-set diagnostic path model, and a diagnostic path database is constructed based on the diagnostic behavior data; the diagnostic behavior data is extracted from the diagnostic path database, and the diagnostic behavior data is standardized to obtain standard diagnostic behavior data, and the standard diagnostic behavior data is encoded to obtain encoded data; a time series is generated according to the encoded data in accordance with a pre-set time series sequence to obtain an input sequence, and the input sequence is vector-converted to obtain an input hidden vector; the input hidden vector is input into a pre-set diagnostic data processing model for disease data processing to obtain a prediction probability, wherein the diagnostic data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer; a consultation result corresponding to the online user is generated according to the prediction probability. By integrating machine learning and neural networks and using a time series prediction model to take the user's consultation path as the acquisition path of the user's diagnostic data, the present invention improves the efficiency of online consultation.
[0042] Please refer to Figure 2 , the second embodiment of the online consultation method in the embodiment of the present invention includes:
[0043] 201. Obtain diagnostic behavior data corresponding to an online user through a pre-set diagnostic path model, and construct a diagnostic path database based on the diagnostic behavior data;
[0044] Specifically, the server matches a consultation path corresponding to the online user through a pre-set diagnostic path model to obtain a consultation path; the server extracts question nodes and option nodes in the consultation path, and obtains question data corresponding to the question nodes and option data corresponding to the option nodes; the server crawls basic information and chief complaint information corresponding to the online user through a pre-set crawler; the server uses the question data, option data, basic information, and chief complaint information as diagnostic behavior data corresponding to the online user, and stores the diagnostic behavior data in a pre-set database to obtain a diagnostic path database. Specifically, the server matches a consultation path corresponding to the online user through a pre-set diagnostic path model to obtain a consultation path, wherein the server upgrades the traditional diagnostic path template, static, and inflexible features based on the new diagnostic path model of the time series prediction model, and has features such as standardization, dynamicization, and intelligent use of prior knowledge; the server extracts question nodes and option nodes in the consultation path, and obtains question data corresponding to the question nodes and option data corresponding to the option nodes. The server extracts the question data and options corresponding to each node in the diagnostic path to obtain question data and option data; the server crawls basic information and chief complaint information corresponding to the online user through a pre-set crawler; the server uses the question data, option data, basic information, and chief complaint information as diagnostic behavior data corresponding to the online user, and stores the diagnostic behavior data in a pre-set database to obtain a diagnostic path database.
[0045] 202. Extract the diagnosis and treatment behavior data from the diagnosis and treatment path database;
[0046] It should be noted that in order to ensure the authenticity of the basic information and the chief complaint information, the acquisition of the basic information and the chief complaint information can be from medical websites, medical institution databases, etc. The basic information and the chief complaint information are text data including disease vocabulary and symptom vocabulary. The basic information and the chief complaint information can be obtained through a pre-set crawler from medical websites or medical institution data. Among them, medical websites or medical institution data record the disease vocabulary and symptom vocabulary of users to generate the basic information and the chief complaint information, or the user can directly input the disease vocabulary and symptom vocabulary to obtain the basic information and the chief complaint information.
[0047] 203. Perform data cleaning on the diagnosis and treatment behavior data through a pre-set data warehouse tool to obtain the diagnosis and treatment behavior data after data cleaning;
[0048] Specifically, the server extracts the diagnosis and treatment behavior data from the diagnosis and treatment path database; the server performs data cleaning on the diagnosis and treatment behavior data through a pre-set data warehouse tool to obtain the diagnosis and treatment behavior data after data cleaning. Among them, the server's data cleaning of the diagnosis and treatment behavior data refers to the last procedure of discovering and correcting identifiable errors in the data file, including checking data consistency, handling invalid values and missing values, etc.
[0049] 204. Invoke a pre-set function to perform normalization processing on the diagnosis and treatment behavior data after data cleaning to obtain standard diagnosis and treatment behavior data;
[0050] Among them, the pre-set data warehouse tool can be the distributed data warehouse HIVE; the server invokes a pre-set function to perform normalization processing on the diagnosis and treatment behavior data after data cleaning to obtain standard diagnosis and treatment behavior data. Among them, the standard diagnosis and treatment behavior data contains the chief complaint information and the basic information of online users; the server extracts the problem data and option data in the standard behavior data respectively to obtain the target problem data and the target option data.
[0051] 205. Extract the problem data and option data in the standard behavior data respectively to obtain the target problem data and the target option data;
[0052] Specifically, the server extracts the problem data and the option data corresponding to the problem data one by one according to each problem node in the diagnosis and treatment path; the server performs normalization encoding processing on the target problem data and the target option data through a pre-set natural language processing model to obtain encoded data.
[0053] 206. Perform normalization encoding processing on the target problem data and the target option data through a pre-set natural language processing model to obtain encoded data;
[0054] Specifically, the server performs text recognition on the target question data and the target option data through a pre-set natural language processing model to obtain question text data and option text data; the server extracts the same questions in the question text data and encodes the same questions in the question text data into one question to obtain the processed question text data, and extracts the same questions in the option text data and encodes the same options in the option text data into one option to obtain the processed option text data; the server performs unified encoding processing on the processed question text data and the processed option text data to obtain encoded data. Specifically, the server performs text recognition on the target question data and the target option data through a pre-set natural language processing model to obtain question text data and option text data, and the server performs recognition on the data of each node in the diagnosis and treatment path through this natural language processing model to respectively obtain the text corresponding to the question, that is, the question text data, and the text corresponding to the option, that is, the option text data; the server extracts the same questions in the question text data and encodes the same questions in the question text data into one question to obtain the processed question text data, and extracts the same questions in the option text data and encodes the same options in the option text data into one option to obtain the processed option text data. The server combines the questions with the same content into one question and combines and encodes the options with the same content into one option. For example, the two questions "May I ask how old you are this year?" and "May I ask your age this year?" can be uniformly encoded into one question, and the fixed options "twenty years old" and "20 years old" can be uniformly encoded into one option; the server performs unified encoding processing on the processed question text data and the processed option text data to obtain encoded data, encodes the questions in sequence according to the order of the diagnosis and treatment path, and encodes the options corresponding to each question one by one with the question to obtain encoded data.
[0055] 207. Generate a time series according to the pre-set time series sequence and the encoded data to obtain an input sequence, and perform vector conversion on the input sequence to obtain an input hidden vector;
[0056] Specifically, the server extracts multiple questions from the encoded data and extracts multiple options from the encoded data; the server matches each question with the options corresponding to each question to obtain a question-option pair for each question; the server sorts the question-option pairs according to a preset time sequence to obtain an input sequence; the server performs implicit vector encoding processing on the input sequence to obtain an input hidden vector. Specifically, the server analyzes the diagnosis path to obtain the path nodes in the diagnosis path, extracts multiple questions corresponding to the encoded data in the path nodes, and the server extracts multiple options from the encoded data according to the multiple questions extracted, where the questions and options are in one-to-one correspondence; the server performs one-to-one correspondence processing on the multiple questions and the multiple options, the server matches each question with the options corresponding to each question to obtain a question-option pair for each question; the server sorts the question-option pairs according to a preset time sequence to obtain an input sequence, where the preset time sequence is the answer time nodes of the online users in the diagnosis path; the server performs implicit vector encoding processing on the input sequence to obtain an input hidden vector, and the server converts the input sequence into an encoded vector to obtain an input hidden vector.
[0057] 208. Input the input hidden vector into a preset diagnosis data processing model for disease data processing to obtain a prediction probability, where the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer;
[0058] Specifically, the server inputs the input hidden vector into a pre-set diagnostic data processing model, where the diagnostic data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer. The server performs one-hot vector encoding on the input hidden vector through the input layer to obtain an initial vector. The server performs multi-layer stacking calculations on the initial vector through the double-layer feedforward neural network to obtain a feature vector. The server performs normalization processing on the feature vector through the embedding layer to obtain a standard vector. The server performs probability calculation on the standard vector through the output layer to obtain a prediction probability. Specifically, the server inputs the input hidden vector into a pre-set diagnostic data processing model, where the diagnostic data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer. Among them, the double-layer feedforward neural network is the simplest neural network, and the neurons are arranged in layers. Each neuron is only connected to the neurons in the previous layer, receives the output of the previous layer, and outputs it to the next layer. There is no feedback between layers. The server performs one-hot vector encoding on the input hidden vector through the input layer to obtain an initial vector. The server enables the input hidden vector to be recognized by the neural network by performing one-hot vector encoding on the input hidden vector, which improves the processing efficiency of the diagnostic data processing model. The server performs multi-layer stacking calculations on the initial vector through the double-layer feedforward neural network to obtain a feature vector. The server performs normalization processing on the feature vector through the embedding layer to obtain a standard vector. The server performs probability calculation on the standard vector through the output layer. The server performs probability calculation on the standard vector through the classification function of the input layer to obtain a prediction probability.
[0059] 209. Generate a consultation result corresponding to the online user according to the prediction probability.
[0060] Specifically, the server matches the disease type corresponding to the online user based on the prediction probability to obtain the disease type corresponding to the online user. The server queries the doctor corresponding to the online user from the pre-set candidate doctor library based on the disease type. The server uses the disease type and the doctor as the consultation result. Specifically, the server matches the disease type corresponding to the online user based on the prediction probability. During the matching process, there may be two situations for the symptom characteristics of the online user: complete match and partial match. Among them, a complete match means that all the symptom characteristics of the online user appear in the reference symptom characteristics corresponding to a certain reference disease type. A partial match means that some of the symptom characteristics of the online user can appear in the reference symptom characteristics corresponding to a certain reference disease type. The server determines the reference disease type corresponding to the complete match as the disease type. When the match is incomplete, the server determines the reference disease type corresponding to the largest number of matching symptom characteristics as the disease type. The server uses the professional doctor corresponding to this disease type as the doctor matched from the candidate doctor library. The server uses the doctor and the disease type as the diagnosis result and pushes it to the online user.
[0061] Further, the server stores the consultation result in the blockchain database, and specific limitations are not made here.
[0062] In the embodiment of the present invention, the diagnosis and treatment behavior data corresponding to the online user is obtained through a preset diagnosis and treatment path model, and a diagnosis and treatment path database is constructed according to the diagnosis and treatment behavior data; the diagnosis and treatment behavior data is extracted from the diagnosis and treatment path database, the diagnosis and treatment behavior data is standardized to obtain standard diagnosis and treatment behavior data, and the standard diagnosis and treatment behavior data is encoded to obtain encoded data; a time series is generated according to the encoded data in accordance with a preset time series to obtain an input sequence, and the input sequence is vector-converted to obtain an input hidden vector; the input hidden vector is input into a preset diagnosis data processing model for disease data processing to obtain a prediction probability, wherein the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer; a consultation result corresponding to the online user is generated according to the prediction probability. The present invention improves the efficiency of online consultation by integrating machine learning and neural networks and using a time series prediction model to take the user's consultation path as the acquisition path of the user's diagnosis and treatment data.
[0063] The online consultation method in the embodiment of the present invention is described above. Next, the online consultation device in the embodiment of the present invention will be described. Please refer to Figure 3 , the first embodiment of the online consultation device in the embodiment of the present invention includes:
[0064] An acquisition module 301, configured to obtain diagnosis and treatment behavior data corresponding to an online user through a preset diagnosis and treatment path model, and construct a diagnosis and treatment path database according to the diagnosis and treatment behavior data;
[0065] A processing module 302, configured to extract the diagnosis and treatment behavior data from the diagnosis and treatment path database, standardize the diagnosis and treatment behavior data to obtain standard diagnosis and treatment behavior data, and encode the standard diagnosis and treatment behavior data to obtain encoded data;
[0066] A conversion module 303, configured to generate a time series according to the encoded data in accordance with a preset time series to obtain an input sequence, and vector-convert the input sequence to obtain an input hidden vector;
[0067] A prediction module 304, configured to input the input hidden vector into a preset diagnosis data processing model for disease data processing to obtain a prediction probability, wherein the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer;
[0068] A generation module 305, configured to generate a consultation result corresponding to the online user according to the prediction probability.
[0069] Further, the server stores the consultation result in the blockchain database, and specific limitations are not made here.
[0070] In the embodiment of the present invention, the diagnosis and treatment behavior data corresponding to the online user is obtained through a preset diagnosis and treatment path model, and a diagnosis and treatment path database is constructed according to the diagnosis and treatment behavior data; the diagnosis and treatment behavior data is extracted from the diagnosis and treatment path database, the diagnosis and treatment behavior data is standardized to obtain standard diagnosis and treatment behavior data, and the standard diagnosis and treatment behavior data is encoded to obtain encoded data; a time series is generated according to the encoded data in accordance with a preset time series to obtain an input sequence, and the input sequence is vector-converted to obtain an input hidden vector; the input hidden vector is input into a preset diagnosis data processing model for disease data processing to obtain a prediction probability, wherein the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer; a consultation result corresponding to the online user is generated according to the prediction probability. The present invention improves the efficiency of online consultation by integrating machine learning and neural networks and using a time series prediction model to take the user consultation path as the acquisition path of user diagnosis and treatment data.
[0071] Please refer to Figure 4 , the second embodiment of the online consultation device in the embodiment of the present invention includes:
[0072] An acquisition module 301, configured to obtain diagnosis and treatment behavior data corresponding to an online user through a preset diagnosis and treatment path model, and construct a diagnosis and treatment path database according to the diagnosis and treatment behavior data;
[0073] A processing module 302, configured to extract the diagnosis and treatment behavior data from the diagnosis and treatment path database, standardize the diagnosis and treatment behavior data to obtain standard diagnosis and treatment behavior data, and encode the standard diagnosis and treatment behavior data to obtain encoded data;
[0074] A conversion module 303, configured to generate a time series according to the encoded data in accordance with a preset time series to obtain an input sequence, and vector-convert the input sequence to obtain an input hidden vector;
[0075] A prediction module 304, configured to input the input hidden vector into a preset diagnosis data processing model for disease data processing to obtain a prediction probability, wherein the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer;
[0076] A generation module 305, configured to generate a consultation result corresponding to the online user according to the prediction probability.
[0077] Optionally, the acquisition module 301 is specifically configured to:
[0078] Match the consultation path corresponding to the online user through a preset diagnosis and treatment path model to obtain the consultation path; extract the question nodes and option nodes in the consultation path, and obtain the question data corresponding to the question nodes and the option data corresponding to the option nodes; crawl the basic information and chief complaint information corresponding to the online user through a preset crawler; use the question data, the option data, the basic information and the chief complaint information as the diagnosis and treatment behavior data corresponding to the online user, and store the diagnosis and treatment behavior data in a preset database to obtain a diagnosis and treatment path database.
[0079] Optionally, the processing module 302 further includes:
[0080] An extraction unit 3021, configured to extract the diagnosis and treatment behavior data from the diagnosis and treatment path database;
[0081] A cleaning unit 3022, configured to perform data cleaning on the diagnosis and treatment behavior data through a preset data warehouse tool to obtain the diagnosis and treatment behavior data after data cleaning;
[0082] A processing unit 3023, configured to call a preset function to perform normalization processing on the diagnosis and treatment behavior data after data cleaning to obtain standard diagnosis and treatment behavior data;
[0083] A configuration unit 3024, configured to respectively extract the question data and the option data in the standard behavior data to obtain target question data and target option data;
[0084] An encoding unit 3025, configured to perform normalization encoding processing on the target question data and the target option data through a preset natural language processing model to obtain encoded data.
[0085] Optionally, the encoding unit 3025 is specifically configured to:
[0086] Perform text recognition on the target question data and the target option data through a preset natural language processing model to obtain question text data and option text data; extract the same questions in the question text data, and encode the same questions in the question text data as one question to obtain the processed question text data, and extract the same questions in the option text data, and encode the same options in the option text data as one option to obtain the processed option text data; perform unified encoding processing on the processed question text data and the processed option text data to obtain encoded data.
[0087] Optionally, the conversion module 303 is specifically configured to:
[0088] Extract multiple questions from the encoded data, and extract multiple options from the encoded data; match each of the questions with the options corresponding to each question to obtain a question-option pair corresponding to each question; sort the question-option pairs according to a preset time sequence to obtain an input sequence; perform an implicit vector encoding process on the input sequence to obtain an input hidden vector.
[0089] Optionally, the prediction module 304 is specifically configured to:
[0090] Input the input hidden vector into a preset diagnostic data processing model, where the diagnostic data processing model includes an input layer, a two-layer feedforward neural network, an embedding layer, and an output layer; perform one-hot vector encoding on the input hidden vector through the input layer to obtain an initial vector; perform multi-layer stacking calculation on the initial vector through the two-layer feedforward neural network to obtain a feature vector; perform normalization processing on the feature vector through the embedding layer to obtain a standard vector; perform probability calculation on the standard vector through the output layer to obtain a prediction probability.
[0091] Optionally, the generation module 305 is specifically configured to:
[0092] Match the disease type corresponding to the online user based on the prediction probability, obtain the disease type corresponding to the online user; query the doctor corresponding to the online user from a preset candidate doctor library based on the disease type; use the disease type and the doctor as the consultation result.
[0093] Further, the server stores the consultation result in a blockchain database, and the specific method is not limited here.
[0094] In the embodiment of the present invention, the diagnosis and treatment behavior data corresponding to the online user is obtained through a preset diagnosis and treatment path model, and a diagnosis and treatment path database is constructed according to the diagnosis and treatment behavior data; the diagnosis and treatment behavior data is extracted from the diagnosis and treatment path database, the diagnosis and treatment behavior data is standardized to obtain standard diagnosis and treatment behavior data, and the standard diagnosis and treatment behavior data is encoded to obtain encoded data; a time sequence is generated according to the encoded data according to a preset time sequence to obtain an input sequence, and the input sequence is vector-converted to obtain an input hidden vector; the input hidden vector is input into a preset diagnostic data processing model for disease data processing to obtain a prediction probability, where the diagnostic data processing model includes an input layer, a two-layer feedforward neural network, an embedding layer, and an output layer; a consultation result corresponding to the online user is generated according to the prediction probability. The present invention improves the efficiency of online consultation by integrating machine learning and neural networks and using a time series prediction model to take the user's consultation path as the acquisition path of the user's diagnosis and treatment data.
[0095] Above Figure 3 And Figure 4The online consultation device in the embodiments of the present invention is described in detail from the perspective of modular functional entities. Next, the online consultation device in the embodiments of the present invention is described in detail from the perspective of hardware processing.
[0096] Figure 5 FIG. 4 is a schematic structural diagram of an online consultation device provided by an embodiment of the present invention. The online consultation device 500 may vary greatly due to different configurations or performances, and may include one or more central processing units (CPUs) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage media 530 may be transient storage or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the online consultation device 500. Further, the processor 510 may be configured to communicate with the storage media 530 and execute a series of instruction operations in the storage media 530 on the online consultation device 500.
[0097] The online consultation device 500 may further include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, and so on. Those skilled in the art can understand that Figure 5 the shown structural diagram of the online consultation device does not limit the online consultation device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0098] The present invention further provides an online consultation device, which includes a memory and a processor. When the computer-readable instructions stored in the memory are executed by the processor, the processor executes the steps of the online consultation method in the above embodiments.
[0099] The present invention further provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer, the computer executes the steps of the online consultation method.
[0100] Further, the computer-readable storage medium may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0101] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, in essence, is a decentralized database, which is a series of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, etc.
[0102] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0103] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This 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 the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0104] As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. An online consultation method, characterized in that, The online consultation method includes: Obtaining the diagnosis and treatment behavior data corresponding to the online user through a preset diagnosis and treatment path model, and constructing a diagnosis and treatment path database according to the diagnosis and treatment behavior data; Extracting the diagnosis and treatment behavior data from the diagnosis and treatment path database, performing standardization processing on the diagnosis and treatment behavior data to obtain standard diagnosis and treatment behavior data, and performing coding processing on the standard diagnosis and treatment behavior data to obtain coded data; Generating a time series according to the coded data in accordance with a preset time series to obtain an input sequence, and performing vector conversion on the input sequence to obtain an input hidden vector; Inputting the input hidden vector into a preset diagnosis data processing model for disease data processing to obtain a prediction probability, wherein the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer; Generating a consultation result corresponding to the online user according to the prediction probability; The extracting the diagnosis and treatment behavior data from the diagnosis and treatment path database, performing standardization processing on the diagnosis and treatment behavior data to obtain standard diagnosis and treatment behavior data, and performing coding processing on the standard diagnosis and treatment behavior data to obtain coded data includes: extracting the diagnosis and treatment behavior data from the diagnosis and treatment path database; performing data cleaning on the diagnosis and treatment behavior data through a preset data warehouse tool to obtain the diagnosis and treatment behavior data after data cleaning; calling a preset function to perform normalization processing on the diagnosis and treatment behavior data after data cleaning to obtain standard diagnosis and treatment behavior data; respectively extracting the problem data and option data in the standard behavior data to obtain target problem data and target option data; performing normalization coding processing on the target problem data and the target option data through a preset natural language processing model to obtain coded data; The performing normalization coding processing on the target problem data and the target option data through a preset natural language processing model to obtain coded data includes: performing text recognition on the target problem data and the target option data through a preset natural language processing model to obtain problem text data and option text data; extracting the same problems in the problem text data, and encoding the same problems in the problem text data as one problem to obtain the processed problem text data, and extracting the same problems in the option text data, and encoding the same options in the option text data as one option to obtain the processed option text data; performing unified coding processing on the processed problem text data and the processed option text data to obtain coded data.
2. The online consultation method according to claim 1, wherein The obtaining the diagnosis and treatment behavior data corresponding to the online user through a preset diagnosis and treatment path model, and constructing a diagnosis and treatment path database according to the diagnosis and treatment behavior data includes: Matching a consultation path corresponding to the online user through a preset diagnosis and treatment path model to obtain a consultation path; Extracting the problem nodes and option nodes in the consultation path, and obtaining the problem data corresponding to the problem nodes and the option data corresponding to the option nodes; Crawling the basic information and chief complaint information corresponding to the online user through a preset crawler; Use the problem data, the option data, the basic information, and the chief complaint information as the diagnosis and treatment behavior data corresponding to the online user, and store the diagnosis and treatment behavior data in a pre-set database to obtain a diagnosis and treatment path database.
3. The online consultation method according to claim 1, wherein Generating a time series according to the pre-set time series and the encoded data to obtain an input series, and performing vector conversion on the input series to obtain an input hidden vector, including: Extract multiple problems from the encoded data, and extract multiple options from the encoded data; Match each problem with the options corresponding to each problem to obtain a problem-option pair corresponding to each problem; Sort the problem-option pairs according to the pre-set time series to obtain an input series; Perform implicit vector encoding processing on the input series to obtain an input hidden vector.
4. The online consultation method according to claim 1, wherein, Input the input hidden vector into a pre-set diagnosis data processing model for disease data processing to obtain a prediction probability, where the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer, including: Input the input hidden vector into a pre-set diagnosis data processing model, where the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer; Perform one-hot vector encoding on the input hidden vector through the input layer to obtain an initial vector; Perform multi-layer stacking calculation on the initial vector through the double-layer feedforward neural network to obtain a feature vector; Perform normalization processing on the feature vector through the embedding layer to obtain a standard vector; Perform probability calculation on the standard vector through the output layer to obtain a prediction probability.
5. The online consultation method according to any one of claims 1-4, characterized in that Generating the consultation result corresponding to the online user according to the prediction probability, including: Match the disease type corresponding to the online user based on the prediction probability to obtain the disease type corresponding to the online user; Query the doctor corresponding to the online user from the pre-set candidate doctor library based on the disease type; Use the disease type and the doctor as the consultation result.
6. An online consultation device, characterized in that, The online consultation device includes: An acquisition module, configured to obtain the diagnosis and treatment behavior data corresponding to the online user through a pre-set diagnosis and treatment path model, and construct a diagnosis and treatment path database according to the diagnosis and treatment behavior data; A processing module, configured to extract the diagnosis and treatment behavior data from the diagnosis and treatment path database, perform normalization processing on the diagnosis and treatment behavior data to obtain standard diagnosis and treatment behavior data, and perform encoding processing on the standard diagnosis and treatment behavior data to obtain encoded data; A conversion module, configured to generate a time series according to the pre-set time series and the encoded data to obtain an input series, and perform vector conversion on the input series to obtain an input hidden vector; A prediction module, configured to input the input hidden vector into a pre-set diagnosis data processing model for disease data processing to obtain a prediction probability, where the diagnosis data processing model includes an input layer, a double-layer feedforward neural network, an embedding layer, and an output layer; A generation module, configured to generate the consultation result corresponding to the online user according to the prediction probability; The processing module further includes: an extraction unit for extracting the diagnosis and treatment behavior data from the diagnosis and treatment path database; a cleaning unit for performing data cleaning on the diagnosis and treatment behavior data through a preset data warehouse tool to obtain the diagnosis and treatment behavior data after data cleaning; a processing unit for calling a preset function to perform normalization processing on the diagnosis and treatment behavior data after data cleaning to obtain standard diagnosis and treatment behavior data; a configuration unit for respectively extracting the problem data and option data from the standard behavior data to obtain target problem data and target option data; an encoding unit for performing normalization encoding processing on the target problem data and the target option data through a preset natural language processing model to obtain encoded data; Specifically, the encoding unit is configured to: perform text recognition on the target problem data and the target option data through a preset natural language processing model to obtain problem text data and option text data; extract the same problems in the problem text data and encode the same problems in the problem text data as one problem to obtain the processed problem text data, and extract the same problems in the option text data and encode the same options in the option text data as one option to obtain the processed option text data; perform unified encoding processing on the processed problem text data and the processed option text data to obtain encoded data.
7. An online consultation device, characterized in that, The online consultation device includes: a memory and at least one processor, and instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the online consultation device executes the online consultation method according to any one of claims 1-5.
8. A computer-readable storage medium, on which instructions are stored, characterized in that, When the instructions are executed by the processor, the online consultation method according to any one of claims 1-5 is implemented.
Citation Information
Patent Citations
Question and answer management method, device and equipment of medical inquiry system and storage medium
CN112035636A
Pronunciation duration prediction method based on duration prediction model and related equipment
CN113870826A