WO2023029501A1 - Smart interrogation method and apparatus, electronic device, and storage medium - Google Patents

Smart interrogation method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2023029501A1
WO2023029501A1 PCT/CN2022/087527 CN2022087527W WO2023029501A1 WO 2023029501 A1 WO2023029501 A1 WO 2023029501A1 CN 2022087527 W CN2022087527 W CN 2022087527W WO 2023029501 A1 WO2023029501 A1 WO 2023029501A1
Authority
WO
WIPO (PCT)
Prior art keywords
consultation
template
target
medical
inquiry
Prior art date
Application number
PCT/CN2022/087527
Other languages
French (fr)
Chinese (zh)
Inventor
陈淼
Original Assignee
康键信息技术(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 康键信息技术(深圳)有限公司 filed Critical 康键信息技术(深圳)有限公司
Publication of WO2023029501A1 publication Critical patent/WO2023029501A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H80/00ICT specially adapted for facilitating communication between medical practitioners or patients, e.g. for collaborative diagnosis, therapy or health monitoring

Definitions

  • the present application relates to the field of digital medical technology, and in particular to an intelligent consultation method, device, electronic equipment and storage medium.
  • the main purpose of the embodiments of the present application is to propose an intelligent medical consultation method, device, electronic equipment and storage medium, aiming at realizing intelligent dialogue and consultation with users and improving consultation efficiency.
  • the embodiment of the present application proposes an intelligent consultation method, which includes:
  • Inquiry is performed according to the question set of the order of inquiry.
  • an intelligent medical inquiry device which includes:
  • the basic medical questioning text acquisition module is used to obtain the basic medical questioning text
  • the entity feature extraction module is used to extract the entity features in the basic medical inquiry text to obtain basic medical inquiry parameters
  • a screening module configured to screen preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates
  • a target consultation template determination module configured to filter the consultation templates in the set of candidate consultation templates according to a preset filtering algorithm to obtain a target consultation template
  • a target node and directed edge determination module configured to determine the target node on the target inquiry template and the directed edge of the target node according to the basic inquiry parameters
  • An inquiry sequence topic set construction module configured to construct an inquiry sequence topic set according to the target node and the directed edge;
  • the consultation module is used to conduct consultation according to the set of questions in the order of consultation.
  • the embodiment of the present application provides an electronic device, the electronic device includes a memory, a processor, a program stored in the memory and operable on the processor, and a program for implementing the processor
  • a data bus connecting and communicating with the memory when the program is executed by the processor, an intelligent consultation method is implemented, wherein the intelligent consultation includes: obtaining basic medical consultation text; The entity features in the medical questioning text are extracted to obtain basic medical questioning parameters; the preset medical questioning templates are screened according to the basic medical questioning parameters to obtain a set of candidate medical questioning templates; the set of candidate medical questioning templates is obtained according to the preset filtering algorithm
  • the consultation templates in the candidate consultation template set are filtered to obtain the target consultation template; the target nodes on the target consultation template and the directed edges of the target nodes are determined according to the basic consultation parameters;
  • the target node and the directed edge construct an inquiry sequence topic set; conduct an inquiry according to the inquiry sequence topic set.
  • the embodiment of the present application provides a computer-readable storage medium for computer-readable storage, the computer-readable storage medium stores one or more programs, and the one or more programs can be stored by one Or a plurality of processors are executed to realize a method of intelligent medical consultation, wherein the intelligent medical consultation includes: obtaining basic medical consultation text; performing feature extraction on entity features in the basic medical consultation text to obtain basic medical consultation Parameters; filter the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates; filter the consultation templates in the set of candidate consultation templates according to a preset filtering algorithm to obtain Target medical inquiry template; determine the target node and the directed edge of the target node on the target medical inquiry template according to the basic medical inquiry parameters; construct a question set of question order according to the target node and the directed edge ; Inquiry is performed according to the question set of the order of inquiry.
  • the intelligent medical questioning method, device, electronic equipment and storage medium proposed in this application can obtain basic medical questioning parameters by obtaining basic medical questioning texts and extracting entity features in the basic medical questioning texts.
  • the feature extraction of the basic question text reduces the data space of the basic question text, making it easier to extract the required basic question parameters; and then screens the preset question templates according to the basic question parameters to obtain candidate questions A collection of diagnosis templates, eliminating templates that are less relevant to the current consultation needs.
  • the consultation templates in the candidate consultation template set can be further filtered according to the preset filtering algorithm to obtain the target consultation template. This method shortens the screening time of consultation templates and improves the The match between the selected consultation template and the current consultation needs.
  • the consultation process can be further optimized, making the questions in the consultation process more suitable for the current consultation needs, realizing the intelligent and The user dialogue consultation improves the efficiency of consultation.
  • Fig. 1 is a flow chart of the intelligent consultation method provided by the embodiment of the present application.
  • Fig. 2 is the flowchart of step S102 in Fig. 1;
  • Fig. 3 is the flowchart of step S104 in Fig. 1;
  • Fig. 4 is the flowchart of step S304 in Fig. 3;
  • Fig. 5 is another flowchart of step S304 in Fig. 3;
  • Fig. 6 is the flowchart of step S105 in Fig. 1;
  • Fig. 7 is the flowchart of step S107 in Fig. 1;
  • Fig. 8 is a schematic structural diagram of an intelligent medical inquiry device provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • Artificial intelligence It is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science. Intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a manner similar to human intelligence. Research in this field includes robotics, language recognition, image recognition, natural language processing, and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a 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.
  • Natural language processing uses computers to process, understand and use human languages (such as Chinese, English, etc.). NLP belongs to a branch of artificial intelligence and is an interdisciplinary subject between computer science and linguistics. Known as computational linguistics. Natural language processing includes syntax analysis, semantic analysis, text understanding, etc. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information retrieval, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves language processing Related data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research and linguistics research related to language computing, etc.
  • a directed graph D refers to an ordered triplet (V(D), A(D), ⁇ D), where ⁇ D) is an association function, which makes each element in A(D) (called directed edges or arcs) corresponds to an ordered pair of elements (called vertices or points) in V(D).
  • Information Extraction A text processing technology that extracts specified types of factual information such as entities, relationships, and events from natural language texts, and forms structured data output.
  • Information extraction is a technique to extract specific information from text data.
  • Text data is composed of some specific units, such as sentences, paragraphs, and chapters.
  • Text information is composed of some small specific units, such as words, words, phrases, sentences, paragraphs, or combinations of these specific units. . Extracting noun phrases, personal names, and place names in text data is all text information extraction.
  • the information extracted by text information extraction technology can be various types of information.
  • Collaborative filtering algorithm It is a relatively well-known and commonly used recommendation algorithm. It discovers user preferences based on mining historical user behavior data, and predicts products that users may like to recommend, or finds similar users (based on users) or Items (based on items). The realization of the user-based collaborative filtering algorithm mainly needs to solve two problems. One is how to find people who have similar hobbies as you, that is, to calculate the similarity of data.
  • BERT Bit Encoder Representations from Transformers: It is a language representation model. BERT uses the Transformer Encoder block for connection, which is a typical two-way encoding model.
  • MEMM Maximum Entropy Markov Model
  • Conditional random field algorithm It is a mathematical algorithm; it combines the characteristics of the maximum entropy model and the hidden Markov model, and is an undirected graph model. It has achieved good results in sequence labeling tasks such as entity recognition.
  • the conditional random field is a typical discriminant model, and its joint probability can be written as the multiplication of several potential functions, the most commonly used of which is the linear chain conditional random field.
  • the CRF model of the linear chain Define the joint conditional probability of the state sequence as p(y
  • LSTM Long Short-Term Memory
  • RNN cyclic neural network
  • All RNNs have a A chain form of repeated neural network modules. In standard RNNs, this repeated structural module has only a very simple structure, such as a tanh layer.
  • LSTM is a type of neural network that contains LSTM blocks (blocks) or others. In literature or other materials, LSTM blocks may be described as intelligent network units because they can memorize values for an indefinite length of time. There is a The gate can determine whether the input is important enough to be remembered and whether it can be output.
  • Bi-LSTM Bi-directional Long Short-Term Memory
  • Bi-LSTM It is a combination of forward LSTM and backward LSTM. It is often used to model contextual information in natural language processing tasks.
  • Bi-LSTM combines the information of the input sequence in both forward and backward directions.
  • the forward LSTM layer has the information of time t and the previous time in the input sequence
  • the backward LSTM layer has the information of time t and the subsequent time in the input sequence.
  • the output of the forward LSTM layer at time t is denoted as
  • the output result of the backward LSTM layer at time t is denoted as
  • the vectors output by the two LSTM layers can be processed by adding, averaging or connecting.
  • AI Artificial Intelligence
  • 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 technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • Medical cloud refers to the use of "cloud computing" to create a medical and health service cloud platform based on new technologies such as cloud computing, mobile technology, multimedia, 4G communication, big data, and the Internet of Things, combined with medical technology, and realizes the realization of medical resources. sharing and expansion of medical coverage. Due to the combination of cloud computing technology, medical cloud improves The efficiency of medical institutions and the convenience for residents to seek medical treatment. For example, appointment registration, electronic medical records, and medical insurance in hospitals are all products of the combination of cloud computing and the medical field. Medical cloud also has the advantages of data security, information sharing, dynamic expansion, and overall layout.
  • the embodiments of the present application provide an intelligent medical consultation method, device, electronic equipment, and storage medium, which can realize intelligent dialogue and consultation with users, and improve the efficiency of medical consultation.
  • the consultation method provided in the embodiment of the present application can be applied to intelligent diagnosis and treatment and remote consultation.
  • the medical inquiry method, device, electronic device, and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the intelligent medical inquiry method in the embodiments of the present application is described.
  • the intelligent consultation method provided in the embodiment of the present application relates to the field of digital medical technology.
  • the intelligent medical inquiry method provided by the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running on a terminal or a server.
  • the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.
  • the server end can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or It can be configured as a cloud 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, CDN, and big data and artificial intelligence platforms.
  • the server; the software can be an application to realize the consultation method, but is not limited to the above forms.
  • Fig. 1 is an optional flow chart of the intelligent consultation method provided by the embodiment of the present application.
  • the method in Fig. 1 may include but not limited to steps S101 to S107.
  • Step S101 obtaining the basic medical inquiry text
  • Step S102 performing feature extraction on entity features in the basic medical questioning text to obtain basic medical questioning parameters
  • Step S103 screening the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates
  • Step S104 according to the preset filtering algorithm, filter the consultation templates in the candidate consultation template set to obtain the target consultation template;
  • Step S105 determine the target node and the directed edge of the target node on the target consultation template according to the basic consultation parameters
  • Step S106 constructing a sequential question set for consultation according to the target node and the directed edge
  • Step S107 conduct medical inquiry according to the question set of the order of medical inquiry.
  • the basic medical questioning text can be obtained through the pre-set pre-set pre-guidance system and the basic question and answer with the patient, and the basic medical questioning text is a natural language text.
  • Feature extraction is performed on the entity features in the basic medical questioning text to obtain the basic medical questioning parameters, where the basic medical questioning parameters include age information, gender information, chief complaint information, etc.
  • the chief complaint information is mainly the patient's current physical condition , a description of self-discomfort conditions, etc.
  • the preset consultation templates are screened, and the consultation templates in the consultation template library that are less relevant to the current consultation requirements are eliminated to obtain candidate questions.
  • Diagnosis template collection Specifically, the screening conditions can be determined according to the age range, gender requirements, and diagnostic departments corresponding to the consultation template, and according to the matching relationship between the preset screening conditions and the current patient's age information, gender information, and chief complaint information, the unqualified patients can be eliminated.
  • the reserved medical questioning templates are used as a set of candidate medical questioning templates, so as to further screen the medical questioning templates according to the set of candidate medical questioning templates.
  • the consultation templates classify the consultation templates according to the preset gender requirements, and select the consultation templates of the same gender according to the gender of the current patient; or, according to the keywords included in the chief complaint information (such as heart, stomach, skin, brain, etc.) etc.) to determine the corresponding diagnostic department, and eliminate the consultation templates that do not belong to the diagnostic department.
  • the consultation templates in the candidate consultation template set are filtered to obtain the target consultation template.
  • the similarity between the consultation template and the current patient's appeal can be calculated or The correlation degree is used to determine the target consultation template, and the target consultation template is used in the subsequent consultation process.
  • the target consultation template determines the target node and the directed edge of the target node on the target consultation template according to the basic consultation parameters, and then construct the consultation order according to the target node and the directed edge
  • the question set which integrates the questions corresponding to the target node and the questions corresponding to the next target node reached by the directed edge of the target node to form a sequential question set of questions, and finally conduct consultation according to the question set of the order of consultation, for example, the patient It can answer the questions selected in the question set of the questioning sequence.
  • the questioning template system can also determine the target node currently staying in the questioning process. By calculating the subsequent directed edges of the target node, the optimal effective point can be determined.
  • the consultation process can be further optimized, making the questions in the consultation process more suitable for the current consultation needs, realizing the intelligent and The user dialogue consultation improves the efficiency of consultation.
  • the above data is medical data, such as personal health records, prescriptions, examination reports and other data.
  • the above-mentioned basic medical questioning text is a medical text
  • the medical text may be a medical electronic record (Electronic Healthcare Record), electronic personal health records, including medical records, electrocardiograms, medical images, and a series of electronic records that are valuable for future reference.
  • medical electronic record Electronic Healthcare Record
  • electronic personal health records including medical records, electrocardiograms, medical images, and a series of electronic records that are valuable for future reference.
  • step S102 may include but not limited to include steps S201 to S203:
  • Step S201 identifying entity features in the basic medical inquiry text
  • Step S202 using a pre-trained sequence classifier to classify entity features
  • Step S203 performing feature extraction on the entity features after classification processing to obtain basic consultation parameters.
  • the pre-trained sequence classifier can be a maximum entropy Markov model (MEMM model) or a model based on a conditional random field algorithm (CRF) or a two-way long-short-term memory algorithm ( bi-LSTM) model.
  • MEMM model maximum entropy Markov model
  • CRF conditional random field algorithm
  • bi-LSTM two-way long-short-term memory algorithm
  • the input word wi and character embedding through left-to-right long-short-term memory and right-to-left long-short-term memory, make the output
  • the concatenated positions generate a single output layer.
  • the sequence classifier can pass the input entity features directly to the softmax classifier through this output layer, and create a probability distribution on the preset label through the softmax classifier, so as to mark and classify the entity parameters according to the probability distribution, and finally After the classification process, the entity features are extracted to obtain the basic consultation parameters.
  • the feature extraction of the basic consultation text reduces the data space of the basic consultation text, making it easier to extract the required basic consultation parameters. Improve matching efficiency.
  • step S104 may include, but is not limited to, step S301 to step S304:
  • Step S301 using the pre-trained automatic text generation model to process the chief complaint information and the consultation templates in the candidate consultation template set, and generate the chief complaint text string and the medical consultation template text string;
  • Step S302 performing encoding processing on the chief complaint text string and the consultation template text string respectively, to obtain the chief complaint text string and the consultation template text string in the coded form;
  • Step S303 calculating the similarity between the chief complaint text string in coded form and the question template text string in each coded form
  • Step S304 according to the size relationship between all the similarities and the size relationship between the similarity and the preset similarity threshold, the target consultation template is obtained.
  • the pre-trained automatic text generation model may be a keyword-based automatic text generation model, and the text automatic generation model may perform different data processing according to the type of input data.
  • the current input is a text sentence or field
  • the candidate sentences are copied and supplemented, and a text string is generated according to the supplemented candidate sentences.
  • the main complaint information and the medical questioning templates in the candidate medical questioning template set can be processed more conveniently, and the chief complaint text string and the medical questioning template text string are generated.
  • the chief complaint text string and the inquiry template text string are respectively encoded by a preset encoder, which can be a BERT-based encoder, that is, by obtaining the chief complaint information and the inquiry template, and
  • the main complaint information and the consultation template are tokenized, and the BERT token generator is constructed, and the BERT token generator is pre-trained to form a BERT encoder that meets the requirements, so that the BERT encoder can use the preset encoding function to
  • the chief complaint text string and the consultation template text string are converted from the text form into the coded form, and the chief complaint text string in the coded form and the consultation template text string in the coded form are obtained.
  • the similarity between the main complaint text string in the coded form and the question template text string in each coded form is calculated through the collaborative filtering algorithm.
  • the collaborative filtering algorithm may be a Jaccard similarity coefficient method, an included angle cosine method, or a similarity measurement method such as Euclidean distance or Manhattan distance, without limitation.
  • the target inquiry template is obtained by comparing the size of all similarities and the size of each similarity with the preset similarity threshold. This method shortens the screening time of the consultation template, and also improves the matching between the selected consultation template and the current consultation demand.
  • step S304 may include but not limited to include steps S401 to S402:
  • Step S401 according to the size relationship among all the similarities, determine the consultation template with the highest similarity
  • Step S402 if the similarity of the medical inquiry template with the highest similarity is greater than or equal to the preset similarity threshold, use the medical inquiry template with the highest similarity as the target medical inquiry template.
  • the similarity between the chief complaint text string in the coded form and the text string in each coded form of the medical inquiry template is calculated through the collaborative filtering algorithm, and the chief complaint text string in the coded form is compared
  • the size relationship between the similarity with each coded form of the query template text string determines the query template with the highest similarity; further, in order to make the configured query template more accurately match the current query requirements, It is also possible to determine whether to use the highest similarity template for consultation by comparing the similarity of the highest similarity template with the preset similarity threshold.
  • the consultation template with the highest similarity matches the current consultation needs and can meet the consultation requirements, and the consultation template with the highest similarity is used as the target consultation template. This method shortens the screening time of the consultation template, and also improves the matching between the selected consultation template and the current consultation demand.
  • step S304 may also include but not limited to include steps S501 to S502:
  • Step S501 according to the size relationship among all the similarities, determine the consultation template with the highest similarity
  • Step S502 if the similarity of the question template with the highest similarity is less than the preset similarity threshold, obtain a preset reference question template, and use the preset reference question template as a target question template.
  • the similarity between the chief complaint text string in the coded form and the consultation template text string in each coded form is calculated through the collaborative filtering algorithm, and the chief complaint text string in the coded form is compared with the consultation template in each coded form.
  • the size relationship between the similarities of template text strings after determining the highest similarity inquiry template, compare the similarity of the highest similarity inquiry template with the size of the preset similarity threshold, if the highest similarity inquiry template If the similarity of the template is less than the preset similarity threshold, it indicates that the query template with the highest similarity is poorly matched with the current consultation and cannot meet the requirements of the consultation.
  • the reference inquiry template is used as the target inquiry template.
  • step S105 in some embodiments may include but not limited to steps S601 to S604:
  • Step S601 according to the basic consultation parameters, determine the target node on the target consultation template
  • Step S602 acquiring the script data of each directed edge of the target node
  • Step S603 calculating the weight of each directed edge according to the script data
  • Step S604 according to the weight of each directed edge, determine the directed edge of the target node.
  • the nodes that collect the same information on the target consultation template can be skipped, and the nodes that do not collect question and answer information in the nodes are used as target nodes, and then according to The order of the nodes in the directed graph can determine the directed edge corresponding to each target node.
  • the script data such as groovy script, etc.
  • the context information includes the option answer selected by the patient in history. Analyze and calculate each directed edge of the target node according to the script data and context information, and obtain the weight of each directed edge.
  • the preset assignment function (such as the add_weighted_edges_from function) to assign an initial weight to each directed edge, modify and adjust the initial weight according to the script data and context information, and use the get_edge_data function to read the modified , compare the modified weight of each directed edge on the target node, and use the directed edge with the highest weight as the optimal directed edge of the target node, and use the optimal directed edge to determine the weight of the next target node position, and then determine the optimal directed edge of the next target node through weight calculation. Repeat this operation in the directed graph corresponding to the current consultation template. Through these target nodes and optimal directed edges, the order of the target nodes can be obtained.
  • the preset assignment function such as the add_weighted_edges_from function
  • a set of questions in the order of questions that meet the needs of the current questioning is produced, and the question set is used to make inquiries.
  • This method can further optimize the problem by identifying and determining the target nodes and directed edges of the target questioning template.
  • the consultation process makes the questions in the consultation process more suitable for the current consultation needs, realizes intelligent dialogue and consultation with users, and improves the efficiency of consultation.
  • step S107 may include but not limited to include steps S701 to S702:
  • Step S701 extracting attribute information of the target node
  • step S702 according to the attribute information, the Q&A data fed back by the client at the target node is formatted and assembled to obtain text data; the text data is used for the user to interact with Q&A.
  • the format of the Q&A data fed back by the client at the target node is assembled to obtain text data.
  • the question and option information of the data obtained by the external dynamic call node is packaged into a text node format and displayed to the user, waiting for the user to perform the next round of interaction.
  • the question and answer information returned in the previous step of the question template the user can answer the selected answers to the questions in the question set of the question sequence.
  • the question template system can also determine the current target node in the question process.
  • the subsequent directed edge is calculated to determine the optimal directed edge, and then jumps to the next target node, and answers the question selection answer of the next target node, repeating the process of jumping to the question and answer. Finally, through multiple rounds of interaction with the user, the question-and-answer interaction during the consultation process can be completed.
  • the entity features in the basic medical questioning text are extracted to obtain the basic medical questioning parameters.
  • This method can realize the feature extraction of the basic medical questioning text and reduce the size of the basic medical questioning text.
  • the data space makes it easier to extract the required basic consultation parameters; and then filter the preset consultation templates according to the age information, gender information and chief complaint information included in the basic consultation parameters to obtain a set of candidate consultation templates , eliminating the consultation templates that are less relevant to the current consultation needs.
  • the consultation templates in the candidate consultation template set can be further filtered according to the preset filtering algorithm to obtain the target consultation template. This method shortens the screening time of consultation templates and improves the The match between the selected consultation template and the current consultation needs.
  • the consultation process can be further optimized, making the questions in the consultation process more suitable for the current consultation needs, realizing the intelligent and The user dialogue consultation improves the efficiency of consultation.
  • the embodiment of the present application also provides an intelligent medical consultation device, which can realize the above-mentioned intelligent medical consultation method, and the device includes:
  • the entity feature extraction module 802 is used to extract the entity features in the basic medical inquiry text to obtain the basic medical inquiry parameters;
  • the screening module 803 is used to screen the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates;
  • the target medical inquiry template determination module 804 is used to filter the medical question templates in the candidate medical question template set according to the preset filtering algorithm to obtain the target medical question template;
  • An inquiry sequence topic set construction module 806, configured to construct an inquiry sequence topic set according to the target node and the directed edge;
  • the medical inquiry module 807 is used to conduct medical inquiry according to the sequence of question sets.
  • the entity feature extraction module 802 when the entity feature extraction module 802 performs feature extraction on the entity features in the basic medical inquiry text to obtain the basic medical inquiry parameters, it is mainly used to identify the entity features in the basic medical inquiry text;
  • the sequence classifier classifies the entity features; extracts the features of the entity features after the classification process, and obtains the basic consultation parameters.
  • the target consultation template determination module 804 when the target consultation template determination module 804 performs feature extraction on the entity features in the basic consultation text to obtain the basic consultation parameters, it is mainly used to use the pre-trained text automatic generation model to analyze the chief complaint information and
  • the question templates in the candidate question template set are processed to generate the chief complaint text string and the question template text string;
  • the chief complaint text string and the question template text string are respectively encoded to obtain the chief complaint text string and the coded form Inquiry template text string; calculate the similarity between the main complaint text string in the coded form and each coded form of the inquiry template text string; according to the size relationship between all similarities and the size relationship between the similarity and the preset similarity threshold , to get the target consultation template. .
  • the target consultation template is obtained according to the size relationship between all the similarities and the size relationship between the similarity and the preset similarity threshold.
  • the inquiry template with the highest similarity can be determined according to the size relationship between all similarities; if the similarity of the inquiry template with the highest similarity is greater than or equal to the preset similarity threshold, the inquiry template with the highest similarity
  • the template serves as the target consultation template. If the similarity of the question template with the highest similarity is less than the preset similarity threshold, a preset reference question template is obtained, and the preset reference question template is used as a target question template.
  • the target node and directed edge determination module 805 determines the target node and the directed edge of the target node on the target consultation template according to the basic consultation parameters, it is mainly used to, according to the basic consultation parameters, Determine the target node on the target consultation template; obtain the script data of each directed edge of the target node; calculate the weight of each directed edge according to the script data; determine the weight of each directed edge according to the weight of each directed edge There is an edge.
  • the inquiry module 807 is mainly used to extract the attribute information of the target node when conducting an inquiry according to the question set of the order of inquiry; and to assemble the format of the question and answer data fed back by the client at the target node according to the attribute information , get the text data; the text data is used for the user to conduct question-and-answer interactions.
  • the embodiment of the present application also provides an electronic device, the electronic device includes: a memory, a processor, a program stored in the memory and operable on the processor, and a data bus for realizing connection and communication between the processor and the memory , when the program is executed by the processor, the above-mentioned intelligent interrogation method is realized.
  • the electronic device may be any intelligent terminal including a tablet computer, a vehicle-mounted computer, and the like.
  • FIG. 9 illustrates a hardware structure of an electronic device in another embodiment.
  • the electronic device includes:
  • the processor 901 may be implemented by a general-purpose CPU (Central Processing Unit, central processing unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute related programs, so as to realize The technical scheme provided by the embodiment of the present application;
  • a general-purpose CPU Central Processing Unit, central processing unit
  • a microprocessor an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute related programs, so as to realize The technical scheme provided by the embodiment of the present application;
  • ASIC Application Specific Integrated Circuit
  • the memory 902 may be implemented in the form of a read-only memory (ReadOnlyMemory, ROM), a static storage device, a dynamic storage device, or a random access memory (RandomAccessMemory, RAM).
  • the memory 902 can store operating systems and other application programs.
  • the relevant program codes are stored in the memory 902, and are invoked by the processor 901 to execute an intelligent Inquiry method;
  • the input/output interface 903 is used to realize information input and output
  • the communication interface 904 is used to realize the communication and interaction between the device and other devices, and the communication can be realized through a wired method (such as USB, network cable, etc.), or can be realized through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.); and
  • Bus 905 which transfers information between various components of the device (such as processor 901, memory 902, input/output interface 903, and communication interface 904);
  • the processor 901 , the memory 902 , the input/output interface 903 and the communication interface 904 are connected to each other within the device through the bus 805 .
  • the intelligent interrogation improved by the embodiment of the present application includes: obtaining the basic interrogation text; performing feature extraction on the entity features in the basic interrogation text to obtain the basic interrogation parameters; Perform screening to obtain a set of candidate consultation templates; filter the consultation templates in the set of candidate consultation templates according to the preset filtering algorithm to obtain the target consultation template; determine the target on the target consultation template according to the basic consultation parameters
  • An embodiment of the present application also provides a computer-readable storage medium for computer-readable storage.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement an intelligent medical inquiry method, wherein the intelligent medical inquiry includes: obtaining basic medical inquiry text; Feature extraction is performed on the entity features in the basic question text to obtain basic question parameters; the preset question templates are screened according to the basic question parameters to obtain a set of candidate question templates; the candidate question Filter the inquiry templates in the diagnosis template set to obtain the target inquiry template; determine the target node and the directed edge of the target node on the target inquiry template according to the basic inquiry parameters; construct the inquiry according to the target node and the directed edge Sequential topic set; conduct interrogation according to the sequential topic set.
  • memory can be used to store non-transitory software programs and non-transitory computer-executable programs.
  • the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices.
  • the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including multiple instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM for short), magnetic disk or optical disk, etc., which can store programs. medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Public Health (AREA)
  • Primary Health Care (AREA)
  • Human Computer Interaction (AREA)
  • Epidemiology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

Embodiments of the present application belong to the technical field of digital medical treatment, and provide a smart interrogation method and apparatus, an electronic device, and a storage medium. The method comprises: acquiring a basic interrogation text; performing feature extraction on entity features in the basic interrogation text, and obtaining basic interrogation parameters; according to the basic interrogation parameters, screening preset interrogation templates, and obtaining a candidate interrogation template set; according to a preset filtering algorithm, filtering the interrogation templates in the candidate interrogation template set , and obtaining a target interrogation template; according to the basic interrogation parameters, determining a target node on the target interrogation template as well as a directed edge of the target node; according to the target node and the directed edge, constructing an interrogation sequential question set; and, according to the interrogation sequential question set, performing interrogation. In the embodiments of the present application, smart dialogue with a user can be achieved for interrogation, improving interrogation efficiency.

Description

智能问诊方法、装置、电子设备及存储介质Intelligent consultation method, device, electronic equipment and storage medium
本申请要求于2021年8月30日提交中国专利局、申请号为202111007751.2,发明名称为“智能问诊方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111007751.2 submitted to the China Patent Office on August 30, 2021, and the invention title is "Intelligent consultation method, device, electronic equipment and storage medium", the entire content of which is incorporated by reference incorporated in this application.
技术领域technical field
本申请涉及数字医疗技术领域,尤其涉及一种智能问诊方法、装置、电子设备及存储介质。The present application relates to the field of digital medical technology, and in particular to an intelligent consultation method, device, electronic equipment and storage medium.
背景技术Background technique
目前,在用户问诊流程中,医生往往需要对每个用户重复询问类似问题,影响问诊时间和问诊效率。发明人意识到相关技术中常常采用机器导诊的方式对用户进行简单的问询,并不能有效地缩短问诊时间,影响问诊效率,因此,如何提供实现智能化地与用户对话问诊,提高问诊效率,成为了亟待解决的技术问题。At present, in the process of user consultation, doctors often need to repeatedly ask similar questions for each user, which affects the consultation time and consultation efficiency. The inventor realizes that in related technologies, machine guidance is often used to conduct simple inquiries to users, which cannot effectively shorten the consultation time and affect the efficiency of consultation. Therefore, how to provide intelligent dialogue and consultation with users, Improving the efficiency of consultation has become a technical problem that needs to be solved urgently.
技术问题technical problem
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics described in detail in this article. This summary is not intended to limit the scope of the claims.
本申请实施例的主要目的在于提出一种智能问诊方法、装置、电子设备及存储介质,旨在实现智能化地与用户对话问诊,提高问诊效率。The main purpose of the embodiments of the present application is to propose an intelligent medical consultation method, device, electronic equipment and storage medium, aiming at realizing intelligent dialogue and consultation with users and improving consultation efficiency.
技术解决方案technical solution
第一方面,本申请实施例提出了一种智能问诊方法,所述方法包括:In the first aspect, the embodiment of the present application proposes an intelligent consultation method, which includes:
获取基本问诊文本;Obtain basic medical inquiry text;
对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;Carrying out feature extraction on entity features in the basic medical inquiry text to obtain basic medical inquiry parameters;
根据所述基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;Screening the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates;
根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;Filtering the consultation templates in the set of candidate consultation templates according to a preset filtering algorithm to obtain a target consultation template;
根据所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边;determining the target node on the target consultation template and the directed edges of the target node according to the basic consultation parameters;
根据所述目标节点和所述有向边构建问诊顺序题目集;Constructing an inquiry sequence topic set according to the target node and the directed edge;
根据所述问诊顺序题目集进行问诊。Inquiry is performed according to the question set of the order of inquiry.
第二方面,本申请实施例提出了一种智能问诊装置,所述装置包括:In the second aspect, the embodiment of the present application proposes an intelligent medical inquiry device, which includes:
基本问诊文本获取模块,用于获取基本问诊文本;The basic medical questioning text acquisition module is used to obtain the basic medical questioning text;
实体特征提取模块,用于对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;The entity feature extraction module is used to extract the entity features in the basic medical inquiry text to obtain basic medical inquiry parameters;
筛选模块,用于根据所述基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;A screening module, configured to screen preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates;
目标问诊模板确定模块,用于根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;A target consultation template determination module, configured to filter the consultation templates in the set of candidate consultation templates according to a preset filtering algorithm to obtain a target consultation template;
目标节点及有向边确定模块,用于根据所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边;A target node and directed edge determination module, configured to determine the target node on the target inquiry template and the directed edge of the target node according to the basic inquiry parameters;
问诊顺序题目集构建模块,用于根据所述目标节点和所述有向边构建问诊顺序题目集;An inquiry sequence topic set construction module, configured to construct an inquiry sequence topic set according to the target node and the directed edge;
问诊模块,用于根据所述问诊顺序题目集进行问诊。The consultation module is used to conduct consultation according to the set of questions in the order of consultation.
第三方面,本申请实施例提出了一种电子设备,所述电子设备包括存储器、处理器、存储在所述存储器上并可在所述处理器上运行的程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,所述程序被所述处理器执行时实现一种智能问诊方法,其中,所述智能问诊包括:获取基本问诊文本;对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;根据所述基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;根据所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边;根据所述目标节点和所述有向边构建问诊顺序题目集;根据所述问诊顺序题目集进行问诊。In the third aspect, the embodiment of the present application provides an electronic device, the electronic device includes a memory, a processor, a program stored in the memory and operable on the processor, and a program for implementing the processor A data bus connecting and communicating with the memory, when the program is executed by the processor, an intelligent consultation method is implemented, wherein the intelligent consultation includes: obtaining basic medical consultation text; The entity features in the medical questioning text are extracted to obtain basic medical questioning parameters; the preset medical questioning templates are screened according to the basic medical questioning parameters to obtain a set of candidate medical questioning templates; the set of candidate medical questioning templates is obtained according to the preset filtering algorithm The consultation templates in the candidate consultation template set are filtered to obtain the target consultation template; the target nodes on the target consultation template and the directed edges of the target nodes are determined according to the basic consultation parameters; The target node and the directed edge construct an inquiry sequence topic set; conduct an inquiry according to the inquiry sequence topic set.
第四方面,本申请实施例提出了一种计算机可读存储介质,用于计算机可读存储,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现一种智能问诊方法,其中,所述智能问诊包括:获取基本问诊文本;对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;根据所述基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;根据所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边;根据所述目标节点和所述有向边构建问诊顺序题目集;根据所述问诊顺序题目集进行问诊。In the fourth aspect, the embodiment of the present application provides a computer-readable storage medium for computer-readable storage, the computer-readable storage medium stores one or more programs, and the one or more programs can be stored by one Or a plurality of processors are executed to realize a method of intelligent medical consultation, wherein the intelligent medical consultation includes: obtaining basic medical consultation text; performing feature extraction on entity features in the basic medical consultation text to obtain basic medical consultation Parameters; filter the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates; filter the consultation templates in the set of candidate consultation templates according to a preset filtering algorithm to obtain Target medical inquiry template; determine the target node and the directed edge of the target node on the target medical inquiry template according to the basic medical inquiry parameters; construct a question set of question order according to the target node and the directed edge ; Inquiry is performed according to the question set of the order of inquiry.
有益效果Beneficial effect
本申请提出的智能问诊方法、装置、电子设备及存储介质,其通过获取基本问诊文本,对基本问诊文本中的实体特征进行特征提取,得到基本问诊参数,这一方式能够实现对基本问诊文本的特征抽取,缩小基本问诊文本的数据空间,使得更为方便提取到所需要的基本问诊参数;进而根据基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合,剔除了与当前问诊需求的相关性较低的问诊模板。这样一来,便可进一步地根据预设的过滤算法对候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板,这一方式缩短了问诊模板的筛选时间,也提高了选定的问诊模板与当前问诊需求的匹配性。在得到目标问诊模板后,根据基本问诊参数确定目标问诊模板上的目标节点及目标节点的有向边,再根据目标节点和有向边构建问诊顺序题目集,最后根据问诊顺序题目集进行问诊。通过对目标问诊模板的目标节点和有向边的识别与确定,能够进一步地优化问诊过程,使得问诊过程中的问诊题目更加贴合当前的问诊需求,实现了智能化地与用户对话问诊,提高了问诊效率。The intelligent medical questioning method, device, electronic equipment and storage medium proposed in this application can obtain basic medical questioning parameters by obtaining basic medical questioning texts and extracting entity features in the basic medical questioning texts. The feature extraction of the basic question text reduces the data space of the basic question text, making it easier to extract the required basic question parameters; and then screens the preset question templates according to the basic question parameters to obtain candidate questions A collection of diagnosis templates, eliminating templates that are less relevant to the current consultation needs. In this way, the consultation templates in the candidate consultation template set can be further filtered according to the preset filtering algorithm to obtain the target consultation template. This method shortens the screening time of consultation templates and improves the The match between the selected consultation template and the current consultation needs. After obtaining the target consultation template, determine the target node and the directed edge of the target node on the target consultation template according to the basic consultation parameters, and then construct the question set of the question order according to the target node and the directed edge, and finally according to the question order Question set for consultation. Through the identification and determination of the target nodes and directed edges of the target consultation template, the consultation process can be further optimized, making the questions in the consultation process more suitable for the current consultation needs, realizing the intelligent and The user dialogue consultation improves the efficiency of consultation.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the application will be set forth in the description which follows, and, in part, will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
附图说明Description of drawings
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present application, and constitute a part of the specification, and are used together with the embodiments of the present application to explain the technical solution of the present application, and do not constitute a limitation to the technical solution of the present application.
图1是本申请实施例提供的智能问诊方法的流程图;Fig. 1 is a flow chart of the intelligent consultation method provided by the embodiment of the present application;
图2是图1中的步骤S102的流程图;Fig. 2 is the flowchart of step S102 in Fig. 1;
图3是图1中的步骤S104的流程图;Fig. 3 is the flowchart of step S104 in Fig. 1;
图4是图3中的步骤S304的流程图;Fig. 4 is the flowchart of step S304 in Fig. 3;
图5是图3中的步骤S304的另一流程图;Fig. 5 is another flowchart of step S304 in Fig. 3;
图6是图1中的步骤S105的流程图;Fig. 6 is the flowchart of step S105 in Fig. 1;
图7是图1中的步骤S107的流程图;Fig. 7 is the flowchart of step S107 in Fig. 1;
图8是本申请实施例提供的智能问诊装置的结构示意图;Fig. 8 is a schematic structural diagram of an intelligent medical inquiry device provided by an embodiment of the present application;
图9是本申请实施例提供的电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application.
需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although the functional modules are divided in the schematic diagram of the device, and the logical sequence is shown in the flowchart, in some cases, it can be executed in a different order than the module division in the device or the flowchart in the flowchart. steps shown or described. The terms "first", "second" and the like in the specification and claims and the above drawings are used to distinguish similar objects, and not necessarily used to describe a specific sequence or sequence.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
首先,对本申请中涉及的若干名词进行解析:First, analyze some nouns involved in this application:
人工智能(artificial intelligence,AI):是研究、开发用于模拟、延伸和扩展人的智能的理论、方法、技术及应用系统的一门新的技术科学;人工智能是计算机科学的一个分支,人工智能企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器,该领域的研究包括机器人、语言识别、图像识别、自然语言处理和专家系统等。人工智能可以对人的意识、思维的信息过程的模拟。人工智能还是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。Artificial intelligence (AI): It is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science. Intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a manner similar to human intelligence. Research in this field includes robotics, language recognition, image recognition, natural language processing, and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a 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.
自然语言处理(natural language processing,NLP): NLP用计算机来处理、理解以及运用人类语言(如中文、英文等),NLP属于人工智能的一个分支,是计算机科学与语言学的交叉学科,又常被称为计算语言学。自然语言处理包括语法分析、语义分析、篇章理解等。自然语言处理常用于机器翻译、手写体和印刷体字符识别、语音识别及文语转换、信息检索、信息抽取与过滤、文本分类与聚类、舆情分析和观点挖掘等技术领域,它涉及与语言处理相关的数据挖掘、机器学习、知识获取、知识工程、人工智能研究和与语言计算相关的语言学研究等。Natural language processing (NLP): NLP uses computers to process, understand and use human languages (such as Chinese, English, etc.). NLP belongs to a branch of artificial intelligence and is an interdisciplinary subject between computer science and linguistics. Known as computational linguistics. Natural language processing includes syntax analysis, semantic analysis, text understanding, etc. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information retrieval, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves language processing Related data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research and linguistics research related to language computing, etc.
有向图:一个有向图D是指一个有序三元组(V(D),A(D),ψD),其中ψD)为关联函数,它使A(D)中的每一个元素(称为有向边或弧)对应于V(D)中的一个有序元素(称为顶点或点)对。Directed graph: A directed graph D refers to an ordered triplet (V(D), A(D), ψD), where ψD) is an association function, which makes each element in A(D) ( called directed edges or arcs) corresponds to an ordered pair of elements (called vertices or points) in V(D).
信息抽取(Information Extraction,NER):从自然语言文本中抽取指定类型的实体、关系、事件等事实信息,并形成结构化数据输出的文本处理技术。信息抽取是从文本数据中抽取特定信息的一种技术。文本数据是由一些具体的单位构成的,例如句子、段落、篇章,文本信息正是由一些小的具体的单位构成的,例如字、词、词组、句子、段落或是这些具体的单位的组合。抽取文本数据中的名词短语、人名、地名等都是文本信息抽取,当然,文本信息抽取技术所抽取的信息可以是各种类型的信息。Information Extraction (Information Extraction, NER): A text processing technology that extracts specified types of factual information such as entities, relationships, and events from natural language texts, and forms structured data output. Information extraction is a technique to extract specific information from text data. Text data is composed of some specific units, such as sentences, paragraphs, and chapters. Text information is composed of some small specific units, such as words, words, phrases, sentences, paragraphs, or combinations of these specific units. . Extracting noun phrases, personal names, and place names in text data is all text information extraction. Of course, the information extracted by text information extraction technology can be various types of information.
协同过滤算法:是一种较为著名和常用的推荐算法,它基于对用户历史行为数据的挖掘发现用户的喜好偏向,并预测用户可能喜好的产品进行推荐,或者找到相似的用户(基于用户)或物品(基于物品)。基于用户的协同过滤算法的实现主要需要解决两个问题,一是如何找到和你有相似爱好的人,也就是要计算数据的相似度。Collaborative filtering algorithm: It is a relatively well-known and commonly used recommendation algorithm. It discovers user preferences based on mining historical user behavior data, and predicts products that users may like to recommend, or finds similar users (based on users) or Items (based on items). The realization of the user-based collaborative filtering algorithm mainly needs to solve two problems. One is how to find people who have similar hobbies as you, that is, to calculate the similarity of data.
BERT(Bidirectional Encoder Representations from Transformers):是一个语言表示模型(language representation model)。BERT采用了Transformer Encoder block进行连接,是一个典型的双向编码模型。BERT (Bidirectional Encoder Representations from Transformers): It is a language representation model. BERT uses the Transformer Encoder block for connection, which is a typical two-way encoding model.
最大熵马尔科夫模型(Maximum Entropy Markov Model,MEMM):用于对给定的观测序列X,计算出各隐藏状态序列Y的条件概率分布,是对转移概率和表现概率建立联合概率,统计时统计的是条件概率,而非共现概率。由于MEMM只在局部做归一化,MEMM容易陷入局部最优。Maximum Entropy Markov Model (MEMM): It is used to calculate the conditional probability distribution of each hidden state sequence Y for a given observation sequence X, and it is to establish a joint probability for transition probability and performance probability. The statistics are conditional probabilities, not co-occurrence probabilities. Since MEMM only performs local normalization, MEMM is easy to fall into local optimum.
条件随机场算法(conditional random field algorithm,CRF):是一种数学算法;结合了最大熵模型和隐马尔可夫模型的特点,是一种无向图模型,近年来在分词、词性标注和命名实体识别等序列标注任务中取得了很好的效果。条件随机场是一个典型的判别式模型,其联合概率可以写成若干势函数联乘的形式,其中最常用的是线性链条件随机场。若让x=(x1,x2,…xn)表示被观察的输入数据序列,y=(y1,y2,…yn)表示一个状态序列,在给定一个输入序列的情况下,线性链的CRF模型定义状态序列的联合条件概率为p(y|x)=exp{} (2-14);Z(x)={} (2-15);其中:Z是以观察序列x为条件的概率归一化因子;fj(yi-1,yi,x,i)是一个任意的特征函数。Conditional random field algorithm (CRF): It is a mathematical algorithm; it combines the characteristics of the maximum entropy model and the hidden Markov model, and is an undirected graph model. It has achieved good results in sequence labeling tasks such as entity recognition. The conditional random field is a typical discriminant model, and its joint probability can be written as the multiplication of several potential functions, the most commonly used of which is the linear chain conditional random field. If x=(x1, x2,...xn) represents the observed input data sequence, y=(y1, y2,...yn) represents a state sequence, given an input sequence, the CRF model of the linear chain Define the joint conditional probability of the state sequence as p(y|x)=exp{} (2-14); Z(x)={} (2-15); where: Z is the probability normalization conditional on the observation sequence x Normalization factor; fj(yi-1, yi, x, i) is an arbitrary feature function.
长短期记忆网络(Long Short-Term Memory,LSTM):是一种时间循环神经网络,是为了解决一般的RNN(循环神经网络)存在的长期依赖问题而专门设计出来的,所有的RNN都具有一种重复神经网络模块的链式形式。在标准RNN中,这个重复的结构模块只有一个非常简单的结构,例如一个tanh层。LSTM是一种含有LSTM区块(blocks)或其他的一种类神经网络,文献或其他资料中LSTM区块可能被描述成智能网络单元,因为它可以记忆不定时间长度的数值,区块中有一个gate能够决定input是否重要到能被记住及能不能被输出output。Long Short-Term Memory (LSTM): It is a time cyclic neural network, which is specially designed to solve the long-term dependence problem of general RNN (cyclic neural network). All RNNs have a A chain form of repeated neural network modules. In standard RNNs, this repeated structural module has only a very simple structure, such as a tanh layer. LSTM is a type of neural network that contains LSTM blocks (blocks) or others. In literature or other materials, LSTM blocks may be described as intelligent network units because they can memorize values for an indefinite length of time. There is a The gate can determine whether the input is important enough to be remembered and whether it can be output.
双向长短时记忆(Bi-directional Long Short-Term Memory,Bi-LSTM):是由前向LSTM与后向LSTM组合而成。在自然语言处理任务中都常被用来建模上下文信息。Bi-LSTM在LSTM的基础上,结合了输入序列在前向和后向两个方向上的信息。对于t时刻的输出,前向LSTM层具有输入序列中t时刻以及之前时刻的信息,而后向LSTM层中具有输入序列中t时刻以及之后时刻的信息。前向LSTM层t时刻的输出记作 ,后向LSTM层t时刻的输出结果记作 ,两个LSTM层输出的向量可以使用相加、平均值或连接等方式进行处理。Bi-directional Long Short-Term Memory (Bi-LSTM): It is a combination of forward LSTM and backward LSTM. It is often used to model contextual information in natural language processing tasks. On the basis of LSTM, Bi-LSTM combines the information of the input sequence in both forward and backward directions. For the output at time t, the forward LSTM layer has the information of time t and the previous time in the input sequence, and the backward LSTM layer has the information of time t and the subsequent time in the input sequence. The output of the forward LSTM layer at time t is denoted as , the output result of the backward LSTM layer at time t is denoted as , and the vectors output by the two LSTM layers can be processed by adding, averaging or connecting.
本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。The embodiments of the present application may acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (Artificial Intelligence (AI) is a 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 technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
本申请实施例可以基于医疗云技术进行与患者之间的智能问诊。其中,医疗云(Medical cloud),是指在云计算、移动技术、多媒体、4G通信、大数 据、以及物联网等新技术基础上,结合医疗技术,使用“云计算”来创建医疗健康服务云平台,实现了医疗资源的共享和医疗范围的扩大。因为云计算技术的运用于结合,医疗云提高 医疗机构的效率,方便居民就医。像现在医院的预约挂号、电子病历、医保等都是云计算与 医疗领域结合的产物,医疗云还具有数据安全、信息共享、动态扩展、布局全局的优势。The embodiment of the present application can conduct intelligent consultation with patients based on medical cloud technology. Among them, Medical Cloud (Medical cloud), refers to the use of "cloud computing" to create a medical and health service cloud platform based on new technologies such as cloud computing, mobile technology, multimedia, 4G communication, big data, and the Internet of Things, combined with medical technology, and realizes the realization of medical resources. sharing and expansion of medical coverage. Due to the combination of cloud computing technology, medical cloud improves The efficiency of medical institutions and the convenience for residents to seek medical treatment. For example, appointment registration, electronic medical records, and medical insurance in hospitals are all products of the combination of cloud computing and the medical field. Medical cloud also has the advantages of data security, information sharing, dynamic expansion, and overall layout.
基于此,本申请实施例提供一种智能问诊方法、装置、电子设备及存储介质,可以实现智能化地与用户对话问诊,提高了问诊效率。本申请实施例提供的问诊方法可应用于智能诊疗、远程会诊。Based on this, the embodiments of the present application provide an intelligent medical consultation method, device, electronic equipment, and storage medium, which can realize intelligent dialogue and consultation with users, and improve the efficiency of medical consultation. The consultation method provided in the embodiment of the present application can be applied to intelligent diagnosis and treatment and remote consultation.
本申请实施例提供的问诊方法、装置、电子设备及存储介质,具体通过如下实施例进行说明,首先描述本申请实施例中的智能问诊方法。The medical inquiry method, device, electronic device, and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the intelligent medical inquiry method in the embodiments of the present application is described.
本申请实施例提供的智能问诊方法,涉及数字医疗技术领域。本申请实施例提供的智能问诊方法可应用于终端中,也可应用于服务器端中,还可以是运行于终端或服务器端中的软件。在一些实施例中,终端可以是智能手机、平板电脑、笔记本电脑、台式计算机等;服务器端可以配置成独立的物理服务器,也可以配置成多个物理服务器构成的服务器集群或者分布式系统,还可以配置成提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN以及大数据和人工智能平台等基础云计算服务的云服务器;软件可以是实现问诊方法的应用等,但并不局限于以上形式。The intelligent consultation method provided in the embodiment of the present application relates to the field of digital medical technology. The intelligent medical inquiry method provided by the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running on a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or It can be configured as a cloud 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, CDN, and big data and artificial intelligence platforms. The server; the software can be an application to realize the consultation method, but is not limited to the above forms.
图1是本申请实施例提供的智能问诊方法的一个可选的流程图,图1中的方法可以包括但不限于包括步骤S101至步骤S107。Fig. 1 is an optional flow chart of the intelligent consultation method provided by the embodiment of the present application. The method in Fig. 1 may include but not limited to steps S101 to S107.
步骤S101,获取基本问诊文本;Step S101, obtaining the basic medical inquiry text;
步骤S102,对基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;Step S102, performing feature extraction on entity features in the basic medical questioning text to obtain basic medical questioning parameters;
步骤S103,根据基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;Step S103, screening the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates;
步骤S104,根据预设的过滤算法对候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;Step S104, according to the preset filtering algorithm, filter the consultation templates in the candidate consultation template set to obtain the target consultation template;
步骤S105,根据基本问诊参数确定目标问诊模板上的目标节点及目标节点的有向边;Step S105, determine the target node and the directed edge of the target node on the target consultation template according to the basic consultation parameters;
步骤S106,根据目标节点和有向边构建问诊顺序题目集;Step S106, constructing a sequential question set for consultation according to the target node and the directed edge;
步骤S107,根据问诊顺序题目集进行问诊。Step S107, conduct medical inquiry according to the question set of the order of medical inquiry.
经过以上步骤S101至步骤S107,首先获取患者的基本问诊文本,其中,基本问诊文本可以通过预先设置的前置导诊系统与患者进行基本问答得到,该基本问诊文本为自然语言文本。对基本问诊文本中的实体特征进行特征提取,得到基本问诊参数,其中基本问诊参数包括年龄信息、性别信息及主诉信息等等,需要说明的是,主诉信息主要为患者的当前身体状况、自我不适状况的描述等等。通过对基本问诊文本的特征抽取,缩小了基本问诊文本的数据空间,使得更为方便提取到所需要的基本问诊参数。根据基本问诊参数包括的年龄信息、性别信息以及主诉信息等对预设的问诊模板进行筛选,剔除问诊模板库中与当前问诊需求的相关性较低的问诊模板,得到候选问诊模板集合。具体地,可以根据问诊模板对应的年龄区间、性别要求以及诊断科室等等来确定筛选条件,根据预设的筛选条件与当前患者的年龄信息、性别信息以及主诉信息的匹配关系,剔除掉不相关的问诊模板,将保留下来的问诊模板作为候选问诊模板集合,以便根据候选问诊模板集合进一步对问诊模板进行筛选。例如,根据预设的性别要求对问诊模板进行分类,根据当前患者的性别,选取相同性别的问诊模板;或者,根据主诉信息中包括的关键词(如心脏、胃部、皮肤、脑等等)确定对应的诊断科室,将不属于该诊断科室的问诊模板进行剔除。进而,根据预设的过滤算法对候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板,在这一过程中,可以是通过计算问诊模板与当前患者诉求的相似度或者相关度来确定目标问诊模板,并将目标问诊模板使用在后续的问诊流程中。为了进一步地优化问诊过程,在得到目标问诊模板后,根据基本问诊参数确定目标问诊模板上的目标节点及目标节点的有向边,再根据目标节点和有向边构建问诊顺序题目集,将目标节点对应的问题以及经过目标节点的有向边到达的下一目标节点所对应的问题进行整合,形成问题顺序题目集,最后根据问诊顺序题目集进行问诊,例如,患者可以对问诊顺序题目集中的问题选择答案进行回答,同时,问诊模板系统也能够确定问诊流程中当前停留的目标节点,通过对该目标节点后续的有向边进行计算,确定最优有向边,进而跳转到下一个目标节点,进而,患者对下一目标节点的问题选择答案进行回答,重复这一跳转问答的过程,最终通过和患者的多轮交互能够完成问诊过程中的智能问诊应答。通过对目标问诊模板的目标节点和有向边的识别与确定,能够进一步地优化问诊过程,使得问诊过程中的问诊题目更加贴合当前的问诊需求,实现了智能化地与用户对话问诊,提高了问诊效率。After the above steps S101 to S107, first obtain the patient's basic medical questioning text, wherein the basic medical questioning text can be obtained through the pre-set pre-set pre-guidance system and the basic question and answer with the patient, and the basic medical questioning text is a natural language text. Feature extraction is performed on the entity features in the basic medical questioning text to obtain the basic medical questioning parameters, where the basic medical questioning parameters include age information, gender information, chief complaint information, etc. It should be noted that the chief complaint information is mainly the patient's current physical condition , a description of self-discomfort conditions, etc. By extracting the features of the basic medical questioning text, the data space of the basic medical questioning text is reduced, making it easier to extract the required basic medical questioning parameters. According to the age information, gender information and chief complaint information included in the basic consultation parameters, the preset consultation templates are screened, and the consultation templates in the consultation template library that are less relevant to the current consultation requirements are eliminated to obtain candidate questions. Diagnosis template collection. Specifically, the screening conditions can be determined according to the age range, gender requirements, and diagnostic departments corresponding to the consultation template, and according to the matching relationship between the preset screening conditions and the current patient's age information, gender information, and chief complaint information, the unqualified patients can be eliminated. Related medical questioning templates, the reserved medical questioning templates are used as a set of candidate medical questioning templates, so as to further screen the medical questioning templates according to the set of candidate medical questioning templates. For example, classify the consultation templates according to the preset gender requirements, and select the consultation templates of the same gender according to the gender of the current patient; or, according to the keywords included in the chief complaint information (such as heart, stomach, skin, brain, etc.) etc.) to determine the corresponding diagnostic department, and eliminate the consultation templates that do not belong to the diagnostic department. Furthermore, according to the preset filtering algorithm, the consultation templates in the candidate consultation template set are filtered to obtain the target consultation template. In this process, the similarity between the consultation template and the current patient's appeal can be calculated or The correlation degree is used to determine the target consultation template, and the target consultation template is used in the subsequent consultation process. In order to further optimize the consultation process, after obtaining the target consultation template, determine the target node and the directed edge of the target node on the target consultation template according to the basic consultation parameters, and then construct the consultation order according to the target node and the directed edge The question set, which integrates the questions corresponding to the target node and the questions corresponding to the next target node reached by the directed edge of the target node to form a sequential question set of questions, and finally conduct consultation according to the question set of the order of consultation, for example, the patient It can answer the questions selected in the question set of the questioning sequence. At the same time, the questioning template system can also determine the target node currently staying in the questioning process. By calculating the subsequent directed edges of the target node, the optimal effective point can be determined. To the edge, and then jump to the next target node, and then, the patient answers the question selection answer of the next target node, repeats the process of jumping to the question and answer, and finally completes the interrogation process through multiple rounds of interaction with the patient intelligent question answering. Through the identification and determination of the target nodes and directed edges of the target consultation template, the consultation process can be further optimized, making the questions in the consultation process more suitable for the current consultation needs, realizing the intelligent and The user dialogue consultation improves the efficiency of consultation.
在一些医学应用场景中,在一种可能的实现方式中,上述数据是医疗数据,如个人健康档案、处方、检查报告等数据。In some medical application scenarios, in a possible implementation manner, the above data is medical data, such as personal health records, prescriptions, examination reports and other data.
在一种可能的实现方式中,上述基本问诊文本为医疗文本,医疗文本可以是医疗电子记录(Electronic Healthcare Record),电子化的个人健康记录,包括病历、心电图、医学影像等一系列具备保存备查价值的电子化记录。In a possible implementation, the above-mentioned basic medical questioning text is a medical text, and the medical text may be a medical electronic record (Electronic Healthcare Record), electronic personal health records, including medical records, electrocardiograms, medical images, and a series of electronic records that are valuable for future reference.
请参阅图2,在一些实施例中,步骤S102可以包括但不限于包括步骤S201至步骤S203:Referring to FIG. 2, in some embodiments, step S102 may include but not limited to include steps S201 to S203:
步骤S201,识别基本问诊文本中的实体特征;Step S201, identifying entity features in the basic medical inquiry text;
步骤S202,利用预先训练的序列分类器对实体特征进行分类处理;Step S202, using a pre-trained sequence classifier to classify entity features;
步骤S203,对分类处理之后的实体特征进行特征提取,得到基本问诊参数。Step S203, performing feature extraction on the entity features after classification processing to obtain basic consultation parameters.
具体地,在对基本问诊文本中的实体特征进行特征提取时,首先识别基本问诊文本中的实体特征,然后查找构成医学专有名称的文本范围,利用预先训练的序列分类器对该文本范围内的实体特征进行分类处理。在对实体特征进行分类处理时,需要利用预先训练的序列分类器对实体特征进行标记,使得这些实体参数都能够带上预设的标签,以便提高分类效率。需要说明的是,在一些具体实施例中,预先训练的序列分类器可以是最大熵马尔科夫模型(MEMM模型)或者基于条件随机场算法(CRF)的模型或者是基于双向长短时记忆算法(bi-LSTM)的模型。例如,在基于bi-LSTM算法构建序列分类器时,在基于bi-LSTM算法的模型中,输入单词wi和字符嵌入,通过左到右的长短记忆和右向左的长短时记忆,使得在输出被连接的位置生成单一的输出层。序列分类器通过这一输出层可以将输入的实体特征直接传递到softmax分类器上,通过softmax分类器在预设的标签上创建一个概率分布,从而根据概率分布对实体参数进行标记分类,最后对分类处理之后的实体特征进行特征提取,得到基本问诊参数,对基本问诊文本的特征抽取,缩小了基本问诊文本的数据空间,使得更为方便提取到所需要的基本问诊参数,以提高匹配效率。Specifically, when performing feature extraction on the entity features in the basic medical questioning text, first identify the entity features in the basic medical questioning text, and then find the text range that constitutes the medical proper name, and use the pre-trained sequence classifier to identify the text The entity features within the range are classified. When classifying entity features, it is necessary to use a pre-trained sequence classifier to mark entity features, so that these entity parameters can carry preset labels, so as to improve classification efficiency. It should be noted that, in some specific embodiments, the pre-trained sequence classifier can be a maximum entropy Markov model (MEMM model) or a model based on a conditional random field algorithm (CRF) or a two-way long-short-term memory algorithm ( bi-LSTM) model. For example, when constructing a sequence classifier based on the bi-LSTM algorithm, in the model based on the bi-LSTM algorithm, the input word wi and character embedding, through left-to-right long-short-term memory and right-to-left long-short-term memory, make the output The concatenated positions generate a single output layer. The sequence classifier can pass the input entity features directly to the softmax classifier through this output layer, and create a probability distribution on the preset label through the softmax classifier, so as to mark and classify the entity parameters according to the probability distribution, and finally After the classification process, the entity features are extracted to obtain the basic consultation parameters. The feature extraction of the basic consultation text reduces the data space of the basic consultation text, making it easier to extract the required basic consultation parameters. Improve matching efficiency.
请参阅图3,在一些实施例中,基本问诊参数包括主诉信息,步骤S104可以包括但不限于包括步骤S301至步骤S304:Please refer to FIG. 3 , in some embodiments, the basic consultation parameters include chief complaint information, and step S104 may include, but is not limited to, step S301 to step S304:
步骤S301,利用预先训练的文本自动生成模型对主诉信息以及候选问诊模板集合中的问诊模板进行处理,生成主诉文本串和问诊模板文本串;Step S301, using the pre-trained automatic text generation model to process the chief complaint information and the consultation templates in the candidate consultation template set, and generate the chief complaint text string and the medical consultation template text string;
步骤S302,分别对主诉文本串和问诊模板文本串进行编码处理,得到编码形式的主诉文本串和编码形式的问诊模板文本串;Step S302, performing encoding processing on the chief complaint text string and the consultation template text string respectively, to obtain the chief complaint text string and the consultation template text string in the coded form;
步骤S303,计算编码形式的主诉文本串与每一编码形式的问诊模板文本串的相似度;Step S303, calculating the similarity between the chief complaint text string in coded form and the question template text string in each coded form;
步骤S304,根据所有相似度之间的大小关系以及相似度与预设的相似度阈值的大小关系,得到目标问诊模板。Step S304, according to the size relationship between all the similarities and the size relationship between the similarity and the preset similarity threshold, the target consultation template is obtained.
具体地,该预先训练的文本自动生成模型可以是基于关键词的文本自动生成模型,该文本自动生成模型可以根据输入数据的类型,进行不同的数据处理。将主诉信息、问诊模板中的关键词或者文本语句或者字段等等输入至预先训练的文本自动生成模型,若输入的关键词、文本语句或者字段与预设的参考文本能够进行匹配,表明当前输入符合要求,若当前输入的是关键词,则在基础语料库中选择和输入关键词相同的语句集合,根据这一语句集合生成对应的文本串。若当前输入的是文本语句或字段,则需要在基础语料库中选取候选语句,并确定选取的候选语句是否符合要求;其中,候选语句为基础语料库中与输入的文本语句或字段相似度大于预设阈值的语句,若选取的候选语句符合要求,则根据候选语句直接生成文本串;若选取的候选语句不符合要求,则对候选语句进行语句补充,例如,填充同义词、或者根据对应的输入信息对候选语句进行复写补充等等,并根据补充之后的候选语句生成文本串。通过这一方式能够较为方便地对主诉信息以及候选问诊模板集合中的问诊模板进行处理,生成主诉文本串和问诊模板文本串。进一步地,通过预设的编码器分别对主诉文本串和问诊模板文本串进行编码处理,该预设的编码器可以是基于BERT的编码器,即通过获取主诉信息和问诊模板,并对主诉信息和问诊模板进行令牌化处理,构建出BERT令牌生成器,对BERT令牌生成器进行预训练,形成符合需求的BERT编码器,使得BERT编码器能够通过预设的编码函数将主诉文本串和问诊模板文本串由文本形式转化为编码形式,得到编码形式的主诉文本串和编码形式的问诊模板文本串。进而,通过协同过滤算法计算编码形式的主诉文本串与每一编码形式的问诊模板文本串的相似度大小。需要说明的是,该协同过滤算法可以是杰卡德相似系数法、夹角余弦法或者欧式距离、曼哈顿距离等相似性度量方法,不做限制。最后通过比较所有相似度之间的大小以及每一相似度与预设相似度阈值的大小,得到目标问诊模板。这一方式缩短了问诊模板的筛选时间,也提高了选定的问诊模板与当前问诊需求的匹配性。Specifically, the pre-trained automatic text generation model may be a keyword-based automatic text generation model, and the text automatic generation model may perform different data processing according to the type of input data. Input the main complaint information, keywords or text sentences or fields in the consultation template to the pre-trained text automatic generation model, if the input keywords, text sentences or fields can match the preset reference text, it indicates that the current The input meets the requirements. If the current input is a keyword, select the same sentence set as the input keyword in the basic corpus, and generate a corresponding text string according to this sentence set. If the current input is a text sentence or field, you need to select a candidate sentence in the basic corpus, and determine whether the selected candidate sentence meets the requirements; wherein, the candidate sentence is that the similarity between the basic corpus and the input text sentence or field is greater than the preset Threshold statement, if the selected candidate sentence meets the requirements, the text string will be directly generated according to the candidate sentence; if the selected candidate sentence does not meet the requirements, the sentence supplement will be performed on the candidate sentence, for example, filling in synonyms, or according to the corresponding input information. The candidate sentences are copied and supplemented, and a text string is generated according to the supplemented candidate sentences. In this way, the main complaint information and the medical questioning templates in the candidate medical questioning template set can be processed more conveniently, and the chief complaint text string and the medical questioning template text string are generated. Further, the chief complaint text string and the inquiry template text string are respectively encoded by a preset encoder, which can be a BERT-based encoder, that is, by obtaining the chief complaint information and the inquiry template, and The main complaint information and the consultation template are tokenized, and the BERT token generator is constructed, and the BERT token generator is pre-trained to form a BERT encoder that meets the requirements, so that the BERT encoder can use the preset encoding function to The chief complaint text string and the consultation template text string are converted from the text form into the coded form, and the chief complaint text string in the coded form and the consultation template text string in the coded form are obtained. Furthermore, the similarity between the main complaint text string in the coded form and the question template text string in each coded form is calculated through the collaborative filtering algorithm. It should be noted that the collaborative filtering algorithm may be a Jaccard similarity coefficient method, an included angle cosine method, or a similarity measurement method such as Euclidean distance or Manhattan distance, without limitation. Finally, the target inquiry template is obtained by comparing the size of all similarities and the size of each similarity with the preset similarity threshold. This method shortens the screening time of the consultation template, and also improves the matching between the selected consultation template and the current consultation demand.
请参阅图4,在一些实施例中,步骤S304可以包括但不限于包括步骤S401至步骤S402:Referring to FIG. 4, in some embodiments, step S304 may include but not limited to include steps S401 to S402:
步骤S401,根据所有相似度之间的大小关系,确定相似度最高的问诊模板;Step S401, according to the size relationship among all the similarities, determine the consultation template with the highest similarity;
步骤S402,若相似度最高的问诊模板的相似度大于等于预设的相似度阈值,则将相似度最高的问诊模板作为目标问诊模板。Step S402, if the similarity of the medical inquiry template with the highest similarity is greater than or equal to the preset similarity threshold, use the medical inquiry template with the highest similarity as the target medical inquiry template.
具体地,为了提高问诊模板与当前问诊需求的匹配度,通过协同过滤算法计算编码形式的主诉文本串与每一编码形式的问诊模板文本串的相似度,比较编码形式的主诉文本串与每一编码形式的问诊模板文本串的相似度之间的大小关系,确定相似度最高的问诊模板;进一步地,为了使得配置的问诊模板与当前问诊需求更为准确地匹配,还可以通过比较相似度最高的问诊模板的相似度与预设的相似度阈值的大小,确定是否将相似度最高的问诊模板用于问诊,例如,若相似度最高的问诊模板的相似度大于等于预设的相似度阈值,表明该相似度最高的问诊模板与当前问诊需要较为匹配,能够符合问诊要求,则将相似度最高的问诊模板作为目标问诊模板。这一方式缩短了问诊模板的筛选时间,也提高了选定的问诊模板与当前问诊需求的匹配性。Specifically, in order to improve the matching degree between the consultation template and the current consultation needs, the similarity between the chief complaint text string in the coded form and the text string in each coded form of the medical inquiry template is calculated through the collaborative filtering algorithm, and the chief complaint text string in the coded form is compared The size relationship between the similarity with each coded form of the query template text string determines the query template with the highest similarity; further, in order to make the configured query template more accurately match the current query requirements, It is also possible to determine whether to use the highest similarity template for consultation by comparing the similarity of the highest similarity template with the preset similarity threshold. For example, if the highest similarity template If the similarity is greater than or equal to the preset similarity threshold, it indicates that the consultation template with the highest similarity matches the current consultation needs and can meet the consultation requirements, and the consultation template with the highest similarity is used as the target consultation template. This method shortens the screening time of the consultation template, and also improves the matching between the selected consultation template and the current consultation demand.
请参阅图5,在一些实施例中,步骤S304还可以包括但不限于包括步骤S501至步骤S502:Referring to FIG. 5, in some embodiments, step S304 may also include but not limited to include steps S501 to S502:
步骤S501,根据所有相似度之间的大小关系,确定相似度最高的问诊模板;Step S501, according to the size relationship among all the similarities, determine the consultation template with the highest similarity;
步骤S502,若相似度最高的问诊模板的相似度小于预设的相似度阈值,则获取预设的参考问诊模板,并将预设的参考问诊模板作为目标问诊模板。Step S502, if the similarity of the question template with the highest similarity is less than the preset similarity threshold, obtain a preset reference question template, and use the preset reference question template as a target question template.
为了使得问诊流程能够顺利进行,通过协同过滤算法计算编码形式的主诉文本串与每一编码形式的问诊模板文本串的相似度,比较编码形式的主诉文本串与每一编码形式的问诊模板文本串的相似度之间的大小关系,确定相似度最高的问诊模板之后,比较相似度最高的问诊模板的相似度与预设的相似度阈值的大小,若相似度最高的问诊模板的相似度小于预设的相似度阈值,表明该相似度最高的问诊模板与当前问诊的匹配性较差,不能够符合问诊要求,则获取参考问诊模板,并将预设的参考问诊模板作为目标问诊模板。具体地,当根据性别信息、年龄信息以及主诉信息等确定没有能够匹配的问诊模板(即候选问诊模板集合为空)或者相似度最高的问诊模板与当前问诊需求的匹配度较低,则需要采取其他方式实现问诊,例如,可以是获取预先设定的参考问诊模板,将参考问诊模板作为目标问诊模板,即根据参考问诊模板构建对应的参考问诊顺序题目集,从而根据参考问诊顺序题目集进行问诊;也可以是在确定没有能够匹配的问诊模板或者相似度最高的问诊模板与当前问诊需求的匹配度较低时,提示转入人工问诊模式,通过医生与患者进行面对面问诊,使得问诊流程顺利进行,提高问诊质量。In order to make the consultation process go smoothly, the similarity between the chief complaint text string in the coded form and the consultation template text string in each coded form is calculated through the collaborative filtering algorithm, and the chief complaint text string in the coded form is compared with the consultation template in each coded form. The size relationship between the similarities of template text strings, after determining the highest similarity inquiry template, compare the similarity of the highest similarity inquiry template with the size of the preset similarity threshold, if the highest similarity inquiry template If the similarity of the template is less than the preset similarity threshold, it indicates that the query template with the highest similarity is poorly matched with the current consultation and cannot meet the requirements of the consultation. The reference inquiry template is used as the target inquiry template. Specifically, when it is determined based on gender information, age information, and chief complaint information that there is no matching template (that is, the set of candidate templates is empty) or the template with the highest degree of similarity has a low matching degree with the current consultation needs , you need to take other ways to realize the consultation, for example, it can be to obtain a pre-set reference consultation template, and use the reference consultation template as the target consultation template, that is, construct a corresponding reference consultation sequence question set according to the reference consultation template , so as to make an inquiry according to the reference question set; it can also be prompted to switch to manual questioning when it is determined that there is no matching question template or the matching degree of the question template with the highest similarity and the current questioning demand is low. The consultation mode, through face-to-face consultation between doctors and patients, makes the consultation process go smoothly and improves the quality of consultation.
请参阅图6,在一些实施例的步骤S105可以包括但不限于包括步骤S601至步骤S604:Referring to FIG. 6, step S105 in some embodiments may include but not limited to steps S601 to S604:
步骤S601,根据基本问诊参数,确定目标问诊模板上的目标节点;Step S601, according to the basic consultation parameters, determine the target node on the target consultation template;
步骤S602,获取目标节点的每一有向边的脚本数据;Step S602, acquiring the script data of each directed edge of the target node;
步骤S603,根据脚本数据,计算每一有向边的权重;Step S603, calculating the weight of each directed edge according to the script data;
步骤S604,根据每一有向边的权重大小,确定目标节点的有向边。Step S604, according to the weight of each directed edge, determine the directed edge of the target node.
在一些实施例中,由于已经获取到主诉信息、年龄信息以及性别信息,对于目标问诊模板上收集相同信息的节点可以跳过,将节点中未收集到问答信息的节点作为目标节点,进而根据有向图的节点先后顺序,可以确定每一目标节点对应的有向边。进而,获取目标节点的每一有向边的脚本数据(如groovy脚本等等)以及该目标节点的上下文信息,其中,该上下文信息包含患者历史选择的选项答案。根据脚本数据和上下文信息对目标节点的每一有向边进行解析计算,得到每一有向边的权重。具体地,利用预设的赋值函数(如add_weighted_edges_from函数)给每一有向边赋予初始权重,根据脚本数据和上下文信息对初始权重进行修改调整,利用get_edge_data函数读取每一有向边的修改后的权重,比较目标节点上的每一有向边的修改后的权重大小,将权重最高的有向边作为目标节点的最优有向边,通过该最优有向边确定下一目标节点的位置,进而通过权重计算确定下一目标节点的最优有向边。在当前的问诊模板对应的有向图内重复这一操作,通过这些目标节点和最优有向边能够得到目标节点的先后顺序,根据目标节点先后顺序以及每一目标节点的节点信息,构建出符合当前问诊需求的问诊顺序题目集,通过该问诊顺序题目集进行问诊,这一方式通过对目标问诊模板的目标节点和有向边的识别与确定,能够进一步地优化问诊过程,使得问诊过程中的问诊题目更加贴合当前的问诊需求,实现了智能化地与用户对话问诊,提高了问诊效率。In some embodiments, since the main complaint information, age information, and gender information have been obtained, the nodes that collect the same information on the target consultation template can be skipped, and the nodes that do not collect question and answer information in the nodes are used as target nodes, and then according to The order of the nodes in the directed graph can determine the directed edge corresponding to each target node. Furthermore, the script data (such as groovy script, etc.) of each directed edge of the target node and the context information of the target node are obtained, wherein the context information includes the option answer selected by the patient in history. Analyze and calculate each directed edge of the target node according to the script data and context information, and obtain the weight of each directed edge. Specifically, use the preset assignment function (such as the add_weighted_edges_from function) to assign an initial weight to each directed edge, modify and adjust the initial weight according to the script data and context information, and use the get_edge_data function to read the modified , compare the modified weight of each directed edge on the target node, and use the directed edge with the highest weight as the optimal directed edge of the target node, and use the optimal directed edge to determine the weight of the next target node position, and then determine the optimal directed edge of the next target node through weight calculation. Repeat this operation in the directed graph corresponding to the current consultation template. Through these target nodes and optimal directed edges, the order of the target nodes can be obtained. According to the order of the target nodes and the node information of each target node, construct A set of questions in the order of questions that meet the needs of the current questioning is produced, and the question set is used to make inquiries. This method can further optimize the problem by identifying and determining the target nodes and directed edges of the target questioning template. The consultation process makes the questions in the consultation process more suitable for the current consultation needs, realizes intelligent dialogue and consultation with users, and improves the efficiency of consultation.
请参阅图7,在一些实施例中,步骤S107可以包括但不限于包括步骤S701至步骤S702:Referring to FIG. 7, in some embodiments, step S107 may include but not limited to include steps S701 to S702:
步骤S701,抽取目标节点的属性信息;Step S701, extracting attribute information of the target node;
步骤S702,根据属性信息对用户端在目标节点反馈的问答数据进行格式组装,得到文本数据;文本数据用于用户进行问答交互。In step S702, according to the attribute information, the Q&A data fed back by the client at the target node is formatted and assembled to obtain text data; the text data is used for the user to interact with Q&A.
在一些实施例中,为了及时反馈问诊数据,还需要根据实际需求,抽取目标节点的属性信息。根据目标节点的属性信息,对用户端在目标节点反馈的问答数据进行格式组装,得到文本数据。将文本数据反馈显示给用户以便用户进行问答交互。例如,对外部动态调用节点获取到的数据进行问题和选项信息后包装成文本节点的格式展示给用户,等待用户进行下一轮交互。用户通过问诊模板上一步返回的问答信息,可以对问诊顺序题目集中的问题选择答案进行回答,同时,问诊模板系统也能够确定问诊流程中当前停留的目标节点,通过对该目标节点后续的有向边进行计算,确定最优有向边,进而跳转到下一个目标节点,并对下一目标节点的问题选择答案进行回答,重复这一跳转问答的过程。最终通过和用户的多轮交互最终能够完成问诊过程中的问答交互。In some embodiments, in order to feed back the consultation data in time, it is also necessary to extract the attribute information of the target node according to actual needs. According to the attribute information of the target node, the format of the Q&A data fed back by the client at the target node is assembled to obtain text data. Display textual data feedback to the user for question-and-answer interaction. For example, the question and option information of the data obtained by the external dynamic call node is packaged into a text node format and displayed to the user, waiting for the user to perform the next round of interaction. Through the question and answer information returned in the previous step of the question template, the user can answer the selected answers to the questions in the question set of the question sequence. At the same time, the question template system can also determine the current target node in the question process. The subsequent directed edge is calculated to determine the optimal directed edge, and then jumps to the next target node, and answers the question selection answer of the next target node, repeating the process of jumping to the question and answer. Finally, through multiple rounds of interaction with the user, the question-and-answer interaction during the consultation process can be completed.
本申请实施例通过获取基本问诊文本,对基本问诊文本中的实体特征进行特征提取,得到基本问诊参数,这一方式能够实现对基本问诊文本的特征抽取,缩小基本问诊文本的数据空间,使得更为方便提取到所需要的基本问诊参数;进而根据基本问诊参数包括的年龄信息、性别信息以及主诉信息等对预设的问诊模板进行筛选,得到候选问诊模板集合,剔除了与当前问诊需求的相关性较低的问诊模板。这样一来,便可进一步地根据预设的过滤算法对候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板,这一方式缩短了问诊模板的筛选时间,也提高了选定的问诊模板与当前问诊需求的匹配性。在得到目标问诊模板后,根据基本问诊参数确定目标问诊模板上的目标节点及目标节点的有向边,再根据目标节点和有向边构建问诊顺序题目集,最后根据问诊顺序题目集进行问诊。通过对目标问诊模板的目标节点和有向边的识别与确定,能够进一步地优化问诊过程,使得问诊过程中的问诊题目更加贴合当前的问诊需求,实现了智能化地与用户对话问诊,提高了问诊效率。In the embodiment of the present application, by obtaining the basic medical questioning text, the entity features in the basic medical questioning text are extracted to obtain the basic medical questioning parameters. This method can realize the feature extraction of the basic medical questioning text and reduce the size of the basic medical questioning text. The data space makes it easier to extract the required basic consultation parameters; and then filter the preset consultation templates according to the age information, gender information and chief complaint information included in the basic consultation parameters to obtain a set of candidate consultation templates , eliminating the consultation templates that are less relevant to the current consultation needs. In this way, the consultation templates in the candidate consultation template set can be further filtered according to the preset filtering algorithm to obtain the target consultation template. This method shortens the screening time of consultation templates and improves the The match between the selected consultation template and the current consultation needs. After obtaining the target consultation template, determine the target node and the directed edge of the target node on the target consultation template according to the basic consultation parameters, and then construct the question set of the question order according to the target node and the directed edge, and finally according to the question order Question set for consultation. Through the identification and determination of the target nodes and directed edges of the target consultation template, the consultation process can be further optimized, making the questions in the consultation process more suitable for the current consultation needs, realizing the intelligent and The user dialogue consultation improves the efficiency of consultation.
请参阅图8,本申请实施例还提供一种智能问诊装置,可以实现上述智能问诊方法,该装置包括:Please refer to Fig. 8, the embodiment of the present application also provides an intelligent medical consultation device, which can realize the above-mentioned intelligent medical consultation method, and the device includes:
基本问诊文本获取模块801,用于获取基本问诊文本;A basic medical questioning text acquisition module 801, configured to obtain basic medical questioning texts;
实体特征提取模块802,用于对基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;The entity feature extraction module 802 is used to extract the entity features in the basic medical inquiry text to obtain the basic medical inquiry parameters;
筛选模块803,用于根据基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;The screening module 803 is used to screen the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates;
目标问诊模板确定模块804,用于根据预设的过滤算法对候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;The target medical inquiry template determination module 804 is used to filter the medical question templates in the candidate medical question template set according to the preset filtering algorithm to obtain the target medical question template;
目标节点及有向边确定模块805,用于根据基本问诊参数确定目标问诊模板上的目标节点及目标节点的有向边;Target node and directed edge determination module 805, used to determine the target node and the directed edge of the target node on the target consultation template according to the basic consultation parameters;
问诊顺序题目集构建模块806,用于根据目标节点和有向边构建问诊顺序题目集;An inquiry sequence topic set construction module 806, configured to construct an inquiry sequence topic set according to the target node and the directed edge;
问诊模块807,用于根据问诊顺序题目集进行问诊。The medical inquiry module 807 is used to conduct medical inquiry according to the sequence of question sets.
在一些具体实施例中,实体特征提取模块802在对基本问诊文本中的实体特征进行特征提取,得到基本问诊参数时,主要用于识别基本问诊文本中的实体特征;利用预先训练的序列分类器对实体特征进行分类处理;对分类处理之后的实体特征进行特征提取,得到基本问诊参数。In some specific embodiments, when the entity feature extraction module 802 performs feature extraction on the entity features in the basic medical inquiry text to obtain the basic medical inquiry parameters, it is mainly used to identify the entity features in the basic medical inquiry text; The sequence classifier classifies the entity features; extracts the features of the entity features after the classification process, and obtains the basic consultation parameters.
在一些具体实施例中,目标问诊模板确定模块804在对基本问诊文本中的实体特征进行特征提取,得到基本问诊参数时,主要用于利用预先训练的文本自动生成模型对主诉信息以及候选问诊模板集合中的问诊模板进行处理,生成主诉文本串和问诊模板文本串;分别对主诉文本串和问诊模板文本串进行编码处理,得到编码形式的主诉文本串和编码形式的问诊模板文本串;计算编码形式的主诉文本串与每一编码形式的问诊模板文本串的相似度;根据所有相似度之间的大小关系以及相似度与预设的相似度阈值的大小关系,得到目标问诊模板。。其中,在根据所有相似度之间的大小关系以及相似度与预设的相似度阈值的大小关系,得到目标问诊模板。时,可以根据所有相似度之间的大小关系,确定相似度最高的问诊模板;若相似度最高的问诊模板的相似度大于等于预设的相似度阈值,则将相似度最高的问诊模板作为目标问诊模板。若相似度最高的问诊模板的相似度小于预设的相似度阈值,则获取预设的参考问诊模板,并将预设的参考问诊模板作为目标问诊模板。In some specific embodiments, when the target consultation template determination module 804 performs feature extraction on the entity features in the basic consultation text to obtain the basic consultation parameters, it is mainly used to use the pre-trained text automatic generation model to analyze the chief complaint information and The question templates in the candidate question template set are processed to generate the chief complaint text string and the question template text string; the chief complaint text string and the question template text string are respectively encoded to obtain the chief complaint text string and the coded form Inquiry template text string; calculate the similarity between the main complaint text string in the coded form and each coded form of the inquiry template text string; according to the size relationship between all similarities and the size relationship between the similarity and the preset similarity threshold , to get the target consultation template. . Wherein, the target consultation template is obtained according to the size relationship between all the similarities and the size relationship between the similarity and the preset similarity threshold. , the inquiry template with the highest similarity can be determined according to the size relationship between all similarities; if the similarity of the inquiry template with the highest similarity is greater than or equal to the preset similarity threshold, the inquiry template with the highest similarity The template serves as the target consultation template. If the similarity of the question template with the highest similarity is less than the preset similarity threshold, a preset reference question template is obtained, and the preset reference question template is used as a target question template.
在另一具体实施例中,目标节点及有向边确定模块805在根据基本问诊参数确定目标问诊模板上的目标节点及目标节点的有向边时,主要用于根据基本问诊参数,确定目标问诊模板上的目标节点;获取目标节点的每一有向边的脚本数据;根据脚本数据,计算每一有向边的权重;根据每一有向边的权重大小,确定目标节点的有向边。In another specific embodiment, when the target node and directed edge determination module 805 determines the target node and the directed edge of the target node on the target consultation template according to the basic consultation parameters, it is mainly used to, according to the basic consultation parameters, Determine the target node on the target consultation template; obtain the script data of each directed edge of the target node; calculate the weight of each directed edge according to the script data; determine the weight of each directed edge according to the weight of each directed edge There is an edge.
在另一具体实施例中,问诊模块807在根据问诊顺序题目集进行问诊时,主要用于抽取目标节点的属性信息;根据属性信息对用户端在目标节点反馈的问答数据进行格式组装,得到文本数据;文本数据用于用户进行问答交互。In another specific embodiment, the inquiry module 807 is mainly used to extract the attribute information of the target node when conducting an inquiry according to the question set of the order of inquiry; and to assemble the format of the question and answer data fed back by the client at the target node according to the attribute information , get the text data; the text data is used for the user to conduct question-and-answer interactions.
本申请实施例还提供了一种电子设备,电子设备包括:存储器、处理器、存储在存储器上并可在处理器上运行的程序以及用于实现处理器和存储器之间的连接通信的数据总线,程序被处理器执行时实现上述智能问诊方法。该电子设备可以为包括平板电脑、车载电脑等任意智能终端。The embodiment of the present application also provides an electronic device, the electronic device includes: a memory, a processor, a program stored in the memory and operable on the processor, and a data bus for realizing connection and communication between the processor and the memory , when the program is executed by the processor, the above-mentioned intelligent interrogation method is realized. The electronic device may be any intelligent terminal including a tablet computer, a vehicle-mounted computer, and the like.
请参阅图9,图9示意了另一实施例的电子设备的硬件结构,电子设备包括:Please refer to FIG. 9. FIG. 9 illustrates a hardware structure of an electronic device in another embodiment. The electronic device includes:
处理器901,可以采用通用的CPU(CentralProcessingUnit,中央处理器)、微处理器、应用专用集成电路(ApplicationSpecificIntegratedCircuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本申请实施例所提供的技术方案;The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit, central processing unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute related programs, so as to realize The technical scheme provided by the embodiment of the present application;
存储器902,可以采用只读存储器(ReadOnlyMemory,ROM)、静态存储设备、动态存储设备或者随机存取存储器(RandomAccessMemory,RAM)等形式实现。存储器902可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器902中,并由处理器901来调用执行一种智能问诊方法;The memory 902 may be implemented in the form of a read-only memory (ReadOnlyMemory, ROM), a static storage device, a dynamic storage device, or a random access memory (RandomAccessMemory, RAM). The memory 902 can store operating systems and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 902, and are invoked by the processor 901 to execute an intelligent Inquiry method;
输入/输出接口903,用于实现信息输入及输出;The input/output interface 903 is used to realize information input and output;
通信接口904,用于实现本设备与其他设备的通信交互,可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信;和The communication interface 904 is used to realize the communication and interaction between the device and other devices, and the communication can be realized through a wired method (such as USB, network cable, etc.), or can be realized through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.); and
总线905,在设备的各个组件(例如处理器901、存储器902、输入/输出接口903和通信接口904)之间传输信息;Bus 905, which transfers information between various components of the device (such as processor 901, memory 902, input/output interface 903, and communication interface 904);
其中处理器901、存储器902、输入/输出接口903和通信接口904通过总线805实现彼此之间在设备内部的通信连接。The processor 901 , the memory 902 , the input/output interface 903 and the communication interface 904 are connected to each other within the device through the bus 805 .
其中,本申请实施例提高的智能问诊包括:获取基本问诊文本;对基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;根据基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;根据预设的过滤算法对候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;根据基本问诊参数确定目标问诊模板上的目标节点及目标节点的有向边;根据目标节点和有向边构建问诊顺序题目集;根据问诊顺序题目集进行问诊。Among them, the intelligent interrogation improved by the embodiment of the present application includes: obtaining the basic interrogation text; performing feature extraction on the entity features in the basic interrogation text to obtain the basic interrogation parameters; Perform screening to obtain a set of candidate consultation templates; filter the consultation templates in the set of candidate consultation templates according to the preset filtering algorithm to obtain the target consultation template; determine the target on the target consultation template according to the basic consultation parameters The directed edge of the node and the target node; according to the target node and the directed edge, construct the question set of the order of consultation; conduct the consultation according to the set of questions of the order of inquiry.
本申请实施例还提供了一种计算机可读存储介质,用于计算机可读存储,计算机可读存储介质可以是非易失性,也可以是易失性。计算机可读存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现一种智能问诊方法,其中,智能问诊包括:获取基本问诊文本;对基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;根据基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;根据预设的过滤算法对候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;根据基本问诊参数确定目标问诊模板上的目标节点及目标节点的有向边;根据目标节点和有向边构建问诊顺序题目集;根据问诊顺序题目集进行问诊。An embodiment of the present application also provides a computer-readable storage medium for computer-readable storage. The computer-readable storage medium may be non-volatile or volatile. The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement an intelligent medical inquiry method, wherein the intelligent medical inquiry includes: obtaining basic medical inquiry text; Feature extraction is performed on the entity features in the basic question text to obtain basic question parameters; the preset question templates are screened according to the basic question parameters to obtain a set of candidate question templates; the candidate question Filter the inquiry templates in the diagnosis template set to obtain the target inquiry template; determine the target node and the directed edge of the target node on the target inquiry template according to the basic inquiry parameters; construct the inquiry according to the target node and the directed edge Sequential topic set; conduct interrogation according to the sequential topic set.
存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。As a non-transitory computer-readable storage medium, memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
本申请实施例描述的实施例是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着技术的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The embodiments described in the embodiments of the present application are to illustrate the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation to the technical solutions provided by the embodiments of the present application. Those skilled in the art know that with the evolution of technology and new For the emergence of application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
本领域技术人员可以理解的是,图1-7中示出的技术方案并不构成对本申请实施例的限定,可以包括比图示更多或更少的步骤,或者组合某些步骤,或者不同的步骤。Those skilled in the art can understand that the technical solutions shown in Figures 1-7 do not constitute a limitation to the embodiments of the present application, and may include more or fewer steps than those shown in the illustrations, or combine certain steps, or be different A step of.
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、设备中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括多指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例的方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序的介质。If the integrated unit is realized in the form of a software function 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 application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including multiple instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM for short), magnetic disk or optical disk, etc., which can store programs. medium.
以上参照附图说明了本申请实施例的优选实施例,并非因此局限本申请实施例的权利范围。本领域技术人员不脱离本申请实施例的范围和实质内所作的任何修改、等同替换和改进,均应在本申请实施例的权利范围之内。The preferred embodiments of the embodiments of the present application have been described above with reference to the accompanying drawings, which does not limit the scope of rights of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall fall within the scope of rights of the embodiments of the present application.

