Medical consultation recommendation system and method
Through semantic coding and correlation coding technology, a high-dimensional matching feature matrix is generated and the feature value position information is expressed and strengthened, which solves the problem of medical data diversity and information clutter, realizes personalized medical resource recommendation, and improves patient medical experience and treatment. Effect.
Patent Information
- Application Number
- CN202310702324.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2043-06-14
AI Technical Summary
During the patient's medical treatment process, medical data comes from various sources and there are many types of information. There are problems with missing data, errors, and duplications. It is difficult to accurately recommend suitable doctors or hospitals, which affects the efficiency and quality of medical services.
A semantic encoder containing a word embedding layer is used to semantically encode user portraits and medical resource text descriptions. A high-dimensional matching feature matrix is generated through association coding, combined with a spatial attention module and feature value position information expression enhancement, and finally a classifier is used to determine whether Recommend medical resources.
It improves patients' medical experience and treatment effects, overcomes the problems of data diversity and information clutter, realizes personalized recommendations, and improves the efficiency and quality of medical services.
Smart Images

Figure CN116682541B
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent medical care, and more specifically, to a medical consultation recommendation system and method thereof. Background Art
[0002] In the process of seeking medical treatment, helping patients find suitable doctors or hospitals more quickly and accurately according to their own conditions is conducive to improving the efficiency and quality of medical services. Therefore, it is expected to build a medical treatment recommendation system.
[0003] However, there are many technical difficulties in building a recommendation system for medical treatments. For example, medical data usually comes from different sources, involves a wide variety of information, and often has problems such as missing, errors, and duplications. In addition, different patients have different health needs and medical backgrounds. Summary of the invention
[0004] In order to solve the above technical problems, the present application is proposed. The embodiments of the present application provide a medical consultation recommendation system and method thereof, which can improve the patient's medical consultation experience and treatment effect.
[0005] According to one aspect of the present application, a medical consultation recommendation system is provided, which includes: a user portrait acquisition module, used to acquire a user portrait of a target object, wherein the user portrait includes basic information of the target object and demand information of the target object; a text description acquisition module, used to acquire a text description of an alternative medical resource; a first semantic encoding module, used to pass the user portrait of the target object through a semantic encoder including a word embedding layer to obtain a user portrait semantic encoding feature vector; a second semantic encoding module, used to pass the text description of the alternative medical resource through the semantic encoder including a word embedding layer to obtain a semantic encoding feature vector of the alternative medical resource; an association encoding module, used to association encode the semantic encoding feature vector of the alternative medical resource and the semantic encoding feature vector of the user portrait to obtain a high-dimensional matching feature matrix; a spatial encoding module, used to pass the high-dimensional matching feature matrix through a spatial attention module to obtain a classification feature matrix; an optimization module, used to enhance the expression of eigenvalue position information on the classification feature matrix to obtain an optimized classification feature matrix; and a classification module, used to pass the optimized classification feature matrix through a classifier to obtain a classification result, and the classification result is used to indicate whether to recommend the alternative medical resource to the target object.
[0006] According to another aspect of the present application, a method for recommending medical treatment is provided, which includes: obtaining a user portrait of a target object, wherein the user portrait includes basic information of the target object and demand information of the target object; obtaining a text description of alternative medical resources; passing the user portrait of the target object through a semantic encoder including a word embedding layer to obtain a user portrait semantic encoding feature vector; passing the text description of the alternative medical resource through the semantic encoder including a word embedding layer to obtain an alternative medical resource semantic encoding feature vector; associatively encoding the alternative medical resource semantic encoding feature vector and the user portrait semantic encoding feature vector to obtain a high-dimensional matching feature matrix; passing the high-dimensional matching feature matrix through a spatial attention module to obtain a classification feature matrix; enhancing the expression of eigenvalue position information on the classification feature matrix to obtain an optimized classification feature matrix; and passing the optimized classification feature matrix through a classifier to obtain a classification result, wherein the classification result is used to indicate whether to recommend the alternative medical resource to the target object.
[0007] Compared with the prior art, the medical treatment recommendation system and method provided by the present application first passes the user portrait of the target object through a semantic encoder including a word embedding layer to obtain a user portrait semantic encoding feature vector, then passes the text description of the alternative medical resource through the semantic encoder including a word embedding layer to obtain an alternative medical resource semantic encoding feature vector, then, the alternative medical resource semantic encoding feature vector and the user portrait semantic encoding feature vector are associated encoded to obtain a high-dimensional matching feature matrix, then, the high-dimensional matching feature matrix is passed through a spatial attention module to obtain a classification feature matrix, and finally, the classification feature matrix is enhanced by the expression of the eigenvalue position information and then passed through a classifier to obtain a classification result indicating whether to recommend alternative medical resources to the target object. In this way, the patient's medical experience and treatment effect can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The following drawings are not deliberately scaled according to the actual size, and the focus is on illustrating the main purpose of the present application.
[0009] Figure 1 It is a block diagram of a medical consultation recommendation system according to an embodiment of the present application.
[0010] Figure 2 It is a block diagram of the first semantic encoding module in the medical consultation recommendation system according to an embodiment of the present application.
[0011] Figure 3 It is a block diagram of the spatial encoding module in the medical consultation recommendation system according to an embodiment of the present application.
[0012] Figure 4 It is a block diagram of the classification module in the medical consultation recommendation system according to an embodiment of the present application.
[0013] Figure 5 The present invention is a flowchart of a method for recommending medical consultation according to an embodiment of the present application.
[0014] Figure 6 A schematic diagram of the system architecture of a method for recommending medical consultation according to an embodiment of the present application.
[0015] Figure 7 This is an application scenario diagram of a medical consultation recommendation system according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work also fall within the scope of protection of the present application.
[0017] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0018] Although the present application makes various references to certain modules in the system according to the embodiments of the present application, any number of different modules can be used and run on the user terminal and / or server. The modules are only illustrative, and different aspects of the system and method can use different modules.
[0019] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps may be processed in reverse order or simultaneously as required. Meanwhile, other operations may also be added to these processes, or a certain step or several steps of operations may be removed from these processes.
[0020] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0021] In response to the above technical problems, the technical concept of this application is to first construct a patient user portrait to fully characterize the patient's basic information and medical needs, and use a semantic encoder based on a natural language processing model to semantically understand the patient user portrait and medical resources to obtain the user portrait semantic encoding feature vector and the alternative medical resource semantic encoding feature vector, and use the associated feature representation of the two to express the degree of fit between the two, and finally use a classifier to determine whether to recommend alternative medical resources to the target object. The medical treatment recommendation system is constructed based on the above technical concept, which can overcome the difficulties of diverse medical data sources and complex information types, and achieve the goal of improving the efficiency and quality of medical services. At the same time, through personalized recommendations, it is possible to more accurately recommend suitable doctors or hospitals to patients, thereby improving patients' medical experience and treatment effects.
[0022] Figure 1 FIG. 1 is a block diagram of a medical consultation recommendation system according to an embodiment of the present application. Figure 1 As shown, according to the medical consultation recommendation system 100 of the embodiment of the present application, it includes: a user portrait acquisition module 110, which is used to acquire a user portrait of a target object, wherein the user portrait includes basic information of the target object and demand information of the target object; a text description acquisition module 120, which is used to acquire a text description of an alternative medical resource; a first semantic encoding module 130, which is used to pass the user portrait of the target object through a semantic encoder including a word embedding layer to obtain a user portrait semantic encoding feature vector; a second semantic encoding module 140, which is used to pass the text description of the alternative medical resource through the semantic encoder including a word embedding layer to obtain an alternative medical resource. Resource semantic coding feature vector; an association coding module 150, used to perform association coding on the semantic coding feature vector of the alternative medical resource and the semantic coding feature vector of the user portrait to obtain a high-dimensional matching feature matrix; a spatial coding module 160, used to pass the high-dimensional matching feature matrix through a spatial attention module to obtain a classification feature matrix; an optimization module 170, used to enhance the expression of eigenvalue position information of the classification feature matrix to obtain an optimized classification feature matrix; and a classification module 180, used to pass the optimized classification feature matrix through a classifier to obtain a classification result, and the classification result is used to indicate whether to recommend alternative medical resources to the target object.
[0023] More specifically, in the embodiment of the present application, the user portrait acquisition module 110 is used to acquire the user portrait of the target object, wherein the user portrait includes the basic information of the target object and the demand information of the target object. The text description acquisition module 120 is used to acquire the text description of the alternative medical resources. It should be understood that in the medical field, the health needs and medical background of the patient have important personalized characteristics, so it is necessary to perform refined analysis and recommendations for different patients. The user portrait refers to a comprehensive, in-depth and accurate analysis and description of the user in order to better understand the user's needs and behaviors. In the medical consultation recommendation system, the user portrait of the target object is obtained, which may include the basic information of the target object (such as age, gender, occupation, etc.) and the demand information of the target object (such as condition, treatment history, medication, health awareness, etc.), and the above information is necessary for doctors or hospitals to provide personalized services to patients. Accordingly, by obtaining the user portrait of the target object, the recommendation system can screen and match the alternative medical resources according to the patient's personal characteristics and demand information, thereby providing medical resources that are more in line with the patient's actual situation and needs, and improving the patient's medical satisfaction and treatment effect. The obtained user portrait of the target object and the text description of the alternative medical resources can be stored in a database or file system so that the recommendation system can perform subsequent matching and recommendation. Specifically, a relational database or a non-relational database can be used to store the user portrait and the text description of the medical resources, such as MySQL, MongoDB, etc. In addition, the obtained user portrait of the target object and the text description of the alternative medical resources can also be stored in a file system, such as a file in a JSON, XML, or other format.
[0024] More specifically, in an embodiment of the present application, the first semantic encoding module 130 is used to pass the user portrait of the target object through a semantic encoder including a word embedding layer to obtain a user portrait semantic encoding feature vector. That is, a semantic encoder based on a natural language processing model is used to perform semantic understanding of the patient user portrait to obtain a user portrait semantic encoding feature vector. The semantic encoder is a converter-based Bert model. Of course, in other examples of the present application, the semantic encoder can also be other language models, such as RNN model, LSTM model, GRU model, Bi-LSTM model, etc., which is not limited to the present application.
[0025] Accordingly, in a specific example, Figure 2As shown, the first semantic encoding module 130 includes: a first word embedding unit 131, used to pass the user profile of the target object through the word embedding layer of the context encoder respectively to convert the user profile of the target object into an embedding vector respectively to obtain a sequence of user portrait embedding vectors; a first semantic encoding unit 132, used to input the sequence of user portrait embedding vectors into the semantic encoder to obtain multiple user portrait semantic feature vectors; and a first cascading unit 133, used to cascade the multiple user portrait semantic feature vectors to obtain the user portrait semantic encoding feature vector.
[0026] More specifically, in an embodiment of the present application, the second semantic encoding module 140 is used to pass the text description of the alternative medical resources through the semantic encoder including the word embedding layer to obtain the semantic encoding feature vector of the alternative medical resources. That is, the medical resources are semantically understood using a semantic encoder based on a natural language processing model to obtain the semantic encoding feature vector of the alternative medical resources. It should be understood that the semantic encoder including the word embedding layer is a natural language processing model based on a deep learning model, which can convert natural language text into a corresponding vector representation. In this model, the word embedding layer refers to a layer that maps each word in the text into a vector representation, which can convert each word in the text into a vector of a fixed length for subsequent processing. After obtaining the word vector representation, the semantic encoder can further convert the entire text sequence into a vector representation, which can be used for tasks such as text classification and similarity matching.
[0027] In a specific example, a semantic encoder including a word embedding layer is used to semantically understand the text description of the candidate medical resources to obtain the semantic encoding feature vector of the candidate medical resources. In specific implementation, a pre-trained word vector model (such as Word2Vec, GloVe, etc.) can be used to build a word embedding layer, and a recurrent neural network (such as LSTM, GRU, etc.) or a convolutional neural network (CNN) model can be used as a semantic encoder to encode the text. The encoded vector can be used as the semantic feature vector of the candidate medical resource for subsequent matching and recommendation.
[0028] More specifically, in an embodiment of the present application, the association coding module 150 is used to perform association coding on the semantic coding feature vector of the alternative medical resource and the semantic coding feature vector of the user portrait to obtain a high-dimensional matching feature matrix. That is, in a high-dimensional semantic feature space, an association feature representation between the patient user portrait and the medical resource information is constructed, and the association feature representation is used to express the complex relationship between the patient's medical needs and medical resources. In a specific example, the vector product between the transposed vector of the semantic coding feature vector of the alternative medical resource and the semantic coding feature vector of the user portrait is calculated to obtain the high-dimensional matching feature matrix. In other words, the text coding features of the user portrait of the target object expressed by the user portrait semantic coding feature vector and the text coding features of the text description of the alternative medical resource expressed by the semantic coding feature vector of the alternative medical resource are associated position by position to obtain the high-dimensional matching feature matrix.
[0029] Accordingly, in a specific example, the association coding module 150 is used to: perform association coding on the semantic coding feature vector of the candidate medical resource and the semantic coding feature vector of the user portrait using the following association coding formula to obtain the high-dimensional matching feature matrix; wherein the association coding formula is: ,in, represents the semantic encoding feature vector of the candidate medical resource, represents the semantic encoding feature vector of the candidate medical resource, represents the semantic encoding feature vector of the user portrait, represents the high-dimensional matching feature matrix, In other words, the text encoding features of the user portrait of the target object expressed by the user portrait semantic encoding feature vector and the text encoding features of the text description of the candidate medical resource expressed by the candidate medical resource semantic encoding feature vector are associated position by position to obtain the high-dimensional matching feature matrix.
[0030] More specifically, in the embodiment of the present application, the spatial encoding module 160 is used to pass the high-dimensional matching feature matrix through the spatial attention module to obtain a classification feature matrix. Considering that the eigenvalues at different positions in the high-dimensional matching feature matrix have different contributions to the final classification judgment, that is, the associations between different patient information and medical consultation information have different contributions to the final classification judgment, in order to make full use of the feature weight specificity of the spatial dimension, the high-dimensional matching feature matrix is passed through the spatial attention module to obtain a classification feature matrix.
[0031] It should be understood that the spatial attention module is a commonly used deep learning module. In this application, the spatial attention module is used to model the association between patient information and medical consultation information to better capture the characteristic that the feature values at different positions have different contributions to the final classification judgment. The spatial attention module usually consists of two parts: query, key, value (QKV) calculation and attention weight calculation. Specifically, given the input feature map, firstly, the query, key, and value feature maps are generated respectively through three convolutional layers, and then the attention weight is calculated. Finally, the value feature map is multiplied and added with the attention weight to obtain the output feature map.
[0032] Accordingly, in a specific example, Figure 3 As shown, the spatial encoding module 160 includes: a deep convolution encoding unit 161, used to use the convolution encoding part of the spatial attention module to perform deep convolution encoding on the high-dimensional matching feature matrix to obtain a high-dimensional matching convolution feature map; a spatial attention unit 162, used to input the high-dimensional matching convolution feature map into the spatial attention part of the spatial attention module to obtain a spatial attention map; an activation unit 163, used to pass the spatial attention map through a Softmax activation function to obtain a spatial attention feature map; a calculation unit 164, used to calculate the spatial attention feature map and the position point multiplication of the spatial attention map to obtain a classification feature map; and a pooling unit 165, used to pool the classification feature map along the channel dimension to obtain the classification feature matrix.
[0033] It is worth mentioning that pooling is a commonly used neural network operation, which can reduce the dimension of the input feature map and reduce the number of parameters. At the same time, it can also process the input feature map for translation invariance, so that the network has a certain robustness to small changes in the input. In deep learning, commonly used pooling methods include maximum pooling, average pooling, etc. In the pooling unit 165, the classification feature map is pooled along the channel dimension to obtain a classification feature matrix. Specifically, assuming that the size of the input feature map is H×W×C, where H, W, and C represent the height, width, and number of channels, respectively, then when pooling along the channel dimension, each channel will be pooled separately to obtain a matrix of size H'×W', where H' and W' represent the height and width after pooling on the channel, respectively. The final classification feature matrix size is H'×W'×C, where each channel corresponds to a H'×W' matrix, representing the feature information on the channel.
[0034] More specifically, in the embodiment of the present application, the optimization module 170 is used to enhance the expression of the eigenvalue position information of the classification feature matrix to obtain an optimized classification feature matrix. Enhancement of the expression of eigenvalue position information refers to the ability to enhance the feature expression by adding position information on the basis of the eigenvalue. In the present application, the expression of eigenvalue position information of the classification feature matrix is enhanced to further improve the accuracy and effect of the recommendation.
[0035] In particular, in the technical solution of the present application, when the semantic coding feature vector of the candidate medical resource and the semantic coding feature vector of the user portrait are associated and encoded to obtain the high-dimensional matching feature matrix, the text coding features of the user portrait of the target object expressed by the semantic coding feature vector of the user portrait and the text coding features of the text description of the candidate medical resource expressed by the semantic coding feature vector of the candidate medical resource are associated position by position, so the eigenvalues of each position of the high-dimensional matching feature matrix have corresponding position attributes, and when the high-dimensional matching feature matrix is passed through the spatial attention module to obtain the classification feature matrix, considering the weighted reinforcement of the eigenvalues of each position of the feature matrix based on spatial distribution by the spatial attention module, the eigenvalues of each position of the classification feature matrix further strengthen the position attribute. However, when the classification feature matrix is subjected to classification regression through a classifier, it is necessary to expand the classification feature matrix into a eigenvector, that is, it involves the rearrangement transformation of the eigenvalues of the classification feature matrix based on the position attribute. Therefore, in order to improve the position information expression effect of each eigenvalue of the classification feature matrix during the arrangement transformation, the position information schema attention response factor of the eigenvalue of each position of the classification feature matrix is calculated.
[0036] Accordingly, in a specific example, the optimization module 170 is used to calculate the position information pattern attention response factor of the feature value of each position of the classification feature matrix using the following factor calculation formula; wherein the factor calculation formula is: ,in, represents a function that maps two-dimensional real numbers to one-dimensional real numbers, and are the width and height of the classification feature matrix, respectively. is the classification feature matrix The eigenvalues at the positions, are the coordinates of each eigenvalue of the classification feature matrix, and is the global mean of all eigenvalues of the classification feature matrix, is a logarithmic function with base 2, is the first The position information schema attention response factor of the feature value at each position of the classification feature matrix is used as a weight to weight the feature value at each position of the classification feature matrix to obtain the optimized classification feature matrix.
[0037] Here, the position information schema attention response factor is represented by the schema information of the relative geometric direction and relative geometric distance of the high-dimensional spatial position of the modeled pixel value relative to the overall feature distribution, and captures the overall shape weight of the feature manifold of the high-dimensional feature distribution of the classification feature matrix while realizing the positional aggregation of the eigenvalues relative to the overall feature distribution, so that the manifold shape of the classification feature matrix is highly responsive to the shape information of each sub-manifold, so as to obtain the permutation invariance property of the high-dimensional feature manifold. Therefore, by weighting each eigenvalue of the classification feature matrix with this position information schema attention response factor, the position information expression effect of each eigenvalue of the eigenvector obtained after the expansion of the classification feature matrix on the eigenvalue of the classification feature matrix during the permutation transformation can be improved, thereby improving the accuracy of the classification result obtained by the classification feature matrix through the classifier.
[0038] It is worth mentioning that the function for mapping a two-dimensional real number to a one-dimensional real number may adopt one or more of a linear mapping function, a polynomial mapping function, a basis function mapping function or a convolution mapping function, and of course other implementation methods may also be adopted.
[0039] More specifically, in the embodiment of the present application, the classification module 180 is used to pass the optimized classification feature matrix through a classifier to obtain a classification result, and the classification result is used to indicate whether to recommend alternative medical resources to the target object. That is, after obtaining the classification feature matrix, the classifier is used to determine the class probability label to which the classification feature matrix belongs, and the class probability label is used to indicate whether to recommend alternative medical resources to the target object.
[0040] That is, in the technical solution of the present application, the label of the classifier includes recommending alternative medical resources to the target object (first label), and not recommending alternative medical resources to the target object (second label), wherein the classifier determines which classification label the optimized classification feature matrix belongs to through a soft maximum function. It is worth noting that the first label p1 and the second label p2 here do not contain artificially set concepts. In fact, during the training process, the computer model does not have the concept of "whether to recommend alternative medical resources to the target object". It only has two classification labels and the probability of outputting features under these two classification labels, that is, the sum of p1 and p2 is one. Therefore, the classification result of whether to recommend alternative medical resources to the target object is actually converted into a binary class probability distribution that conforms to natural laws through classification labels. In essence, the physical meaning of the natural probability distribution of the label is used, rather than the linguistic text meaning of "whether to recommend alternative medical resources to the target object".
[0041] It should be understood that the role of the classifier is to use the given categories and known training data to learn classification rules and classifiers, and then classify (or predict) unknown data. Logistic regression, SVM, etc. are often used to solve binary classification problems. For multi-class classification problems, logistic regression or SVM can also be used, but multiple binary classifications are required to form a multi-classification, but this is prone to errors and inefficient. Commonly used multi-classification methods include the Softmax classification function.
[0042] Accordingly, in a specific example, Figure 4 As shown, the classification module 180 includes: a matrix expansion unit 181, used to expand the optimized classification feature matrix into an optimized classification feature vector according to a row vector or a column vector; a fully connected encoding unit 182, used to use multiple fully connected layers of the classifier to fully connect encode the optimized classification feature vector to obtain an encoded classification feature vector; and a classification unit 183, used to pass the encoded classification feature vector through the Softmax classification function of the classifier to obtain the classification result.
[0043] It is worth mentioning that matrix expansion refers to expanding a matrix into a vector in the order of rows or columns to facilitate calculation and optimization. The matrix , expanded into a vector by row The method is to arrange each row of the matrix in sequence, that is, to put all the elements of the first row in front of the vector. positions, and all elements of the second row are placed in the first position of the vector. arrive Positions, and so on, finally get a length of The formula for row expansion is as follows: The method of expanding by column is similar to that of expanding by row, except that each column of the matrix is arranged in sequence, and the final vector is also of length The formula expanded by column is as follows: It should be noted that the direction of expansion does not affect the content of the matrix, but only changes the order of the data in the vector.
[0044] Furthermore, in one example, the recommendation of alternative medical resources to the target object can be achieved by: displaying the recommended alternative medical resources on the user interface, allowing the user to choose independently; sending the recommended alternative medical resource information to the user through SMS, email, etc.; and directly pushing the recommended alternative medical resource information to the user's mobile device. These recommendation methods can be selected and combined according to actual conditions to achieve better recommendation effects and user experience.
[0045] In summary, a medical consultation recommendation system 100 based on an embodiment of the present application is explained, which first passes the user portrait of the target object through a semantic encoder including a word embedding layer to obtain a user portrait semantic encoding feature vector, then passes the text description of the alternative medical resource through the semantic encoder including a word embedding layer to obtain an alternative medical resource semantic encoding feature vector, then, the alternative medical resource semantic encoding feature vector and the user portrait semantic encoding feature vector are associated encoded to obtain a high-dimensional matching feature matrix, then, the high-dimensional matching feature matrix is passed through a spatial attention module to obtain a classification feature matrix, and finally, the classification feature matrix is enhanced by expressing the eigenvalue position information and then passed through a classifier to obtain a classification result indicating whether to recommend alternative medical resources to the target object. In this way, the patient's medical experience and treatment effect can be improved.
[0046] As described above, according to the embodiment of the present application, the medical treatment recommendation system 100 based on the embodiment of the present application can be implemented in various terminal devices, such as a server having a medical treatment recommendation algorithm based on the embodiment of the present application. In one example, the medical treatment recommendation system 100 based on the embodiment of the present application can be integrated into the terminal device as a software module and / or a hardware module. For example, the medical treatment recommendation system 100 based on the embodiment of the present application can be a software module in the operating system of the terminal device, or can be an application developed for the terminal device; of course, the medical treatment recommendation system 100 based on the embodiment of the present application can also be one of the many hardware modules of the terminal device.
[0047] Alternatively, in another example, the medical treatment recommendation system 100 based on the embodiment of the present application and the terminal device may also be separate devices, and the medical treatment recommendation system 100 may be connected to the terminal device via a wired and / or wireless network and transmit interactive information in accordance with an agreed data format.
[0048] Figure 5 The present invention is a flowchart of a method for recommending medical consultation according to an embodiment of the present application. Figure 6 FIG. 1 is a schematic diagram of a system architecture of a method for recommending medical consultation according to an embodiment of the present application. Figure 5 and Figure 6 As shown, according to the medical consultation recommendation method of the embodiment of the present application, it includes: S110, obtaining a user portrait of the target object, wherein the user portrait includes basic information of the target object and demand information of the target object; S120, obtaining a text description of alternative medical resources; S130, passing the user portrait of the target object through a semantic encoder including a word embedding layer to obtain a user portrait semantic encoding feature vector; S140, passing the text description of the alternative medical resource through the semantic encoder including a word embedding layer to obtain a semantic encoding feature vector of the alternative medical resource; S150, associatively encoding the semantic encoding feature vector of the alternative medical resource and the semantic encoding feature vector of the user portrait to obtain a high-dimensional matching feature matrix; S160, passing the high-dimensional matching feature matrix through a spatial attention module to obtain a classification feature matrix; S170, enhancing the expression of eigenvalue position information of the classification feature matrix to obtain an optimized classification feature matrix; and, S180, passing the optimized classification feature matrix through a classifier to obtain a classification result, and the classification result is used to indicate whether to recommend alternative medical resources to the target object.
[0049] In a specific example, in the above-mentioned medical consultation recommendation method, the semantic encoder is a transformer-based Bert model.
[0050] In a specific example, in the above-mentioned medical consultation recommendation method, the user profile of the target object is passed through a semantic encoder including a word embedding layer to obtain a user portrait semantic encoding feature vector, including: passing the user profile of the target object through the word embedding layer of the context encoder respectively to convert the user profile of the target object into embedding vectors respectively to obtain a sequence of user portrait embedding vectors; inputting the sequence of user portrait embedding vectors into the semantic encoder to obtain multiple user portrait semantic feature vectors; and, cascading the multiple user portrait semantic feature vectors to obtain the user portrait semantic encoding feature vector.
[0051] Here, those skilled in the art will appreciate that the specific operations of each step in the above-mentioned recommended method for medical consultation have been described in the above reference. Figures 1 to 4 The description of the medical visit recommendation system 100 has been described in detail, and therefore, its repeated description will be omitted.
[0052] Figure 7 FIG. 1 is an application scenario diagram of a medical consultation recommendation system according to an embodiment of the present application. Figure 7 As shown, in this application scenario, first, the user portrait of the target object is obtained (for example, Figure 7 D1 as shown in the figure) and a textual description of the alternative medical resource (e.g. Figure 7 D2 as shown in the figure), wherein the user portrait includes basic information of the target object and demand information of the target object, and then the user portrait of the target object and the text description of the candidate medical resources are input into a server deployed with a medical consultation recommendation algorithm (for example, Figure 7 S as shown in ), wherein the server is able to use the medical consultation recommendation algorithm to process the user portrait of the target object and the text description of the alternative medical resources to obtain a classification result indicating whether to recommend the alternative medical resources to the target object.
[0053] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the invention belongs. It should also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology and should not be interpreted in an idealized or extremely formal sense, unless explicitly defined as such herein.
[0054] The above is an explanation of the present invention and should not be considered as a limitation thereof. Although several exemplary embodiments of the present invention have been described, it will be readily appreciated by those skilled in the art that many modifications may be made to the exemplary embodiments without departing from the novel teachings and advantages of the present invention. Therefore, all such modifications are intended to be included within the scope of the present invention as defined in the claims. It should be understood that the above is an explanation of the present invention and should not be considered as being limited to the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The present invention is defined by the claims and their equivalents.
Claims
1. A medical consultation recommendation system, characterized in that: include: A user portrait acquisition module, used to acquire a user portrait of a target object, wherein the user portrait includes basic information of the target object and demand information of the target object; A text description acquisition module, used to acquire text descriptions of candidate medical resources; A first semantic encoding module, configured to pass the user profile of the target object through a semantic encoder including a word embedding layer to obtain a user profile semantic encoding feature vector; A second semantic encoding module, configured to pass the text description of the candidate medical resource through the semantic encoder including the word embedding layer to obtain a semantic encoding feature vector of the candidate medical resource; An association coding module, used for performing association coding on the semantic coding feature vector of the candidate medical resource and the semantic coding feature vector of the user portrait to obtain a high-dimensional matching feature matrix; A spatial encoding module, used for passing the high-dimensional matching feature matrix through a spatial attention module to obtain a classification feature matrix; an optimization module, used for enhancing the expression of eigenvalue position information of the classification feature matrix to obtain an optimized classification feature matrix; and A classification module, used for passing the optimized classification feature matrix through a classifier to obtain a classification result, wherein the classification result is used to indicate whether to recommend an alternative medical resource to the target object; Wherein, the association coding module is used to: The candidate medical resource semantic coding feature vector and the user portrait semantic coding feature vector are associated and encoded using the following association coding formula to obtain the high-dimensional matching feature matrix; Wherein, the association coding formula is: , in, represents the semantic encoding feature vector of the candidate medical resource, represents the semantic encoding feature vector of the candidate medical resource, represents the semantic encoding feature vector of the user portrait, represents the high-dimensional matching feature matrix, Represents vector multiplication; Wherein, the spatial coding module includes: A deep convolutional coding unit, configured to perform deep convolutional coding on the high-dimensional matching feature matrix using the convolutional coding part of the spatial attention module to obtain a high-dimensional matching convolutional feature map; A spatial attention unit, configured to input the high-dimensional matching convolutional feature map into the spatial attention part of the spatial attention module to obtain a spatial attention map; An activation unit, used for passing the spatial attention map through a Softmax activation function to obtain a spatial attention feature map; a calculation unit, configured to calculate a classification feature map obtained by multiplying the spatial attention feature map by a position point and the spatial attention map; and A pooling unit, used for performing pooling processing on the classification feature map along the channel dimension to obtain the classification feature matrix; Wherein, the optimization module is used to: The position information pattern attention response factor of the feature value of each position of the classification feature matrix is calculated by the following factor calculation formula; The factor calculation formula is: , in, represents a function that maps two-dimensional real numbers to one-dimensional real numbers, and are the width and height of the classification feature matrix, respectively. is the classification feature matrix The eigenvalues at the positions, are the coordinates of each eigenvalue of the classification feature matrix, and is the global mean of all eigenvalues of the classification feature matrix, is a logarithmic function with base 2, is the first The position information schema attention response factor of the feature value at each position; and The position information schema attention response factor is used as a weight to weight the feature value of each position of the classification feature matrix to obtain the optimized classification feature matrix.
2. The medical consultation recommendation system according to claim 1, characterized in that: The semantic encoder is a transformer-based Bert model.
3. The medical consultation recommendation system according to claim 2, characterized in that: The first semantic encoding module includes: A first word embedding unit, configured to pass the user profiles of the target object through the word embedding layer of the context encoder to convert the user profiles of the target object into embedding vectors to obtain a sequence of user profile embedding vectors; A first semantic encoding unit, configured to input the sequence of user portrait embedding vectors into the semantic encoder to obtain a plurality of user portrait semantic feature vectors; and The first cascading unit is used to cascade the multiple user portrait semantic feature vectors to obtain the user portrait semantic encoding feature vector.
4. The medical consultation recommendation system according to claim 3, characterized in that: The classification module comprises: A matrix expansion unit, used for expanding the optimized classification feature matrix into an optimized classification feature vector according to row vectors or column vectors; a fully connected encoding unit, configured to perform fully connected encoding on the optimized classification feature vector using a plurality of fully connected layers of the classifier to obtain an encoded classification feature vector; and The classification unit is used to pass the encoded classification feature vector through the Softmax classification function of the classifier to obtain the classification result.
5. A method for recommending medical treatment, characterized in that: include: Obtaining a user profile of the target object, wherein the user profile includes basic information of the target object and demand information of the target object; Obtain text descriptions of alternative medical resources; Passing the user profile of the target object through a semantic encoder including a word embedding layer to obtain a user profile semantic encoding feature vector; Passing the text description of the candidate medical resource through the semantic encoder including the word embedding layer to obtain a semantic encoding feature vector of the candidate medical resource; Performing association coding on the semantic coding feature vector of the candidate medical resource and the semantic coding feature vector of the user portrait to obtain a high-dimensional matching feature matrix; Passing the high-dimensional matching feature matrix through a spatial attention module to obtain a classification feature matrix; Performing feature value position information expression enhancement on the classification feature matrix to obtain an optimized classification feature matrix; and Passing the optimized classification feature matrix through a classifier to obtain a classification result, wherein the classification result is used to indicate whether to recommend alternative medical resources to the target object; Among them, associating and encoding the semantic encoding feature vector of the candidate medical resource and the semantic encoding feature vector of the user portrait to obtain a high-dimensional matching feature matrix includes: The candidate medical resource semantic coding feature vector and the user portrait semantic coding feature vector are associated and encoded using the following association coding formula to obtain the high-dimensional matching feature matrix; Wherein, the association coding formula is: , in, represents the semantic encoding feature vector of the candidate medical resource, represents the semantic encoding feature vector of the candidate medical resource, represents the semantic encoding feature vector of the user portrait, represents the high-dimensional matching feature matrix, Represents vector multiplication; Wherein, the high-dimensional matching feature matrix is passed through a spatial attention module to obtain a classification feature matrix, including: Using the convolutional coding part of the spatial attention module to perform deep convolutional coding on the high-dimensional matching feature matrix to obtain a high-dimensional matching convolutional feature map; Inputting the high-dimensional matching convolutional feature map into the spatial attention part of the spatial attention module to obtain a spatial attention map; Pass the spatial attention map through a Softmax activation function to obtain a spatial attention feature map; Calculate the spatial attention feature map and the position point multiplication of the spatial attention map to obtain a classification feature map; Performing pooling processing on the classification feature map along the channel dimension to obtain the classification feature matrix; The step of enhancing the expression of the eigenvalue position information of the classification feature matrix to obtain an optimized classification feature matrix includes: The position information pattern attention response factor of the feature value of each position of the classification feature matrix is calculated by the following factor calculation formula; The factor calculation formula is: , in, represents a function that maps two-dimensional real numbers to one-dimensional real numbers, and are the width and height of the classification feature matrix, respectively. is the classification feature matrix The eigenvalues at the positions, are the coordinates of each eigenvalue of the classification feature matrix, and is the global mean of all eigenvalues of the classification feature matrix, is a logarithmic function with base 2, is the first The position information schema attention response factor of the feature value at each position; and The position information schema attention response factor is used as a weight to weight the feature value of each position of the classification feature matrix to obtain the optimized classification feature matrix.
6. The method for recommending medical consultation according to claim 5, characterized in that: The semantic encoder is a transformer-based Bert model.
7. The method for recommending medical consultation according to claim 6, characterized in that: The user profile of the target object is passed through a semantic encoder including a word embedding layer to obtain a user profile semantic encoding feature vector, including: Passing the user profiles of the target objects through the word embedding layer of the context encoder respectively to convert the user profiles of the target objects into embedding vectors respectively to obtain a sequence of user profile embedding vectors; Inputting the sequence of user portrait embedding vectors into the semantic encoder to obtain a plurality of user portrait semantic feature vectors; and The multiple user portrait semantic feature vectors are cascaded to obtain the user portrait semantic encoding feature vector.
Citation Information
Patent Citations
Innovation and entrepreneurship platform service data processing method and system based on cloud computing
CN116010713A
Sports injury early warning system and early warning method thereof
CN116052269A
Hospital appointment registration management system
CN116189865A
Semiconductor microwave heating equipment and power control method thereof
CN116210987A
Optical arrayed waveguide grating devices
US6374013B1
