



技术领域technical field
本发明涉及一种在线医疗推荐系统及方法,具体涉及一种基于改进的知识图谱和PSVD方法的在线医疗推荐系统及其实现方法。The present invention relates to an online medical recommendation system and method, in particular to an online medical recommendation system based on an improved knowledge graph and a PSVD method and an implementation method thereof.
背景技术Background technique
目前,医疗卫生信息领域内的医疗人员在采集、处理海量数据过程中仍然面临许多问题与挑战。一是传统的医院信息存储方式已无法满足庞大的医疗信息存储需求;二是系统信息不足,信息过量,信息冲突,信息分散和信息错误等问题导致无法充分发掘医院信息数据的潜在价值;三是一旦医疗数据呈现爆炸式的增长则意味着数据可能面临泄露的风险,医疗数据的安全性和隐私性就难以保障。信息化技术飞速发展的今天,在海量医疗卫生信息数据中,如何迅速、高效地向患者推荐合适的医疗方案、就诊医师、康复计划等信息成为目前医疗领域内一个亟需解决的问题。At present, medical personnel in the field of medical and health information still face many problems and challenges in the process of collecting and processing massive data. First, the traditional hospital information storage method can no longer meet the huge demand for medical information storage; second, problems such as insufficient system information, excessive information, information conflict, information dispersion and information errors make it impossible to fully explore the potential value of hospital information data; third, Once the explosive growth of medical data means that the data may face the risk of leakage, it is difficult to guarantee the security and privacy of medical data. Today, with the rapid development of information technology, in the massive medical and health information data, how to quickly and efficiently recommend suitable medical plans, doctors, rehabilitation plans and other information to patients has become an urgent problem in the medical field.
发明内容SUMMARY OF THE INVENTION
本发明针对医疗信息过量的问题,设计患者-医疗项目偏好矩阵,并定义矩阵奇异值临界参数,临界参数依据方差模型和矩阵奇异值集合进行设定,并去除矩阵中的边缘数据;针对如何快速高效的向患者推荐项目,利用设定的知识图KI,分析KI中的多实体、属性建立矢量三元组,建立患者兴趣属性偏好和正反相关实体方法,给出推荐模型方案;针对现有医疗推荐方法存在的推荐结果单一、数据稀疏、数据冷启动问题,本发明设计基于知识图谱和改进的PSVD方法实现医疗推荐。总之,本发明提供一种基于改进的知识图谱和PSVD方法的在线医疗推荐系统及其实现方法,拟向登录系统的患者推荐合适的医生、有效的康复治疗建议等,同时提供在线社区的信息发布与提问、系统首页的信息推荐、在登录用户的个人主页中依据其兴趣偏好实现信息推荐等功能。Aiming at the problem of excessive medical information, the present invention designs a patient-medical item preference matrix, defines a critical parameter of the singular value of the matrix, and the critical parameter is set according to the variance model and the singular value set of the matrix, and removes the marginal data in the matrix; Efficiently recommend items to patients, use the set knowledge graph KI, analyze the multi-entities and attributes in KI to establish vector triples, establish patient interest attribute preferences and positive and negative related entity methods, and provide a recommended model scheme; The medical recommendation method has the problems of single recommendation result, sparse data, and cold start of data. The present invention is designed to realize medical recommendation based on the knowledge map and the improved PSVD method. In a word, the present invention provides an online medical recommendation system based on an improved knowledge graph and PSVD method and an implementation method thereof, which is intended to recommend suitable doctors, effective rehabilitation treatment suggestions, etc. to patients who log in to the system, and at the same time provides information release in an online community and questions, information recommendation on the homepage of the system, and information recommendation in the personal homepage of the logged-in user according to their interests and preferences.
本发明提供一种在线医疗推荐系统,包括首页模块、个人信息页模块、医疗交流反馈模块、疾病社区模块和康复理疗建议模块;所述首页模块用于汇总展示系统各个子模块的入口,所述个人信息页模块展示患者基本信息,所述医疗交流反馈模块用于系统用户进行医疗信息交流,所述疾病社区模块用于展示疾病医疗信息,所述康复理疗建议模块用于向系统用户展示疾病康复理疗的推荐信息。The present invention provides an online medical recommendation system, including a home page module, a personal information page module, a medical communication feedback module, a disease community module and a rehabilitation physiotherapy suggestion module; The personal information page module displays basic information of patients, the medical communication feedback module is used for system users to exchange medical information, the disease community module is used to display disease medical information, and the rehabilitation physiotherapy suggestion module is used to display disease rehabilitation to system users Recommended information for physiotherapy.
本发明首先患者注册并登录系统,输入个人医疗信息,包括:基本信息、患病名称、患病时长、治疗时长等。患者登录系统之后,可以选择:首页模块、个人信息页模块、医疗交流反馈模块、疾病社区模块、康复理疗建议模块进入。推荐模型的构建是基于改进的PSVD方法和知识图谱方法,具体分为两大部分,首先是PSVD方法部分,利用建立的患者-医疗项目偏好矩阵、噪声数据临界值、奇异值集等构建出患者对未评分医疗项目的预测分数模型,接着考虑到PSVD方法仅依赖于数据,忽略了患者和项目本身的语义信息,可能会造成推荐结果不准确,因此本发明引入知识图谱方法对PSVD方法结果优化,依据数据集构建知识图KI,并设定KI中(实体,属性,关系)的矢量三元组,基于三元组分别构建KI患者兴趣偏好属性等级模型和医疗项目正反相关实体模型,最终融合前面建立的PSVD方法构建推荐模型,得出最终的推荐结果列表集合SET。总之,本发明运用了一种改进的PSVD方法,并使用知识图谱技术来优化PSVD方法得到的患者对医疗项目的预测分数,最后融合改进的知识图谱“患者兴趣属性模型”和“正反相关实体模型”和PSVD方法预测分数模型给出最终的医疗推荐模型。In the present invention, the patient first registers and logs into the system, and inputs personal medical information, including: basic information, disease name, disease duration, treatment duration and the like. After the patient logs in to the system, he or she can choose: the home page module, the personal information page module, the medical communication feedback module, the disease community module, and the rehabilitation physiotherapy suggestion module to enter. The construction of the recommendation model is based on the improved PSVD method and the knowledge graph method. It is divided into two parts. The first part is the PSVD method, which uses the established patient-medical item preference matrix, noise data critical value, singular value set, etc. For the prediction score model of unscored medical items, considering that the PSVD method only relies on data, ignoring the semantic information of the patient and the item itself, it may cause inaccurate recommendation results. Therefore, the present invention introduces the knowledge map method to optimize the results of the PSVD method. , build a knowledge graph KI based on the data set, and set the vector triples (entities, attributes, relationships) in KI, and build KI patient interest preference attribute level models and medical item positive and negative correlation entity models based on the triples, and finally The recommendation model is constructed by integrating the PSVD method established above, and the final recommendation result list set SET is obtained. In a word, the present invention uses an improved PSVD method, and uses the knowledge graph technology to optimize the patient's prediction scores for medical items obtained by the PSVD method, and finally integrates the improved knowledge graph "patient interest attribute model" and "positive and negative related entities". Model" and the PSVD method predict the score model to give the final medical recommendation model.
本发明还提供一种在线医疗推荐系统的实现方法,包括以下步骤:The present invention also provides an implementation method of an online medical recommendation system, comprising the following steps:
步骤1、基于数据集patient-Medical-Data,定义患者patient对医疗项目Medical的偏好矩阵R,定义如下:Step 1. Based on the data set patient-Medical-Data, define the patient's preference matrix R for the medical item Medical, which is defined as follows:
式中,将系统中的若干患者和医疗项目分别使用两个多维向量表示,P=[P1,P2,P3,...Pi,...Pp],M=[M1,M2,M3,...Mj,...Mm],代表的含义为患者i对医疗项目j的偏好分数;In the formula, several patients and medical items in the system are respectively represented by two multi-dimensional vectors, P=[P1 , P2 , P3 ,...Pi ,...P p], M=[M1 , M2 , M3 , ... Mj , ... Mm ], The meaning of the representative is the preference score of patient i to medical item j;
步骤2、依据SVD方法的思想,考虑到偏好矩阵R中的数据量较大,且掺杂着许多边缘数据,为了降低推荐方法的时间复杂度,减少不必要的方法计算,考虑设计改进的方法,去除偏好矩阵R中的冗余数据,得到新的偏好矩阵R′;Step 2. According to the idea of SVD method, considering that the amount of data in the preference matrix R is large and mixed with a lot of edge data, in order to reduce the time complexity of the recommended method and reduce unnecessary method calculations, consider designing an improved method. , remove the redundant data in the preference matrix R, and obtain a new preference matrix R′;
步骤3、在上述一系列步骤操作之后,得到新的偏好矩阵R′,定义参数TOP-K表示矩阵R′的维度,相比于步骤1中初始偏好矩阵,矩阵R′中的数据维度降低,且边缘数据减少,降低了噪声数据的存在,有利于提升推荐结果的准确度。在此步骤中,依据新的偏好矩阵R′,计算患者对未评分医疗项目的预测偏好分数;Step 3. After the above series of steps, a new preference matrix R' is obtained, and the parameter TOP-K is defined to represent the dimension of the matrix R'. Compared with the initial preference matrix in step 1, the data dimension in the matrix R' is reduced. In addition, the reduction of edge data reduces the existence of noise data, which is beneficial to improve the accuracy of recommendation results. In this step, according to the new preference matrix R', calculate the patient's predicted preference score for unscored medical items;
步骤4、针对PSVD方法得到的预测分数进行优化改进,由于PSVD仅考虑数据层面,忽略了患者和医疗项目等实体语义的属性,本发明首先基于TransH知识表示方法将项目实体转变为三元组矢量化,得到实体属性三元组的向量表示,即Step 4. Optimize and improve the prediction scores obtained by the PSVD method. Since PSVD only considers the data level, ignoring the attributes of entity semantics such as patients and medical items, the present invention first converts item entities into triplet vectors based on the TransH knowledge representation method. to obtain the vector representation of entity attribute triples, namely
Tu={(h,r,a)]h∈Historyu}Tu ={(h,r,a)]h∈Historyu }
其中,Historyu表示患者关联的历史医疗项目实体集,Tu表示患者u历史医疗项目实体集中包含的三元组信息,h表示推荐系统中的实体,a表示实体的属性,r表示实体与属性之间的关系;Among them, Historyu represents the historical medical item entity set associated with the patient, Tu represents the triple information contained in the historical medical item entity set of patient u, h represents the entity in the recommendation system, a represents the attribute of the entity, and r represents the entity and attribute The relationship between;
步骤5、利用矢量三元组中的a属性,定义方法获取某一个医疗实体属性在与患者相关的所有医疗项目实体属性中所占的权重,基于该权重评判患者对某一个实体属性的兴趣偏好等级;Step 5. Use the a attribute in the vector triplet to define a method to obtain the weight of a medical entity attribute in all medical item entity attributes related to the patient, and judge the patient's interest preference for a certain entity attribute based on the weight. grade;
步骤6、基于建立的医疗项目属性a权重模型、知识图中矢量三元组,构建患者对医疗项目兴趣偏好的等级判定模型;Step 6. Based on the established weight model of the medical item attribute a and the vector triplet in the knowledge graph, construct a grade judgment model for the interest and preference of the patient on the medical item;
步骤7、基于建立的知识矢量三元组,构建正反相关性医疗项目实体模型;Step 7. Based on the established knowledge vector triplet, construct a positive and negative correlation medical item entity model;
步骤8、融合改进的PSVD的预测分数模型和患者兴趣属性偏好等级模型和正反相关性实体模型得出融合推荐算法;Step 8. Integrate the improved PSVD prediction score model, the patient interest attribute preference grade model and the positive and negative correlation entity model to obtain a fusion recommendation algorithm;
步骤9、返回最终推荐结果集SET。Step 9. Return the final recommendation result set SET.
本发明的推荐方法对传统的SVD方法进行改进,提出一种新的PSVD方法,PSVD方法中提出一种新的去除偏好矩阵“边缘数据”的方法,该方法首先基于建立的患者-项目偏好矩阵R,并将数据集中的医疗数据分为两类:患者数据、医疗项目数据,二者以多维向量P、M的形式表示:P=[P1,P2,P3,...Pp],M=[M1,M2,M3,...Mm],接着设定边缘数据临界值E,E的定义依赖于R中奇异值,并将其组成向量Q=[Q1,Q2,Q3,...Qm],E的具体表示如下,依赖E,将实现去除偏好矩阵R中的边缘数据,从而实现在偏好矩阵R中降低噪声数据的分布。同时,引入“最小二乘法”来降低患者对医疗项目的偏好分数误差,具体包括:定义患者因子向量pu、医疗项目因子向量Ii,定义两个评分偏离值δu,δi,分别表示在预测评分偏好分数时候的患者因素、项目因素偏离值,另外定义评级偏离参数μ,同时,表示为,其中SSu,i为初步定义的预测偏好分数方法。在去除掉初始偏好矩阵中的边缘数据之后,针对新得到的偏好矩阵R′,将其分解为患者因素矩阵和医疗项目因素矩阵,分别记为Up*k,Iu*k,通过分析患者对k个因素的偏好程度以及某医疗项目中这些潜在因素的存在率,结合患者之间的关联度,结合误差降低模型,综合得出最终的预测分数方法。另外,融入知识图谱方法来优化PSVD方法得到的预测分数模型,由于PSVD算法仅依赖于“患者-医疗项目”的偏好矩阵实现推荐,依靠的仅仅是数据,忽略了患者与医疗项目自身的语义信息,若只利用改进的PSVD算法实现医疗推荐的话,会导致推荐结果精度不高。因此本发明在前述步骤的基础上,引入知识图谱技术,将知识图谱中的医疗项目、患者之间的语义关联信息、项目相似度等属性添加到推荐模型中,高度利用推荐系统中的医疗项目与患者的隐式信息,从而提升推荐的精确度。最后,结合患者和医疗项目的语义属性,利用知识表示方法将项目实体转变为三元组矢量化,基于建立的矢量三元组,利用矢量三元组中的a属性,定义方法获取某一个医疗实体属性在与患者相关的所有医疗项目实体属性中所占的权重,基于该权重评判患者对某一个实体属性的兴趣偏好等级。The recommendation method of the present invention improves the traditional SVD method, and proposes a new PSVD method. In the PSVD method, a new method for removing the "edge data" of the preference matrix is proposed. The method is first based on the established patient-item preference matrix. R, and divide the medical data in the dataset into two categories: patient data and medical item data, which are represented in the form of multidimensional vectors P and M: P=[P1 , P2 , P3 ,...Pp ], M= [M1 , M2 , M3 , . ,Q2 , Q3 , . At the same time, the "least squares method" is introduced to reduce the patient's preference score error for medical items, which includes: defining the patient factor vector pu and the medical item factor vector Ii , and defining two score deviation values δu , δi , respectively representing The deviation value of patient factors and item factors when predicting the score preference score, and the deviation parameter μ of the ranking is also defined. At the same time, it is expressed as, where SSu,i is the preliminarily defined prediction preference score method. After removing the marginal data in the initial preference matrix, the newly obtained preference matrix R′ is decomposed into a patient factor matrix and a medical item factor matrix, which are denoted as Up*k and Iu*k respectively . The degree of preference for k factors and the existence rate of these potential factors in a medical project, combined with the correlation between patients, combined with the error reduction model, comprehensively obtain the final prediction score method. In addition, the knowledge graph method is integrated to optimize the prediction score model obtained by the PSVD method. Since the PSVD algorithm only relies on the “patient-medical item” preference matrix for recommendation, it only relies on data, ignoring the semantic information of patients and medical items themselves. , if only the improved PSVD algorithm is used to achieve medical recommendation, the accuracy of the recommendation results will be low. Therefore, on the basis of the aforementioned steps, the present invention introduces the knowledge graph technology, and adds attributes such as medical items in the knowledge graph, semantic association information between patients, item similarity and other attributes to the recommendation model, and highly utilizes the medical items in the recommendation system. Implicit information with patients to improve the accuracy of recommendations. Finally, combined with the semantic attributes of patients and medical items, the knowledge representation method is used to transform the item entity into triple vectorization. Based on the established vector triple, the a attribute in the vector triple is used to define a method to obtain a certain medical treatment. The weight of the entity attribute in the entity attributes of all medical items related to the patient, and the patient's interest preference level for a certain entity attribute is judged based on the weight.
本发明进一步优化的技术方案如下所示:The further optimized technical scheme of the present invention is as follows:
所述步骤2的具体操作如下:The specific operations of step 2 are as follows:
步骤2.1、依据建立的矩阵R,设定一个临界值E,临界值判定是依赖于矩阵R子对角线上的的数据形成的一维向量数据集,定义其为Q=[Q1,Q2,Q3,...,Qi,...Qm];依据SVD的思想,偏好矩阵对角线上的数据为奇异值,依据奇异值来实现去除,可以有效保证去除边缘数据的准确性;临界值E的定义如下:Step 2.1. According to the established matrix R, set a critical value E. The critical value judgment is a one-dimensional vector data set formed by relying on the data on the sub-diagonal of the matrix R, which is defined as Q=[Q1 , Q2 , Q3 ,...,Qi ,...Qm ]; According to the idea of SVD, the data on the diagonal of the preference matrix are singular values, and the removal is realized according to the singular values, which can effectively ensure the removal of edge data. Accuracy; critical value E is defined as follows:
式中,为向量数据集Q的均值,m为Q的向量维度;In the formula, is the mean of the vector data set Q, and m is the vector dimension of Q;
步骤2.2、依据步骤2.1中的E,判断矩阵R中的数值与E的大小关系:Step 2.2, according to E in step 2.1, judge the value in the matrix R The size relationship with E:
若在矩阵R中,保留所在的行与列的数据;like In matrix R, keep The data of the row and column where it is located;
若在矩阵R中,删除所在的行与列的数据;like In matrix R, delete The data of the row and column where it is located;
最终得到新的偏好矩阵R′。Finally, a new preference matrix R' is obtained.
所述步骤3的具体操作如下:The specific operations of the step 3 are as follows:
步骤3.1、将新的偏好矩阵R′分解为患者因素矩阵和医疗项目因素矩阵,并分别记为Up*k,Iu*k,其中k表示患者对项目偏好的潜在因素属性,通过分析患者对k个因素的偏好程度以及某医疗项目中这些潜在因素的存在率,PSVD可以预测用户对相应物品的偏好分数。患者u对医疗项目i的预测偏好分数定义如下:Step 3.1. Decompose the new preference matrix R′ into a patient factor matrix and a medical item factor matrix, and denote them as Up*k and Iu*k respectively , where k represents the latent factor attribute of the patient’s preference for the item. The degree of preference for k factors and the existence rate of these latent factors in a medical item, PSVD can predict the user's preference score for the corresponding item. The predicted preference score of patient u for medical item i is defined as follows:
SSu,i′=pu*Ii+μ*(δu+δi)SSu, i ′ = pu *Ii +μ*(δu +δi )
式中,pu、Ii分别表示单个患者因子向量和单个医疗项目因子向量,δu、δi表示在预测患者u对项目i的偏好分数时候的评分偏离值,前者表示患者因素偏离值,后者表示项目因素偏离值;μ表示设定的评级偏离参数;In the formula, pu and Ii represent a single patient factor vector and a single medical item factor vector, respectively, δu , δi represent the score deviation value when predicting the preference score of patient u to item i, the former represents the patient factor deviation value, The latter represents the project factor deviation value; μ represents the set rating deviation parameter;
步骤3.2、考虑到患者对项目的预测评分存在误差,因此引入最小二乘法来降低偏离率,具体表示如下:Step 3.2. Considering that there is an error in the patient's predicted score for the item, the least squares method is introduced to reduce the deviation rate, which is expressed as follows:
式中,u,i∈SS表示选取数据集中的某个用户u与医疗项目i,SSu,i、SSu,i′分别表示偏好矩阵R降维前后的患者u对医疗项目i的预测偏好分数,γ表示设定的阈值参数;In the formula, u, i∈SS represents a certain user u and medical item i in the selected data set, SSu,i and SSu,i ′ represent the predicted preference of patient u to medical item i before and after the dimensionality reduction of the preference matrix R, respectively. Score, γ represents the set threshold parameter;
步骤3.3、在对预测评分的偏离误差进行处理之后,可以实现降低预测分数的误差性,基于相似用户的历史分数来对目标用户进行评分预测,最终得到的预测分数定义如下:Step 3.3. After the deviation error of the predicted score is processed, the error of the predicted score can be reduced, and the target user can be scored and predicted based on the historical scores of similar users. The final prediction score is defined as follows:
式中,第一个加数表示患者u和患者v二者之间的关联度,这里引用了pcc定理度量角色之间的相似度,SSu,i、SSv,i均表示患者对项目i的评分,分别为患者u、v对项目的平均评分,N表示系统中医疗项目的总数。至此得到了基于多患者关联度的SVD方法的预测偏好分数。In the formula, the first addend represents the degree of association between patientu and patientv . Here, the pcc theorem is used to measure the similarity between roles. rating, are the average scores of patients u and v on items, respectively, and N represents the total number of medical items in the system. So far, the predicted preference score of the SVD method based on the multi-patient correlation has been obtained.
由于PSVD算法仅依赖于“患者-医疗项目”的偏好矩阵实现推荐,依靠的仅仅是数据,忽略了患者与医疗项目自身的语义信息,若只利用改进的PSVD算法实现医疗推荐的话,会导致推荐结果精度不高。因此本发明在前述步骤的基础上,引入知识图谱技术,将知识图谱中的医疗项目、患者之间的语义关联信息、项目相似度等属性添加到推荐模型中,高度利用推荐系统中的医疗项目与患者的隐式信息,从而提升推荐的精确度。Since the PSVD algorithm only relies on the "patient-medical item" preference matrix to achieve recommendation, it relies only on data, ignoring the semantic information of patients and medical items themselves. The result is not very accurate. Therefore, on the basis of the aforementioned steps, the present invention introduces the knowledge graph technology, and adds attributes such as medical items in the knowledge graph, semantic association information between patients, item similarity and other attributes to the recommendation model, and highly utilizes the medical items in the recommendation system. Implicit information with patients to improve the accuracy of recommendations.
所述步骤5中获取a属性的权重,具体如下:In the step 5, the weight of the a attribute is obtained, as follows:
基于知识图谱中的三元组(h,r,a),定义a属性在患者u相关的医疗项目属性中所占的权重,如下所示:Based on the triples (h, r, a) in the knowledge graph, define the weight of the attribute a in the attributes of medical items related to patient u, as follows:
式中,表示患者u的所有医疗项目实体属性中a属性的权重值,haT表示与a属性相关联的前实体,ra表示与a属性相关联的关系向量,(h,r,a)∈Tu表示选择知识图谱中包含a属性的三元组,h、r分别表示包含a属性的所有三元组中的前实体与关系向量。In the formula, Represents the weight value of the a attribute in the entity attributes of all medical items of patient u, haT represents the former entity associated with the a attribute, ra represents the relationship vector associated with the a attribute, (h, r, a) ∈ Tu represents the selection of the triplet containing the attribute a in the knowledge graph, and h and r represent the previous entity and relation vector in all triples containing the attribute a, respectively.
所述步骤6中,构建等级判定模型包含以下步骤:In the step 6, building a grade judgment model includes the following steps:
步骤6.1、在获得实体属性的权重之后,基于此判定患者u对属性a的兴趣偏好等级,具体表示方法如下:Step 6.1, in obtaining the weight of entity attributes After that, based on this, the interest preference level of patient u for attribute a is determined, and the specific expression method is as follows:
式中,Interestu表示患者u的对实体属性a的兴趣偏好属性值,属性a的权重表示为In the formula, Interestu represents the interest and preference attribute value of patient u to entity attribute a, and the weight of attribute a is expressed as
步骤6.2、设置三个等级参数,将设定的等级参数,与步骤6.1中得出的患者对实体属性的兴趣偏好属性值进行比较,得出兴趣偏好等级;Step 6.2, set three grade parameters, compare the set grade parameters with the patient's interest preference attribute value for the entity attribute obtained in step 6.1, and obtain the interest preference grade;
步骤6.3、设定第一个等级参数γ1,依据知识图KI中的矢量三元组,仅取出与实体属性a相关的前实体向量ha和关系向量ra,二者进行向量的点积运算。因为仅依赖于实体属性a,可以说明当前属性a与患者兴趣偏好度匹配最低,因此该参数表示患者最不感兴趣,具体表示如下:Step 6.3, set the first level parameter γ1 , according to the vector triples in the knowledge graph KI, only extract the former entity vectorha and relation vector ra related to the entity attributea , and perform the dot product of the vectors. operation. Because it only depends on the entity attribute a, it can be shown that the current attribute a matches the patient's interest preference the least, so this parameter indicates that the patient is the least interested, and the specific expression is as follows:
步骤6.4、设定第二个等级参数γ2,依据知识图KI中的矢量三元组,只要三元组中包含属性a,就将其前实体h和关系向量r取出,并进行向量点积运算。设定该参数表示当前属性a与患者兴趣偏好度匹配中等,因此该参数表示患者感兴趣。具体表示如下:Step 6.4. Set the second level parameter γ2 . According to the vector triples in the knowledge graph KI, as long as the triples contain attribute a, the former entity h and the relation vector r are taken out, and the vector dot product is performed. operation. Setting this parameter indicates that the current attribute a is moderately matched with the patient's interest preference, so this parameter indicates that the patient is interested. The specific representation is as follows:
步骤6.5、设定第三个等级参数γ3,该参数表示当前属性a与患者兴趣偏好度匹配最高,因此该参数表示患者非常感兴趣。具体表示如下:Step 6.5: Set the third level parameter γ3 , this parameter indicates that the current attribute a matches the patient's interest preference the most, so this parameter indicates that the patient is very interested. The specific representation is as follows:
步骤6.6、判定患者对医疗项目属性a的偏好等级:Step 6.6. Determine the patient's preference level for the medical item attribute a:
若Interestu->a<γ1,则认为患者U对a属性的兴趣偏好等级为不感兴趣;If Interestu->a <γ1 , it is considered that the interest preference level of patient U in attribute a is not interested;
若γ1<Interestu->a<γ2,则认为患者U对a属性的兴趣偏好等级为感兴趣,If γ1 <Interestu->a <γ2 , it is considered that the interest preference level of patient U in attribute a is interested,
若Interestu->a>γ3,则认为患者U对a属性的兴趣偏好等级为非常感兴趣,至此,基于知识图KI得到患者对属性a的兴趣偏好等级模型。If Interestu->a >γ3 , it is considered that the patient U's interest preference level for attribute a is very interested. So far, the patient's interest preference level model for attribute a is obtained based on the knowledge graph KI.
本发明由于推荐方案的制定涉及的主体是项目实体,对于知识图谱中的项目实体,将其分类为:正相关实体和负相关实体,在最终形成推荐的时候,自动去除掉以负相关实体为核心的推荐方案列表,以及负相关实体相关的子实体属性,从而降低方法的复杂度和不必要的计算。In the present invention, since the main body involved in the formulation of the recommendation scheme is the project entity, the project entities in the knowledge map are classified into: positive related entities and negative related entities, and when the recommendation is finally formed, the negative related entities are automatically removed. A list of recommended solutions for the core, and sub-entity attributes related to negatively related entities, thereby reducing the complexity of the method and unnecessary computation.
所述步骤7中,由于推荐方案的制定涉及的主体是项目实体,对于知识图谱中的项目实体,将其分类为正相关实体和负相关实体,在最终形成推荐时,自动去除掉以负相关实体为核心的推荐方案列表,以及负相关实体相关的子实体属性,从而降低方法的复杂度和不必要的计算。构建正反相关性医疗项目实体模型包含以下步骤:In the step 7, since the main body involved in the formulation of the recommendation scheme is the project entity, the project entities in the knowledge map are classified into positive related entities and negative related entities, and when the recommendation is finally formed, the negative related entities are automatically removed. A list of recommended solutions with entity as the core, and sub-entity attributes related to negatively related entities, thus reducing the complexity of the method and unnecessary computation. The construction of the positive and negative correlation medical item entity model includes the following steps:
步骤7.1、定义知识图KI中的随机Random实体:对于知识图KI中的若干实体形成的三元组,单个三元组(h,r,t),其中h表示前实体,t表示后实体,将前实体h使用知识图KI中的任意一个随机实体hrandom代替,后实体也被代替为trandom,新生成的三元组(hrandom,r,t)、(h,r,trandom)不存在知识图KI中;Step 7.1. Define the random Random entity in the knowledge graph KI: for the triplet formed by several entities in the knowledge graph KI, a single triplet (h, r, t), where h represents the former entity, t represents the latter entity, The former entity h is replaced by any random entity hrandom in the knowledge graph KI, and the latter entity is also replaced by trandom , and the newly generated triplet (hrandom , r, t), (h, r, trandom ) Does not exist in the knowledge graph KI;
步骤7.2、基于步骤7.1中定义的前、后实体h、t,定义Wh向量表示将实体从实体空间映射到关系空间,设定边缘函数f,函数f得到的是向量模的平方值,具体表示为;Step 7.2. Based on the front and back entities h and t defined in step 7.1, define the Wh vector to represent the mapping of the entity from the entity space to the relation space, and set the edge function f. The function f obtains the square value of the vector modulus. Expressed as;
f(h,t)=||h-t-(WhT·h·Wh-WhT·t·Wh)||2;f(h, t)=||ht-(WhT ·h ·Wh -WhT ·t ·Wh )||2 ;
步骤7.3、建立正相关实体和负相关实体的判断模型,基于步骤7.2中定义的边缘函数f,设计用于区分正、反相关实体的方法模型;Step 7.3, establish the judgment model of positive related entities and negative related entities, and design a method model for distinguishing positive and negative related entities based on the edge function f defined in step 7.2;
正反相关性实体模型,具体表示如下:Positive and negative correlation entity model, specifically expressed as follows:
式中,classh,t模型执行的前提条件是:(h,r,t)∈Tu且且In the formula, the precondition for the execution of the classh, t model is: (h, r, t) ∈ Tu and and
步骤7.4、分析classh,t的两个结果值,判定正负相关实体。Step 7.4, analyze the two result values of classh, t , and determine the positive and negative related entities.
所述步骤8中,融合推荐算法包含以下步骤:In the step 8, the fusion recommendation algorithm includes the following steps:
步骤8.1、针对知识图KI中的两元组(u,i),若即患者u对项目i的偏好等级为不感兴趣,则算法终止,否则执行步骤8.3;Step 8.1. For the two-tuple (u, i) in the knowledge graph KI, if That is, the preference level of patient u to item i is not interested, then the algorithm is terminated, otherwise step 8.3 is executed;
步骤8.2、针对知识图KI中的两元组(u,i),若Step 8.2. For the two-tuple (u, i) in the knowledge graph KI, if
即患者u对项目i的偏好等级为感兴趣,则算法终止,否则执行步骤8.3;That is, if the preference level of patient u is interested in item i, the algorithm terminates, otherwise, step 8.3 is executed;
步骤8.3、针对知识图KI中的两元组(u,i),若不满足即实体h、t是负相关实体,则算法终止,否则执行步骤8.4,Step 8.3. For the two-tuple (u, i) in the knowledge graph KI, if not satisfied That is, the entities h and t are negatively correlated entities, then the algorithm is terminated, otherwise step 8.4 is executed,
步骤8.4、若SET中的推荐方案个数没有达到K,则将其加入推荐结果集SET中,并执行步骤8.1,否则执行步骤8.5;Step 8.4. If the number of recommended solutions in the SET does not reach K, add it to the recommended result set SET, and perform Step 8.1, otherwise, perform Step 8.5;
步骤8.5、若SET集合中的数据已达到k,则输出SET,形成推荐结果集,推荐结束;否则执行步骤8.1。Step 8.5. If the data in the SET set has reached k, output the SET to form a recommended result set, and the recommendation ends; otherwise, go to Step 8.1.
附图说明Description of drawings
图1为本发明中基于“糖尿病”的医疗知识图KI。Fig. 1 is a medical knowledge graph KI based on "diabetes" in the present invention.
图2为本发明中改进的PSVD方法流程图。Fig. 2 is the flow chart of the improved PSVD method in the present invention.
图3为本发明中融合PSVD、兴趣偏好属性和正反相关实体的推荐模型流程图。FIG. 3 is a flow chart of a recommendation model integrating PSVD, interest preference attributes and positive and negative related entities in the present invention.
图4为本发明中系统的架构图。FIG. 4 is an architecture diagram of the system in the present invention.
具体实施方式Detailed ways
下面结合附图对本发明的技术方案做进一步的详细说明:本实施例在以本发明技术方案为前提下进行实施,给出了详细的实施方式和具体的操作过程,但本发明的保护权限不限于下述的实施例。The technical solution of the present invention will be further described in detail below in conjunction with the accompanying drawings: the present embodiment is implemented on the premise of the technical solution of the present invention, and provides a detailed implementation manner and a specific operation process, but the protection authority of the present invention does not It is limited to the following examples.
实施例1Example 1
本实施例以医疗中的“糖尿病”为例建立知识图(见图1),并以此作为实例,执行推荐模型的PSVD预测分数和KI的兴趣偏好属性和正反相关实体等步骤,相比于传统基于SVD方法的医疗推荐方法,本系统加入知识图谱方法,使得推荐模型结合医疗项目和患者本身语义,不仅仅依靠偏好分数,更有利于提升推荐的准确度和减少推荐误差性。This embodiment takes “diabetes” in medical care as an example to build a knowledge graph (see Figure 1), and uses this as an example to perform steps such as the PSVD prediction score of the recommendation model, the interest preference attribute of KI, and the positive and negative related entities. Compared with the traditional medical recommendation method based on the SVD method, this system adds the knowledge graph method, so that the recommendation model combines the semantics of medical items and the patient itself, and not only depends on the preference score, but also helps to improve the accuracy of recommendation and reduce the error of recommendation.
本实施例的在线医疗推荐系统,包括首页模块、个人信息页模块、医疗交流反馈模块、疾病社区模块和康复理疗建议模块;首页模块用于汇总展示系统各个子模块的入口,个人信息页模块展示患者基本信息,医疗交流反馈模块用于系统用户进行医疗信息交流,疾病社区模块用于展示疾病医疗信息,康复理疗建议模块用于向系统用户展示疾病康复理疗的推荐信息。The online medical recommendation system of this embodiment includes a home page module, a personal information page module, a medical communication feedback module, a disease community module, and a rehabilitation physiotherapy suggestion module; the home page module is used to summarize and display the entrances of each sub-module of the system, and the personal information page module displays The basic information of patients, the medical communication feedback module is used for system users to exchange medical information, the disease community module is used to display disease medical information, and the rehabilitation physiotherapy recommendation module is used to display disease rehabilitation physiotherapy recommendation information to system users.
使用上述医疗推荐系统时,具体步骤为:患者注册并登录系统,填写个人基本信息,包括:所患疾病名称、时长、治疗记录等;推荐系统模块组成:首页模块、个人信息页模块、医疗交流反馈模块、疾病社区模块、康复理疗建议模块;患者可以进入各个子模块进行查看,其中医疗交流反馈模块可供患者在社区交流医疗疾病情况,疾病社区模块可向患者推荐当前疾病的相关医学研究等信息,包括:治疗医生、治疗药物、引起的并发症等,康复理疗建议模块可以向患者展示当前疾病的一些治疗建议、预防措施方案、康复治疗建议等(见图4)。When using the above medical recommendation system, the specific steps are: patients register and log in to the system, and fill in basic personal information, including: the name of the disease, duration, treatment records, etc.; the recommendation system modules are composed of: home page module, personal information page module, medical communication Feedback module, disease community module, and rehabilitation physiotherapy suggestion module; patients can enter each sub-module to view, among which the medical communication feedback module can be used by patients to communicate medical diseases in the community, and the disease community module can recommend relevant medical research of the current disease to patients, etc. Information, including: treating doctors, treatment drugs, complications, etc., the rehabilitation physiotherapy suggestion module can show patients some treatment suggestions, preventive measures, and rehabilitation treatment suggestions for the current disease (see Figure 4).
如图2和图3所示,一种在线医疗推荐系统的实现方法,包括以下步骤:As shown in Figure 2 and Figure 3, an implementation method of an online medical recommendation system includes the following steps:
步骤1、医疗数据集的获取。从“聚数力”官网下载相关数据集,命名数据集:proDatas,定义糖尿病患者Diabetics对糖尿病相关医疗项目MedicalPros(糖尿病治疗药物、治疗仪器、治疗方案、预防措施等)的偏好矩阵R,定义如下:Step 1. Acquisition of medical datasets. Download the relevant data set from the official website of "Jushuli", name the data set: proDatas, and define the preference matrix R of Diabetics for diabetes-related medical items MedicalPros (diabetes treatment drugs, treatment equipment, treatment plans, preventive measures, etc.), which is defined as follows :
式中,将系统proDatas中的两类数据:糖尿病患者、项目分别使用两个多维向量表示,即In the formula, the two types of data in the system proDatas: diabetic patients and items are represented by two multidimensional vectors, namely
P=[P1,P2,P3,...Pi,...Pp],M=[M1,M2,M3,...Mj,...Mm],代表的含义为糖尿病患者i对糖尿病项目j的偏好分数。P=[P1 , P2 , P3 ,...Pi ,... Pp ], M=[M1 , M2 , M3 ,... Mj ,... Mm ], The meaning of the representative is the preference score of diabetes patient i to diabetes item j.
步骤2、降低糖尿病患者偏好矩阵中的数据量,去除矩阵的边缘、噪声数据。Step 2: Reduce the amount of data in the diabetes patient preference matrix, and remove the edge and noise data of the matrix.
步骤2.1、依据建立的矩阵R,设定一个临界值E,定义矩阵R子对角线上的的数据形成的一维向量数据集Q=[Q1,Q2,Q3,...,Qi,...Qm]。依据SVD的思想,偏好矩阵对角线上的数据为奇异值,依据奇异值来实现去除,可以有效保证去除边缘数据的准确性。得到临界值E的定义如下:Step 2.1. According to the established matrix R, set a critical value E, and define the one-dimensional vector data set Q=[Q1 , Q2 , Q3 ,..., formed by the data on the sub-diagonal of the matrix R , Qi ,...Qm ]. According to the idea of SVD, the data on the diagonal of the preference matrix are singular values, and the removal is realized according to the singular values, which can effectively ensure the accuracy of removing edge data. The definition of the obtained critical value E is as follows:
式中,勾向量数据集Q的均值,m为Q的向量维度;In the formula, Check the mean of the vector data set Q, m is the vector dimension of Q;
步骤2.2、依据步骤2.1中的E,判断矩阵R中的数值与E的大小关系:Step 2.2, according to E in step 2.1, judge the value in the matrix R The size relationship with E:
若在矩阵R中,保留所在的行与列的数据;like In matrix R, keep The data of the row and column where it is located;
若在矩阵R中,删除所在的行与列的数据;like In matrix R, delete The data of the row and column where it is located;
最终得到新的偏好矩阵R′。Finally, a new preference matrix R' is obtained.
步骤3、将步骤2.2得到的新矩阵定义为R′,定义参数TOP-K表示矩阵R′的维度,之后依据新偏好矩阵,计算糖尿病患者对未评分的糖尿病医疗项目(如:胰岛素的治疗方案满意度、胃部手术预防措施的依赖度、骨髓干细胞、外周血干细胞移植的容纳度、严格规范生活方式习惯的接受度等)的项目预测偏好分数。Step 3. Define the new matrix obtained in step 2.2 as R', define the parameter TOP-K to represent the dimension of the matrix R', and then calculate the unscored diabetes medical items (eg: insulin treatment plan) for diabetic patients according to the new preference matrix. Item prediction preference scores for satisfaction, reliance on preventive measures for gastric surgery, acceptance of bone marrow stem cells, peripheral blood stem cell transplantation, acceptance of strictly regulated lifestyle habits, etc.).
步骤3.1、将R′分解为糖尿病、患者因素矩阵,包括患者个人体貌特征信息、患病时长、糖尿病类型、历史治疗记录等和糖尿病项目因素矩阵,包括相关可能引起的并发症、预防糖尿病的措施、糖尿病的相关症状表现等,分别记为Up*k,Iu*k,其中k表示患者对糖尿病项目偏好的潜在因素属性,潜在因素比如:少糖饮食、运动健身、禁止吸烟等行为习惯。通过分析患者对k个因素的偏好程度以及糖尿病医疗项目中这些潜在因素的存在率,PSVD可以预测患者对相应项目的偏好分数。Step 3.1. Decompose R' into diabetes and patient factor matrix, including patient's personal physical characteristics information, duration of illness, diabetes type, historical treatment records, etc. and diabetes item factor matrix, including related possible complications and diabetes prevention measures , diabetes-related symptoms, etc., respectively denoted as Up*k , Iu*k , where k represents the underlying factor attributes of the patient’s preference for diabetes items, such as: low-sugar diet, exercise and fitness, no smoking and other behavioral habits . By analyzing patients' preference for k factors and the presence of these latent factors in diabetes medical programs, PSVD can predict patients' preference scores for corresponding items.
偏好分数定义:SSu,i′=pu*Ii+μ*(δu+δi),上述公式中,pu,Ii分别表示单个患者因子向量和单个糖尿病项目因子向量,δu,δi表示在预测患者u对项目i的偏好分数时候的评分偏离值,前者表示患者因素偏离值,后者表示项目因素偏离值。μ表示设定的评级偏离参数。Definition of preference score: SSu, i ′= pu *Ii +μ*(δu +δi ), in the above formula, pu , Ii represent a single patient factor vector and a single diabetes item factor vector, respectively, δu , δi represents the score deviation value when predicting patient u's preference score for item i, the former represents the patient factor deviation value, and the latter represents the item factor deviation value. μ represents the set rating deviation parameter.
步骤3.2、引入最小二乘法来降低偏离率,具体表示如下:Step 3.2. Introduce the least squares method to reduce the deviation rate, which is expressed as follows:
式中,u,i∈SS表示选取数据集中的某个用户u与医疗项目i,SSu,i、SSu,i′分别表示偏好矩阵R降维前后的患者u对医疗项目i的预测偏好分数,γ表示设定的阈值参数;In the formula, u, i∈SS represents a certain user u and medical item i in the selected data set, SSu,i and SSu,i ′ represent the predicted preference of patient u to medical item i before and after the dimensionality reduction of the preference matrix R, respectively. Score, γ represents the set threshold parameter;
步骤3.3、基于与患者的相似患者的历史分数来对目标糖尿病患者进行评分预测,最终得到的预测分数定义如下:Step 3.3: Predict the score of the target diabetic patient based on the historical scores of similar patients with the patient, and the final prediction score is defined as follows:
式中,第一个加数表示糖尿病患者u、v二者之间的关联度,SSu,i,SSv,i均表示患者对项目i的评分,为患者u、v对项目的平均评分,N表示糖尿病医疗项目的总数。至此得到了基于多糖尿病患者关联度的PSVD方法的预测偏好分数。In the formula, the first addend represents the degree of correlation between u and v of diabetic patients, SSu, i , SSv, i all represent the patient's score for item i, is the average score of patients u and v on items, and N represents the total number of diabetes medical items. So far, the predicted preference score of the PSVD method based on the association of polydiabetic patients was obtained.
步骤4、建立基于糖尿病的知识图KI,得到实体属性三元组的向量表示,Tu={(h,r,a)|h∈Historyu},其中,Historyu表示糖尿病患者u关联的历史项目实体集,Tu表示患者u历史医疗项目实体集中包含的三元组信息,h表示KI中的实体,a表示实体的属性,r表示实体与属性之间的关系。Step 4. Establish a diabetes-based knowledge graph KI, and obtain a vector representation of entity attribute triples, Tu = {(h, r, a)|h∈Historyu }, where Historyu represents the history associated with diabetes patientu Item entity set, Tu represents the triple information contained in the entity set of patient u's history medical items, h represents the entity in KI, a represents the attribute of the entity, and r represents the relationship between the entity and the attribute.
步骤5、利用矢量三元组中的a属性,定义方法获取糖尿病医疗实体属性在与糖尿病患者相关的所有医疗项目实体属性中所占的权重,基于该权重评判患者对糖尿病实体属性的兴趣偏好等级。Step 5. Use the a attribute in the vector triplet to define a method to obtain the weight of the diabetes medical entity attribute in all the medical item entity attributes related to the diabetic patient, and judge the patient's interest preference level for the diabetes entity attribute based on the weight. .
基于知识图谱中的三元组(h,r,a),定义a属性在患者u相关的医疗项目属性中所占的权重。患者u的所有医疗项目实体属性中a属性的权重值,定义如下:Based on triples (h, r, a) in the knowledge graph, the weight of attribute a in the attributes of medical items related to patient u is defined. The weight value of attribute a in the entity attributes of all medical items of patient u is defined as follows:
式中,表示患者u的所有医疗项目实体属性中a属性的权重值。haT表示与a属性相关联的前实体,ra表示与a属性相关联的关系向量,(h,r,a)∈Tu表示选择知识图谱中包含a属性的三元组,h、r分别表示包含a属性的所有三元组中的前实体与关系向量。In the formula, Represents the weight value of attribute a in all medical item entity attributes of patient u. haT represents the former entity associated with the a attribute, ra represents the relation vector associated with the a attribute, (h, r, a) ∈ Tu represents the selection of the triplet containing the a attribute in the knowledge graph, h, r represents the pre-entity and relation vectors in all triples containing a attribute, respectively.
步骤6、利用知识图KI中建立的三元组Tu中的a属性,通过分析实体属性在患者的兴趣权重,建立计算患者兴趣属性偏好的方法:表示患者u的对糖尿病项目属性的兴趣偏好值,表示单个糖尿病项目实体属性向量值,ra表示实体属性a的权重为Wa,表示为(h,r,t)∈Ta表示包含糖尿病项目实体属性a的三元组向量表示集合,同时计算三个等级参数γ1、γ2、γ3,依据参数得出最终的兴趣偏好等级。Step 6. Using the a attribute in the tripleTu established in the knowledge graph KI, by analyzing the interest weight of the entity attribute in the patient, a method for calculating the patient's interest attribute preference is established: represents patient u’s interest preference value for diabetes item attributes, Represents the entity attribute vector value ofa single diabetes item, and ra represents the weight of the entity attribute a as Wa , which is expressed as (h, r, t)∈Ta represents the triplet vector representation set containing the entity attribute a of the diabetes item, and calculates three level parameters γ1 , γ2 , γ3 at the same time, and obtains the final interest preference level according to the parameters.
步骤6.1、在获得实体属性的权重之后,基于此判定患者u对属性a的兴趣偏好等级,具体表示方法如下:Step 6.1, in obtaining the weight of entity attributes After that, based on this, the interest preference level of patient u for attribute a is determined, and the specific expression method is as follows:
式中,Interestu表示患者u的对实体属性a的兴趣偏好属性值,属性a的权重表示为In the formula, Interestu represents the interest and preference attribute value of patient u to entity attribute a, and the weight of attribute a is expressed as
步骤6.2、设置三个等级参数,将设定的等级参数,与步骤6.1中得出的患者对实体属性的兴趣偏好属性值进行比较,得出兴趣偏好等级;Step 6.2, set three grade parameters, compare the set grade parameters with the patient's interest preference attribute value for the entity attribute obtained in step 6.1, and obtain the interest preference grade;
步骤6.3、设定第一个等级参数γ1,依据知识图KI中的矢量三元组,仅取出与实体属性a相关的前实体向量ha和关系向量ra,二者进行向量的点积运算。因为仅依赖于实体属性a,可以说明当前属性a与患者兴趣偏好度匹配最低,因此该参数表示患者最不感兴趣,具体表示如下:Step 6.3, set the first level parameter γ1 , according to the vector triples in the knowledge graph KI, only extract the former entity vectorha and relation vector ra related to the entity attributea , and perform the dot product of the vectors. operation. Because it only depends on the entity attribute a, it can be shown that the current attribute a matches the patient's interest preference the least, so this parameter indicates that the patient is the least interested, and the specific expression is as follows:
步骤6.4、设定第二个等级参数γ2,依据知识图KI中的矢量三元组,只要三元组中包含属性a,就将其前实体h和关系向量r取出,并进行向量点积运算。设定该参数表示当前属性a与患者兴趣偏好度匹配中等,因此该参数表示患者感兴趣。具体表示如下:Step 6.4. Set the second level parameter γ2 . According to the vector triples in the knowledge graph KI, as long as the triples contain attribute a, the former entity h and the relation vector r are taken out, and the vector dot product is performed. operation. Setting this parameter indicates that the current attribute a is moderately matched with the patient's interest preference, so this parameter indicates that the patient is interested. The specific representation is as follows:
步骤6.5、设定第三个等级参数γ3,该参数表示当前属性a与患者兴趣偏好度匹配最高,因此该参数表示患者非常感兴趣。具体表示如下:Step 6.5: Set the third level parameter γ3 , this parameter indicates that the current attribute a matches the patient's interest preference the most, so this parameter indicates that the patient is very interested. The specific representation is as follows:
步骤6.6、判定患者对医疗项目属性a的偏好等级:Step 6.6. Determine the patient's preference level for the medical item attribute a:
若Interestu->a<γ1,则认为患者U对a属性的兴趣偏好等级为不感兴趣;If Interestu->a <γ1 , it is considered that the interest preference level of patient U in attribute a is not interested;
若γ1<Interestu->a<γ2,则认为患者U对a属性的兴趣偏好等级为感兴趣,If γ1 <Interestu->a <γ2 , it is considered that the interest preference level of the patient U in the attribute a is interested,
若Interestu->a>γ3,则认为患者U对a属性的兴趣偏好等级为非常感兴趣,至此,基于知识图KI得到患者对属性a的兴趣偏好等级模型。If Interestu->a >γ3 , it is considered that the patient U's interest preference level for attribute a is very interested. So far, the patient's interest preference level model for attribute a is obtained based on the knowledge graph KI.
步骤7、在上述步骤5之后,以“糖尿病”为核心词,建立方法判断数据集proDatas中的正反相关实体。去除“反相关实体”对应的推荐方案,并将包含“正相关实体”的推荐方案加入到最终输出的推荐列表集合SET中。Step 7. After the above step 5, with "diabetes" as the core word, a method is established to determine the positive and negative related entities in the data set proDatas. The recommendation scheme corresponding to the "anti-related entity" is removed, and the recommendation scheme containing the "positively related entity" is added to the final output recommendation list set SET.
步骤7.1、对于知识图KI中的若干实体形成的三元组,单个三元组(h,r,t),其中h表示前实体,t表示后实体,将前实体h使用知识图KI中的任意一个随机实体hrandom代替,后实体也被代替为trandom,新生成的三元组(hrandom,r,t)、(h,r,trandom)不存在知识图KI中。Step 7.1. For the triplet formed by several entities in the knowledge graph KI, a single triplet (h, r, t), where h represents the former entity, t represents the latter entity, and the former entity h is used in the knowledge graph KI. Any random entity hrandom is replaced, and the latter entity is also replaced by trandom , and the newly generated triples (hrandom , r, t) and (h, r, trandom ) do not exist in the knowledge graph KI.
步骤7.2、定义Wh向量表示将实体从实体空间映射到关系空间,设定边缘函数f,函数f得到的是向量模的平方值,具体表示为;Step 7.2. Define the Wh vector to represent the mapping of the entity from the entity space to the relation space, set the edge function f, and the function f obtains the square value of the vector modulus, which is specifically expressed as;
f(h,t)=||h-t-(WhT·h·Wh-WhT·t·Wh)||2。f(h, t)=||ht-(WhT ·h ·Wh -WhT ·t ·Wh )||2 .
步骤7.3、基于步骤7.2中定义的边缘函数f,设计用于区分正、反相关实体的方法模型,具体表示如下:Step 7.3, based on the edge function f defined in step 7.2, design a method model for distinguishing positive and negative related entities, which is specifically expressed as follows:
式中,classh,t模型执行的前提条件是:(h,r,t)∈Tu且且In the formula, the precondition for the execution of the classh, t model is: (h, r, t) ∈ Tu and and
上述公式中,对于知识图KI中的前实体h、hrandom,计算二者对应的边缘函数f(h,t)和f(hrandom,t)的值,对于知识图KI中的后实体t、trandom,计算二者对应的边缘函数f(h,t)、f(h,trandom)的值,若f(h,t)大于f(hrandom,t),则认为KI中实体h为正相关实体,若f(h,t)大于f(h,trandom),则认为KI中实体t为正相关实体,其余情况,则判定为负相关实体。In the above formula, for the front entities h and hrandom in the knowledge graph KI, the values of the corresponding edge functions f(h, t) and f(hrandom , t) are calculated. For the back entity t in the knowledge graph KI , trandom , calculate the value of the corresponding edge functions f(h, t) and f(h, trandom ), if f(h, t) is greater than f(hrandom , t), it is considered that the entity h in KI is a positively related entity, if f(h, t) is greater than f(h, trandom ), the entity t in KI is considered to be a positively related entity, and in other cases, it is determined to be a negatively related entity.
步骤8、执行融合推荐方法,得出最终的推荐结果集SET。Step 8: Execute the fusion recommendation method to obtain the final recommendation result set SET.
步骤8.1、针对知识图KI中的两元组(u,i),若即患者u对项目i的偏好等级为不感兴趣,则算法终止,否则执行步骤8.3;Step 8.1. For the two-tuple (u, i) in the knowledge graph KI, if That is, the preference level of patient u to item i is not interested, then the algorithm is terminated, otherwise step 8.3 is executed;
步骤8.2、针对知识图KI中的两元组(u,i),若Step 8.2. For the two-tuple (u, i) in the knowledge graph KI, if
即患者u对项目i的偏好等级为感兴趣,则算法终止,否则执行步骤8.3;That is, if the preference level of patient u is interested in item i, the algorithm terminates, otherwise, step 8.3 is executed;
步骤8.3、针对知识图KI中的两元组(u,i),若不满足即实体h、t是负相关实体,则算法终止,否则执行步骤8.4,Step 8.3. For the two-tuple (u, i) in the knowledge graph KI, if not satisfied That is, the entities h and t are negatively correlated entities, then the algorithm is terminated, otherwise step 8.4 is executed,
步骤8.4、若SET中的推荐方案个数没有达到K,则将其加入推荐结果集SET中,并执行步骤8.1,否则执行步骤8.5;Step 8.4. If the number of recommended solutions in the SET does not reach K, add it to the recommended result set SET, and perform step 8.1, otherwise, perform step 8.5;
步骤8.5、若SET集合中的数据已达到k,则输出SET,形成推荐结果集,推荐结束;否则执行步骤8.1。Step 8.5. If the data in the SET set has reached k, output the SET to form a recommended result set, and the recommendation ends; otherwise, go to Step 8.1.
步骤9、返回最终推荐结果集SET。Step 9. Return the final recommendation result set SET.
具体操作步骤如下:The specific operation steps are as follows:
以上所述,仅为本发明中的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉该技术的人在本发明所揭露的技术范围内,可理解想到的变换或替换,都应涵盖在本发明的包含范围之内,因此,本发明的保护范围应该以权利要求书的保护范围为准。The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited to this, any person familiar with the technology can understand the transformation or replacement that comes to mind within the technical scope disclosed by the present invention, All should be included within the scope of the present invention, therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210132352.7ACN114547444A (en) | 2022-02-14 | 2022-02-14 | An online medical recommendation system and its realization method |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210132352.7ACN114547444A (en) | 2022-02-14 | 2022-02-14 | An online medical recommendation system and its realization method |
| Publication Number | Publication Date |
|---|---|
| CN114547444Atrue CN114547444A (en) | 2022-05-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210132352.7APendingCN114547444A (en) | 2022-02-14 | 2022-02-14 | An online medical recommendation system and its realization method |
| Country | Link |
|---|---|
| CN (1) | CN114547444A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115186183A (en)* | 2022-07-12 | 2022-10-14 | 佛山市星曼信息科技有限公司 | Information display method, apparatus, electronic device and readable medium |
| CN116504414A (en)* | 2023-05-19 | 2023-07-28 | 北京百度网讯科技有限公司 | Medical data query method, device, electronic equipment and storage medium |
| CN118195630A (en)* | 2024-04-03 | 2024-06-14 | 煤炭科学技术研究院有限公司 | Online after-sales service method and system for mining equipment based on knowledge graph |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106530168A (en)* | 2016-12-20 | 2017-03-22 | 墨宝股份有限公司 | Community health medical interaction system based on internet and implementation method thereof |
| CN106971069A (en)* | 2017-03-20 | 2017-07-21 | 云南火地科技有限公司 | A kind of intelligent recipe recommendation system for nutrient health |
| CN110310721A (en)* | 2018-03-27 | 2019-10-08 | 九阳股份有限公司 | A method and device for constructing recipe recommendation strategy based on knowledge graph |
| CN111897967A (en)* | 2020-07-06 | 2020-11-06 | 北京大学 | A medical consultation recommendation method based on knowledge graph and social media |
| WO2021189971A1 (en)* | 2020-10-26 | 2021-09-30 | 平安科技(深圳)有限公司 | Medical plan recommendation system and method based on knowledge graph representation learning |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106530168A (en)* | 2016-12-20 | 2017-03-22 | 墨宝股份有限公司 | Community health medical interaction system based on internet and implementation method thereof |
| CN106971069A (en)* | 2017-03-20 | 2017-07-21 | 云南火地科技有限公司 | A kind of intelligent recipe recommendation system for nutrient health |
| CN110310721A (en)* | 2018-03-27 | 2019-10-08 | 九阳股份有限公司 | A method and device for constructing recipe recommendation strategy based on knowledge graph |
| CN111897967A (en)* | 2020-07-06 | 2020-11-06 | 北京大学 | A medical consultation recommendation method based on knowledge graph and social media |
| WO2021189971A1 (en)* | 2020-10-26 | 2021-09-30 | 平安科技(深圳)有限公司 | Medical plan recommendation system and method based on knowledge graph representation learning |
| Title |
|---|
| 袁泉;成振华;江洋;: "基于知识图谱和协同过滤的电影推荐算法研究", 计算机工程与科学, no. 04, 15 April 2020 (2020-04-15)* |
| 陈嘉颖;于炯;杨兴耀;: "一种融合语义分析特征提取的推荐算法", 计算机研究与发展, no. 03, 15 March 2020 (2020-03-15)* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115186183A (en)* | 2022-07-12 | 2022-10-14 | 佛山市星曼信息科技有限公司 | Information display method, apparatus, electronic device and readable medium |
| CN116504414A (en)* | 2023-05-19 | 2023-07-28 | 北京百度网讯科技有限公司 | Medical data query method, device, electronic equipment and storage medium |
| CN116504414B (en)* | 2023-05-19 | 2024-03-22 | 北京百度网讯科技有限公司 | Medical data query method, device, electronic equipment and storage medium |
| CN118195630A (en)* | 2024-04-03 | 2024-06-14 | 煤炭科学技术研究院有限公司 | Online after-sales service method and system for mining equipment based on knowledge graph |
| Publication | Publication Date | Title |
|---|---|---|
| CN114547444A (en) | An online medical recommendation system and its realization method | |
| Das et al. | Group decision making in medical system: An intuitionistic fuzzy soft set approach | |
| US8055603B2 (en) | Automatic generation of new rules for processing synthetic events using computer-based learning processes | |
| CN113628726B (en) | Traditional Chinese medicine diagnosis and treatment recommendation system and method based on graph neural network and electronic equipment | |
| CN116910172A (en) | Follow-up table generation method and system based on artificial intelligence | |
| US11355243B2 (en) | Medication recommendation system and method for treating migraine | |
| CN116110533B (en) | Event map-based drug type and dosage recommendation system and method | |
| CN106845147A (en) | Medical practice summarizes method for building up, device and the data assessment method of model | |
| Niu et al. | FACETS: A cognitive business intelligence system | |
| CN116721730B (en) | Whole-course patient management system based on digital therapy | |
| CN117370565A (en) | An information retrieval method and system | |
| CN112635072A (en) | ICU (intensive care unit) similar case retrieval method and system based on similarity calculation and storage medium | |
| CN118299070B (en) | Treatment effect estimation method, system, equipment and medium based on inverse fact prediction | |
| Mao et al. | Optimization of the medical service consultation system based on the artificial intelligence of the internet of things | |
| CN118315024A (en) | Special medical food recommendation system and method based on artificial intelligence | |
| CN114822849A (en) | Data monitoring method, device, equipment and storage medium based on digital twin | |
| WO2023240837A1 (en) | Service package generation method, apparatus and device based on patient data, and storage medium | |
| CN118942712A (en) | A risk assessment method and system for human health status | |
| Bhatti et al. | Recommendations for healthcare: An interpretable approach using deep learning | |
| Saleem Durai et al. | An intelligent knowledge mining model for kidney cancer using rough set theory | |
| Wang et al. | Joint Modeling of Longitudinal and Survival Data | |
| Khan et al. | Validation of an ontological medical decision support system for patient treatment using a repository of patient data: Insights into the value of machine learning | |
| US20220222554A1 (en) | Operation result predicting method, electronic device, and computer program product | |
| CN118352017A (en) | Dysmenorrhea management method and system | |
| EP3977370A1 (en) | Method and system for personalizing and standardizing cannabis, psychedelic and bioactive products |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |