A medicine combination recommendation method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202611082667.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-09-22
AI Technical Summary
[0002]在药品推荐与处方辅助决策场景下,现有药品推荐方案多采用规则匹配、贪心策略来进行药品推荐,尽管这些方法在某些特定场景下有效,但在面对复杂的医疗约束与动态变化的市场环境时,这些方法存在明显的不足,例如,约束表达分散,缺少统一建模,往往导致约束耦合关系无法被高效计算;又例如,在多个目标共存时,各个目标之间冲突难协调;甚至还可能具有动态响应能力弱的问题,计算开销大、响应延迟高,不适合实时的药品推荐场景
[0008]本发明实施例的技术方案,通过获取用户数据、药品数据和业务指标数据;然后基于药品数据和业务指标数据,构建硬约束图谱和软约束图谱,该硬约束图谱用于对推荐的药品组合需要满足的用药安全与合规情况进行约束,该软约束图谱用于对推荐的药品组合的收益指标进行约束,从而实现了将多源约束进行一体化表达,能够提升约束耦合可计算性与可扩展性;接着,基于硬约束图谱构建用药冲突位图,并基于用药冲突位图对初始候选解集合中的各个候选解进行剪枝处理与可行解优化处理,以得到中间候选解集合;其中,该初始候选解集合基于用户数据和药品数据确定,且初始候选解集合中的候选解至少用于指示出推荐的药品组合信息,从而能够在搜索前期快速剔除不可行解,降低优化计算复杂度;再接着,基于软约束图谱对中间候选解集合的各个候选解进行评分,并基于评分结果从各个候选解中筛选出预设数量个候选解,以得到目标可行解集合;最后,基于目标可行解集合,确定药品组合推荐方案。采用本方案,可以实现在保证用药安全与合规前提下进行精准的药品组合推荐,并且能够提升实时推荐效率,适用于互联网医疗与零售药房处方场景下进行辅助决策。
Smart Images

