A Sorting Processing System Based on Partial Order Structure Graph
Through the sorting processing system based on the partial order structure graph, the weights of Chinese patent medicines are calculated and sorted, which solves the problem of low accuracy of Chinese patent medicine recommendations for new users in the existing technology and achieves more accurate Chinese patent medicine recommendations.
Patent Information
- Application Number
- CN202410888926.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-04
AI Technical Summary
The user-drug interaction matrix based on the patient database in the existing technology is difficult to recommend suitable Chinese patent medicines for new users. Especially when the new user's symptoms are uncommon, the accuracy of the recommendation is low, and there is even a cold start problem.
A sorting processing system based on the partial order structure graph is adopted. Through the attribute partial order structure graph and the object partial order structure graph, the symptoms input by the user are obtained and the weight of the Chinese patent medicines is calculated, and the Chinese patent medicines that match the symptoms input by the user are sorted.
The accuracy of recommendation of Chinese patent medicines is improved, more suitable Chinese patent medicines can be recommended to new users, and the problems of low recommendation accuracy and cold start in the existing technology are solved.
Smart Images

Figure CN118430737B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to a sorting processing system based on a partial order structure diagram. Background Art
[0002] Intelligent recommendation systems for over-the-counter Chinese patent medicines have been disclosed in the prior art. For example, Chinese patent application No. 202310189853.3 discloses an intelligent recommendation method and system for over-the-counter Chinese patent medicines. The recommendation system includes a data storage module for storing medical data of multiple patients, a data processing module for connecting to the data storage module, and a data recommendation module for connecting to the data processing module; however, the recommendation method relies on a patient database, and recommends to new users a combination of medicines selected by patients with similar symptoms; because the number of Chinese patent medicines is large and there are many TCM symptoms, the user-drug interaction matrix of the patient database is a sparse matrix. If the symptoms of the new user are uncommon, the recommended Chinese patent medicine will have a low match with the user's symptoms, that is, the accuracy of the recommendation will be reduced; if the symptoms of the new user do not exist in the database, there will be a cold start problem. Summary of the invention
[0003] The purpose of the present invention is to provide a sorting processing system based on a partial order structure graph to solve the problem that the user-drug interaction matrix based on the patient database cannot recommend suitable Chinese patent medicines to new users.
[0004] According to the present invention, a sorting processing system based on a partial order structure graph is provided, comprising a memory, wherein the memory stores an attribute partial order structure graph d1 and an object partial order structure graph d2, wherein d1 comprises a topmost node rnode1 and a bottommost node l node1, rnode1 are connected through several first branches l node1, each first branch is composed of a number of first intermediate nodes and the first edge connecting the first intermediate nodes, each first intermediate node is used to represent a symptom, each first branch is used to represent a Chinese patent medicine, rnode1 is used to represent a Western medicine disease or a Chinese medicine disease or a tonic type; d2 includes a top-level node rnode2 and a bottom-level node l node2, rnode2 are connected through several second branches lnode2, each second branch is composed of several second intermediate nodes and second edges connecting the second intermediate nodes, each second intermediate node is used to represent a Chinese patent medicine, each second branch is used to represent several symptoms, rnode2 is used to represent a Western medicine disease or a Chinese medicine disease or a tonic type, the Western medicine disease or Chinese medicine disease or tonic type represented by rnode2 is the same as the Western medicine disease or Chinese medicine disease or tonic type represented by rnode1; each Chinese patent medicine represented by the first branch is represented by the second intermediate node in d2, and each Chinese patent medicine represented by the second intermediate node is represented by the first branch in d1.
[0005] The system further includes a processor and a storage medium storing a computer program. When the computer program is executed by the processor, the following steps are implemented:
[0006] S100, obtain the symptom set h input by the user, h={h1, h2, …, h i ,…,h n}, h i is the i-th symptom input by the user. The value of i ranges from 1 to n, and n is the number of symptoms input by the user.
[0007] S200, according to d1, d2 and h, obtain the weight w of each Chinese patent medicine represented by the first branch in d1, w={w1, w2, ..., w j ,…,w m},w j is the weight of the Chinese patent medicine represented by the jth first branch in d1. The value range of j is 1 to m, and m is the number of first branches in d1.
[0008] S300, sorting the Chinese patent medicine represented by each first branch in d1 according to w.
[0009] Compared with the prior art, the present invention has at least the following beneficial effects:
[0010] The memory of the sorting processing system of the present invention stores an attribute partial order structure diagram and an object partial order structure diagram, wherein each first branch in the attribute partial order structure diagram represents a Chinese patent medicine, each first intermediate node represents a symptom, and each first branch includes several first intermediate nodes, indicating that one Chinese patent medicine corresponds to several symptoms; each second branch in the object partial order structure diagram represents several symptoms, each second intermediate node represents a Chinese patent medicine, and each second branch includes several second intermediate nodes, indicating that several symptoms correspond to several Chinese patent medicines; on the basis of the attribute partial order structure diagram and the object partial order structure diagram, if a user inputs a symptom, the weight of the Chinese patent medicine represented by each first branch in the attribute partial order structure diagram is obtained according to the symptoms input by the user, the attribute partial order structure diagram and the object partial order structure diagram, and the Chinese patent medicine represented by each first branch is sorted according to the weight, and the Chinese patent medicine with a higher ranking is the Chinese patent medicine that is more matched with the symptom input by the user, that is, the Chinese patent medicine that is more suitable for the user. The present invention can recommend more suitable Chinese patent medicines to users based on the constructed attribute partial order structure diagram and object partial order structure diagram, which can solve the problem in the prior art that the user-drug interaction matrix based on the patient database cannot recommend suitable Chinese patent medicines to new users. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 A flowchart of steps executed by a processor of a sorting processing system based on a partial order structure diagram provided by an embodiment of the present invention;
[0013] Figure 2 A schematic diagram of the framework of a sorting processing system based on a partial order structure diagram provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0015] According to the present invention, a sorting processing system based on a partial order structure graph is provided, comprising a memory, wherein the memory stores an attribute partial order structure graph d1 and an object partial order structure graph d2, wherein d1 comprises a topmost node rnode1 and a bottommost node l node1, rnode1 are connected through several first branches l node1, each first branch is composed of a number of first intermediate nodes and the first edge connecting the first intermediate nodes, each first intermediate node is used to represent a symptom, each first branch is used to represent a Chinese patent medicine, rnode1 is used to represent a Western medicine disease or a Chinese medicine disease or a tonic type; d2 includes a top-level node rnode2 and a bottom-level node l node2, rnode2 are connected through several second branches l node2, each second branch is composed of several second intermediate nodes and second edges connecting the second intermediate nodes, each second intermediate node is used to represent a Chinese patent medicine, each second branch is used to represent several symptoms, rnode2 is used to represent a Western medicine disease or a Chinese medicine disease or a tonic type, the Western medicine disease or Chinese medicine disease or tonic type represented by rnode2 is the same as the Western medicine disease or Chinese medicine disease or tonic type represented by rnode1; each Chinese patent medicine represented by the first branch is represented by the second intermediate node in d2, and each Chinese patent medicine represented by the second intermediate node is represented by the first branch in d1.
[0016] In this embodiment, the attribute partial order structure diagram d1 and the object partial order structure diagram d2 are established for the same western medicine disease or Chinese medicine disease or tonic type, and the western medicine disease or Chinese medicine disease or tonic type represented by the top-level node rnode1 in the attribute partial order structure diagram is the same as the western medicine disease or Chinese medicine disease or tonic type represented by the top-level node rnode2 in the object partial order structure diagram. For example, the attribute partial order structure diagram d1 and the object partial order structure diagram d2 are established for the same western medicine disease, and the name of the western medicine disease is tinnitus and deafness, lumbar muscle strain, functional dyspepsia or diarrhea, etc.; the attribute partial order structure diagram d1 and the object partial order structure diagram d2 are established for the same Chinese medicine disease, and the name of the Chinese medicine disease is cold, cough, wheezing, bloating or vomiting, etc.; the attribute partial order structure diagram d1 and the object partial order structure diagram d2 are established for the same tonic type, and the name of the tonic type is blood tonic, qi and blood tonic, qi tonic, qi tonic and yin tonic, yin and yang tonic, yang tonic or yin tonic, etc.
[0017] Moreover, the Chinese patent medicine represented by the first branch in the attribute partial order structure diagram d1 is the same as the Chinese patent medicine represented by the second intermediate node in the object partial order structure diagram d2. For example, the attribute partial order structure diagram d1 includes 10 first branch representations, and the Chinese patent medicines represented by these 10 first branches are med1, med2, ..., med 10, then, the second intermediate node in the object partial order structure graph d2 also represents 10 kinds of Chinese patent medicines, namely med1, med2, ..., med 10 .
[0018] In this embodiment, the attribute partial order structure diagram d1 and the object partial order structure diagram d2 are constructed based on the existing knowledge related to Chinese patent medicines. Any Chinese patent medicine represented by the first branch has a corresponding relationship with the symptoms represented by the first intermediate node that constitutes it, that is, any Chinese patent medicine represented by the first branch has a therapeutic effect on the symptoms represented by the first intermediate node that constitutes it; any Chinese patent medicine represented by the second intermediate node has a corresponding relationship with the symptoms represented by the second branch that it constitutes, that is, any Chinese patent medicine represented by the second intermediate node has a therapeutic effect on the symptoms represented by the second branch that it constitutes; the attribute partial order structure diagram d1 and the object partial order structure diagram d2 are both closed non-cyclic tree structure diagrams, and the object partial order structure diagram d2 is the transpose of the attribute partial order structure d1.
[0019] In this embodiment, a number refers to more than one, that is, greater than or equal to 1; the first intermediate node is the other nodes in the attribute partial order structure graph except the topmost node and the bottommost node, and the second intermediate node is the other nodes in the object partial order structure graph except the topmost node and the bottommost node.
[0020] The system also includes a processor and a storage medium storing a computer program. When the computer program is executed by the processor, the following steps are implemented: Figure 1 As shown:
[0021] S100, obtain the symptom set h input by the user, h={h1, h2, …, h i ,…,h n}, h i is the i-th symptom input by the user. The value of i ranges from 1 to n, and n is the number of symptoms input by the user.
[0022] In this embodiment, the user knows the name of his or her Western medicine disease or the name of his or her TCM disease or the type of tonic. Based on the Western medicine disease name, the TCM disease or the tonic type, the attribute partial order structure diagram and the object partial order structure diagram corresponding to the Western medicine disease name, the TCM disease or the tonic type can be determined. The attribute partial order structure diagram corresponding to the Western medicine disease name, the TCM disease or the tonic type refers to the attribute partial order structure diagram whose top-level node represents the Western medicine disease, the TCM disease or the tonic type, and the object partial order structure diagram corresponding to the Western medicine disease name, the TCM disease or the tonic type refers to the object partial order structure diagram whose top-level node represents the Western medicine disease, the TCM disease or the tonic type; as an optional specific implementation method, the user selects one of knowing the disease, knowing the disease or taking tonic on the user interface of the sorting processing system. When the user selects knowing the disease, knowing the disease or taking tonic, When the user is ill, the user interface will display the names of several Western medicine diseases. After the user selects one of the Western medicine disease names, the user interface will display the symptom group corresponding to the Western medicine disease name, and the user inputs the symptoms to the sorting processing system by checking several symptoms in the symptom group; when the user chooses to know the syndrome, the user interface will display the names of several Chinese medicine diseases and syndromes. After the user selects one of the Chinese medicine disease syndrome names, the user interface will display the symptom group corresponding to the Chinese medicine disease syndrome name, and the user inputs the symptoms to the sorting processing system by checking several symptoms in the symptom group; when the user chooses to supplement, the user interface will display several tonic types. After the user selects one of the tonic types, the user interface will display the symptom group corresponding to the tonic type, and the user inputs the symptoms to the sorting processing system by checking several symptoms in the symptom group, such as Figure 2 shown.
[0023] S200, according to d1, d2 and h, obtain the weight w of each Chinese patent medicine represented by the first branch in d1, w={w1, w2, ..., w j ,…,w m},w j is the weight of the Chinese patent medicine represented by the jth first branch in d1. The value range of j is 1 to m, and m is the number of first branches in d1.
[0024] In this embodiment, the weight of each Chinese patent medicine represented by the first branch in d1 can be obtained based on the attribute partial order structure diagram d1, the object partial order structure diagram d2 and the set of symptoms input by the user. The larger the weight, the more the corresponding Chinese patent medicine matches the symptoms input by the user; the smaller the weight, the less the corresponding Chinese patent medicine matches the symptoms input by the user. As a preferred specific implementation, S200 includes:
[0025] S210, obtain the set znode of the first intermediate node constituting the jth first branch in d1 j , znode j ={znode j,1, znode j,2 , ..., znode j,q(j) , ..., znode j,Q(j)}, znode j,q(j) is the q(j)th first intermediate node in d1 that constitutes the jth first branch, the value range of q(j) is 1 to Q(j), and Q(j) is the number of first intermediate nodes in d1 that constitute the jth first branch.
[0026] In this embodiment, the jth first branch in d1 represents the jth Chinese patent medicine to be sorted, and the set of symptoms that can be treated by the jth Chinese patent medicine to be sorted can be known based on the set of first intermediate nodes constituting the jth first branch.
[0027] S220, according to znode j and h to obtain the first matching degree x between the Chinese patent medicine represented by the first branch of the jth item in d1 and the symptom input by the user j .
[0028] In this embodiment, znode j The greater the proportion of symptoms represented by the first intermediate node that match the symptoms in h, the greater the proportion of symptoms in x. j As a specific implementation, S220 includes:
[0029] S221, traversal of znode j If znode j,q(j) The symptoms are related to one of the h i If the match is true, the znode j,q(j) Append to the first preset symptom set R1, which is initialized to an empty set; otherwise, znode j,q(j) Append to R1.
[0030] In this embodiment, znode j,q(j) The symptoms are related to one of the h i Matches refer to znode j,q(j) The symptoms are related to one of the h i The same or the same in semantics; those skilled in the art know that any method in the prior art for determining whether the semantics are the same falls within the protection scope of the present invention.
[0031] S222, obtain the number qua1 of symptoms in R1.
[0032] S223, determine qua1 / Q(j) as x j .
[0033] Based on x obtained from S221-S223 jIt can represent the first matching degree between the Chinese patent medicine represented by the jth first branch in d1 and the symptoms input by the user. The larger the value is, the more matching the Chinese patent medicine represented by the jth first branch in d1 is with the symptoms input by the user.
[0034] S230, obtain the number of cells in d2 from c j The second branch set f j , c j is used in d2 to represent e j The second intermediate node, e j is the Chinese patent medicine represented by the first branch of the jth line in d1; f j ={f j,1 , f j,2 , …, f j,a(j) , …, f j,A(j)}, f j,a(j) For d2 by c j The a(j)th second branch is formed, and the value range of a(j) is 1 to A(j), and A(j) is the value of c in d2. j The number of second branches formed.
[0035] In this embodiment, the Chinese patent medicine e represented by the first branch of the jth line in d2 j The set of the second branch with corresponding relationship is f j , f j Each second branch includes a circuit for characterizing e j The second intermediate node, f j Each second branch of the symptoms and e j There is a corresponding relationship, that is, e j Can treat j The symptom represented by each second branch in d2; the symptom represented by a second branch in d2 is greater than or equal to 1, therefore, A(j)≤Q(j).
[0036] S240, get e j In f j,a(j) The weight g in j,a(j) , g j,a(j) =1 / num j,a(j) , num j,a(j) f j,a(j) The number of second intermediate nodes included.
[0037] In this embodiment, g j,a(j) The larger the value, the greater the f j,a(j) The more specific the symptoms are; j,a(j) The smaller it is, the more f j,a(j) The weaker the specificity of the symptom represented, the more specific the symptom is. Symptoms with strong specificity are conducive to the rapid recommendation of Chinese patent medicines. In this embodiment, the stronger the specificity of the symptom, the greater the corresponding weight.
[0038] S250, traverse f j , if f j,a(j) If the symptoms represented match the symptoms included in h, then so j,a(j) ×g j,a(j) / δ j,a Pursue to the preset weight set D, which is initialized to an empty set; otherwise, do not j,a(j) ×g j,a(j) / δ j,a Pursuit to D; δ j,a f j,a(j) The number of symptoms present, so j,a(j) f j,a(j) The number of symptoms represented that match the symptoms included in h.
[0039] In this embodiment, f j,a(j) The number of symptoms represented is greater than or equal to 1, if f j,a(j) If there is more than one symptom in the symptoms represented that matches the symptoms included in h, then it is determined that f j,a(j) The symptoms represented match those included in h.
[0040] As a specific implementation, so j,a(j) The acquisition process includes:
[0041] S251, get f j,a(j) The set of symptoms that characterize j,a(j) ,u j,a(j) ={u 1 j,a(j) ,u 2 j,a(j) ,…,u k j,a(j) ,…,u v j,a(j)},u k j,a(j) f j,a(j) The kth symptom represented, k ranges from 1 to v, and v is f j,a(j) The number of symptoms present.
[0042] In this embodiment, v≥1.
[0043] S252, traverse u j,a(j) , if u k j,a(j) With one of h i If it matches, then u k j,a(j) Append to the second preset symptom set R2, R2 is initialized to an empty set; otherwise, u k j,a(j) Append to R2.
[0044] S253, determine the number of symptoms in R2 as so j,a(j) .
[0045] S260, sum(D) is determined as the second matching degree y between the Chinese patent medicine represented by the jth first branch in d1 and the symptom input by the user j ; sum() is for sum.
[0046] Based on y obtained from S230-S260 j It can represent the second matching degree between the Chinese patent medicine represented by the jth first branch in d1 and the symptoms input by the user. The larger the value is, the more matching the Chinese patent medicine represented by the jth first branch in d1 is with the symptoms input by the user.
[0047] S270, according to x j and j Get w j .
[0048] As a first preferred specific implementation, w j =α×x j +β×y j , α is the weight of the first matching degree, β is the weight of the second matching degree, α>0, β>0. Optionally, α+β=1.
[0049] As a second preferred specific implementation, the particularity of the user is also taken into consideration, for example, the user is an elderly person, a pregnant woman, a child, an athlete, a person with allergies, a person with liver disease, a person with kidney disease, a person with hypertension, a person with heart disease, a person with diabetes, etc., and the weight of each Chinese patent medicine represented by the first branch in d1 is comprehensively determined in combination with the particularity of the user; specifically, S270 includes:
[0050] S271, obtaining a user tag set t input by the user, where t is an empty set, or t={t1, t2, …, t b ,…,t B}, t b is the bth user tag input by the user. The value range of b is 1 to B, and B is the number of user tags input by the user.
[0051] In this embodiment, the user knows whether he or she has special characteristics, that is, the user knows his or her own label, and the label is used to reflect the special characteristics of the user, for example, the elderly label, pregnant woman label, child label, athlete label, allergy label, liver disease label, kidney disease label, hypertension label, heart disease label, and diabetes label. If the user has no special characteristics, the label set input by the user is an empty set. As an optional specific implementation method, the user inputs his or her label to the sorting processing system by checking several labels displayed by the sorting processing system on the user interface.
[0052] S272, if t is an empty set, then the matching degree between the Chinese patent medicine represented by the first branch of the jth item in d1 and the user is com j Determine to be 1, and enter S274; otherwise, obtain the Chinese patent medicine represented by the first branch of the jth in d1 and each t b The matching degree of j,b , and enter S273; 0 <com j,b <1.
[0053] In this embodiment, the matching degree between each tag and each Chinese patent medicine is preset and is a known value; j,b The smaller it is, the less the Chinese patent medicine represented by the jth first branch in d1 matches the bth user label input by the user.
[0054] S273, min(com j,1 ,com j,2 ,…,com j,b ,…,com j,B ) is determined as com j , and enter S274; min() is the minimum value.
[0055] S274, according to x j ,y j and com j Get w j .
[0056] Based on S271-S274, the weight of each Chinese patent medicine represented by the first branch in d1 is also modified according to the user's particularity, and the weight of the Chinese patent medicine that does not match the user's label is reduced, so that the sorting result also matches the user's label, thereby improving the accuracy of the sorting.
[0057] As a third preferred specific implementation, based on the second preferred specific implementation, the priority of Chinese patent medicines is also considered, and the priority of each Chinese patent medicine is a preset value, that is, a known value. Optionally, the priority of the Chinese patent medicine is related to the difficulty of obtaining the Chinese patent medicine by the user. The easier it is for a Chinese patent medicine to be obtained by the user, the greater the priority of the Chinese patent medicine; the more difficult it is for a Chinese patent medicine to be obtained by the user, the lower the priority of the Chinese patent medicine; specifically, S274 includes:
[0058] S2741, obtain the priority η of the Chinese patent medicine represented by the first branch of the jth item in d1 j , 0≤η j ≤1.
[0059] As a specific implementation, the priority η of the Chinese patent medicine represented by the first branch of the jth line in d1 is jIt is related to the difficulty of users obtaining the Chinese patent medicine represented by the first branch of the jth item in d1. Optionally, sample fa1 pharmacies. If the number of pharmacies fa1 that have the Chinese patent medicine represented by the first branch of the jth item in d1 is fa2, then the priority of the Chinese patent medicine represented by the first branch of the jth item in d1 is fa2 / fa1; fa1 is the preset sampling number.
[0060] S2742, according to x j ,y j ,com j and η j Get w j .
[0061] As a preferred specific implementation mode, j =(α×x j +β×y j )×com j ×η j , α is the weight of the first matching degree, β is the weight of the second matching degree, α>0, β>0. Optionally, α and β are empirical values, for example, α=β=0.5.
[0062] Based on S2741-S2742, the weight of each Chinese patent medicine represented by the first branch in d1 is also corrected according to the priority of the Chinese patent medicine, and the weight of the Chinese patent medicine with a lower priority is reduced, so that the sorting result also matches the priority of the Chinese patent medicine, thereby improving the accuracy of the sorting.
[0063] S300, sorting the Chinese patent medicine represented by each first branch in d1 according to w.
[0064] Specifically, for each w in w, the weight is ordered from high to low. j To sort, if a certain w j is the largest weight in w, then w j The Chinese patent medicine represented by the first branch of the jth line in the corresponding d1 ranks first; if a certain w j is the smallest weight in w, then w j The Chinese patent medicine represented by the first branch of the jth line in the corresponding d1 is ranked last; if a certain w j is the ε-largest weight in w, then w j The corresponding Chinese patent medicine represented by the first branch of the jth line in d1 ranks εth.
[0065] As a specific implementation, the sorted Chinese patent medicines are output on the user interface of the system so that the user can obtain the sorting results.
[0066] The memory of the sorting processing system of this embodiment stores an attribute partial order structure diagram and an object partial order structure diagram, wherein each first branch in the attribute partial order structure diagram represents a Chinese patent medicine, each first intermediate node represents a symptom, and each first branch includes several first intermediate nodes, indicating that one Chinese patent medicine corresponds to several symptoms; each second branch in the object partial order structure diagram represents several symptoms, each second intermediate node represents a Chinese patent medicine, and each second branch includes several second intermediate nodes, indicating that several symptoms correspond to several Chinese patent medicines; on the basis of the attribute partial order structure diagram and the object partial order structure diagram, if a user enters symptoms, the weight of the Chinese patent medicine represented by each first branch in the attribute partial order structure diagram is obtained according to the symptoms entered by the user, the attribute partial order structure diagram and the object partial order structure diagram, and the Chinese patent medicine represented by each first branch is sorted according to the weight, and the Chinese patent medicine with a higher ranking is the Chinese patent medicine that is more matched with the symptoms entered by the user, that is, the Chinese patent medicine that is more suitable for the user. This embodiment can recommend more suitable Chinese patent medicines to users based on the constructed attribute partial order structure diagram and object partial order structure diagram, which can solve the problem in the prior art that the user-drug interaction matrix based on the patient database cannot recommend suitable Chinese patent medicines to new users.
[0067] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A sorting processing system based on a partial order structure graph, characterized in that: A memory is included, wherein the memory stores an attribute partial order structure graph d1 and an object partial order structure graph d2, wherein d1 includes a topmost node rnode1 and a bottommost node l node1, rnode1 are connected through several first branches l node1, each first branch is composed of a number of first intermediate nodes and the first edge connecting the first intermediate nodes, each first intermediate node is used to represent a symptom, each first branch is used to represent a Chinese patent medicine, rnode1 is used to represent a Western medicine disease or a Chinese medicine disease or a tonic type; d2 includes a top-level node rnode2 and a bottom-level node l node2, rnode2 are connected through several second branches l node2, each second branch is composed of a number of second intermediate nodes and a second edge connecting the second intermediate nodes, each second intermediate node is used to represent a Chinese patent medicine, each second branch is used to represent a number of symptoms, rnode2 is used to represent a Western medicine disease or a Chinese medicine disease or a tonic type, and the Western medicine disease or Chinese medicine disease or tonic type represented by rnode2 is the same as the Western medicine disease or Chinese medicine disease or tonic type represented by rnode1; each Chinese patent medicine represented by the first branch is represented by the second intermediate node in d2, and each Chinese patent medicine represented by the second intermediate node is represented by the first branch in d1; The system further includes a processor and a storage medium storing a computer program. When the computer program is executed by the processor, the following steps are implemented: S100, obtain the symptom set h input by the user, h={h1, h2, …, h i ,…,h n }, h i is the i-th symptom entered by the user, where i ranges from 1 to n, and n is the number of symptoms entered by the user; S200, according to d1, d2 and h, obtain the weight w of each Chinese patent medicine represented by the first branch in d1, w={w1, w2, ..., w j ,…,w m },w j is the weight of the Chinese patent medicine represented by the jth first branch in d1, the value range of j is 1 to m, and m is the number of first branches in d1; S300, sorting the Chinese patent medicine represented by each first branch in d1 according to w; S200 includes: S210, obtain the set znode of the first intermediate node constituting the jth first branch in d1 j , znode j ={znode j,1 , znode j,2 , ..., znode j,q(j) , ..., znode j,Q(j) }, znode j,q(j) is the q(j)th first intermediate node constituting the jth first branch in d1, the value range of q(j) is 1 to Q(j), and Q(j) is the number of first intermediate nodes constituting the jth first branch in d1; S220, according to znode j and h to obtain the first matching degree x between the Chinese patent medicine represented by the first branch of the jth item in d1 and the symptom input by the user j ; S230, obtain the number of cells in d2 from c j The second branch set f j , c j is used in d2 to represent e j The second intermediate node, e j is the Chinese patent medicine represented by the first branch of the jth line in d1; f j ={f j,1 , f j,2 , …, f j,a(j) , …, f j,A(j) }, f j,a(j) For d2 by c j The a(j)th second branch is formed, and the value range of a(j) is 1 to A(j), and A(j) is the value of c in d2. j The number of second branches formed; S240, get e j In f j,a(j) The weight g in j,a(j) , g j,a(j) =1 / num j,a(j) , num j,a(j) f j,a(j) the number of included second intermediate nodes; S250, traverse f j , if f j,a(j) If the symptoms represented match the symptoms included in h, then so j,a(j) ×g j,a(j) / δ j,a Pursue to the preset weight set D, which is initialized to an empty set; otherwise, do not j,a(j) ×g j,a(j) / δ j,a Pursuit to D; δ j,a f j,a(j) The number of symptoms present, so j,a(j) f j,a(j) The number of symptoms represented that match those included in h; S260, sum(D) is determined as the second matching degree y between the Chinese patent medicine represented by the jth first branch in d1 and the symptom input by the user j ; sum() is for summing; S270, according to x j and j Get w j ; S220 includes: S221, traversal of znode j If znode j,q(j) The symptoms are related to one of the h i If the match is true, the znode j,q(j) Append to the first preset symptom set R1, which is initialized to an empty set; otherwise, znode j,q(j) Append to R1; S222, obtain the number of symptoms qua1 in R1; S223, determine qua1 / Q(j) as x j ; S270 includes: S271, obtaining a user tag set t input by the user, where t is an empty set, or t={t1, t2, …, t b ,…,t B }, t b is the bth user tag entered by the user, where the value of b ranges from 1 to B, and B is the number of user tags entered by the user; S272, if t is an empty set, then the matching degree between the Chinese patent medicine represented by the first branch of the jth item in d1 and the user is com j Determine to be 1, and enter S274; otherwise, obtain the Chinese patent medicine represented by the first branch of the jth in d1 and each t b The matching degree of j,b , and enter S273; 0 <com j,b <1; S273, min(com j,1 ,com j,2 ,…,com j,b ,…,com j,B ) is determined as com j , and enter S274; min() is to take the minimum value; S274, according to x j ,y j and com j Get w j ; S274 includes: S2741, obtain the priority η of the Chinese patent medicine represented by the first branch of the jth item in d1 j , 0≤η j ≤1; S2742, according to x j ,y j ,com j and η j Get w j ; w j =(α×x j +β×y j )×com j ×η j , α is the weight of the first matching degree, β is the weight of the second matching degree, α>0, β>0.
2. The sorting processing system based on the partial order structure graph according to claim 1 is characterized in that: so j,a(j) The acquisition process includes: S251, get f j,a(j) The set of symptoms that characterize j,a(j) ,u j,a(j) ={u 1 j,a(j) ,u 2 j,a(j) ,…,u k j,a(j) ,…,u v j,a(j) },u k j,a(j) f j,a(j) The kth symptom represented, k ranges from 1 to v, and v is f j,a(j) the number of symptoms represented; S252, traverse u j,a(j) , if u k j,a(j) With one of h i If it matches, then u k j,a(j) Append to the second preset symptom set R2, which is initialized to an empty set; otherwise, u k j,a(j) Append to R2; S253, determine the number of symptoms in R2 as so j,a(j) .
