A doctor recommendation method based on modeling doctor knowledge graph using forest hypergraph

Through the forest hypergraph model, combined with the doctor knowledge graph and the patient behavior sequence, a hypergraph forest is constructed and the node vector is obtained, which solves the problem of data sparseness and department information neglect in the online medical platform, and achieves more accurate doctor recommendation effects.

CN116521998BActive Publication Date: 2024-09-03NARI HEALTH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310560989.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2024-09-03
Estimated Expiration
2043-05-18

AI Technical Summary

Technical Problem

In online medical platforms, it is difficult for patients to find suitable doctors from massive doctor resources. The existing recommendation system ignores the sparsity of doctor department information and patient behavior sequences, resulting in poor doctor recommendation results.

Method used

The forest hypergraph is used to model the doctor's knowledge graph. By dividing the patient behavior sequence into subsequences, a hypergraph forest is constructed, and the hypergraph forest neural network is used to obtain the node vector representation, and the sequence encoder is combined to obtain the patient's local and global preferences. , recommend a suitable doctor.

Benefits of technology

It effectively alleviates the problem of data sparseness, takes into account the attributes of doctors' departments, improves the accuracy and effect of doctor recommendation, and avoids the problem of over-smoothing of the graph structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116521998B
    Figure CN116521998B
Patent Text Reader

Abstract

The present invention discloses a doctor recommendation method for modeling a doctor knowledge graph using a forest hypergraph, and recommends suitable doctors to patients based on the patient's behavior sequence in an intelligent medical guidance platform and the doctor's knowledge graph. The forward propagation part of the present invention mainly consists of four parts. The first part is to divide the patient's behavior sequence into several subsequences based on the doctor's knowledge graph; the second part is to construct a hypergraph forest based on the doctor's knowledge graph and several subsequences of the patient; the third part is to use a hypergraph forest neural network to obtain a node vector representation in the hypergraph forest; the fourth part is to use a sequence encoder to model the patient's behavior sequence and several subsequences to obtain the patient's local preference and global preference; the fifth part is to recommend doctors to patients based on their preferences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of Internet service technology, and in particular, relates to a doctor recommendation method for modeling a doctor knowledge graph using a forest hypergraph. Background Art

[0002] Recommendation systems have now been successfully applied in various fields, such as e-commerce and short video. Recommendation systems learn user preferences from the item sequences of historical user interactions and predict the next item that the user is interested in. The specific approach is to learn user vectors and item vectors from the platform data, and recommend items to users based on the similarity between user vectors and item vectors. However, the application of recommendation systems in medical platforms is not yet widespread. One of the main functions of online medical platforms is intelligent consultation. There are many doctors in online medical platforms. For example, Good Doctor has more than 600,000 doctors. Patients can search for doctors suitable for them in online medical platforms and consult online or offline. However, because there are too many doctors on the platform, most patients lack basic medical knowledge, and it is difficult to judge which doctors are suitable for them, and it is difficult to find doctors suitable for them from a large number of doctor resources. Therefore, doctor recommendation is particularly important. The doctor recommendation method recommends suitable doctors to patients based on the patient's historical browsing data on the platform.

[0003] Unlike recommendation systems in other fields, doctors in the doctor recommendation scenario belong to different departments. For example, the first-level department includes internal medicine, which also includes several second-level departments: respiratory medicine, gastroenterology, cardiovascular medicine, neurology, etc. Doctors in different departments treat different types of diseases, and the information of the department to which the doctor belongs can be obtained from the doctor knowledge graph. Patients may browse the information of doctors in multiple departments at the same time, because many times patients cannot accurately judge which disease they have and which department they should consult. It is also possible that the patient suffers from multiple diseases, or diseases that require doctors from multiple departments to treat together. Therefore, in the doctor recommendation scenario, it is very necessary to divide the patient browsing sequence into multiple subsequences according to the department information and learn the information transfer of subsequences under the same department. Similarly, it is also very necessary to treat the patient browsing sequence as a complete sequence to learn the information transfer rules between different departments.

[0004] In the doctor recommendation scenario, another serious problem is data sparsity. Therefore, this method uses the information of the doctor's department in the doctor's knowledge graph to construct a graph, thereby alleviating the data sparsity problem. In recent years, graph-based recommendation methods have achieved great success. The graph-based method essentially assumes that adjacent nodes in the graph have similar characteristics, so any node in the graph gathers information from its local neighbor nodes. This method uses the information of the doctor's department in the doctor's knowledge graph and the interactive behavior data of all patients in the platform to construct a hypergraph forest. The hypergraph forest consists of multiple hypergraphs, and the hypergraphs are independent of each other. The hypergraph integrates the doctor's knowledge graph and collaborative information. Each hypergraph node is composed of doctors from only one department, so the hypergraph is also called a department hypergraph. The specific steps of this method are: the first step is to divide the patient behavior sequence into several subsequences based on the doctor knowledge graph; the second step is to construct a hypergraph forest based on the doctor knowledge graph and several subsequences of the patient; the third step is to use the hypergraph forest neural network to obtain the node vector representation in the hypergraph forest; the fourth step is to use the sequence encoder to model the patient's behavior sequence and several subsequences to obtain the patient's local preference and global preference; the fifth step is to recommend doctors to patients based on their preferences. Summary of the invention

[0005] The problem of this method is defined as recommending a suitable doctor to the patient based on the patient's behavior sequence in the intelligent guidance platform and the doctor's knowledge graph. In mathematical language, it is: based on the patient u i Behavior sequence and behavioral sequences Department attribute sequence corresponding to internal doctors Predict the doctor who is suitable for the patient. It is a behavior sequence The length, v j Is patient u i In the behavior sequence Doctor v in the jth viewed doctor j The department attributes are expressed as The existing recommendation system ignores the doctor's department information in the patient behavior sequence and ignores the sparsity of the patient behavior sequence. To this end, the present invention adopts the following technical solutions:

[0006] A doctor recommendation method for modeling a doctor knowledge graph using a forest hypergraph includes the following steps:

[0007] Based on the doctor knowledge graph, the patient behavior sequence is divided into several subsequences. There is a wealth of doctor attribute information on the online consultation platform, such as the doctor's department, the doctor's specialty, and the doctor's title information. The doctor's knowledge graph can be constructed based on the doctor's information. This method only uses the doctor's department information in the doctor knowledge graph. A doctor belongs to only one department. For patient u i The behavior sequence is Subscript It is a behavior sequence The length, v j Is patient u i In the behavior sequence The jth doctor browsed in. Behavior sequence The department attribute sequence corresponding to the internal doctor is: Doctor j The department attributes are expressed as The number of departments is N, and the set of doctors under the kth department is represented by C k , the value range of k is {1,2,…,N}. According to the behavior sequence Department attribute sequence corresponding to internal doctors Patient i Behavior sequence Divided into sub-behavior sequences under different departments, patient u i Behavior sequence The sub-behavior sequence belonging to the kth department in is expressed as And patient u i Behavior sequence The set of departments involved in is represented as

[0008] Based on the doctor knowledge graph and several subsequences of patients, a hypergraph forest is constructed. Based on all patients in the system and their subsequences under department k, a department k hypergraph G is constructed. k , patient u i The sub-behavior sequence under the k-th department All doctors in the department form nodes of the k-hypergraph, and patients u i The patient hyperedge e that constitutes the department k hypergraph i,k , and the patient exceeds the edge e i,k Linker sequence All the doctor nodes in the hypergraph. All the department hypergraphs constitute a hypergraph forest. The number of hypergraphs in the hypergraph forest depends on the number of departments N, and the hypergraphs in the hypergraph forest are independent and disconnected. Because a doctor belongs to only one department, a doctor will only appear in one department hypergraph, while a patient may appear in multiple department hypergraphs.

[0009] The hypergraph forest neural network is used to obtain the node vector representation in the hypergraph forest. The doctor is initialized as a d-dimensional vector according to the doctor ID. j , the initialization vector is After l layers of information transmission, doctor v j The vector is Patient i Patient hyperedge e in the department k-hypergraph i,k The vector is The number of layers of the hypergraph forest neural network is controlled by the model hyperparameter L. After the network updates L layers, the final result is doctor v j The vector is Patient i The vector in the department k-hypergraph is Patient hyperedge e in department k-hypergraph i,k The set of doctor nodes included is denoted by B(e i,k ) indicates that it contains the doctor node v j The patient hyperedge set is E(v j ) indicates. Doctor v j Only belongs to one department super map. Once the doctor v j Determine, its department hypergraph is also determined, that is, for Patients in the ultra margin τ,k The subscript k is determined and unique. The following is the information transmission process between the patient hyperedge and the doctor node in the hypergraph forest neural network:

[0010]

[0011] Among them, AGGR node→edge The aggregation function aggregates the information of the doctor nodes in the hypergraph into the patient hyperedges, AGGR edge→node The aggregation function aggregates the information of the patient hyperedge in the hypergraph into the doctor node. Aggregation function AGGR node→edge and AGGR edge→node The structure of AGGR is implemented using the self-attention mechanism. node→edge The specific formula of the aggregation function is as follows:

[0012]

[0013] Among them, parameter a k represents the model vector in the department k-hypergraph, and the parameter represents the transfer matrix in the department k hypergraph, a k and Updated during model training. σ is the sigmoid activation function, and tanh is the tanh activation function. In calculating the hyperedge e of the patient in the layer l of the department k hypergraph i,k Vector When B(e i,k Any doctor in τ Calculate the attention value α τ,k , α τ,k represents the doctor v in the department k hypergraph τ importance.

[0014] AGGR edge→node The specific formula of the aggregation function is as follows:

[0015]

[0016] Among them, the parameter q k represents the model vector in the department k-hypergraph, and the parameter represents the transfer matrix in the department k-hypergraph, q k and Updated during model training. σ is the sigmoid activation function, and tanh is the tanh activation function. j Vector When E(v j ) within any patient hyperedge e τ,k Calculate the attention value β τ,k , β τ,k represents the patient hyperedge e in the department k-hypergraph τ,k importance.

[0017] The sequence encoder is used to model the patient's behavior sequence and several subsequences to obtain the patient's local preference and global preference. The hypergraph forest neural network has been used to obtain the patient's local preference and global preference. j The vector is Patient i The behavior sequence is And the sub-behavior sequence belonging to the kth department is This method uses the gated recurrent unit network GRU as the encoder to i Behavior sequence Modeling, get the last hidden vector output of the gated recurrent unit network GRU as patient u i Global preferences for all departments The gated recurrent unit network GRU is also used as the encoder for patient u i The sub-behavior sequence Modeling, get patient u i Local preferences under this department Aggregate the local preferences of all subsequences of the patient to obtain the local preferences of the patient in Is patient u i Behavior sequence The collection of departments involved in Represents the number of elements in the collection.

[0018] Recommend doctors to patients based on their preferences. Combined with the patient's local preferences and global preferences Get the final patient preference u , the calculation formula is λ g and λ l represents the weights of the patient's global and local preferences, λ g and λ l is a hyperparameter. Then, doctors v in the doctor set in the platform τ Vector Multiply by patient preference z u , apply the softmax function to calculate the doctor v τ Score: Indicates doctor v τ The possibility of becoming the next interactive doctor. The loss function is:

[0019]

[0020] Among them, y τ Representative Doctor τ One-hot encoding. The function is optimized using gradient descent.

[0021] The beneficial technical effects of the present invention are as follows:

[0022] (1) In order to solve the data sparsity problem in the recommendation system, this method constructs a hypergraph forest based on the doctor knowledge graph and user behavior sequence, and designs a hypergraph forest neural network to obtain the node vectors in the hypergraph forest.

[0023] (2) This method takes into account the department attributes of doctors in the patient behavior sequence, divides the patient behavior sequence into several subsequences, and obtains the patient's local preference in a department based on the patient's subbehavior sequence. At the same time, the overall patient behavior sequence is modeled to obtain the patient's global preference in all departments.

[0024] (3) The hypergraph forest structure proposed in this method divides a large hypergraph into several small department hypergraphs according to the department information in the doctor knowledge graph in the platform to form a hypergraph forest, which effectively alleviates the over-smoothing problem of the graph structure. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram of a process of a doctor recommendation method for modeling a doctor knowledge graph using a forest hypergraph according to the present invention;

[0026] Figure 2 A partial graph of department information of a doctor knowledge graph of a doctor recommendation method for modeling a doctor knowledge graph using a forest hypergraph according to the present invention;

[0027] Figure 3 This is a model framework diagram of a doctor recommendation method of the present invention that uses a forest hypergraph to model a doctor knowledge graph. DETAILED DESCRIPTION

[0028] In order to further understand the present invention, the doctor recommendation method provided by the present invention for modeling the doctor knowledge graph using a forest hypergraph is described in detail below in combination with a specific implementation method. However, the present invention is not limited to this. Non-essential improvements and adjustments made by technical personnel in this field under the core guiding ideology of the present invention still fall within the scope of protection of the present invention.

[0029] The problem of this method is defined as recommending a suitable doctor to the patient based on the patient's behavior sequence in the intelligent guidance platform and the doctor's knowledge graph. In mathematical language, it is: based on the patient u i Behavior sequence and behavioral sequences Department attribute sequence corresponding to internal doctors Predict the doctor who is suitable for the patient. It is a behavior sequence The length, v j Is patient u i In the behavior sequence Doctor v in the jth viewed doctor j The department attributes are expressed as The forward propagation part of a doctor recommendation method that uses a forest hypergraph to model the doctor knowledge graph mainly consists of five parts. The first step is to divide the patient behavior sequence into several subsequences based on the doctor knowledge graph; the second step is to construct a hypergraph forest based on the doctor knowledge graph and several subsequences of the patient; the third step is to use the hypergraph forest neural network to obtain the node vector representation in the hypergraph forest; the fourth step is to use a sequence encoder to model the patient's behavior sequence and several subsequences to obtain the patient's local preference and global preference; the fifth step is to recommend doctors to patients based on their preferences.

[0030] like Figure 1 As shown, according to an embodiment of the present invention in a doctor recommendation scenario in intelligent medical guidance, the method includes the following steps:

[0031] S100, based on the doctor knowledge graph, divide the patient behavior sequence into several subsequences. The online consultation platform has rich doctor attribute information, such as the doctor's department, the doctor's specialty, and the doctor's professional title information. The doctor's knowledge graph can be constructed based on the doctor's information. This method only uses the doctor's department information in the doctor knowledge graph. A doctor belongs to only one department. Figure 2 It is a partial graph of the knowledge graph of the departments to which the five doctors belong. This department refers to the secondary department. i The behavior sequence is Subscript It is a behavior sequence The length, v j Is patient u i In the behavior sequence The jth doctor browsed in. Behavior sequence The department attribute sequence corresponding to the internal doctor is: Doctor j The department attributes are expressed as The number of departments is N, and the set of doctors under the kth department is represented by C k , the value range of k is {1,2,...,N}. According to the behavior sequence Department attribute sequence corresponding to internal doctors Patient i Behavior sequence Divided into sub-behavior sequences under different departments, patient u i Behavior sequence The sub-behavior sequence belonging to the kth department in is expressed as And patient u i Behavior sequence The set of departments involved in is represented as like Figure 3 As shown in (a), the behavior sequences of patients u1, u2 and u3 are divided into subsequences under two departments according to the department information in the doctor knowledge graph.

[0032] S200: Based on the doctor knowledge graph and several subsequences of patients, a hypergraph forest is constructed. Based on all patients in the system and their subsequences under department k, a department k hypergraph G is constructed. k , patient u i The sub-behavior sequence under the k-th department All doctors in the department form nodes of the k-hypergraph, and patients u i The patient hyperedge e that constitutes the department k hypergraph i,k , and the patient exceeds the edge e i,k Linker sequence All the doctor nodes in the department. All the department hypergraphs constitute a hypergraph forest. The number of hypergraphs in the hypergraph forest depends on the number of departments N, and the hypergraphs in the hypergraph forest are independent and disconnected. Because a doctor belongs to only one department, a doctor will only appear in one department hypergraph, while a patient may appear in multiple department hypergraphs. The hypergraph forest constructed based on the sub-behavior sequences of patients u1, u2 and u3 and the department information in the doctor knowledge graph is as follows: Figure 3 (b) as shown.

[0033] S300, using the hypergraph forest neural network to obtain the node vector representation in the hypergraph forest. The doctor is initialized as a d-dimensional vector according to the doctor ID. j , the initialization vector is After l layers of information transmission, doctor v j The vector is Patient i Patient hyperedge e in the department k-hypergraph i,k The vector is The number of layers of the hypergraph forest neural network is controlled by the model hyperparameter L. After the network updates L layers, the final result is doctor v j The vector is Patient i The vector in the department k-hypergraph is In this experiment, L = 3. Patient hyperedge e in department k hypergraph i,k The set of doctor nodes included is denoted by B(e i,k ) indicates that it contains the doctor node v j The patient hyperedge set is E(v j ) indicates. Doctor v j Only belongs to one department super map. Once the doctor v j Determine, its department hypergraph is also determined, that is, for Patients in the ultra margin τ,k The subscript k is determined and unique. The following is the information transmission process between the patient hyperedge and the doctor node in the hypergraph forest neural network:

[0034]

[0035] Among them, AGGR node→edge The aggregation function aggregates the information of the doctor nodes in the hypergraph into the patient hyperedges, AGGR edge→node The aggregation function aggregates the information of the patient hyperedge in the hypergraph into the doctor node. Aggregation function AGGR node→edge and AGGR edge→node The structure of AGGR is implemented using the self-attention mechanism. node→edge The specific formula of the aggregation function is as follows:

[0036]

[0037] Among them, parameter a k represents the model vector in the department k-hypergraph, and the parameter represents the transfer matrix in the department k hypergraph, a k and Updated during model training. σ is the sigmoid activation function, and tanh is the tanh activation function. In calculating the hyperedge e of the patient in the layer l of the department k hypergraph i,k Vector When B(e i,k Any doctor in τ Calculate the attention value α τ,k , α τ,k represents the doctor v in the department k hypergraph τ importance.

[0038] AGGR edge→node The specific formula of the aggregation function is as follows:

[0039]

[0040] Among them, the parameter q k represents the model vector in the department k-hypergraph, and the parameter represents the transfer matrix in the department k-hypergraph, q k and Updated during model training. σ is the sigmoid activation function, and tanh is the tanh activation function. j Vector When E(v j ) within any patient hyperedge e τ,k Calculate the attention value β τ,k , β τ,k represents the patient hyperedge e in the department k-hypergraph τ,k importance.

[0041] S400, using sequence encoder to model the patient's behavior sequence and several subsequences, to obtain the patient's local preference and global preference. The hypergraph forest neural network has been used to obtain any doctor v j The vector is Patient i The behavior sequence is And the sub-behavior sequence belonging to the kth department is This method uses the gated recurrent unit network GRU as the encoder to i Behavior sequence Modeling, get the last hidden vector output of the gated recurrent unit network GRU as patient u iGlobal preferences for all departments Modeling the entire behavior sequence can help us learn the patient’s preference transfer patterns among doctors in all departments. i The sub-behavior sequence Modeling, get patient u i Local preferences under this department Aggregate the local preferences of all subsequences of the patient to obtain the local preferences of the patient in Is patient u i Behavior sequence The collection of departments involved in Represents the number of elements in the collection.

[0042] S500 recommends doctors to patients based on their preferences. Combined with the patient's local preferences and global preferences Get the final patient preference u , the calculation formula is λ g and λ l represents the weights of the patient's global and local preferences, λ g and λ l is a hyperparameter. This method sets λ g = 0.35 and λ l =0.65. Then, doctors v in the doctor set on the platform τ Vector Multiply by patient preference z u , apply the softmax function to calculate the doctor v τ Score: Indicates doctor v τ The possibility of becoming the next interactive doctor. The loss function is:

[0043]

[0044] Among them, y τ Representative Doctor τ One-hot encoding. The function is optimized using gradient descent.

[0045] The above description of the embodiments is to facilitate the understanding and application of the present invention by those skilled in the art. It is obvious that those skilled in the art can easily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative work. Therefore, the present invention is not limited to the above embodiments, and improvements and modifications made to the present invention by those skilled in the art based on the disclosure of the present invention should be within the scope of protection of the present invention.

Claims

1. A doctor recommendation method for modeling a doctor knowledge graph using a forest hypergraph, characterized in that: Based on the doctor knowledge graph, the patient behavior sequence is divided into several subsequences; the knowledge graph about doctors is constructed based on the rich doctor attribute information on the online consultation platform; this method only uses the information about the doctor's department in the doctor knowledge graph, and a doctor belongs to only one department; for patient u i The behavior sequence is Subscript It is a behavior sequence The length, v j Is patient u i In the behavior sequence The jth doctor browsed in the The department attribute sequence corresponding to the internal doctor is: Doctor j The department attributes are expressed as The number of departments is N, and the set of doctors in the kth department is represented by C k , the value range of k is {1,2,…,N}; according to the behavior sequence Department attribute sequence corresponding to internal doctors Patient i Behavior sequence Divided into sub-behavior sequences under different departments, patient u i Behavior sequence The sub-behavior sequence belonging to the kth department in is expressed as And patient u i Behavior sequence The set of departments involved in is represented as Based on the doctor knowledge graph and several subsequences of patients, a hypergraph forest is constructed; Construct the department k hypergraph G based on all patients in the system and their subsequences under department k k , patient u i The sub-behavior sequence under the k-th department All doctors in the department constitute the nodes of the k-hypergraph, and patients u i The patient hyperedge e that constitutes the department k hypergraph i,k , and the patient exceeds the edge e i,k Linker sequence All doctor nodes in the department; all department hypergraphs constitute a hypergraph forest. The number of hypergraphs in the hypergraph forest depends on the number of departments N, and the hypergraphs in the hypergraph forest are independent and disconnected from each other. Because a doctor belongs to only one department, a doctor will only appear in one department hypergraph, while a patient may appear in multiple department hypergraphs. The hypergraph forest neural network is used to obtain the node vector representation in the hypergraph forest; the doctor is initialized as a d-dimensional vector according to the doctor ID. j , the initialization vector is After l layers of information transmission, doctor v j The vector is Patient i Patient hyperedge e in the department k-hypergraph i,k The vector is The number of layers of the hypergraph forest neural network is controlled by the model hyperparameter L. After the network updates L layers, the final result is doctor v j The vector is Patient i The vector in the department k-hypergraph is Patient hyperedge e in department k-hypergraph i,k The set of doctor nodes included is denoted by B(e i,k ) indicates that it contains the doctor node v j The patient hyperedge set is E(v j ) means; doctor v j Only belongs to one department super map. Once the doctor v j Determine, its department hypergraph is also determined, that is, for Patients in the ultra margin τ,k The subscript k is determined and unique; the following is the information transmission process between the patient hyperedge and the doctor node in the hypergraph forest neural network: Among them, AGGR node→edge The aggregation function aggregates the information of the doctor nodes in the hypergraph into the patient hyperedges, AGGR edge→node The aggregation function aggregates the information of the patient hyperedge in the hypergraph to the doctor node; the aggregation function AGGR node→edge and AGGR edge→node The structures of are all implemented using the self-attention mechanism; The sequence encoder is used to model the patient's behavior sequence and several subsequences to obtain the patient's local preference and global preference. The hypergraph forest neural network has been used to obtain the patient's local preference and global preference. j The vector is Patient i The behavior sequence is And the sub-behavior sequence belonging to the kth department is This method uses the gated recurrent unit network GRU as the encoder to i Behavior sequence Modeling, get the last hidden vector output of the gated recurrent unit network GRU as patient u i Global preferences for all departments The gated recurrent unit network GRU is also used as the encoder for patient u i The sub-behavior sequence Modeling, get patient u i Local preferences under this department Aggregate the local preferences of all subsequences of the patient to obtain the local preferences of the patient in Is patient u i Behavior sequence The collection of departments involved in Represents the number of elements in a collection; Recommend doctors to patients based on their preferences; combine patients’ local preferences and global preferences Get the final patient preference u , the calculation formula is λ g and λ l represents the weights of the patient's global and local preferences, λ g and λ l is a hyperparameter; then the doctor v in the doctor set in the platform τ Vector Multiply by patient preference z u , apply the softmax function to calculate the doctor v τ Score: Indicates doctor v τ The possibility of becoming the next interactive doctor; the loss function is: Among them, y τ Representative Doctor τ One-hot encoding; The function is optimized using gradient descent.

2. A doctor recommendation method for modeling a doctor knowledge graph using a forest hypergraph according to claim 1, wherein: The self-attention mechanism is used to implement the aggregation function AGGR node→edge The specific formula is: Among them, parameter a k represents the model vector in the department k-hypergraph, and the parameter represents the transfer matrix in the department k hypergraph, a k and Updated during model training; σ is the sigmoid activation function, tanh is the tanh activation function; in the calculation of the hyperedge e of the patient in the lth layer of the department k hypergraph i,k Vector When B(e i,k Any doctor in τ Calculate the attention value α τ,k , α τ,k represents the doctor v in the department k hypergraph τ importance.

3. A doctor recommendation method for modeling a doctor knowledge graph using a forest hypergraph according to claim 1, wherein: The self-attention mechanism is used to implement the aggregation function AGGR edge→node The specific formula is: Among them, the parameter q k represents the model vector in the department k-hypergraph, and the parameter represents the transfer matrix in the department k-hypergraph, q k and Updated during model training; σ is the sigmoid activation function, tanh is the tanh activation function; when calculating the l-th layer doctor vj 的 vector When E(v j ) within any patient hyperedge e τ,k Calculate the attention value β τ,k , β τ,k represents the patient hyperedge e in the department k-hypergraph τ,k importance.