Claims (20)

  1. 一种智能问诊方法,其中,所述方法包括:A kind of intelligent interrogation method, wherein, described method comprises:
    获取基本问诊文本;Obtain basic medical inquiry text;
    对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;Carrying out feature extraction on entity features in the basic medical inquiry text to obtain basic medical inquiry parameters;
    根据所述基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;Screening the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates;
    根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;Filtering the consultation templates in the set of candidate consultation templates according to a preset filtering algorithm to obtain a target consultation template;
    根据所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边;determining the target node on the target consultation template and the directed edges of the target node according to the basic consultation parameters;
    根据所述目标节点和所述有向边构建问诊顺序题目集;Constructing an inquiry sequence topic set according to the target node and the directed edge;
    根据所述问诊顺序题目集进行问诊。Inquiry is performed according to the question set of the order of inquiry.
  2. 根据权利要求1所述的智能问诊方法,其中,所述对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数的步骤,包括:The intelligent medical inquiry method according to claim 1, wherein the step of performing feature extraction on entity features in the basic medical questioning text to obtain basic medical questioning parameters includes:
    识别所述基本问诊文本中的实体特征;Identifying entity features in the basic medical questioning text;
    利用预先训练的序列分类器对所述实体特征进行分类处理;Classifying the entity features by using a pre-trained sequence classifier;
    对分类处理之后的实体特征进行特征提取,得到基本问诊参数。Feature extraction is performed on the entity features after classification processing to obtain basic consultation parameters.
  3. 根据权利要求1所述的智能问诊方法,其中,所述基本问诊参数包括主诉信息,所述根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板的步骤,包括:The intelligent medical inquiry method according to claim 1, wherein the basic medical inquiry parameters include chief complaint information, and the medical inquiry templates in the candidate medical inquiry template set are filtered according to a preset filtering algorithm to obtain The steps of the target interview template, including:
    利用预先训练的文本自动生成模型对所述主诉信息以及所述候选问诊模板集合中的问诊模板进行处理,生成主诉文本串和问诊模板文本串;Using a pre-trained automatic text generation model to process the chief complaint information and the medical questioning templates in the candidate medical questioning template set to generate chief complaint text strings and medical questioning template text strings;
    分别对所述主诉文本串和所述问诊模板文本串进行编码处理,得到编码形式的主诉文本串和编码形式的问诊模板文本串;Carry out coding processing to described chief complaint text string and described medical inquiry template text string respectively, obtain the chief complaint text string of coded form and the medical inquiry template text string of coded form;
    计算所述编码形式的主诉文本串与每一所述编码形式的问诊模板文本串的相似度;Calculate the similarity between the main complaint text string in the coded form and each of the question template text strings in the coded form;
    根据所有所述相似度之间的大小关系以及所述相似度与预设的相似度阈值的大小关系,得到目标问诊模板。According to the magnitude relationship between all the similarities and the magnitude relationship between the similarity and a preset similarity threshold, a target consultation template is obtained.
  4. 根据权利要求3所述的智能问诊方法,其中,所述根据所有所述相似度之间的大小关系以及所述相似度与预设的相似度阈值的大小关系,得到目标问诊模板的步骤,包括:The intelligent medical inquiry method according to claim 3, wherein, the step of obtaining the target medical inquiry template according to the size relationship between all the similarities and the size relationship between the similarity and the preset similarity threshold ,include:
    根据所有所述相似度之间的大小关系,确定相似度最高的问诊模板;According to the size relationship among all the similarities, determine the inquiry template with the highest similarity;
    若所述相似度最高的问诊模板的相似度大于等于预设的相似度阈值,则将所述相似度最高的问诊模板作为目标问诊模板。If the similarity of the question template with the highest similarity is greater than or equal to a preset similarity threshold, the question template with the highest similarity is used as the target question template.
  5. 根据权利要求3所述的智能问诊方法,其中,所述根据所有所述相似度之间的大小关系以及所述相似度与预设的相似度阈值的大小关系,得到目标问诊模板的步骤,还包括:The intelligent medical inquiry method according to claim 3, wherein, the step of obtaining the target medical inquiry template according to the size relationship between all the similarities and the size relationship between the similarity and the preset similarity threshold ,Also includes:
    根据所有所述相似度之间的大小关系,确定相似度最高的问诊模板;According to the size relationship among all the similarities, determine the inquiry template with the highest similarity;
    若所述相似度最高的问诊模板的相似度小于预设的相似度阈值,则获取预设的参考问诊模板,并将所述预设的参考问诊模板作为目标问诊模板。If the similarity of the query template with the highest similarity is less than the preset similarity threshold, a preset reference query template is obtained, and the preset reference query template is used as a target query template.
  6. 根据权利要求1至5任一项所述的智能问诊方法,其中,所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边的步骤,包括:According to the intelligent medical consultation method according to any one of claims 1 to 5, wherein the step of determining the target node on the target medical consultation template and the directed edge of the target node by the basic medical consultation parameters comprises:
    根据所述基本问诊参数,确定所述目标问诊模板上的目标节点;determining a target node on the target medical inquiry template according to the basic medical inquiry parameters;
    获取所述目标节点的每一有向边的脚本数据;Obtain the script data of each directed edge of the target node;
    根据所述脚本数据,计算每一有向边的权重;Calculate the weight of each directed edge according to the script data;
    根据每一有向边的权重大小,确定所述目标节点的有向边。Determine the directed edge of the target node according to the weight of each directed edge.
  7. 根据权利要求1至5任一项所述的智能问诊方法,其中,所述根据所述问诊顺序题目集进行问诊的步骤,包括:The intelligent medical inquiry method according to any one of claims 1 to 5, wherein the step of conducting medical inquiry according to the question set of the order of medical inquiry includes:
    抽取所述目标节点的属性信息;extracting attribute information of the target node;
    根据所述属性信息对用户端在所述目标节点反馈的问答数据进行格式组装,得到文本数据;所述文本数据用于用户进行问答交互。According to the attribute information, the question and answer data fed back by the user terminal at the target node is formatted and assembled to obtain text data; the text data is used for the user to perform question and answer interaction.
  8. 一种智能问诊装置,其中,所述装置包括:An intelligent medical interrogation device, wherein the device includes:
    基本问诊文本获取模块,用于获取基本问诊文本;The basic medical questioning text acquisition module is used to obtain the basic medical questioning text;
    实体特征提取模块,用于对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;The entity feature extraction module is used to extract the entity features in the basic medical inquiry text to obtain basic medical inquiry parameters;
    筛选模块,用于根据所述基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;A screening module, configured to screen preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates;
    目标问诊模板确定模块,用于根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;A target consultation template determination module, configured to filter the consultation templates in the set of candidate consultation templates according to a preset filtering algorithm to obtain a target consultation template;
    目标节点及有向边确定模块,用于根据所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边;A target node and directed edge determination module, configured to determine the target node on the target inquiry template and the directed edge of the target node according to the basic inquiry parameters;
    问诊顺序题目集构建模块,用于根据所述目标节点和所述有向边构建问诊顺序题目集;An inquiry sequence topic set construction module, configured to construct an inquiry sequence topic set according to the target node and the directed edge;
    问诊模块,用于根据所述问诊顺序题目集进行问诊。The consultation module is used to conduct consultation according to the set of questions in the order of consultation.
  9. 一种电子设备,其中,所述电子设备包括存储器、处理器、存储在所述存储器上并可在所述处理器上运行的程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,所述程序被所述处理器执行时实现一种智能问诊方法,其中,所述智能问诊方法包括:An electronic device, wherein the electronic device includes a memory, a processor, a program stored on the memory and operable on the processor, and a program for realizing the connection between the processor and the memory A data bus for communication, when the program is executed by the processor, an intelligent medical inquiry method is implemented, wherein the intelligent medical inquiry method includes:
    获取基本问诊文本;Obtain basic medical inquiry text;
    对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;Carrying out feature extraction on entity features in the basic medical inquiry text to obtain basic medical inquiry parameters;
    根据所述基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;Screening the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates;
    根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;Filtering the consultation templates in the set of candidate consultation templates according to a preset filtering algorithm to obtain a target consultation template;
    根据所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边;determining the target node on the target consultation template and the directed edges of the target node according to the basic consultation parameters;
    根据所述目标节点和所述有向边构建问诊顺序题目集;Constructing an inquiry sequence topic set according to the target node and the directed edge;
    根据所述问诊顺序题目集进行问诊。Inquiry is performed according to the question set of the order of inquiry.
  10. 根据权利要求9所述的电子设备,其中,所述对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数的步骤,包括:The electronic device according to claim 9, wherein the step of performing feature extraction on entity features in the basic medical questioning text to obtain basic medical questioning parameters includes:
    识别所述基本问诊文本中的实体特征;Identifying entity features in the basic medical questioning text;
    利用预先训练的序列分类器对所述实体特征进行分类处理;Classifying the entity features by using a pre-trained sequence classifier;
    对分类处理之后的实体特征进行特征提取,得到基本问诊参数。Feature extraction is performed on the entity features after classification processing to obtain basic consultation parameters.
  11. 根据权利要求9所述的电子设备,其中,所述基本问诊参数包括主诉信息,所述根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板的步骤,包括:The electronic device according to claim 9, wherein the basic consultation parameters include chief complaint information, and the consultation templates in the set of candidate consultation templates are filtered according to a preset filtering algorithm to obtain the target question Steps to diagnose the template, including:
    利用预先训练的文本自动生成模型对所述主诉信息以及所述候选问诊模板集合中的问诊模板进行处理,生成主诉文本串和问诊模板文本串;Using a pre-trained automatic text generation model to process the chief complaint information and the medical questioning templates in the candidate medical questioning template set to generate chief complaint text strings and medical questioning template text strings;
    分别对所述主诉文本串和所述问诊模板文本串进行编码处理,得到编码形式的主诉文本串和编码形式的问诊模板文本串;Carry out coding processing to described chief complaint text string and described medical inquiry template text string respectively, obtain the chief complaint text string of coded form and the medical inquiry template text string of coded form;
    计算所述编码形式的主诉文本串与每一所述编码形式的问诊模板文本串的相似度;Calculate the similarity between the main complaint text string in the coded form and each of the question template text strings in the coded form;
    根据所有所述相似度之间的大小关系以及所述相似度与预设的相似度阈值的大小关系,得到目标问诊模板。According to the magnitude relationship between all the similarities and the magnitude relationship between the similarity and a preset similarity threshold, a target consultation template is obtained.
  12. 根据权利要求11所述的电子设备,其中,所述根据所有所述相似度之间的大小关系以及所述相似度与预设的相似度阈值的大小关系,得到目标问诊模板的步骤,包括:The electronic device according to claim 11, wherein the step of obtaining the target consultation template according to the size relationship between all the similarities and the size relationship between the similarity and a preset similarity threshold includes :
    根据所有所述相似度之间的大小关系,确定相似度最高的问诊模板;According to the size relationship among all the similarities, determine the inquiry template with the highest similarity;
    若所述相似度最高的问诊模板的相似度大于等于预设的相似度阈值,则将所述相似度最高的问诊模板作为目标问诊模板。If the similarity of the question template with the highest similarity is greater than or equal to a preset similarity threshold, the question template with the highest similarity is used as the target question template.
  13. 根据权利要求11所述的电子设备,其中,所述根据所有所述相似度之间的大小关系以及所述相似度与预设的相似度阈值的大小关系,得到目标问诊模板的步骤,还包括:The electronic device according to claim 11, wherein the step of obtaining the target consultation template according to the size relationship between all the similarities and the size relationship between the similarity and the preset similarity threshold is also include:
    根据所有所述相似度之间的大小关系,确定相似度最高的问诊模板;According to the size relationship among all the similarities, determine the inquiry template with the highest similarity;
    若所述相似度最高的问诊模板的相似度小于预设的相似度阈值,则获取预设的参考问诊模板,并将所述预设的参考问诊模板作为目标问诊模板。If the similarity of the query template with the highest similarity is less than the preset similarity threshold, a preset reference query template is obtained, and the preset reference query template is used as a target query template.
  14. 根据权利要求9至13任一项所述的电子设备,其中,所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边的步骤,包括:The electronic device according to any one of claims 9 to 13, wherein the step of determining the target nodes on the target consultation template and the directed edges of the target nodes by the basic consultation parameters includes:
    根据所述基本问诊参数,确定所述目标问诊模板上的目标节点;determining a target node on the target medical inquiry template according to the basic medical inquiry parameters;
    获取所述目标节点的每一有向边的脚本数据;Obtain the script data of each directed edge of the target node;
    根据所述脚本数据,计算每一有向边的权重;Calculate the weight of each directed edge according to the script data;
    根据每一有向边的权重大小,确定所述目标节点的有向边。Determine the directed edge of the target node according to the weight of each directed edge.
  15. 一种计算机可读存储介质,用于计算机可读存储,其中,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现一种智能问诊方法,其中,所述智能问诊方法包括:A computer-readable storage medium for computer-readable storage, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to Realize a kind of intelligent interrogation method, wherein, described intelligent interrogation method comprises:
    获取基本问诊文本;Obtain basic medical inquiry text;
    对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数;Carrying out feature extraction on entity features in the basic medical inquiry text to obtain basic medical inquiry parameters;
    根据所述基本问诊参数对预设的问诊模板进行筛选,得到候选问诊模板集合;Screening the preset consultation templates according to the basic consultation parameters to obtain a set of candidate consultation templates;
    根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板;Filtering the consultation templates in the set of candidate consultation templates according to a preset filtering algorithm to obtain a target consultation template;
    根据所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边;determining the target node on the target consultation template and the directed edges of the target node according to the basic consultation parameters;
    根据所述目标节点和所述有向边构建问诊顺序题目集;Constructing an inquiry sequence topic set according to the target node and the directed edge;
    根据所述问诊顺序题目集进行问诊。Inquiry is performed according to the question set of the order of inquiry.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述对所述基本问诊文本中的实体特征进行特征提取,得到基本问诊参数的步骤,包括:The computer-readable storage medium according to claim 15, wherein the step of performing feature extraction on entity features in the basic medical questioning text to obtain basic medical questioning parameters includes:
    识别所述基本问诊文本中的实体特征;Identifying entity features in the basic medical questioning text;
    利用预先训练的序列分类器对所述实体特征进行分类处理;Classifying the entity features by using a pre-trained sequence classifier;
    对分类处理之后的实体特征进行特征提取,得到基本问诊参数。Feature extraction is performed on the entity features after classification processing to obtain basic consultation parameters.
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述基本问诊参数包括主诉信息,所述根据预设的过滤算法对所述候选问诊模板集合中的问诊模板进行过滤处理,得到目标问诊模板的步骤,包括:The computer-readable storage medium according to claim 15, wherein the basic consultation parameters include chief complaint information, and the consultation templates in the set of candidate consultation templates are filtered according to a preset filtering algorithm, The steps to obtain the target consultation template include:
    利用预先训练的文本自动生成模型对所述主诉信息以及所述候选问诊模板集合中的问诊模板进行处理,生成主诉文本串和问诊模板文本串;Using a pre-trained automatic text generation model to process the chief complaint information and the medical questioning templates in the candidate medical questioning template set to generate chief complaint text strings and medical questioning template text strings;
    分别对所述主诉文本串和所述问诊模板文本串进行编码处理,得到编码形式的主诉文本串和编码形式的问诊模板文本串;Carry out coding processing to described chief complaint text string and described medical inquiry template text string respectively, obtain the chief complaint text string of coded form and the medical inquiry template text string of coded form;
    计算所述编码形式的主诉文本串与每一所述编码形式的问诊模板文本串的相似度;Calculate the similarity between the main complaint text string in the coded form and each of the question template text strings in the coded form;
    根据所有所述相似度之间的大小关系以及所述相似度与预设的相似度阈值的大小关系,得到目标问诊模板。According to the magnitude relationship between all the similarities and the magnitude relationship between the similarity and a preset similarity threshold, a target consultation template is obtained.
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述根据所有所述相似度之间的大小关系以及所述相似度与预设的相似度阈值的大小关系,得到目标问诊模板的步骤,包括:The computer-readable storage medium according to claim 17, wherein, according to the size relationship between all the similarities and the size relationship between the similarity and the preset similarity threshold, the target consultation template is obtained. steps, including:
    根据所有所述相似度之间的大小关系,确定相似度最高的问诊模板;According to the size relationship among all the similarities, determine the inquiry template with the highest similarity;
    若所述相似度最高的问诊模板的相似度大于等于预设的相似度阈值,则将所述相似度最高的问诊模板作为目标问诊模板。If the similarity of the question template with the highest similarity is greater than or equal to a preset similarity threshold, the question template with the highest similarity is used as the target question template.
  19. 根据权利要求17所述的计算机可读存储介质,其中,所述根据所有所述相似度之间的大小关系以及所述相似度与预设的相似度阈值的大小关系,得到目标问诊模板的步骤,还包括:The computer-readable storage medium according to claim 17, wherein, according to the size relationship between all the similarities and the size relationship between the similarity and the preset similarity threshold, the target consultation template is obtained. steps, also include:
    根据所有所述相似度之间的大小关系,确定相似度最高的问诊模板;According to the size relationship among all the similarities, determine the inquiry template with the highest similarity;
    若所述相似度最高的问诊模板的相似度小于预设的相似度阈值,则获取预设的参考问诊模板,并将所述预设的参考问诊模板作为目标问诊模板。If the similarity of the query template with the highest similarity is less than the preset similarity threshold, a preset reference query template is obtained, and the preset reference query template is used as a target query template.
  20. 根据权利要求15至19任一项所述的计算机可读存储介质,其中,所述基本问诊参数确定所述目标问诊模板上的目标节点及所述目标节点的有向边的步骤,包括:The computer-readable storage medium according to any one of claims 15 to 19, wherein the basic consultation parameters determine the target node on the target consultation template and the step of the directed edge of the target node, comprising :
    根据所述基本问诊参数,确定所述目标问诊模板上的目标节点;determining a target node on the target medical inquiry template according to the basic medical inquiry parameters;
    获取所述目标节点的每一有向边的脚本数据;Obtain the script data of each directed edge of the target node;
    根据所述脚本数据,计算每一有向边的权重;Calculate the weight of each directed edge according to the script data;
    根据每一有向边的权重大小,确定所述目标节点的有向边。Determine the directed edge of the target node according to the weight of each directed edge.
