Registered office department recommendation method and device, equipment and storage medium

By constructing a diagnostic knowledge graph and using multi-hop reasoning filtering, combined with the GPT model to generate updated consultation dialogues, the problem of low accuracy in traditional registration department recommendations has been solved, achieving higher accuracy in department recommendations.

CN116483976BActive Publication Date: 2026-05-08PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2023-04-28
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Traditional methods of recommending departments for registration rely on matching departments based on a user's single chief complaint, resulting in a low accuracy rate for department recommendations.

Method used

By constructing a diagnostic knowledge graph, diseases and symptoms in the consultation dialogue text are extracted as nodes, connected and optimized for training, and multi-hop reasoning filtering and GPT model are used to generate and update consultation dialogues. Based on the consultation results, departments are selected and sent to the terminal device.

Benefits of technology

It improved the accuracy of department recommendations for registration, and achieved precision in the initial diagnosis and classification of users' diseases and department recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116483976B_ABST
    Figure CN116483976B_ABST
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence, and discloses a registration department recommendation method, comprising: extracting diseases and symptoms in each dialogue text in a dialogue text set to construct a diagnosis knowledge graph; when receiving a registration department recommendation request and an initial consultation dialogue of a user, extracting a consultation symptom in the initial consultation dialogue; when the consultation symptom in the diagnosis knowledge graph has a connected disease node, determining a consultation result according to the connected disease node; when the consultation symptom in the diagnosis knowledge graph does not have a connected disease node, screening a symptom node in the diagnosis knowledge graph based on the consultation symptom, and updating the initial consultation dialogue by using the screened node until the consultation symptom in the diagnosis knowledge graph has a connected disease node; and screening and recommending a department based on the consultation result. The present application also relates to a blockchain technology, and the consultation result can be stored in a blockchain node. The present application also provides a registration department recommendation device, equipment and medium. The present application can improve the accuracy of registration department recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to artificial intelligence technology and digital medical technology, and in particular to a method, device, electronic device and storage medium for recommending departments for registration. Background Technology

[0002] When consulting about traditional medications or registering for medical appointments, it is generally necessary to recommend the corresponding department to the user so that they can receive the appropriate consultation.

[0003] However, current appointment booking systems only recommend departments based on a user's single chief complaint, resulting in a low accuracy rate for department recommendations. Summary of the Invention

[0004] This invention provides a method, device, electronic device, and storage medium for recommending departments for registration, the main purpose of which is to improve the accuracy of department recommendations.

[0005] Obtain a set of consultation dialogue texts, extract diseases and symptoms from each dialogue text in the set, and connect the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph.

[0006] When receiving a user's request for a recommended department and an initial consultation dialogue, the symptoms in the initial consultation dialogue are extracted to obtain the consultation symptoms.

[0007] Determine whether the symptoms described in the diagnostic knowledge graph are connected to disease nodes;

[0008] When the symptoms described in the diagnostic knowledge graph are connected to disease nodes, the diagnosis result is determined based on the connected disease nodes.

[0009] When the symptoms described in the diagnostic knowledge graph do not have a connected disease node, the symptom nodes within the preset connection range of the symptoms described in the diagnostic knowledge graph are subjected to multi-hop reasoning and filtering to obtain the target node.

[0010] Based on the symptoms corresponding to the target node, the initial consultation dialogue is updated to obtain the updated initial consultation dialogue, and the step of extracting symptoms from the initial consultation dialogue is returned.

[0011] Based on the consultation results, all the preset departments are screened, and the screening results are sent to the preset terminal device.

[0012] Optionally, the step of extracting diseases and symptoms from each dialogue text in the dialogue text set, and connecting the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph, includes:

[0013] Extract diseases and symptoms from the dialogue text, and connect the extracted diseases and symptoms as nodes according to the order in which they appear in the dialogue text to construct a directed graph, thus obtaining a dialogue diagnosis knowledge graph.

[0014] Connect all the dialogue diagnostic knowledge graphs according to the same nodes to obtain the initial diagnostic knowledge graph;

[0015] The initial diagnostic knowledge graph is subjected to diagnostic optimization training to obtain the diagnostic knowledge graph.

[0016] Optionally, the step of extracting symptoms from the initial consultation dialogue to obtain consultation symptoms includes:

[0017] Identify all symptoms in the consultation dialogue and sort all identified symptoms according to the order of dialogues to which each symptom belongs in the initial consultation dialogue to obtain a symptom sequence;

[0018] The symptom that is last in the symptom sequence is identified as the symptom in the consultation.

[0019] Optionally, the step of performing multi-hop reasoning filtering on symptom nodes within the preset connection range of the diagnostic symptoms in the diagnostic knowledge graph to obtain target nodes includes:

[0020] Mark the nodes corresponding to the consultation symptoms in the diagnostic knowledge graph as access nodes;

[0021] Select symptom nodes within a preset connection range corresponding to the symptom in the diagnostic knowledge graph to obtain initial nodes, wherein the initial nodes are non-accessed nodes;

[0022] The node score of each initial node is calculated based on a multi-hop inference algorithm;

[0023] The target node is obtained by filtering all the initial nodes based on the node scores.

[0024] Optionally, the step of filtering all the initial nodes based on the node scores to obtain the target node includes:

[0025] The maximum node score among all the node scores is determined as the target node score;

[0026] The initial node corresponding to the target node score is determined as the target node.

[0027] Optionally, the step of updating the initial consultation dialogue based on the symptoms corresponding to the target node to obtain an updated initial consultation dialogue includes:

[0028] The node score of the target node is normalized to obtain the node distribution probability of the target node;

[0029] Based on the node distribution probability, the target node is gating selected to obtain the gating probability of the target node;

[0030] Determine whether the gated probability is greater than a preset gated threshold;

[0031] When the gating probability is greater than the preset gating threshold, the pre-constructed GPT model and the initial consultation dialogue are used for decoding to generate text, thus obtaining the consultation text;

[0032] When the gating probability is not greater than the preset gating threshold, the symptom corresponding to the target node is used as the decoded word of the GPT model. Based on the decoded word and the initial consultation dialogue, the GPT model is used to decode and obtain the consultation text.

[0033] Obtain the user's response based on the consultation text to obtain the consultation response;

[0034] The consultation text and the consultation response are added to the initial consultation dialogue to obtain the updated initial consultation dialogue.

[0035] Optionally, the step of filtering all the preset departments based on the consultation results and sending the filtering results to a preset terminal device includes:

[0036] Obtain information on the treatable diseases for each of the aforementioned departments;

[0037] The diagnosable and treatable disease information containing the consultation results is identified as the target diagnosable and treatable disease information;

[0038] The department corresponding to the information on the target diagnosable and treatable disease is identified as the target department;

[0039] The target department is sent to a preset terminal device.

[0040] To address the aforementioned problems, the present invention also provides a registration department recommendation device, the device comprising:

[0041] The knowledge graph construction module is used to obtain a set of consultation dialogue texts, extract diseases and symptoms from each dialogue text in the set of dialogue texts, and connect the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph.

[0042] The dialogue consultation module is used to extract symptoms from the initial consultation dialogue when receiving a user's request for a recommended department and an initial consultation dialogue. It then determines whether the consultation symptoms in the diagnostic knowledge graph are connected to disease nodes. If the consultation symptoms in the diagnostic knowledge graph are connected to disease nodes, the consultation result is determined based on the connected disease nodes. If the consultation symptoms in the diagnostic knowledge graph are not connected to disease nodes, multi-hop reasoning is performed on symptom nodes within a preset connection range in the diagnostic knowledge graph to obtain a target node. Based on the symptoms corresponding to the target node, the initial consultation dialogue is updated to obtain an updated initial consultation dialogue, and the process returns to the step of extracting symptoms from the initial consultation dialogue.

[0043] The department screening module is used to screen all the preset departments based on the consultation results and send the screening results to the preset terminal device.

[0044] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0045] Memory, storing at least one computer program; and

[0046] The processor executes the computer program stored in the memory to implement the above-described method for recommending registration departments.

[0047] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the aforementioned method for recommending departments for registration.

[0048] In this embodiment of the invention, when receiving a user's request for a recommended department and an initial consultation dialogue, the following steps are taken: Symptoms are extracted from the initial consultation dialogue to obtain consultation symptoms; it is determined whether the consultation symptoms in the diagnostic knowledge graph have connected disease nodes; if the consultation symptoms in the diagnostic knowledge graph have connected disease nodes, the consultation result is determined based on the connected disease nodes; if the consultation symptoms in the diagnostic knowledge graph do not have connected disease nodes, multi-hop reasoning is performed on the symptom nodes within a preset connection range in the diagnostic knowledge graph to obtain a target node; and the initial consultation dialogue is updated based on the symptoms corresponding to the target node. The system retrieves the updated initial consultation dialogue and returns to the step of extracting symptoms from the initial consultation dialogue. Based on the consultation results, it filters all preset departments and sends the filtering results to a preset terminal device. The consultation dialogue is updated based on the consultation knowledge graph, thereby updating the consultation symptoms and achieving a preliminary consultation classification of the user's disease. Then, based on the consultation results, department recommendations are made. Compared to simply filtering and recommending departments based on consultation symptoms, this method has a smaller selection range, thus improving the accuracy of the selection. Therefore, the registration department recommendation method, device, electronic device, and readable storage medium proposed in this embodiment of the invention improve the accuracy of registration department recommendations. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating a method for recommending registration departments according to an embodiment of the present invention.

[0050] Figure 2 This is a schematic diagram of a module for a registration department recommendation device provided in an embodiment of the present invention;

[0051] Figure 3 This is a schematic diagram of the internal structure of an electronic device for implementing a method for recommending departments for registration, provided in an embodiment of the present invention.

[0052] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0053] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0054] This invention provides a method for recommending departments for registration. The executing entity of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application embodiment: a server, a terminal, etc. In other words, the method for recommending departments for registration can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0055] Reference Figure 1 The flowchart shown is a schematic diagram of a department recommendation method provided in an embodiment of the present invention. In this embodiment, the department recommendation method includes the following steps:

[0056] S1. Obtain the consultation dialogue text set, extract the diseases and symptoms from each dialogue text in the dialogue text set, and connect the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph.

[0057] In this embodiment of the invention, the dialogue text is the text of a consultation between a doctor and a patient.

[0058] Furthermore, in order to gain a more intuitive understanding of the relationship between different diseases and symptoms, this embodiment of the invention extracts the diseases and symptoms from each dialogue text in the dialogue text set, and connects the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph.

[0059] Specifically, in this embodiment of the invention, the extraction of diseases and symptoms from each dialogue text in the dialogue text set, and the connection of the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph, includes:

[0060] Extract diseases and symptoms from the dialogue text, and connect the extracted diseases and symptoms as nodes according to the order in which they appear in the dialogue text to construct a directed graph, thus obtaining a dialogue diagnosis knowledge graph.

[0061] Connect all the dialogue diagnostic knowledge graphs based on the same nodes to obtain the initial diagnostic knowledge graph;

[0062] The initial diagnostic knowledge graph is subjected to diagnostic optimization training to obtain the diagnostic knowledge graph.

[0063] Specifically, in this embodiment of the invention, the edge weights connecting disease nodes and symptom nodes in the knowledge graph are calculated using the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm, and the edge weights connecting symptom nodes are calculated using the PMI (Pointwise Mutual Information) algorithm. Furthermore, in this embodiment of the invention, the initial diagnostic knowledge graph is trained with the diagnostic accuracy as the optimization objective to obtain the diagnostic knowledge graph.

[0064] In this embodiment of the invention, the disease nodes and symptom nodes in the diagnostic knowledge graph can be distinguished by different identifiers, such as using different colors to distinguish disease nodes and symptom nodes.

[0065] S2. When receiving a user's request for a recommended department for registration and an initial consultation dialogue, extract the symptoms from the initial consultation dialogue to obtain the consultation symptoms.

[0066] In this embodiment of the invention, the department recommendation request is a request from a user for a department recommendation when seeking medical treatment. The initial consultation dialogue is the text of the initial formatted dialogue between the doctor and the user, such as: "Doctor asks: What's wrong? User answers: My stomach hurts."

[0067] In this embodiment of the invention, in order to better conduct further consultations with users, the symptoms in the initial consultation dialogue are extracted to obtain the consultation symptoms.

[0068] Specifically, in this embodiment of the invention, symptoms are extracted from the initial consultation dialogue to obtain the consultation symptoms, including:

[0069] Identify all symptoms in the consultation dialogue and sort all identified symptoms according to the order of dialogues to which each symptom belongs in the initial consultation dialogue to obtain a symptom sequence;

[0070] The symptom that is last in the symptom sequence is identified as the symptom in the consultation.

[0071] In this embodiment of the invention, an entity recognition algorithm can be used to identify all symptoms in the consultation dialogue.

[0072] S3. Determine whether the symptoms described in the diagnostic knowledge graph are connected to disease nodes;

[0073] In this embodiment of the invention, in order to confirm a user's possible disease based on the user's symptoms, it is determined whether there are disease nodes connected to the diagnostic symptoms in the diagnostic knowledge graph. When there are disease nodes connected to the diagnostic symptoms in the diagnostic knowledge graph, the disease nodes connected to the diagnostic symptoms are the possible diseases that the user may have, and the disease corresponding to the disease nodes connected to the diagnostic symptoms is determined as the consultation result.

[0074] S4. When the symptoms described in the diagnostic knowledge graph have connected disease nodes, the diagnosis result is determined based on the connected disease nodes.

[0075] In this embodiment of the invention, when the symptoms described in the diagnostic knowledge graph are connected to disease nodes, the disease nodes connected to the symptoms represent the possible diseases the user may have. The disease corresponding to the disease node connected to the symptoms is identified as the consultation result, used for initial disease classification of the user, facilitating departmental recommendations. For example, if the disease node connected to the symptoms is "enteritis," then "enteritis" is identified as the consultation result.

[0076] In another embodiment of the present invention, the consultation results can be stored in a blockchain node, utilizing the high throughput of the blockchain node to improve the efficiency of data retrieval.

[0077] S5. When the symptoms described in the diagnostic knowledge graph do not have connected disease nodes, perform multi-hop reasoning and filtering on the symptom nodes within the preset connection range of the symptoms described in the diagnostic knowledge graph to obtain the target node.

[0078] In this embodiment of the invention, when the symptoms described in the diagnostic knowledge graph are not connected to disease nodes, it proves that it is necessary to continue asking the user about their symptoms in order to determine the possible disease the user may have. Therefore, it is necessary to filter the symptom nodes connected to the symptoms described in the diagnostic knowledge graph and update the filtered symptom nodes to the requested symptoms.

[0079] In detail, the method of performing multi-hop reasoning and filtering on symptom nodes within the preset connection range of the diagnostic symptoms in the diagnostic knowledge graph to obtain target nodes in this embodiment of the invention includes:

[0080] Mark the nodes corresponding to the consultation symptoms in the diagnostic knowledge graph as access nodes;

[0081] Select symptom nodes within a preset connection range corresponding to the symptom in the diagnostic knowledge graph to obtain initial nodes, wherein the initial nodes are non-accessed nodes;

[0082] The node score of each initial node is calculated based on a multi-hop inference algorithm;

[0083] The target node is obtained by filtering all the initial nodes based on the node scores.

[0084] Specifically, in this embodiment of the invention, the node score of each initial node is calculated using the following formula, including:

[0085] ns(v) = (,r∈(Nin(v)) (.ns(u)+R(u,,))

[0086] Wherein, Nin(v) represents the set of initial nodes connected to the initial node v, γ represents the preset hyperparameter of multi-hop score, ns(v) represents the node score of the initial node v, ns(u) represents the node score of the initial node u, f represents the average function or the maximum function, and R(u,r,v) represents the obtained correlation scores of the initial nodes u, r, and v.

[0087] The correlation score described in this embodiment of the invention can be calculated using the commonly used method for calculating the correlation score of triples, which will not be elaborated here.

[0088] Further, in this embodiment of the invention, all the initial nodes are filtered according to the node scores to obtain the target node, including:

[0089] The maximum node score among all the node scores is determined as the target node score;

[0090] The initial node corresponding to the target node score is determined as the target node.

[0091] S6. Based on the symptoms corresponding to the target node, update the initial consultation dialogue to obtain the updated initial consultation dialogue, and return to the step of extracting symptoms from the initial consultation dialogue.

[0092] Specifically, in this embodiment of the invention, the process of generating and updating the initial consultation dialogue based on the symptoms corresponding to the target node to obtain an updated initial consultation dialogue includes:

[0093] The node score of the target node is normalized to obtain the node distribution probability of the target node;

[0094] Based on the node distribution probability, the target node is gating selected to obtain the gating probability of the target node;

[0095] Determine whether the gated probability is greater than a preset gated threshold;

[0096] When the gating probability is greater than the preset gating threshold, the pre-constructed GPT model and the initial consultation dialogue are used for decoding to generate text, thus obtaining the consultation text;

[0097] When the gating probability is not greater than the preset gating threshold, the symptom corresponding to the target node is used as the decoding word of the GPT model, and the pre-built GPT model and the initial consultation dialogue are used for decoding to obtain the consultation text;

[0098] Obtain the user's response based on the consultation text to obtain the consultation response;

[0099] The consultation text and the consultation response are added to the initial consultation dialogue to obtain the updated initial consultation dialogue.

[0100] Specifically, in this embodiment of the invention, the softmax function is used to normalize the node score of the target node.

[0101] Furthermore, in this embodiment of the invention, gating selection of the target node is performed based on the node distribution probability to obtain the gating probability of the target node, including:

[0102] After obtaining the initial consultation dialogue input to the GPT model, the hidden layer output matrix of the GPT model is obtained.

[0103] The hidden layer output matrix is ​​multiplied by the pre-constructed weight matrix to perform a gating feature.

[0104] The gating feature is used as a variable in the softmax function to calculate the gating probability.

[0105] In detail, in this embodiment of the invention, the initial consultation dialogue is decoded using a pre-built GPT model to generate text, which includes: inputting the initial consultation dialogue into the GPT model, decoding it using the original vocabulary of the GPT model, and obtaining the consultation text.

[0106] Furthermore, in this embodiment of the invention, the symptoms corresponding to the target node are used as the decoded words of the GPT model. Based on the decoded words and the initial consultation dialogue, the GPT model is used to decode and obtain the consultation text, including: inputting the initial consultation dialogue into the GPT model, decoding based on the decoded words, and obtaining the consultation text.

[0107] S7. Based on the consultation results, filter all the preset departments and send the filtering results to the preset terminal device.

[0108] In this embodiment of the invention, the consultation result is the disease node connected to the consultation symptoms in the diagnostic knowledge graph. Therefore, in this embodiment of the invention, it is necessary to determine which department is responsible for the disease corresponding to the disease node, and then send the corresponding department to the preset terminal device. All the departments mentioned are all departments that can be registered.

[0109] Specifically, S7 in this embodiment of the invention includes:

[0110] Obtain information on the treatable diseases for each of the aforementioned departments;

[0111] The diagnosable and treatable disease information containing the consultation results is identified as the target diagnosable and treatable disease information;

[0112] The department corresponding to the information on the target diagnosable and treatable disease is identified as the target department;

[0113] The target department is sent to a preset terminal device.

[0114] Specifically, in this embodiment of the invention, the set of diseases that the department corresponding to the information on treatable diseases can treat or is good at treating is included. The terminal device is a smart terminal device, which can be a device that sends the request for the recommended department for registration, including: mobile phone, computer, tablet, etc.

[0115] like Figure 2 The diagram shown is a functional block diagram of the department recommendation device for registration in this invention.

[0116] The appointment department recommendation device 100 of this invention can be installed in an electronic device. Depending on the functions implemented, the appointment department recommendation device may include a knowledge graph construction module 101, a dialogue consultation module 102, and a department screening module 103. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.

[0117] In this embodiment, the functions of each module / unit are as follows:

[0118] The knowledge graph construction module 101 is used to obtain a set of consultation dialogue texts, extract diseases and symptoms from each dialogue text in the set of dialogue texts, and connect the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph.

[0119] The dialogue consultation module 102 is used to extract symptoms from the initial consultation dialogue when receiving a user's request for a recommended department and an initial consultation dialogue, thereby obtaining consultation symptoms; determine whether the consultation symptoms in the diagnostic knowledge graph have connected disease nodes; if the consultation symptoms in the diagnostic knowledge graph have connected disease nodes, determine the consultation result based on the connected disease nodes; if the consultation symptoms in the diagnostic knowledge graph do not have connected disease nodes, perform multi-hop reasoning filtering on symptom nodes within a preset connection range of the consultation symptoms in the diagnostic knowledge graph to obtain a target node; update the initial consultation dialogue based on the symptoms corresponding to the target node to obtain an updated initial consultation dialogue, and return to the step of extracting symptoms from the initial consultation dialogue;

[0120] The department screening module 103 is used to screen all the preset departments based on the consultation results and send the screening results to the preset terminal device.

[0121] In detail, each module in the registration department recommendation device 100 described in this embodiment of the invention adopts the same characteristics as described above during use. Figure 1 The method used is the same as the department recommendation method described above and can produce the same technical effect, so it will not be repeated here.

[0122] like Figure 3 The diagram shown is a structural schematic of the electronic device used in this invention to implement the department recommendation method for registration.

[0123] The electronic device may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a department recommendation program for registration.

[0124] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code of a department recommendation program, but also to temporarily store data that has been output or will be output.

[0125] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., a department recommendation program for registration), and calls data stored in the memory 11 to perform various functions of the electronic device and process data.

[0126] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is configured to enable communication between the memory 11 and at least one processor 10, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus.

[0127] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0128] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault classification circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0129] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device and other electronic devices.

[0130] Optionally, the communication interface 13 may further include a user interface, which may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0131] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0132] The registration department recommendation program stored in the memory 11 of the electronic device is a combination of multiple computer programs. When run in the processor 10, it can achieve the following:

[0133] Obtain a set of consultation dialogue texts, extract diseases and symptoms from each dialogue text in the set, and connect the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph.

[0134] When receiving a user's request for a recommended department and an initial consultation dialogue, the symptoms in the initial consultation dialogue are extracted to obtain the consultation symptoms.

[0135] Determine whether the symptoms described in the diagnostic knowledge graph are connected to disease nodes;

[0136] When the symptoms described in the diagnostic knowledge graph are connected to disease nodes, the diagnosis result is determined based on the connected disease nodes.

[0137] When the symptoms described in the diagnostic knowledge graph do not have a connected disease node, the symptom nodes within the preset connection range of the symptoms described in the diagnostic knowledge graph are subjected to multi-hop reasoning and filtering to obtain the target node.

[0138] Based on the symptoms corresponding to the target node, the initial consultation dialogue is updated to obtain the updated initial consultation dialogue, and the step of extracting symptoms from the initial consultation dialogue is returned.

[0139] Based on the consultation results, all the preset departments are screened, and the screening results are sent to the preset terminal device.

[0140] Specifically, the processor 10's implementation method of the above-mentioned computer program can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0141] Furthermore, if the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0142] Embodiments of the present invention may also provide a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0143] Obtain a set of consultation dialogue texts, extract diseases and symptoms from each dialogue text in the set, and connect the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph.

[0144] When receiving a user's request for a recommended department and an initial consultation dialogue, the symptoms in the initial consultation dialogue are extracted to obtain the consultation symptoms.

[0145] Determine whether the symptoms described in the diagnostic knowledge graph are connected to disease nodes;

[0146] When the symptoms described in the diagnostic knowledge graph are connected to disease nodes, the diagnosis result is determined based on the connected disease nodes.

[0147] When the symptoms described in the diagnostic knowledge graph do not have a connected disease node, the symptom nodes within the preset connection range of the symptoms described in the diagnostic knowledge graph are subjected to multi-hop reasoning and filtering to obtain the target node.

[0148] Based on the symptoms corresponding to the target node, the initial consultation dialogue is updated to obtain the updated initial consultation dialogue, and the step of extracting symptoms from the initial consultation dialogue is returned.

[0149] Based on the consultation results, all the preset departments are screened, and the screening results are sent to the preset terminal device.

[0150] Furthermore, the computer's usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, applications required for at least one function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.

[0151] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0152] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0153] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0154] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0155] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0156] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0157] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0158] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The term "second class" is used to indicate names and does not indicate any specific order.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for recommending departments for registration, characterized in that, The method includes: Obtain a set of consultation dialogue texts, extract diseases and symptoms from each dialogue text in the set, and connect the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph. When receiving a user's request for a recommended department and an initial consultation dialogue, the symptoms in the initial consultation dialogue are extracted to obtain the consultation symptoms. Determine whether the symptoms described in the diagnostic knowledge graph are connected to disease nodes; When the symptoms described in the diagnostic knowledge graph are connected to disease nodes, the diagnosis result is determined based on the connected disease nodes. When the symptoms described in the diagnostic knowledge graph do not have a connected disease node, the symptom nodes within the preset connection range of the symptoms described in the diagnostic knowledge graph are subjected to multi-hop reasoning and filtering to obtain the target node. Based on the symptoms corresponding to the target node, the initial consultation dialogue is updated to obtain the updated initial consultation dialogue, and the step of extracting symptoms from the initial consultation dialogue is returned. Based on the consultation results, all the preset departments are screened, and the screening results are sent to the preset terminal device; The step of updating the initial consultation dialogue based on the symptoms corresponding to the target node to obtain an updated initial consultation dialogue includes: normalizing the node score of the target node to obtain the node distribution probability of the target node; gating the target node based on the node distribution probability to obtain the gating probability of the target node; determining whether the gating probability is greater than a preset gating threshold; if the gating probability is greater than the preset gating threshold, decoding using a pre-built GPT model and the initial consultation dialogue to generate text, obtaining consultation text; if the gating probability is not greater than the preset gating threshold, using the symptoms corresponding to the target node as the decoding words of the GPT model, decoding using the GPT model based on the decoding words and the initial consultation dialogue to obtain consultation text; obtaining the user's reply based on the consultation text to obtain a consultation reply; and adding the consultation text and the consultation reply to the initial consultation dialogue to obtain an updated initial consultation dialogue.

2. The method for recommending registration departments as described in claim 1, characterized in that, The process involves extracting diseases and symptoms from each dialogue text in the dialogue text set, and connecting the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph, including: Extract diseases and symptoms from the dialogue text, and connect the extracted diseases and symptoms as nodes according to the order in which they appear in the dialogue text to construct a directed graph, thus obtaining a dialogue diagnosis knowledge graph. Connect all the dialogue diagnostic knowledge graphs based on the same nodes to obtain the initial diagnostic knowledge graph; The initial diagnostic knowledge graph is subjected to diagnostic optimization training to obtain the diagnostic knowledge graph.

3. The method for recommending registration departments as described in claim 1, characterized in that, The extraction of symptoms from the initial consultation dialogue to obtain consultation symptoms includes: Identify all symptoms in the consultation dialogue and sort all identified symptoms according to the order of dialogues to which each symptom belongs in the initial consultation dialogue to obtain a symptom sequence; The symptom that is last in the symptom sequence is identified as the symptom in the consultation.

4. The method for recommending registration departments as described in claim 1, characterized in that, The process of performing multi-hop reasoning and filtering on symptom nodes within the preset connection range of the diagnostic symptoms in the diagnostic knowledge graph to obtain target nodes includes: Mark the nodes corresponding to the consultation symptoms in the diagnostic knowledge graph as access nodes; Select symptom nodes within a preset connection range corresponding to the symptom in the diagnostic knowledge graph to obtain initial nodes, wherein the initial nodes are non-accessed nodes; The node score of each initial node is calculated based on a multi-hop inference algorithm; The target node is obtained by filtering all the initial nodes based on the node scores.

5. The method for recommending registration departments as described in claim 4, characterized in that, The step of filtering all the initial nodes based on the node scores to obtain the target node includes: The maximum node score among all the node scores is determined as the target node score; The initial node corresponding to the target node score is determined as the target node.

6. The method for recommending registration departments as described in any one of claims 1 to 5, characterized in that, The step of filtering all the preset departments based on the consultation results and sending the filtering results to the preset terminal device includes: Obtain information on the treatable diseases for each of the aforementioned departments; The diagnosable and treatable disease information containing the consultation results is identified as the target diagnosable and treatable disease information; The department corresponding to the information on the target diagnosable and treatable disease is identified as the target department; The target department is sent to a preset terminal device.

7. A device for recommending departments for registration, characterized in that, include: The knowledge graph construction module is used to obtain a set of consultation dialogue texts, extract diseases and symptoms from each dialogue text in the set of dialogue texts, and connect the extracted diseases and symptoms as nodes to obtain a diagnostic knowledge graph. The dialogue consultation module is used to extract the symptoms from the initial consultation dialogue when it receives a user's request for a recommended department and the initial consultation dialogue, and obtain the consultation symptoms. Determine whether the symptoms described in the diagnostic knowledge graph are connected to disease nodes; if the symptoms described in the diagnostic knowledge graph are connected to disease nodes, determine the consultation result based on the connected disease nodes. When the symptoms in the diagnostic knowledge graph are not connected to any disease nodes, multi-hop reasoning is performed on the symptom nodes within the preset connection range of the symptoms in the diagnostic knowledge graph to obtain the target node; based on the symptoms corresponding to the target node, the initial consultation dialogue is updated to obtain the updated initial consultation dialogue, and the step of extracting symptoms from the initial consultation dialogue is returned. The department screening module is used to screen all the preset departments based on the consultation results and send the screening results to the preset terminal device; The step of updating the initial consultation dialogue based on the symptoms corresponding to the target node to obtain an updated initial consultation dialogue includes: normalizing the node score of the target node to obtain the node distribution probability of the target node; gating the target node based on the node distribution probability to obtain the gating probability of the target node; determining whether the gating probability is greater than a preset gating threshold; if the gating probability is greater than the preset gating threshold, decoding using a pre-built GPT model and the initial consultation dialogue to generate text, obtaining consultation text; if the gating probability is not greater than the preset gating threshold, using the symptoms corresponding to the target node as the decoding words of the GPT model, decoding using the GPT model based on the decoding words and the initial consultation dialogue to obtain consultation text; obtaining the user's reply based on the consultation text to obtain a consultation reply; and adding the consultation text and the consultation reply to the initial consultation dialogue to obtain an updated initial consultation dialogue.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory that is communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the registration department recommendation method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the registration department recommendation method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dialogue representation-based triage method, apparatus and device, and storage medium

    CN113223735A

  • Methods and systems for an artificial intelligence alimentary professional support network for vibrant constitutional guidance

    US20200321122A1