Figure CN122800302A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer processing technology, and in particular to a method, apparatus, electronic device, and storage medium for recommending drug combinations. Background Technology
[0002] In drug recommendation and prescription-assisted decision-making scenarios, existing drug recommendation schemes mostly adopt rule matching and greedy strategies. Although these methods are effective in certain specific scenarios, they have obvious shortcomings when facing complex medical constraints and dynamic market environments. For example, the constraints are scattered and lack unified modeling, which often leads to the inefficient calculation of constraint coupling relationships. For another example, when multiple objectives coexist, it is difficult to coordinate conflicts between them. They may even have weak dynamic response capabilities, with high computational overhead and high response latency, making them unsuitable for real-time drug recommendation scenarios. Summary of the Invention
[0003] This invention provides a method, apparatus, electronic device, and storage medium for recommending drug combinations, which can achieve accurate drug combination recommendations while ensuring medication safety and compliance, and can improve real-time recommendation efficiency.
[0004] In a first aspect, the present invention provides a method for recommending drug combinations, comprising: Acquire user data, drug data, and business performance data; Based on the drug data and the business indicator data, a hard constraint graph and a soft constraint graph are constructed; wherein, the hard constraint graph is used to constrain the medication safety and compliance conditions that the recommended drug combination needs to meet, and the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination. A drug conflict bitmap is constructed based on the hard constraint graph, and pruning and feasible solution optimization are performed on each candidate solution in the initial candidate solution set based on the drug conflict bitmap to obtain an intermediate candidate solution set; wherein, the initial candidate solution set is determined based on the user data and the drug data, and the candidate solutions in the initial candidate solution set are at least used to indicate the recommended drug combination information; The candidate solutions in the intermediate candidate solution set are scored based on the soft constraint map, and a preset number of candidate solutions are selected from each candidate solution based on the scoring results to obtain the target feasible solution set. Based on the set of feasible solutions for the objective, a recommended drug combination scheme is determined.
[0005] Secondly, the present invention also provides a drug combination recommendation device, comprising: The data acquisition module is used to acquire user data, drug data, and business indicator data; A two-layer graph construction module is used to construct a hard constraint graph and a soft constraint graph based on the drug data and the business indicator data; wherein, the hard constraint graph is used to constrain the medication safety and compliance conditions that the recommended drug combination needs to meet, and the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination. The intermediate candidate solution set determination module is used to construct a drug conflict bitmap based on the hard constraint graph, and perform pruning and feasible solution optimization on each candidate solution in the initial candidate solution set based on the drug conflict bitmap to obtain an intermediate candidate solution set; wherein, the initial candidate solution set is determined based on the user data and the drug data, and the candidate solutions in the initial candidate solution set are at least used to indicate recommended drug combination information; The target feasible solution set determination module is used to score each candidate solution in the intermediate candidate solution set based on the soft constraint map, and select a preset number of candidate solutions from each candidate solution based on the scoring results to obtain the target feasible solution set. The drug combination recommendation module is used to determine a drug combination recommendation scheme based on the target feasible solution set.
[0006] Thirdly, this invention also provides an electronic device, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the drug combination recommendation method as provided in any embodiment of the present invention.
[0007] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the drug combination recommendation method provided in any embodiment of the present invention.
[0008] The technical solution of this invention acquires user data, drug data, and business indicator data; then, based on the drug data and business indicator data, it constructs a hard constraint graph and a soft constraint graph. The hard constraint graph is used to constrain the medication safety and compliance requirements that the recommended drug combination must meet, and the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination. This achieves an integrated expression of multi-source constraints, improving the computability and scalability of constraint coupling. Next, a medication conflict bitmap is constructed based on the hard constraint graph, and the initial candidate solution set is then analyzed based on the medication conflict bitmap. The initial candidate solution set is determined based on user and drug data, and each candidate solution in the initial set is used to indicate at least one recommended drug combination. This allows for the rapid elimination of infeasible solutions in the early stages of the search, reducing computational complexity. Next, each candidate solution in the intermediate set is scored using a soft constraint graph, and a predetermined number of candidate solutions are selected based on the scoring results to obtain the target feasible solution set. Finally, a drug combination recommendation scheme is determined based on the target feasible solution set. This scheme enables accurate drug combination recommendations while ensuring medication safety and compliance, and improves real-time recommendation efficiency. It is suitable for decision support in internet healthcare and retail pharmacy prescription scenarios.
[0009] The above description of the invention is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0011] Figure 1 This is a schematic flowchart of a drug combination recommendation method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a layered map structure provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a drug conflict bitmap provided in an embodiment of the present invention; Figure 4 This is a schematic flowchart of another drug combination recommendation method provided in an embodiment of the present invention; Figure 5This is a schematic diagram of a processing logic flow for pruning and optimizing candidate solutions provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of a processing logic for locally optimizing a drug combination recommendation scheme provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a drug combination recommendation device provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of an electronic device for implementing a drug combination recommendation method, provided in an embodiment of the present invention. Detailed Implementation
[0012] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the invention. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the invention.
[0013] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0014] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0015] It should be noted that the concepts of "first" and "second" mentioned in this invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0016] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0017] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0018] Figure 1 This is a flowchart illustrating a drug combination recommendation method provided in an embodiment of the present invention. This embodiment is applicable to situations involving drug combination recommendations. The method can be executed by a drug combination recommendation device, which can be implemented in software and / or hardware and is generally integrated into any electronic device with network communication capabilities, such as a mobile terminal, PC, or server. Figure 1 As shown, the drug combination recommendation method of this embodiment of the invention may include the following process: S110. Obtain user data, drug data, and business indicator data.
[0019] In this context, user data refers to data related to the user to be recommended. In this embodiment, user data includes at least the user's purchase budget, medical diagnosis results, allergy information, past medical history, and age.
[0020] Drug data refers to relevant data about a drug. In this embodiment, drug data includes at least the drug ID, drug name, drug price, drug cost, drug indications, drug interactions, allergy information, and drug expiration date.
[0021] Business performance data refers to data related to drug recommendations. In this embodiment, business performance data mainly includes two categories: one is specific indicator data, which may include drug profits, user budget utilization, transaction probability, and inventory risk, etc. The other is policy rule data, which may include drug policies and drug insurance policies, etc.
[0022] Specifically, it can acquire user data, drug data, and business performance data. Of course, in addition to the specific data listed above, this data can also be customized and expanded based on actual needs.
[0023] S120. Based on drug data and business indicator data, construct hard constraint graphs and soft constraint graphs. The hard constraint graph is used to constrain the medication safety and compliance requirements that the recommended drug combination needs to meet, while the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination.
[0024] Specifically, hard constraint graphs and soft constraint graphs can be constructed based on drug data and business indicator data. The constructed hard constraint graph is used to constrain the medication safety and compliance requirements that the recommended drug combination must meet, while the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination.
[0025] As an optional but non-limiting implementation, this method constructs hard-constraint and soft-constraint graphs based on drug data and business indicator data. This includes: identifying multiple knowledge graph nodes based on drug data and business indicator data; analyzing the relationships between these nodes to determine hard and soft constraints; where hard constraints include at least one of the following: drug incompatibility, allergy contraindications, medical history contraindications, prescription compliance, and insurance reimbursement; and soft constraints include at least one of the following: drug profit, user budget utilization rate, transaction probability, and inventory risk. A hard-constraint graph is constructed based on these multiple knowledge graph nodes and hard constraints; and a soft-constraint graph is constructed based on these multiple knowledge graph nodes and soft constraints. Using this optional approach, knowledge graph nodes can be identified based on drug data and business indicator data, and hard and soft constraints can be analyzed to obtain the hard-constraint and soft-constraint graphs.
[0026] Specifically, multiple knowledge graph nodes can be determined first based on drug data and business indicator data. For example, for drug data, each drug and its associated allergy information can be identified based on its drug ID, and these can be used as knowledge graph nodes. Similarly, for business indicator data, the various indicators can be identified and used as knowledge graph nodes. Then, the relationships between the identified knowledge graph nodes can be analyzed to determine hard and soft constraints. In this embodiment, hard constraints may include at least one of the following: drug incompatibility, allergy contraindications, medical history contraindications, prescription compliance, and insurance reimbursement. Soft constraints may include at least one of the following: drug profit, user budget utilization rate, transaction probability, and inventory risk. Finally, a hard constraint graph and a soft constraint graph can be constructed based on the multiple knowledge graph nodes and hard constraints. For example, Figure 2 This is a schematic diagram of the structure of a layered spectrum provided in an embodiment of the present invention, such as... Figure 2 As shown, this hierarchical graph includes hard-constraint graphs and soft-constraint graphs. Knowledge graph nodes can include Drug 1, Drug 2, Drug 3, allergy information, drug policies, and drug insurance policies, etc.
[0027] S130. Construct a drug conflict bitmap based on the hard constraint graph, and perform pruning and feasible solution optimization on each candidate solution in the initial candidate solution set based on the drug conflict bitmap to obtain an intermediate candidate solution set; wherein, the initial candidate solution set is determined based on user data and drug data, and the candidate solutions in the initial candidate solution set are at least used to indicate the recommended drug combination information.
[0028] The drug conflict bitmap is used to indicate the conflicting relationships between drugs. For example, the drug conflict bitmap can be used to determine that there is a conflict between drug 1 and drug 4, so drug 1 and drug 4 cannot be used at the same time.
[0029] The initial candidate solution set can be understood as a set composed of multiple candidate solutions. The candidate solutions in this initial candidate solution set at least indicate the drug combination information to be recommended to the user. This drug combination information includes at least the specific drugs recommended to the user and the specific quantity of each drug. For example, the drug combination information indicated by a candidate solution A in the initial candidate solution set could be "Drug 1, 2 boxes; Drug 3, 1 box". Another example is that the drug combination information indicated by another candidate solution B in the initial candidate solution set could be "Drug 3, 2 boxes; Drug 4, 1 box; Drug 5, 1 box". In this embodiment, the initial candidate solution set can be determined based on user data and drug data to initially determine various candidate solutions relatively suitable for the user's situation.
[0030] Specifically, since the hard constraint graph contains at least the incompatibilities between different drugs, a drug conflict bitmap can be constructed based on the hard constraint graph. Based on this drug conflict bitmap, pruning and feasible solution optimization are performed on each candidate solution in the initial candidate solution set to screen, eliminate, and optimize the original candidate solutions, thereby obtaining an intermediate candidate solution set. This intermediate candidate solution set can be understood as the candidate solution set obtained after screening, eliminating, and optimizing the initial candidate solution set.
[0031] As an optional but non-limiting implementation, the initial candidate solution set is determined as follows: Based on user data, the symptom diagnosis of the user to be recommended is determined; based on drug data, a complete set of drugs is determined; based on the symptom diagnosis, multiple candidate drugs are selected from the complete set of drugs; based on the multiple candidate drugs and the inventory quantity associated with each candidate drug, multiple drug combination information is constructed, and each drug combination information is used as a candidate solution to obtain the initial candidate solution set. Using this optional scheme, multiple candidate drugs suitable for the symptom of the user to be recommended can be selected based on user data, and further, based on the multiple candidate drugs and related inventory data, an initial candidate solution set can be constructed.
[0032] The complete drug set refers to the collection of all available drugs. In other words, the complete drug set comprises all the drugs available in the system. Correspondingly, candidate drugs are those selected from the complete drug set. These candidate drugs are closely related to the diagnosis of the user's condition and can provide targeted treatment. Multiple candidate drugs can be used to recommend drug combinations to the user in the future.
[0033] Specifically, since user data reflects relevant information about the user to be recommended, the user's ailment diagnosis can be determined based on this data. For example, the diagnosis could be "anemia" or "eczema." Simultaneously, drug data can be used to identify all available drug types, thus defining the complete drug set. Then, based on the ailment diagnosis, multiple candidate drugs can be selected from the complete drug set. For instance, based on the diagnosis of "anemia," three candidate drugs can be selected from the 2000 drugs in the complete drug set. These three candidate drugs are different from each other, but all can be used to treat "anemia (ailment)." Next, based on the multiple candidate drugs and their associated inventory quantities, multiple drug combination information can be constructed, and each drug combination information can be used as a candidate solution to obtain an initial candidate solution set. For example, if there are 3 candidate drugs for "anemia (symptom)", namely drug 1, drug 2 and drug 3; and drug 1 has 1 box in stock, drug 2 has 2 boxes in stock, and drug 3 has 1 box in stock, then 12 drug combination information can be constructed. Each drug combination information can be used as a candidate solution, thus obtaining the initial candidate solution set.
[0034] For example, in this embodiment, the constructed candidate solution can adopt the following logical expression: ; Where X represents a candidate solution; i represents the i-th candidate drug; and N represents the total number of candidate drugs. Indicates whether to select the i-th candidate drug. The value can be 0 or 1; This indicates the recommended number of boxes for the i-th candidate drug. , among them This represents the inventory quantity associated with the drug used in the i-th candidate drug.
[0035] Optionally, in this embodiment, after constructing multiple candidate solutions based on multiple candidate drugs and their associated inventory quantities, the candidate solutions can be further screened and eliminated to retain those that meet the preset number of drug types. The initial candidate solution set is then based on the retained candidate solutions. For example, if there are 6 identified candidate drugs, and combined with the inventory data of each candidate drug, 300 candidate solutions can be determined. These 300 candidate solutions can then be screened. If the preset number of drug types is 4, then candidate solutions containing a maximum of 4 drugs can be retained. If 200 candidate solutions are retained, then the initial candidate solution set can be based on these 200 candidate solutions.
[0036] As an optional but non-limiting implementation, constructing a drug conflict bitmap based on a hard constraint graph includes: constructing an initial drug conflict matrix based on an initial candidate solution set; wherein the number of rows and columns of the initial drug conflict matrix is equal to the total number of candidate drug types associated with the initial candidate solution set; determining the element values corresponding to each drug pair in the initial drug conflict matrix based on the hard constraint graph; wherein if a drug pair does not meet the constraints of the hard constraint graph, the element value is set to 1; if a drug pair meets the constraints of the hard constraint graph, the element value is set to 0; filling the initial drug conflict matrix with element values based on the element values corresponding to each drug pair to obtain the final drug conflict matrix, and using the final drug conflict matrix as the drug conflict bitmap. Using this optional scheme, a drug conflict bitmap can be constructed based on a hard constraint graph.
[0037] In this context, a drug pair refers to a pair of drugs consisting of the drug in the i-th row and the drug in the j-th column of the drug conflict matrix. Essentially, this drug pair corresponds to the element at the i-th row and j-th column position in the drug conflict matrix.
[0038] Specifically, we can first determine the total number of candidate drug types associated with the initial candidate solution set, and then determine the number of rows and columns of the initial drug conflict matrix based on this total number of types. This allows us to construct the initial drug conflict matrix based on the initial candidate solution set. In this matrix, different rows represent different drugs, and different columns also represent different drugs. For example, assuming the initial candidate solution set is constructed based on 3 candidate drugs, then the total number of candidate drug types associated with this initial candidate solution set is 3. Therefore, the initial drug conflict matrix will also have 3 rows and 3 columns, resulting in a 3×3 matrix. Then, based on the hard constraint graph, the element values corresponding to each drug pair in the initial drug conflict matrix can be determined, that is, the specific element value of the element at the i-th row and j-th column position in the initial drug conflict matrix can be determined. In this embodiment, if a drug pair does not meet the constraints of the hard constraint graph, it means that there are incompatibilities, allergies, medical histories, etc., between the drug pairs. In this case, the element value associated with the drug pair can be set to 1, indicating that the two drugs in the drug pair cannot appear at the same time. Conversely, if a drug pair meets the constraints of the hard constraint graph, the element value associated with the drug pair can be set to 0, indicating that the two drugs in the drug pair can appear at the same time. Following this principle, the element values corresponding to each drug pair can be determined sequentially, which essentially determines the specific element values of the elements at each position in the initial drug conflict matrix. Next, based on the element values corresponding to each drug pair, the initial drug conflict matrix can be filled with element values to obtain the final drug conflict matrix, which is then used as a drug conflict bitmap.
[0039] For example, Figure 3 This is a schematic diagram of a drug conflict bitmap provided in an embodiment of the present invention, such as... Figure 3 As shown, the drug conflict bitmap is an N×N matrix. Rows 1 to N represent "Drug 1" to "Drug N" respectively, and columns 1 to N also represent "Drug 1" to "Drug N" respectively. It can be seen that: in this matrix, an element with a value of 1, such as the element in the 2nd row and 3rd column, indicates that "Drug 2" and "Drug 3" do not meet the constraints of the hard constraint graph, and these two drugs cannot appear simultaneously. Conversely, an element with a value of 0, such as the element in the 3rd row and 1st column, indicates that "Drug 3" and "Drug 1" meet the constraints of the hard constraint graph, and these two drugs can appear simultaneously.
[0040] S140. Based on the soft constraint graph, score each candidate solution in the intermediate candidate solution set, and select a preset number of candidate solutions from each candidate solution based on the scoring results to obtain the target feasible solution set.
[0041] The target feasible solution set can be understood as the final set obtained after further screening and processing of the intermediate candidate solution set.
[0042] Specifically, since the soft constraint graph is used to constrain the return metrics of the recommended drug combination, the candidate solutions in the intermediate candidate solution set can be scored based on the soft constraint graph. Then, a predetermined number of candidate solutions can be selected from these scores to obtain the target feasible solution set. For example, after determining the scores for each candidate solution, the solutions can be sorted based on the scores, and a predetermined number of top-ranked candidate solutions can be retained to obtain the target feasible solution set.
[0043] S150. Based on the feasible solution set of the objective, determine the recommended drug combination scheme.
[0044] Specifically, after obtaining the set of feasible solutions, a drug combination recommendation scheme can be determined. For example, each data point in the set of feasible solutions corresponds to a drug combination recommendation scheme, which can then be recommended to the user.
[0045] The technical solution of this invention acquires user data, drug data, and business indicator data. Then, based on the drug data and business indicator data, it constructs a hard constraint graph and a soft constraint graph. The hard constraint graph constrains the medication safety and compliance requirements of the recommended drug combination, while the soft constraint graph constrains the revenue indicators of the recommended drug combination. This achieves an integrated expression of multi-source constraints, improving the computability and scalability of constraint coupling. Next, a medication conflict bitmap is constructed based on the hard constraint graph, and the initial candidate solution set is then analyzed based on the medication conflict bitmap. The initial candidate solution set is determined based on user and drug data, and each candidate solution in the initial set is used to indicate at least one recommended drug combination. This allows for the rapid elimination of infeasible solutions in the early stages of the search, reducing computational complexity. Next, each candidate solution in the intermediate set is scored using a soft constraint graph, and a predetermined number of candidate solutions are selected based on the scoring results to obtain the target feasible solution set. Finally, a drug combination recommendation scheme is determined based on the target feasible solution set. This scheme enables accurate drug combination recommendations while ensuring medication safety and compliance, and improves real-time recommendation efficiency. It is suitable for decision support in internet healthcare and retail pharmacy prescription scenarios.
[0046] Figure 4This is a flowchart illustrating another drug combination recommendation method provided by an embodiment of the present invention. The technical solution of this embodiment further optimizes the process in the aforementioned embodiments of pruning and optimizing each candidate solution in the initial candidate solution set based on a drug conflict bitmap to obtain an intermediate candidate solution set. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 4 As shown, the drug combination recommendation method of this embodiment of the invention may include the following process: S410: Obtain user data, drug data, and business indicator data.
[0047] S420. Based on drug data and business indicator data, construct hard constraint graphs and soft constraint graphs. The hard constraint graph is used to constrain the medication safety and compliance requirements that the recommended drug combination needs to meet, while the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination.
[0048] S430. Construct a drug conflict bitmap based on the hard constraint graph, determine the drug contraindication information of the user to be recommended based on user data, and determine the individual contraindication vector based on the drug contraindication information.
[0049] Among these, contraindication information indicates whether a user being recommended has any restrictions on the use of a particular medication. For example, contraindication information might indicate that a user is allergic to penicillin-containing drugs, meaning they cannot use penicillin-containing medications. Correspondingly, the individual contraindication vector can be understood as the result of vectorizing the contraindication information of the user being recommended.
[0050] Specifically, a medication conflict bitmap can be constructed based on a hard constraint graph, and medication contraindications for users to be recommended can be determined based on user data. Furthermore, an individual contraindication vector can be determined based on this contraindication information. For example, in the individual contraindication vector, the corresponding medication that the user is allergic to / cannot use can be assigned a value of 0, indicating that the medication is prohibited.
[0051] S440. For a single candidate solution in the initial candidate solution set, perform a drug conflict judgment on the candidate solution based on the drug conflict bitmap and the individual taboo vector.
[0052] Understandably, while the candidate solutions in the initial candidate solution set are constructed based on multiple candidate drugs, the drug combination information corresponding to these candidate solutions may contain issues such as: some drugs in the drug combination are incompatible and cannot be used simultaneously; or some drugs in the drug combination may cause allergies in the user to be recommended, and therefore should not be used. For example, if a user to be recommended has a "bacterial infection (symptom)," but has a history of penicillin allergy, then penicillin cannot be used for treatment; instead, other drugs for treating "bacterial infections (symptoms)" should be used.
[0053] Therefore, for a single candidate solution in the initial candidate solution set, a medication conflict judgment can be made based on the medication conflict bitmap and the individual contraindication vector to determine whether the candidate solution is suitable for the user to be recommended. The same principle can be applied to each candidate solution to perform a medication conflict judgment.
[0054] S450. If a candidate solution conflicts with a drug conflict bitmap or an individual contraindication vector, the candidate solution is identified as an anomalous solution.
[0055] Specifically, for a single candidate solution, if the candidate solution has a medication conflict with the medication conflict bitmap or the individual contraindication vector, it means that the drug recommendation information corresponding to the candidate solution is unreasonable or unsuitable for the user to be recommended, and then the candidate solution can be identified as an abnormal solution.
[0056] S460. If there is no drug conflict between the candidate solution and the drug conflict bitmap and the individual contraindication vector, then determine whether the candidate solution exceeds the budget or the number of drug boxes exceeds the limit. If it does, then optimize the candidate solution according to the preset optimization rules to obtain the optimized solution.
[0057] "Over budget" refers to a situation where the total cost of the recommended medications in the drug combination information corresponding to a candidate solution exceeds the user's purchase budget. "Exceeding the limit on the number of drug boxes" means that the total number of drug boxes in the drug combination information corresponding to a candidate solution exceeds a preset limit, which can be pre-set based on actual needs. For example, if the preset limit is set to 5, then if the total number of recommended drug boxes in the drug combination information corresponding to a candidate solution is 6, it indicates that the candidate solution has exceeded the limit on the number of drug boxes.
[0058] Preset optimization rules are used to indicate the processing rules when optimizing the drug combination information corresponding to candidate solutions. These preset optimization rules can be pre-set based on actual needs. For example, a preset optimization rule might indicate the following: when optimizing drug combination information, the number of boxes of each drug in the combination can be gradually reduced by 1, and the reduction can start from the drug with the lowest profit in the combination, until it meets the purchase budget of the user to be recommended. Another example is that a preset optimization rule might indicate the following: when optimizing drug combination information, the drug with the lowest profit in the combination can be deleted, meaning that this drug will no longer be recommended.
[0059] Specifically, for a single candidate solution, if the candidate solution does not have any medication conflict with the medication conflict bitmap and the individual contraindication vector, it means that the candidate solution is suitable for the user to be recommended and does not have any medication conflict. Then, it can be further determined whether the candidate solution exceeds the budget or the number of drug boxes exceeds the limit. If it is determined that the candidate solution exceeds the budget or the number of drug boxes exceeds the limit, the candidate solution is optimized according to the preset optimization rules, and the optimized solution is obtained after the optimization is completed.
[0060] S470. Prune and remove outlier solutions from the initial candidate solution set, and update the data based on the optimized solution to obtain an intermediate candidate solution set.
[0061] Specifically, based on the above principle, each candidate solution in the initial candidate solution set can be judged and processed, thereby pruning and removing abnormal solutions in the initial candidate solution set, and updating the data based on the optimized solution, finally obtaining the intermediate candidate solution set.
[0062] For example, Figure 5 This is a schematic diagram of a processing logic flow for pruning and optimizing candidate solutions provided in an embodiment of the present invention, as shown below. Figure 5 As shown, before judging candidate solutions, a drug conflict bitmap M and an individual contraindication vector V can be constructed first. For a single candidate solution X, it can be first determined whether the candidate solution X conflicts with M or V. If a conflict exists, the candidate solution X is pruned. If the candidate solution X does not conflict with M and V, it is further determined whether the candidate solution X exceeds the budget or the number of boxes exceeds the limit. Specifically, if it does, the candidate solution X is optimized according to a preset optimization rule. After optimization, an optimized solution is obtained, and the candidate solution X is updated based on the optimized solution. If it does not exist, the candidate solution X is directly retained as a feasible solution. The same principle applies to judge and process each candidate solution, and finally, an intermediate candidate solution set is obtained.
[0063] S480. Based on the soft constraint graph, score each candidate solution in the intermediate candidate solution set, and select a preset number of candidate solutions from each candidate solution based on the scoring results to obtain the target feasible solution set.
[0064] As an optional but non-limiting implementation, scoring each candidate solution in the intermediate candidate solution set based on a soft constraint graph includes: determining at least one scoring dimension for evaluating candidate solutions based on the soft constraint graph; for a single candidate solution, determining the corresponding dimension values under each scoring dimension, and assigning weights and dimension values based on the scoring dimension and preset dimensions to determine the scoring result of the single candidate solution. Using this optional approach, candidate solutions can be scored based on a soft constraint graph to obtain scoring results.
[0065] The preset dimension allocation weights indicate the weight values configured for each scoring dimension. These preset dimension allocation weights can be pre-set based on actual needs.
[0066] Specifically, at least one scoring dimension for evaluating candidate solutions can be determined based on a soft constraint graph. In this embodiment, the scoring dimensions include: drug profit, user budget utilization rate, transaction probability, and inventory risk. Next, for a single candidate solution, the corresponding dimension values under each scoring dimension can be determined, and weights and dimension values are assigned based on the scoring dimensions and preset dimensions to determine the scoring result of the single candidate solution.
[0067] For example, in this embodiment, the scoring result can be calculated according to the following formula: ; Where S represents the scoring result; P represents the drug profit; This indicates the weighting of drug profit allocation; U represents the user budget utilization rate. This indicates the weight assigned to the user's budget utilization rate; C represents the probability of a transaction. This indicates the weighting of the probability of a transaction; R represents inventory risk. This indicates the weighting of inventory risk allocation.
[0068] For example, the weights can be configured as follows: .
[0069] S490. Based on the set of feasible solutions for the objective, determine the recommended drug combination scheme.
[0070] As an optional but non-limiting implementation, the drug combination recommendation method in this embodiment further includes: when a price change event or inventory quantity change event occurs for the target drug, determining the drug combination recommendation scheme associated with the target drug, and determining the corresponding substitute drugs; based on the drug information associated with the substitute drugs, determining a partial substitution sub-scheme for the target drug; based on the target drug, determining the drugs to be retained in the drug combination recommendation scheme, and determining a reuse sub-scheme from the drug recommendation scheme; wherein, the reuse sub-scheme is used to project and reuse the drug scheme details associated with the drugs to be retained; based on the partial substitution sub-scheme and the reuse sub-scheme, updating the original drug combination recommendation scheme to obtain a recommended updated scheme. By adopting this optional scheme, when a change event occurs for the target drug, it is possible to locate and reuse unaffected drugs, and update the drug combination recommendation scheme locally, avoiding full recalculation in dynamic scenarios and significantly improving update efficiency.
[0071] Price change events refer to changes in the price of a drug. For example, if the price of drug 1 changes from 10 yuan to 11 yuan, then drug 1 has experienced a price change event. Inventory quantity change events refer to changes in the quantity of a drug in stock. For example, if the quantity of drug 2 in stock changes from 5 boxes to 0 boxes, then drug 2 has experienced an inventory quantity change event.
[0072] The target drug refers to a drug that has experienced a price change event or an inventory change event. Correspondingly, alternative drugs refer to other drugs that have the same therapeutic effect as the target drug and can be used to replace it.
[0073] Specifically, when a price change or inventory change event occurs for a target drug, a recommended drug combination scheme associated with the target drug and its corresponding substitute drugs can be determined. Then, based on the drug information associated with the substitute drugs, a partial substitution sub-scheme for the target drug is determined. For example, in the original drug combination recommendation scheme, the target drug is drug 3, and 1 box is recommended. However, if a change in the inventory quantity of drug 3 occurs (e.g., the inventory becomes 0), then a partial substitution sub-scheme can be generated using the substitute drug for drug 3 (e.g., drug 8). Specifically, the generated partial substitution sub-scheme could be "drug 8, 1 box". Simultaneously, based on the target drug, drugs to be retained in the drug combination recommendation scheme can be determined, and reuse sub-schemes can be determined from the drug recommendation scheme. These reuse sub-schemes are used to project and reuse the drug scheme details associated with the drugs to be retained. For example, a reuse sub-scheme determined from the original drug combination recommendation scheme could be "drug 2, 2 boxes". Finally, based on the partial substitution sub-schemes and reuse sub-schemes, the original drug combination recommendation scheme can be updated to obtain the recommended updated scheme.
[0074] For example, Figure 6 This is a schematic diagram of a processing logic for locally optimizing a drug combination recommendation scheme provided in an embodiment of the present invention, as shown below. Figure 6 As shown, when an event trigger detects a price change event or an inventory quantity change event (where the event trigger includes at least an inventory threshold change trigger and a price change trigger), an incremental set will be formed. Only extract The corresponding node and its adjacent conflicting edges constitute the affected subgraph The previous optimal state of the unaffected subgraph is retained, and state reuse adopts the "unaffected combined projection" method, that is, the previous feasible solution is divided into non-affected subgraphs. The node projection is the initial population / initial state; then, for Perform local search and re-scoring, that is, only for... The scores for the associated candidate drugs in the four categories of P, U, C, and R are recalculated, and the stable subgraph and the re-optimization results are merged to obtain the updated results. If no feasible solution is found in the local re-optimization, the process reverts to full optimization within the constrained scope. This reduces the overhead of repeated searches compared to full recalculation and is suitable for scenarios with high-frequency inventory changes.
[0075] The technical solution of this invention acquires user data, drug data, and business indicator data; then, based on the drug data and business indicator data, it constructs a hard constraint graph and a soft constraint graph. The hard constraint graph is used to constrain the medication safety and compliance requirements of the recommended drug combination, and the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination. This achieves an integrated expression of multi-source constraints, improving the computability and scalability of constraint coupling. Next, a medication conflict bitmap is constructed based on the hard constraint graph, and medication contraindication information for the user to be recommended is determined based on user data. Individual contraindication vectors are then determined based on the medication contraindication information. For a single candidate solution in the initial candidate solution set, a medication conflict judgment is made based on the medication conflict bitmap and the individual contraindication vector. If the candidate solution conflicts with the medication conflict bitmap or... If an individual contraindication vector indicates a medication conflict, the candidate solution is identified as an anomalous solution. If no medication conflict exists between the candidate solution and either the medication conflict bitmap or the individual contraindication vector, it is determined whether the candidate solution exceeds the budget or the drug box limit. If so, the candidate solution is optimized according to preset optimization rules to obtain an optimized solution. Anomalous solutions in the initial candidate solution set are pruned and removed, and data is updated based on the optimized solution to obtain an intermediate candidate solution set. This allows for rapid removal of infeasible solutions in the early stages of the search, reducing computational complexity. Next, each candidate solution in the intermediate candidate solution set is scored based on a soft constraint graph, and a preset number of candidate solutions are selected from these based on the scoring results to obtain the target feasible solution set. Finally, a drug combination recommendation scheme is determined based on the target feasible solution set. This scheme enables accurate drug combination recommendations while ensuring medication safety and compliance, and improves real-time recommendation efficiency. It is suitable for decision support in internet healthcare and retail pharmacy prescription scenarios.
[0076] Figure 7 This is a schematic diagram of a drug combination recommendation device provided in an embodiment of the present invention. This embodiment is applicable to situations involving drug combination recommendations. The drug combination recommendation device can be implemented in software and / or hardware, and is generally integrated into any electronic device with network communication capabilities, such as a mobile terminal, PC, or server. Figure 7 As shown, the drug combination recommendation device of this embodiment of the invention may include a data acquisition module 710, a two-layer map construction module 720, an intermediate candidate solution set determination module 730, a target feasible solution set determination module 740, and a drug combination recommendation module 750. Wherein: The data acquisition module 710 is used to acquire user data, drug data, and business indicator data. The dual-layer graph construction module 720 is used to construct a hard constraint graph and a soft constraint graph based on the drug data and the business indicator data; wherein, the hard constraint graph is used to constrain the medication safety and compliance conditions that the recommended drug combination needs to meet, and the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination. The intermediate candidate solution set determination module 730 is used to construct a drug conflict bitmap based on the hard constraint map, and perform pruning and feasible solution optimization processing on each candidate solution in the initial candidate solution set based on the drug conflict bitmap to obtain an intermediate candidate solution set; wherein, the initial candidate solution set is determined based on the user data and the drug data, and the candidate solutions in the initial candidate solution set are at least used to indicate recommended drug combination information; The target feasible solution set determination module 740 is used to score each candidate solution of the intermediate candidate solution set based on the soft constraint map, and select a preset number of candidate solutions from each candidate solution based on the scoring results to obtain the target feasible solution set. The drug combination recommendation module 750 is used to determine a drug combination recommendation scheme based on the target feasible solution set.
[0077] The technical solution of this invention involves acquiring user data, drug data, and business indicator data through a data acquisition module. Then, a two-layer graph construction module constructs a hard constraint graph and a soft constraint graph based on the drug data and business indicator data. The hard constraint graph constrains the medication safety and compliance requirements of the recommended drug combination, while the soft constraint graph constrains the revenue indicators of the recommended drug combination. This achieves an integrated expression of multi-source constraints, improving the computability and scalability of constraint coupling. Next, an intermediate candidate solution set determination module constructs a medication conflict bitmap based on the hard constraint graph and determines the intermediate candidate solution set based on the medication conflict bitmap. Each candidate solution undergoes pruning and feasible solution optimization to obtain an intermediate candidate solution set. This initial candidate solution set is determined based on user and drug data, and the candidate solutions in the initial set at least indicate recommended drug combinations, thus quickly eliminating infeasible solutions in the early stages of the search and reducing computational complexity. Next, a target feasible solution set determination module scores each candidate solution in the intermediate candidate solution set based on a soft constraint graph, and selects a predetermined number of candidate solutions based on the scoring results to obtain the target feasible solution set. Finally, a drug combination recommendation module determines the recommended drug combination scheme based on the target feasible solution set. This scheme enables accurate drug combination recommendations while ensuring medication safety and compliance, and improves real-time recommendation efficiency, making it suitable for decision support in internet healthcare and retail pharmacy prescription scenarios.
[0078] As an optional but non-limiting implementation, the initial candidate solution set is determined as follows: based on the user data, the disease diagnosis result of the user to be recommended is determined; based on the drug data, a complete set of drugs is determined; based on the disease diagnosis result, multiple candidate drugs are selected from the complete set of drugs; based on the multiple candidate drugs and the inventory quantity associated with each candidate drug, multiple drug combination information is constructed, and each drug combination information is used as a candidate solution to obtain the initial candidate solution set.
[0079] As an optional but non-limiting implementation, the two-layer graph construction module 720 includes a graph node determination unit, a constraint relationship determination unit, and a graph construction unit. Wherein: The knowledge graph node determination unit is used to determine multiple knowledge graph nodes based on the drug data and the business indicator data. The constraint relationship determination unit is used to analyze the relationships between multiple knowledge graph nodes and determine hard and soft constraints. The hard constraints include at least one of the following: drug incompatibility, allergy contraindication, medical history contraindication, prescription compliance, and insurance reimbursement. The soft constraints include at least one of the following: drug profit, user budget utilization rate, transaction probability, and inventory risk. The graph construction unit is used to construct the hard-constraint graph based on multiple knowledge graph nodes and the hard constraint relationships; and to construct the soft-constraint graph based on multiple knowledge graph nodes and the soft constraint relationships.
[0080] As an optional but non-limiting implementation, the intermediate candidate solution set determination module 730 includes an initial drug conflict matrix construction unit, an element value determination unit, and a final drug conflict matrix determination unit. Wherein: An initial drug conflict matrix construction unit is used to construct an initial drug conflict matrix based on the initial candidate solution set; wherein the number of rows and columns of the initial drug conflict matrix are both equal to the total number of candidate drug types associated with the initial candidate solution set; The element value determination unit is used to determine the element value corresponding to each drug pair in the initial drug conflict matrix based on the hard constraint graph; wherein, if the drug pair does not meet the constraint requirements of the hard constraint graph, the element value is set to 1; if the drug pair meets the constraint requirements of the hard constraint graph, the element value is set to 0. The final drug conflict matrix determination unit is used to fill the initial drug conflict matrix with element values based on the element values corresponding to each drug pair to obtain the final drug conflict matrix, and to use the final drug conflict matrix as the drug conflict bitmap.
[0081] As an optional but non-limiting implementation, the intermediate candidate solution set determination module 730 further includes an individual taboo vector determination unit, a medication conflict judgment unit, an abnormal solution determination unit, an optimized solution determination unit, and an intermediate candidate solution set determination unit. Wherein: An individual contraindication vector determination unit is used to determine the medication contraindication information of the user to be recommended based on the user data, and to determine the individual contraindication vector based on the medication contraindication information; The medication conflict determination unit is used to determine medication conflicts for a single candidate solution in the initial candidate solution set based on the medication conflict bitmap and the individual taboo vector. An abnormal solution determination unit is used to determine the candidate solution as an abnormal solution if there is a drug conflict between the candidate solution and the drug conflict bitmap or the individual contraindication vector. The optimization solution determination unit is used to determine whether the candidate solution exceeds the budget or the number of drug boxes exceeds the limit if there is no drug conflict between the candidate solution and the drug conflict bitmap and the individual contraindication vector. If there is an over-budget or drug box limit, the candidate solution is optimized according to the preset optimization rules to obtain the optimized solution. The intermediate candidate solution set determination unit is used to prune and remove the abnormal solutions in the initial candidate solution set, and to update the data based on the optimized solution to obtain the intermediate candidate solution set.
[0082] As an optional but non-limiting implementation, the target feasible solution set determination module 740 includes a scoring dimension determination unit and a scoring result determination unit. Wherein: The scoring dimension determination unit is used to determine at least one scoring dimension for evaluating the candidate solution based on the soft constraint map. The scoring result determination unit is used to determine the dimension value corresponding to the candidate solution under each of the scoring dimensions for a single candidate solution, and to determine the scoring result of the single candidate solution based on the scoring dimensions, the weights assigned to the preset dimensions, and the dimension values.
[0083] As an optional but non-limiting implementation, the drug combination recommendation device further includes: The event triggering module is used to determine the recommended drug combination scheme associated with the target drug and to determine the alternative drugs corresponding to the target drug when a price change event or an inventory quantity change event occurs for the target drug. A local alternative sub-scheme determination module is used to determine a local alternative sub-scheme for the target drug based on the drug information associated with the alternative drug; The reuse sub-scheme determination module is used to determine, based on the target drug, the drugs to be retained in the recommended drug combination scheme, and to determine the reuse sub-schemes from the recommended drug scheme; wherein, the reuse sub-schemes are used to project and reuse the drug scheme details associated with the drugs to be retained; The recommended scheme update module is used to update the original drug combination recommended scheme based on the local substitution sub-scheme and the reuse sub-scheme to obtain the recommended updated scheme.
[0084] The drug combination recommendation device provided in this embodiment of the invention can be used to execute the drug combination recommendation method, and has the corresponding functional modules and beneficial effects for executing the drug combination recommendation method.
[0085] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of the present invention.
[0086] Figure 8 This is a schematic diagram of an electronic device for implementing a drug combination recommendation method according to an embodiment of the present invention. The following refers to... Figure 8 The diagram illustrates a structural schematic of an electronic device 810 suitable for implementing embodiments of the present invention. The terminal devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0087] like Figure 8As shown, the electronic device 810 includes at least one processor 811 and a memory, such as a read-only memory (ROM) 812 and a random access memory (RAM) 813, communicatively connected to the at least one processor 811. The memory stores computer programs executable by the at least one processor. The processor 811 can perform various appropriate actions and processes based on the computer program stored in the ROM 812 or loaded from storage unit 818 into the RAM 813. The RAM 813 can also store various programs and data required for the operation of the electronic device 810. The processor 811, ROM 812, and RAM 813 are interconnected via a bus 814. An input / output (I / O) interface 815 is also connected to the bus 814.
[0088] Multiple components in electronic device 810 are connected to input / output (I / O) interface 815, including: input unit 816, such as keyboard, mouse, etc.; output unit 817, such as various types of monitors, speakers, etc.; storage unit 818, such as disk, optical disk, etc.; and communication unit 819, such as network card, modem, wireless transceiver, etc. Communication unit 819 allows electronic device 810 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0089] Processor 811 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 811 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 811 executes the drug combination recommendation method provided in any embodiment of the present invention.
[0090] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the drug combination recommendation method shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 819, or installed from storage unit 818, or installed from read-only memory (ROM) 812. When the computer program is executed by processor 811, it performs the functions defined in the drug combination recommendation method of the embodiments of the present invention.
[0091] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0092] The electronic device provided in this embodiment of the invention and the drug combination recommendation method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0093] This invention provides a computer storage medium storing a computer program that, when executed by a processor, implements the drug combination recommendation method provided in the above embodiments.
[0094] It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0095] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0096] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0097] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0098] The units described in the embodiments of the present invention can be implemented in software or in hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0099] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0100] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0101] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
[0102] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the invention. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0103] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for recommending drug combinations, characterized in that, The method includes: Acquire user data, drug data, and business performance data; Based on the drug data and the business indicator data, a hard constraint graph and a soft constraint graph are constructed; wherein, the hard constraint graph is used to constrain the medication safety and compliance conditions that the recommended drug combination needs to meet, and the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination. A drug conflict bitmap is constructed based on the hard constraint graph, and pruning and feasible solution optimization are performed on each candidate solution in the initial candidate solution set based on the drug conflict bitmap to obtain an intermediate candidate solution set; wherein, the initial candidate solution set is determined based on the user data and the drug data, and the candidate solutions in the initial candidate solution set are at least used to indicate the recommended drug combination information; The candidate solutions in the intermediate candidate solution set are scored based on the soft constraint map, and a preset number of candidate solutions are selected from each candidate solution based on the scoring results to obtain the target feasible solution set. Based on the set of feasible solutions for the objective, a recommended drug combination scheme is determined.
2. The method according to claim 1, characterized in that, The initial set of candidate solutions is determined in the following manner: Based on the user data, determine the disease diagnosis results of the users to be recommended; Based on the aforementioned drug data, a complete set of drugs is determined; Based on the diagnosis results of the disease, multiple candidate drugs are selected from the complete set of drugs; Based on the multiple candidate drugs and the inventory quantity associated with each candidate drug, multiple drug combination information is constructed, and each drug combination information is used as a candidate solution to obtain the initial candidate solution set.
3. The method according to claim 1, characterized in that, The construction of hard constraint graphs and soft constraint graphs based on the drug data and the business indicator data includes: Based on the drug data and the business indicator data, multiple knowledge graph nodes are identified; The relationships between multiple knowledge graph nodes are analyzed to determine hard and soft constraints. The hard constraints include at least one of the following: drug incompatibility, allergy contraindication, medical history contraindication, prescription compliance, and insurance reimbursement. The soft constraints include at least one of the following: drug profit, user budget utilization rate, transaction probability, and inventory risk. Based on multiple knowledge graph nodes and the hard constraint relationships, a hard constraint graph is constructed; and based on multiple knowledge graph nodes and the soft constraint relationships, a soft constraint graph is constructed.
4. The method according to claim 1, characterized in that, The construction of the drug conflict bitmap based on the hard constraint map includes: Based on the initial candidate solution set, an initial drug conflict matrix is constructed; wherein the number of rows and columns of the initial drug conflict matrix are both equal to the total number of candidate drug types associated with the initial candidate solution set; Based on the hard constraint graph, the element values corresponding to each drug pair in the initial drug conflict matrix are determined; wherein, if the drug pair does not meet the constraint requirements of the hard constraint graph, the element value is set to 1; if the drug pair meets the constraint requirements of the hard constraint graph, the element value is set to 0. Based on the element values corresponding to each drug pair, the initial drug conflict matrix is filled with element values to obtain the final drug conflict matrix, and the final drug conflict matrix is used as the drug conflict bitmap.
5. The method according to claim 1, characterized in that, The step of pruning and optimizing each candidate solution in the initial candidate solution set based on the medication conflict bitmap to obtain an intermediate candidate solution set includes: Based on the user data, determine the medication contraindications information of the users to be recommended, and determine the individual contraindication vector based on the medication contraindications information; For a single candidate solution in the initial candidate solution set, a drug conflict judgment is made on the candidate solution based on the drug conflict bitmap and the individual taboo vector; If the candidate solution has a medication conflict with the medication conflict bitmap or the individual contraindication vector, then the candidate solution is determined to be an abnormal solution; If the candidate solution does not conflict with either the medication conflict bitmap or the individual contraindication vector, then it is determined whether the candidate solution exceeds the budget or the number of drug boxes exceeds the limit. If it does exceed the budget or the number of drug boxes exceeds the limit, then the candidate solution is optimized according to the preset optimization rules to obtain the optimized solution. The abnormal solutions in the initial candidate solution set are pruned and removed, and the data is updated based on the optimized solution to obtain the intermediate candidate solution set.
6. The method according to claim 1, characterized in that, The scoring of each candidate solution in the intermediate candidate solution set based on the soft constraint map includes: Based on the soft constraint map, at least one scoring dimension is determined to evaluate the candidate solution; For a single candidate solution, determine the dimension value corresponding to the candidate solution under each of the scoring dimensions, and determine the scoring result of the single candidate solution based on the scoring dimensions, the preset dimensions, and the dimension value.
7. The method according to claim 1, characterized in that, The method further includes: When a price change event or an inventory change event occurs for the target drug, determine the recommended drug combination scheme associated with the target drug, and determine the alternative drugs corresponding to the target drug; Based on the drug information associated with the alternative drugs, a local alternative sub-scheme for the target drug is determined; Based on the target drug, drugs to be retained in the recommended drug combination scheme are determined, and reuse sub-schemes are determined from the recommended drug scheme; wherein, the reuse sub-schemes are used to project and reuse the drug scheme details associated with the drugs to be retained; Based on the local substitution sub-scheme and the reuse sub-scheme, the original drug combination recommendation scheme is updated to obtain the recommended updated scheme.
8. A drug combination recommendation device, characterized in that, The device includes: The data acquisition module is used to acquire user data, drug data, and business indicator data; A two-layer graph construction module is used to construct a hard constraint graph and a soft constraint graph based on the drug data and the business indicator data; wherein, the hard constraint graph is used to constrain the medication safety and compliance conditions that the recommended drug combination needs to meet, and the soft constraint graph is used to constrain the revenue indicators of the recommended drug combination. The intermediate candidate solution set determination module is used to construct a drug conflict bitmap based on the hard constraint graph, and perform pruning and feasible solution optimization on each candidate solution in the initial candidate solution set based on the drug conflict bitmap to obtain an intermediate candidate solution set; wherein, the initial candidate solution set is determined based on the user data and the drug data, and the candidate solutions in the initial candidate solution set are at least used to indicate recommended drug combination information; The target feasible solution set determination module is used to score each candidate solution in the intermediate candidate solution set based on the soft constraint map, and select a preset number of candidate solutions from each candidate solution based on the scoring results to obtain the target feasible solution set. The drug combination recommendation module is used to determine a drug combination recommendation scheme based on the target feasible solution set.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the drug combination recommendation method as described in any one of claims 1-7.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the drug combination recommendation method as described in any one of claims 1-7.