PCT/CN2022/087527 2021-08-30 2022-04-19 Smart interrogation method and apparatus, electronic device, and storage medium WO2023029501A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111007751.2A CN113704428B (en) 2021-08-30 2021-08-30 Intelligent inquiry method, intelligent inquiry device, electronic equipment and storage medium
CN202111007751.2 2021-08-30

Publications (1)

Publication Number Publication Date
WO2023029501A1 true WO2023029501A1 (en) 2023-03-09

Family

ID=78657086

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/087527 WO2023029501A1 (en) 2021-08-30 2022-04-19 Smart interrogation method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN113704428B (en)
WO (1) WO2023029501A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116779087A (en) * 2023-08-18 2023-09-19 江苏臻云技术有限公司 Automatic data management system and method based on AI engine

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704428B (en) * 2021-08-30 2023-10-24 康键信息技术(深圳)有限公司 Intelligent inquiry method, intelligent inquiry device, electronic equipment and storage medium
CN114579723A (en) * 2022-03-02 2022-06-03 平安科技(深圳)有限公司 Interrogation method and apparatus, electronic device, and storage medium
CN114566295A (en) * 2022-03-04 2022-05-31 康键信息技术(深圳)有限公司 Online inquiry method, device, equipment and storage medium
CN116052907A (en) * 2022-12-16 2023-05-02 北京邮电大学 Inquiry method and device and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106650261A (en) * 2016-12-22 2017-05-10 上海智臻智能网络科技股份有限公司 Intelligent inquiry method, device and system
US20180137433A1 (en) * 2016-11-16 2018-05-17 International Business Machines Corporation Self-Training of Question Answering System Using Question Profiles
CN109065183A (en) * 2018-07-04 2018-12-21 平安科技(深圳)有限公司 Interrogation dialog template generates and interrogation data capture method, device
CN109192300A (en) * 2018-08-17 2019-01-11 百度在线网络技术(北京)有限公司 Intelligent way of inquisition, system, computer equipment and storage medium
US20200152338A1 (en) * 2018-11-14 2020-05-14 International Business Machines Corporation Dynamically optimized inquiry process for intelligent health pre-diagnosis
CN111159369A (en) * 2019-12-18 2020-05-15 平安健康互联网股份有限公司 Multi-round intelligent inquiry method and device and computer readable storage medium
CN112309587A (en) * 2020-11-26 2021-02-02 微医云(杭州)控股有限公司 On-line inquiry method, system, server and storage medium
CN112509682A (en) * 2020-12-15 2021-03-16 康键信息技术(深圳)有限公司 Text recognition-based inquiry method, device, equipment and storage medium
CN113704428A (en) * 2021-08-30 2021-11-26 康键信息技术(深圳)有限公司 Intelligent inquiry method, device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109492077B (en) * 2018-09-29 2020-09-29 北京智通云联科技有限公司 Knowledge graph-based petrochemical field question-answering method and system
CN110019820B (en) * 2019-03-28 2023-05-30 云知声(上海)智能科技有限公司 Method for detecting time consistency of complaints and symptoms of current medical history in medical records
CN112287080B (en) * 2020-10-23 2023-10-03 平安科技(深圳)有限公司 Method and device for rewriting problem statement, computer device and storage medium
CN112445903A (en) * 2020-11-26 2021-03-05 北京沃东天骏信息技术有限公司 Method, apparatus and storage medium for determining output content
CN113127621A (en) * 2021-04-28 2021-07-16 平安国际智慧城市科技股份有限公司 Dialogue module pushing method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180137433A1 (en) * 2016-11-16 2018-05-17 International Business Machines Corporation Self-Training of Question Answering System Using Question Profiles
CN106650261A (en) * 2016-12-22 2017-05-10 上海智臻智能网络科技股份有限公司 Intelligent inquiry method, device and system
CN109065183A (en) * 2018-07-04 2018-12-21 平安科技(深圳)有限公司 Interrogation dialog template generates and interrogation data capture method, device
CN109192300A (en) * 2018-08-17 2019-01-11 百度在线网络技术(北京)有限公司 Intelligent way of inquisition, system, computer equipment and storage medium
US20200152338A1 (en) * 2018-11-14 2020-05-14 International Business Machines Corporation Dynamically optimized inquiry process for intelligent health pre-diagnosis
CN111159369A (en) * 2019-12-18 2020-05-15 平安健康互联网股份有限公司 Multi-round intelligent inquiry method and device and computer readable storage medium
CN112309587A (en) * 2020-11-26 2021-02-02 微医云(杭州)控股有限公司 On-line inquiry method, system, server and storage medium
CN112509682A (en) * 2020-12-15 2021-03-16 康键信息技术(深圳)有限公司 Text recognition-based inquiry method, device, equipment and storage medium
CN113704428A (en) * 2021-08-30 2021-11-26 康键信息技术(深圳)有限公司 Intelligent inquiry method, device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116779087A (en) * 2023-08-18 2023-09-19 江苏臻云技术有限公司 Automatic data management system and method based on AI engine
CN116779087B (en) * 2023-08-18 2023-11-07 江苏臻云技术有限公司 Automatic data management system and method based on AI engine

