Search

CN-116483976-B - Registration department recommendation method, device, equipment and storage medium

CN116483976BCN 116483976 BCN116483976 BCN 116483976BCN-116483976-B

Abstract

The invention relates to the field of artificial intelligence and discloses a method for recommending a registration department, which comprises the steps of extracting diseases and symptoms in each dialogue text in a dialogue text set to construct a diagnosis knowledge graph, extracting inquiry symptoms in an initial inquiry dialogue when receiving a registration department recommendation request and the initial inquiry dialogue of a user, determining inquiry results according to the connected disease nodes when the inquiry symptoms are connected with the disease nodes in the diagnosis knowledge graph, screening symptom nodes in the diagnosis knowledge graph based on the inquiry symptoms when the inquiry symptoms are not connected with the disease nodes in the diagnosis knowledge graph, updating the initial inquiry dialogue by utilizing screening nodes until the inquiry symptoms are connected with the disease nodes in the diagnosis knowledge graph, and screening and recommending departments based on the inquiry results. The invention also relates to a blockchain technique, and the inquiry result can be stored in a blockchain node. The invention also provides a registration department recommendation device, equipment and medium. The invention can improve the accuracy of registration department recommendation.

Inventors

  • Yao Haishen

Assignees

  • 平安科技(深圳)有限公司

Dates

Publication Date
20260508
Application Date
20230428

Claims (9)

  1. 1. A method for recommending a registered department, the method comprising: Acquiring a consultation dialogue text set, extracting diseases and symptoms in each dialogue text in the dialogue text set, and connecting the extracted diseases and symptoms as nodes to obtain a diagnosis knowledge graph; When receiving a registration department recommendation request and an initial consultation dialogue of a user, extracting symptoms in the initial consultation dialogue to obtain consultation symptoms; Judging whether the inquiry symptoms have connected disease nodes in the diagnosis knowledge graph; When the inquiry symptoms in the diagnosis knowledge graph are connected with disease nodes, determining inquiry results according to the connected disease nodes; when the inquiry symptoms in the diagnosis knowledge graph are not connected with disease nodes, performing multi-hop reasoning screening on symptom nodes in a preset connection range of the inquiry symptoms in the diagnosis knowledge graph to obtain target nodes; performing dialogue generation update on the initial inquiry dialogue based on the symptoms corresponding to the target node to obtain an updated initial inquiry dialogue, and returning to the step of extracting the symptoms in the initial inquiry dialogue; screening all preset departments according to the inquiry result, and sending the screening result to preset terminal equipment; The method comprises the steps of carrying out dialogue generation updating on an initial inquiry dialogue based on symptoms corresponding to a target node to obtain an updated initial inquiry dialogue, carrying out normalized conversion on node scores of the target node to obtain node distribution probability of the target node, carrying out gating selection on the target node based on the node distribution probability to obtain gating probability of the target node, judging whether the gating probability is larger than a preset gating threshold, decoding by utilizing a pre-built GPT model and the initial inquiry dialogue to carry out text generation to obtain an inquiry text when the gating probability is larger than the preset gating threshold, taking the symptoms corresponding to the target node as decoding words of the GPT model when the gating probability is not larger than the preset gating threshold, decoding by utilizing the GPT model based on the decoding words and the initial inquiry dialogue to obtain an inquiry text, obtaining a reply of a user based on the inquiry text, and adding the inquiry text and the initial inquiry dialogue into the updated initial inquiry dialogue to obtain the inquiry text.
  2. 2. The method for recommending a registered department as set forth in claim 1, wherein the extracting the diseases and symptoms in each dialogue text in the dialogue text set and connecting the extracted diseases and symptoms as nodes to obtain a diagnosis knowledge graph comprises: extracting diseases and symptoms in the dialogue text, and connecting the extracted diseases and symptoms as nodes according to the sequence of occurrence in the dialogue text to construct a directed graph, so as to obtain a dialogue diagnosis knowledge graph; connecting all the dialogue diagnosis knowledge graphs based on the same node to obtain an initial diagnosis knowledge graph; And performing diagnosis optimization training on the initial diagnosis knowledge graph to obtain the diagnosis knowledge graph.
  3. 3. The method of claim 1, wherein the extracting the symptoms in the initial consultation session to obtain the consultation symptoms comprises: Identifying all symptoms in the inquiry dialogue, and sequencing all the identified symptoms according to the dialogue sequence of the dialogue to which each symptom belongs in the initial inquiry dialogue to obtain a symptom sequence; And identifying the last symptom in the symptom sequence as the inquiry symptom.
  4. 4. The method for recommending a registration department according to claim 1, wherein the multi-hop inference screening is performed on symptom nodes within the preset connection range of the inquiry symptoms in the diagnosis knowledge graph to obtain target nodes, and the method comprises the steps of: marking the node corresponding to the inquiry symptom in the diagnosis knowledge graph as an access node; Selecting symptom nodes in a preset connection range of nodes corresponding to the inquiry symptoms in the diagnosis knowledge graph to obtain initial nodes, wherein the initial nodes are non-access nodes; calculating the node score of each initial node based on a multi-hop reasoning algorithm; And screening all the initial nodes according to the node scores to obtain the target node.
  5. 5. The method for recommending a registered department as set forth in claim 4, wherein said screening all the initial nodes according to the node score to obtain a target node includes: Determining the maximum node score in all the node scores as a target node score; and determining the initial node corresponding to the target node score as the target node.
  6. 6. The method for recommending a registered department according to any one of claims 1 to 5, wherein the steps of screening all preset departments according to the inquiry result, and transmitting the screening result to a preset terminal device include: obtaining diagnosable disease information of each department; Determining diagnosable disease information including the inquiry result as target diagnosable disease information; Determining a department corresponding to the target diagnosable disease information as a target department; And sending the target department to preset terminal equipment.
  7. 7. A registration department recommendation device, comprising: the knowledge graph construction module is used for acquiring a consultation dialogue text set, extracting diseases and symptoms in each dialogue text in the dialogue text set, and connecting the extracted diseases and symptoms as nodes to obtain a diagnosis knowledge graph; The dialogue inquiry module is used for extracting symptoms in an initial inquiry dialogue to obtain inquiry symptoms when receiving a registration department recommendation request and the initial inquiry dialogue of a user, judging whether the inquiry symptoms have connected disease nodes in the diagnosis knowledge graph, determining inquiry results according to the connected disease nodes when the inquiry symptoms have connected disease nodes in the diagnosis knowledge graph, carrying out multi-hop reasoning screening on the symptom nodes in a preset connection range of the inquiry symptoms in the diagnosis knowledge graph to obtain target nodes, carrying out dialogue generation update on the initial inquiry dialogue based on the symptoms corresponding to the target nodes to obtain updated initial inquiry dialogue, and returning to the step of extracting the symptoms in the initial inquiry dialogue; the department screening module is used for screening all preset departments according to the inquiry result and sending the screening result to preset terminal equipment; The method comprises the steps of carrying out dialogue generation updating on an initial inquiry dialogue based on symptoms corresponding to a target node to obtain an updated initial inquiry dialogue, carrying out normalized conversion on node scores of the target node to obtain node distribution probability of the target node, carrying out gating selection on the target node based on the node distribution probability to obtain gating probability of the target node, judging whether the gating probability is larger than a preset gating threshold, decoding by utilizing a pre-built GPT model and the initial inquiry dialogue to carry out text generation to obtain an inquiry text when the gating probability is larger than the preset gating threshold, taking the symptoms corresponding to the target node as decoding words of the GPT model when the gating probability is not larger than the preset gating threshold, decoding by utilizing the GPT model based on the decoding words and the initial inquiry dialogue to obtain an inquiry text, obtaining a reply of a user based on the inquiry text, and adding the inquiry text and the initial inquiry dialogue into the updated initial inquiry dialogue to obtain the inquiry text.
  8. 8. An electronic device, the electronic device comprising: At least one processor, and A memory communicatively coupled to the at least one processor; Wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of registering department recommendation as claimed in any one of claims 1 to 6.
  9. 9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements a registered department recommendation method according to any one of claims 1 to 6.

Description

Registration department recommendation method, device, equipment and storage medium Technical Field The invention relates to an artificial intelligence technology and a digital medical technology, in particular to a registration department recommendation method, a registration department recommendation device, electronic equipment and a storage medium. Background When a traditional medicine is consulted or a disease inquiry is registered, a corresponding department is generally recommended to a user so that the user can conduct a corresponding inquiry. However, the current registration can be recommended to match the corresponding department recommendation according to the single complaint symptoms of the user, so that the accuracy of the registered department recommendation is low. Disclosure of Invention The invention provides a method, a device, electronic equipment and a storage medium for recommending a registration department, and mainly aims to improve the accuracy of the recommendation of the registration department. Acquiring a consultation dialogue text set, extracting diseases and symptoms in each dialogue text in the dialogue text set, and connecting the extracted diseases and symptoms as nodes to obtain a diagnosis knowledge graph; When receiving a registration department recommendation request and an initial consultation dialogue of a user, extracting symptoms in the initial consultation dialogue to obtain consultation symptoms; Judging whether the inquiry symptoms have connected disease nodes in the diagnosis knowledge graph; When the inquiry symptoms in the diagnosis knowledge graph are connected with disease nodes, determining inquiry results according to the connected disease nodes; when the inquiry symptoms in the diagnosis knowledge graph are not connected with disease nodes, performing multi-hop reasoning screening on symptom nodes in a preset connection range of the inquiry symptoms in the diagnosis knowledge graph to obtain target nodes; performing dialogue generation update on the initial inquiry dialogue based on the symptoms corresponding to the target node to obtain an updated initial inquiry dialogue, and returning to the step of extracting the symptoms in the initial inquiry dialogue; screening all preset departments according to the inquiry result, and sending the screening result to preset terminal equipment. Optionally, the extracting the diseases and symptoms in each dialogue text in the dialogue text set, and connecting the extracted diseases and symptoms as nodes to obtain a diagnosis knowledge graph, including: extracting diseases and symptoms in the dialogue text, and connecting the extracted diseases and symptoms as nodes according to the sequence of occurrence in the dialogue text to construct a directed graph, so as to obtain a dialogue diagnosis knowledge graph; connecting all the dialogue diagnosis knowledge graphs according to the same node to obtain an initial diagnosis knowledge graph; And performing diagnosis optimization training on the initial diagnosis knowledge graph to obtain the diagnosis knowledge graph. Optionally, the extracting the symptoms in the initial inquiry dialogue to obtain inquiry symptoms includes: Identifying all symptoms in the inquiry dialogue, and sequencing all the identified symptoms according to the dialogue sequence of the dialogue to which each symptom belongs in the initial inquiry dialogue to obtain a symptom sequence; And identifying the last symptom in the symptom sequence as the inquiry symptom. Optionally, the performing multi-hop reasoning and screening on the symptom nodes in the preset connection range of the inquiry symptoms in the diagnosis knowledge graph to obtain target nodes includes: marking the node corresponding to the inquiry symptom in the diagnosis knowledge graph as an access node; Selecting symptom nodes in a preset connection range of nodes corresponding to the inquiry symptoms in the diagnosis knowledge graph to obtain initial nodes, wherein the initial nodes are non-access nodes; calculating the node score of each initial node based on a multi-hop reasoning algorithm; And screening all the initial nodes according to the node scores to obtain the target node. Optionally, the screening all the initial nodes according to the node score to obtain a target node includes: Determining the maximum node score in all the node scores as a target node score; and determining the initial node corresponding to the target node score as the target node. Optionally, the updating the dialogue generation of the initial inquiry dialogue based on the symptoms corresponding to the target node, to obtain an updated initial inquiry dialogue includes: carrying out normalization conversion on the node score of the target node to obtain node distribution probability of the target node; Performing gating selection on the target node based on the node distribution probability to obtain gating probability of the target node; judging wheth