Also Published As

Publication number Publication date
CN113704428B (en) 2023-10-24
CN113704428A (en) 2021-11-26

Similar Documents

Publication Publication Date Title
CN112131366B (en) Method, device and storage medium for training text classification model and text classification
WO2023029501A1 (en) Smart interrogation method and apparatus, electronic device, and storage medium
CN112131350B (en) Text label determining method, device, terminal and readable storage medium
CN111680159B (en) Data processing method and device and electronic equipment
CN112131393A (en) Construction method of medical knowledge map question-answering system based on BERT and similarity algorithm
WO2023029506A1 (en) Illness state analysis method and apparatus, electronic device, and storage medium
WO2023165012A1 (en) Consultation method and apparatus, electronic device, and storage medium
WO2023029502A1 (en) Method and apparatus for constructing user portrait on the basis of inquiry session, device, and medium
WO2023108993A1 (en) Product recommendation method, apparatus and device based on deep clustering algorithm, and medium
CN111881292B (en) Text classification method and device
CN112133406B (en) Multi-mode emotion guidance method and system based on emotion maps and storage medium
CN111540470B (en) Social network depression tendency detection model based on BERT transfer learning and training method thereof
CN116541493A (en) Interactive response method, device, equipment and storage medium based on intention recognition
Sharif et al. Vision to language: Methods, metrics and datasets
CN114613462A (en) Medical data processing method and device, electronic equipment and storage medium
An et al. Toward better understanding older adults: a biography brief timeline extraction approach
EP3901875A1 (en) Topic modelling of short medical inquiries
CN116702743A (en) Text similarity detection method and device, electronic equipment and storage medium
CN116844731A (en) Disease classification method, disease classification device, electronic device, and storage medium
CN114611529B (en) Intention recognition method and device, electronic equipment and storage medium
CN115795007A (en) Intelligent question-answering method, intelligent question-answering device, electronic equipment and storage medium
CN117009456A (en) Medical query text processing method, device, equipment, medium and electronic product
CN115270746A (en) Question sample generation method and device, electronic equipment and storage medium
CN115130461A (en) Text matching method and device, electronic equipment and storage medium
CN114360715A (en) Constitution identification method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22862647

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE