Medicine recommendation model training method and device, equipment and storage medium

By obtaining drug buried event data and performing feature extraction and model training, the problem of low quality training data for drug recommendation models on the pharmaceutical e-commerce platform is solved, and the recommendation effect and user satisfaction are improved.

CN119338557APending Publication Date: 2025-01-21GUANGZHOU FANGZHOU INFORMATION TECHNOLOGY CO LTD
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202411447280.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The number of drugs on medical e-commerce platforms is limited, and long tail products account for the majority, resulting in very little interaction between drugs and users. There is a deviation in the quality of the training data of the pharmaceutical recommendation model, which affects the online recommendation effect.

Method used

By obtaining the drug training data corresponding to the drug buried events from the database of the pharmaceutical e-commerce platform, using the feature extraction layer to extract features from the drug training data, obtain key features, and input them into the drug recommendation layer to obtain the drug recommendation results. The drug recommendation results train the initial drug recommendation model.

Benefits of technology

It improves the quality of the training data for the medical recommendation model, makes up for the shortcomings of small data volume, makes the drug recommendation results more accurate, improves the online recommendation effect of drugs on the medical e-commerce platform, and thereby improves the user's shopping efficiency and user satisfaction. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338557A_ABST
    Figure CN119338557A_ABST
Patent Text Reader

Abstract

The invention discloses a medicine recommendation model training method and device, equipment and a storage medium, and belongs to the technical field of computers, and the method comprises the steps: obtaining medicine training data corresponding to a medicine burying point event from a database of a medicine e-commerce platform; performing feature extraction on the drug training data through a feature extraction layer to obtain key features; inputting the key features into a drug recommendation layer to obtain a drug recommendation result; and training the initial medicine recommendation model according to the medicine recommendation result. The quality of the medicine recommendation model training data is improved, the defect that the medicine recommendation model training data volume is small is overcome, the medicine recommendation result of the medicine recommendation model is more accurate, the online recommendation effect of medicines in a medicine e-commerce platform is improved, and then the shopping efficiency and the user satisfaction degree of the user are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a medicine recommendation model training method, device, equipment and storage medium. Background Art

[0002] Current e-commerce recommendation models rely on large amounts of data for training. For example, Taobao has a huge number of products for sale, so both the quality and quantity of the data are saturated.

[0003] However, the number of products (mainly medicines) on medical e-commerce platforms is limited, and long-tail products account for the majority, resulting in very little interaction between a large number of products and users. Therefore, the training data for the medical recommendation model is very limited, and the quality of the data is biased, resulting in insufficient training of the medical recommendation model and affecting the online recommendation effect. Summary of the invention

[0004] The present invention provides a medicine recommendation model training method, device, equipment and storage medium to improve the quality of medicine recommendation model training data, thereby improving the online recommendation effect of medicines in a medicine e-commerce platform.

[0005] According to one aspect of the present invention, a method for training a medicine recommendation model is provided, wherein the initial medicine recommendation model includes a feature extraction layer and a medicine recommendation layer, and the method includes:

[0006] Obtain drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform;

[0007] The feature extraction layer extracts features from drug training data to obtain key features;

[0008] Input key features into the drug recommendation layer to obtain drug recommendation results;

[0009] Based on the drug recommendation results, the initial medicine recommendation model is trained.

[0010] According to another aspect of the present invention, a medicine recommendation model training device is provided, wherein the initial medicine recommendation model includes a feature extraction layer and a medicine recommendation layer, and the device includes:

[0011] The drug training data acquisition module is used to obtain drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform;

[0012] A key feature extraction module is used to extract features from drug training data through a feature extraction layer to obtain key features;

[0013] The drug recommendation result determination module is used to input key features into the drug recommendation layer to obtain drug recommendation results;

[0014] The medicine recommendation model training module is used to train the initial medicine recommendation model based on the drug recommendation results.

[0015] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the medicine recommendation model training method of any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the medical recommendation model training method of any embodiment of the present invention when executed.

[0020] According to another aspect of the present invention, a computer program product is provided, including a computer program, which implements the medicine recommendation model training method of any embodiment of the present invention when executed by a processor.

[0021] The technical solution of the embodiment of the present invention obtains drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform; extracts features from the drug training data through the feature extraction layer to obtain key features; inputs the key features into the drug recommendation layer to obtain drug recommendation results; and trains the initial pharmaceutical recommendation model based on the drug recommendation results. The above technical solution obtains drug training data with the help of drug embedding events on the pharmaceutical e-commerce platform, ensuring that the collected drug training data can accurately reflect the actual behavior and user preferences of users, thereby improving the quality of the training data of the pharmaceutical recommendation model; at the same time, the feature extraction layer in the initial pharmaceutical recommendation model extracts features from the drug training data to obtain key features of multiple dimensions, which makes up for the defect of small amount of training data of the pharmaceutical recommendation model, making the drug recommendation results of the pharmaceutical recommendation model more accurate, thereby improving the online recommendation effect of drugs on the pharmaceutical e-commerce platform, and further improving the shopping efficiency and user satisfaction of users.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0024] Figure 1 is a flowchart of a method for training a medicine recommendation model according to Embodiment 1 of the present invention;

[0025] Figure 2 is a flow chart of a method for training a medicine recommendation model according to Embodiment 2 of the present invention;

[0026] Figure 3 is a structural diagram of a medicine recommendation model training device provided according to Embodiment 3 of the present invention;

[0027] Figure 4 It is a structural schematic diagram of an electronic device for implementing the medicine recommendation model training method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "initial", "target", "first" and "second" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] In addition, it should be noted that in the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of drug embedding events, the first time period, the second time period, the third time period and the preset statistical time, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0031] Embodiment 1

[0032] Figure 1 This is a flowchart of a method for training a medicine recommendation model provided in the first embodiment of the present invention. This embodiment can be applied to the case where training data required for training a medicine recommendation model is collected and features are extracted. The method can be executed by a medicine recommendation model training device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0033] S101. Obtain drug training data corresponding to drug embedding events from a database of a pharmaceutical e-commerce platform.

[0034] Among them, the pharmaceutical e-commerce platform refers to a platform that provides e-commerce services specifically for the pharmaceutical industry, such as xx Pharmacy. Pharmaceutical embedding events refer to embedding events used to obtain pharmaceutical-related data on pharmaceutical e-commerce platforms; optionally, pharmaceutical embedding events include pharmaceutical exposure events, pharmaceutical click events, and pharmaceutical order events. Among them, pharmaceutical exposure events refer to embedding events used to expose pharmaceuticals on pharmaceutical e-commerce platforms; pharmaceutical click events refer to embedding events used to obtain user clicks on pharmaceuticals on pharmaceutical e-commerce platforms; pharmaceutical order events refer to embedding events used to obtain user orders for pharmaceuticals on pharmaceutical e-commerce platforms.

[0035] The drug training data refers to the training data required for training the initial drug recommendation model. The initial drug recommendation model refers to the drug recommendation model before training; optionally, the initial drug recommendation model includes a feature extraction layer and a drug recommendation layer. The feature extraction layer is used to extract features from the drug training data; and the drug recommendation layer is used to obtain drug recommendation results.

[0036] Specifically, the demand embedding event type can be determined according to actual business needs; the demand embedding event type refers to the embedding event type involved in the drug embedding event that meets the actual business needs; the drug training data corresponding to the drug embedding event is obtained from the database of the pharmaceutical e-commerce platform using the demand embedding event type as the search condition. The demand embedding event type includes but is not limited to exposure embedding events, click embedding events, add to shopping cart embedding events, and order embedding events.

[0037] Optionally, the drug training data includes first drug training data, second drug training data, and third drug training data. Accordingly, obtaining drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform may be: obtaining first drug training data corresponding to drug exposure events within a first time period from the database of the pharmaceutical e-commerce platform; obtaining second drug training data corresponding to drug click events within a second time period from the first drug training data; wherein the first time period includes the second time period; obtaining third drug training data corresponding to drug order events within a third time period from the second drug training data; wherein the first time period includes the third time period; and the third time period is greater than the second time period.

[0038] Among them, the first time period refers to a period of time from a certain time point in the past to the current time point; optionally, the first time period can be preset according to actual business needs or experimental experience, for example, the first time period can be 7 days from October 9, 2024 to October 15, 2024, which is not specifically limited in the embodiment of the present invention. The first drug training data refers to the data of the drug exposed to the user on the recommendation page of the medical e-commerce platform within the first time period; optionally, the first drug training data includes but is not limited to the drug identification, user identification and drug exposure time.

[0039] The second time period can be preset according to actual business needs or experimental experience. For example, the second time period can be 30 minutes, which is not specifically limited in the embodiment of the present invention. The second drug training data refers to the data in the first drug training data that satisfies the drug exposure and is clicked by the user within the second time period; optionally, the second drug training data includes but is not limited to the drug identification, user identification and the drug click time when the user clicks the drug.

[0040] The third time period can be preset according to actual business needs or experimental experience. For example, the third time period can be 3 days, which is not specifically limited in the embodiment of the present invention. The third drug training data refers to the data in the second drug training data that satisfies the user's order within the third time period; optionally, the third drug training data includes but is not limited to the drug identification, user identification and the drug order time of the user's ordered drug.

[0041] Specifically, the exposure time range of the drug exposure time can be determined according to the first time period, and the exposure time range is used as the search condition to obtain the first drug training data from the database of the medical e-commerce platform; the click time range of the drug click time can be determined according to the second time period, and the click time range is used as the search condition to obtain the second drug training data from the first drug training data; the order time range of the drug order time can be determined according to the third time period, and the order time range is used as the search condition to obtain the third drug training data from the second drug training data; thereby obtaining the drug training data consisting of the first drug training data, the second drug training data and the third drug training data.

[0042] It can be understood that the drug training data is obtained in the above manner, so that the drug training data includes user behavior data from the user seeing the drug (i.e., drug exposure), to the user being interested in the drug (i.e., the user clicking on the drug), to the user finally purchasing the drug (i.e., the user placing an order for the drug), thereby improving the data quality of the drug training data.

[0043] Optionally, in order to better reflect the recommendation performance of the initial medicine recommendation model, the drug training data is divided into positive sample data and negative sample data. Specifically, the training data in the first drug training data except the second drug training data is used as drug exposure positive sample data, drug click negative sample data and drug order negative sample data; the data in the second drug training data except the third drug training data is used as drug click positive sample data and drug order negative sample data; the third drug training data is used as drug order positive sample data.

[0044] S102. Extract features from drug training data through a feature extraction layer to obtain key features.

[0045] Among them, key features refer to the features required to obtain drug recommendation results; optionally, key features include drug features, user features, user behavior sequence features and interactive features. Among them, drug features refer to the features possessed by the drug itself; optionally, drug features include but are not limited to drug identification, drug brand, drug classification, drug ingredients, drug instructions, drug precautions and drug treatment conditions. User features refer to features used to describe user basic information; optionally, user features include but are not limited to user identification, age, gender, user region, device address and device brand of the user logging into the medical e-commerce platform. User behavior sequence features refer to the features displayed by user behavior data based on time series. Interaction features refer to the features displayed by the interactive behavior data between users and drugs.

[0046] Specifically, the drug training data is input into the feature extraction layer of the initial drug recommendation model, and the key features are obtained after being processed by the feature extraction layer.

[0047] S103. Input the key features into the drug recommendation layer to obtain drug recommendation results.

[0048] Among them, the drug recommendation result refers to the recommendation result obtained by the initial medicine recommendation model based on the drug training data; optionally, the drug recommendation result can be displayed in the form of a list.

[0049] Specifically, the key features are input into the drug recommendation layer of the initial medicine recommendation model, and the drug recommendation results are obtained after being processed by the drug recommendation layer.

[0050] S104. Train the initial medicine recommendation model based on the drug recommendation results.

[0051] Specifically, the training loss can be determined based on the preset loss function according to the actual drug recommendation results corresponding to the drug recommendation results and the drug training data; the initial drug recommendation model is trained based on the training loss until the training loss is stabilized within the preset loss range, or the number of training times reaches the training times threshold. The preset loss range and the training times threshold can be pre-set according to actual business needs or the experience of those skilled in the art, and the embodiments of the present invention do not specifically limit them.

[0052] The technical solution of the embodiment of the present invention obtains drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform; extracts features from the drug training data through the feature extraction layer to obtain key features; inputs the key features into the drug recommendation layer to obtain drug recommendation results; and trains the initial pharmaceutical recommendation model based on the drug recommendation results. The above technical solution obtains drug training data with the help of drug embedding events on the pharmaceutical e-commerce platform, ensuring that the collected drug training data can accurately reflect the actual behavior and user preferences of users, thereby improving the quality of the training data of the pharmaceutical recommendation model; at the same time, the feature extraction layer in the initial pharmaceutical recommendation model extracts features from the drug training data to obtain key features of multiple dimensions, which makes up for the defect of small amount of training data of the pharmaceutical recommendation model, making the drug recommendation results of the pharmaceutical recommendation model more accurate, thereby improving the online recommendation effect of drugs on the pharmaceutical e-commerce platform, and further improving the shopping efficiency and user satisfaction of users.

[0053] Embodiment 2

[0054] Figure 2This is a flowchart of a method for training a medicine recommendation model provided in Example 2 of the present invention. Based on the above example, this example further optimizes "extracting features from medicine training data through a feature extraction layer to obtain key features" and provides an optional implementation scheme. It should be noted that for the parts not described in detail in the examples of the present invention, reference can be made to the relevant descriptions of other examples. It should also be noted that key features include medicine features, user features, user behavior sequence features, and interaction features. Figure 2 As shown, the method includes:

[0055] S201. Obtain drug training data corresponding to drug embedding events from a database of a pharmaceutical e-commerce platform.

[0056] S202: For each sample in the drug training data, extract drug features corresponding to the sample from the database of the pharmaceutical e-commerce platform according to the drug identification in the sample.

[0057] It should be noted that the feature extraction layer in the initial medicine recommendation model includes a learnable feature extraction sublayer, a drug category feature extraction sublayer, and a numerical statistical feature extraction sublayer. Each sample in the drug training data is unique, that is, each sample in the drug training data has a unique correspondence between the user ID, drug ID, and timestamp.

[0058] Specifically, for each sample in the drug training data, the drug learnable features corresponding to the drug identification in the sample can be extracted from the database of the medical e-commerce platform through the learnable feature extraction sublayer; the drug category features corresponding to the drug identification in the sample can be extracted from the database of the medical e-commerce platform through the drug category feature extraction sublayer; the drug numerical statistical features corresponding to the drug identification in the sample and the preset statistical time can be extracted from the database of the medical e-commerce platform through the numerical statistical feature extraction sublayer; the drug learnable features, drug category features and drug numerical statistical features are merged to obtain the drug features corresponding to the sample.

[0059] Among them, the drug learnable features refer to the features in the drug features that can be automatically learned through machine learning technology or deep learning technology; optionally, the drug learnable features include but are not limited to drug identification, drug brand, primary classification of the drug and secondary classification of the drug. It should be noted that the secondary classification of the drug is a subclass of the primary classification of the drug. For example, if the primary classification of the drug is nutrition and health care, the secondary classification of the drug can be beauty and skin care, immunity enhancement or calcium supplement. Drug category features refer to features related to the use of drugs; optionally, drug category features include but are not limited to drug ingredients, drug instructions, drug precautions and drug treatment diseases. The preset statistical time can be pre-set according to actual business needs. For example, the preset statistical time can be 1 week, 2 weeks, 1 month, 3 months, 6 months or 12 months from a certain time point in the past to the current time point. Drug numerical statistical features refer to features used to count the number of times a drug is clicked, the number of times a drug is exposed, the number of times a drug is ordered and the number of times a drug is added to the shopping cart.

[0060] More specifically, for each sample in the drug training data, the drug identification in the sample can be input into the learnable feature extraction sublayer in the feature extraction layer of the initial drug recommendation model, and the learnable drug feature corresponding to the drug identification can be obtained after being processed by the learnable feature extraction sublayer; at the same time, the drug identification in the sample is input into the drug category feature extraction sublayer in the feature extraction layer of the initial drug recommendation model, and the drug category feature corresponding to the drug identification can be obtained after being processed by the drug category feature extraction sublayer; at the same time, the drug identification and the preset statistical time in the sample are input into the numerical statistical feature extraction sublayer in the feature extraction layer of the initial drug recommendation model, and the numerical statistical feature corresponding to the drug identification can be obtained after being processed by the numerical statistical feature extraction sublayer; based on the feature merging algorithm, the drug learnable feature, the drug category feature and the drug numerical statistical feature are merged to obtain the drug feature corresponding to the sample. Among them, the feature merging algorithm can be pre-set according to actual business needs, and the embodiment of the present invention does not specifically limit it. Similarly, the drug feature corresponding to each sample in the drug training data can be obtained.

[0061] It can be understood that by extracting the drug learnable features, drug category features and drug numerical statistical features corresponding to the drug identification of each sample in the drug training data from the database of the pharmaceutical e-commerce platform, the drug features corresponding to each sample in the drug training data can be obtained, making the obtained drug features richer and more comprehensive.

[0062] Optionally, based on the drug identification in the sample, the drug category feature corresponding to the drug identification is extracted from the database of the medical e-commerce platform through the drug category feature extraction sublayer, which can be: based on the drug identification in the sample, at least one drug keyword corresponding to the drug identification is extracted from the database of the medical e-commerce platform; word embedding processing is performed on the drug keywords to obtain embedded features corresponding to the drug keywords; feature merging is performed on the embedded features corresponding to each drug keyword to obtain the drug category feature corresponding to the drug identification.

[0063] Specifically, the drug category feature extraction sublayer uses the drug identification in the sample as an index, and extracts at least one drug keyword corresponding to the drug identification from the drug keyword corresponding table in the database of the medical e-commerce platform; wherein the drug keyword corresponding table refers to a data table for storing drug keywords corresponding to different drugs that are set in advance; the extracted drug keywords are input into a pre-trained large model, and the extracted drug keywords are processed by word embedding using the pre-trained large model to obtain the embedded features corresponding to each drug keyword; based on the feature merging strategy, the embedded features corresponding to each drug keyword are merged to obtain the drug category features corresponding to the drug identification. Among them, the feature merging strategy can be pre-set according to actual business needs. For example, the feature merging strategy can be a feature serial strategy, which is not specifically limited in the embodiment of the present invention. Among them, the feature serial strategy refers to a strategy that connects all embedded features in series in a certain order to form a long feature.

[0064] It can be understood that for each sample in the drug training data, based on the drug identification of the sample, the drug category features corresponding to the drug identification of the sample are extracted from the database of the pharmaceutical e-commerce platform through keyword extraction, word embedding and feature merging techniques, so that the obtained drug category features are richer and more accurate.

[0065] S203. According to the user identifier in the sample, extract the user characteristics and user behavior sequence characteristics corresponding to the sample from the database of the pharmaceutical e-commerce platform.

[0066] Specifically, based on the user identifier in the sample, the user learnable features corresponding to the user identifier can be extracted from the database of the pharmaceutical e-commerce platform through the learnable feature extraction sublayer; based on the user identifier in the sample and the preset statistical time, the user numerical statistical features corresponding to the user identifier can be extracted from the database of the pharmaceutical e-commerce platform through the numerical statistical feature extraction sublayer; the user learnable features and the user numerical statistical features are merged to obtain the user features corresponding to the sample; at the same time, based on the user behavior sequence extraction algorithm, the user behavior sequence features corresponding to the sample are extracted from the database of the pharmaceutical e-commerce platform according to the user identifier in the sample. Among them, the user behavior sequence extraction algorithm can be pre-set according to actual business needs, and the embodiment of the present invention does not specifically limit it.

[0067] Among them, user learnable features refer to features in user features that can be automatically learned through machine learning technology or deep learning technology; optional user learnable features include but are not limited to user ID, age, gender, user location, device address and device brand of the user's login to the pharmaceutical e-commerce platform. User numerical statistical features refer to features used to count the number of times users click on drugs, the number of times users browse and expose drugs, the number of times users place orders, and the number of times users add drugs to shopping carts.

[0068] More specifically, the user ID in the sample is input into the learnable feature extraction sublayer in the feature extraction layer of the initial medicine recommendation model, and the learnable feature of the medicine corresponding to the user ID is obtained after being processed by the learnable feature extraction sublayer; at the same time, the user ID and the preset statistical time in the sample are input into the numerical statistical feature extraction sublayer in the feature extraction layer of the initial medicine recommendation model, and the numerical statistical feature of the medicine corresponding to the user ID is obtained after being processed by the numerical statistical feature extraction sublayer; based on the feature merging algorithm, the user learnable feature and the user numerical statistical feature are merged to obtain the user feature corresponding to the sample. At the same time, based on the user behavior sequence extraction algorithm, the user behavior sequence feature corresponding to the sample is extracted from the database of the medicine e-commerce platform according to the user ID in the sample.

[0069] It can be understood that by extracting the user learnable features and user numerical statistical features corresponding to the user identifier of each sample in the drug training data from the database of the pharmaceutical e-commerce platform, the user features corresponding to each sample in the drug training data can be obtained, making the obtained user features richer and more comprehensive; at the same time, based on the user identifier in each sample in the drug training data, the user behavior sequence features corresponding to each sample in the drug training data are extracted from the database of the pharmaceutical e-commerce platform, which can provide richer background information for the pharmaceutical recommendation model, thereby helping the pharmaceutical recommendation model to more accurately capture user preferences.

[0070] S204: Extracting interaction features corresponding to the sample from a database of the pharmaceutical e-commerce platform based on the drug identifier and the user identifier in the sample.

[0071] The interaction feature refers to the interaction feature between the user and the drug that is jointly determined by the user identifier and the drug identifier in the sample.

[0072] Specifically, the interaction features corresponding to the sample can be extracted from the database of the pharmaceutical e-commerce platform through the numerical statistical feature extraction sublayer according to the drug identification, user identification and preset statistical time in the sample.

[0073] More specifically, the drug identification, user identification and preset statistical time in the sample are input into the numerical statistical feature extraction sublayer in the feature extraction layer of the initial medicine recommendation model. After being processed by the numerical statistical feature extraction sublayer, the interactive features corresponding to the sample are obtained.

[0074] It is understandable that extracting the interaction features between drugs and users from drug training data can help the medical recommendation model learn a wider range of user characteristics and drug characteristics.

[0075] S205. Input key features into the drug recommendation layer to obtain drug recommendation results; wherein the key features include drug features, user features, user behavior sequence features and interaction features.

[0076] S206. According to the drug recommendation results, the initial medicine recommendation model is trained.

[0077] The technical solution of the embodiment of the present invention is to obtain drug training data corresponding to drug embedding events from the database of the medical e-commerce platform; for each sample in the drug training data, extract the drug features corresponding to the sample from the database of the medical e-commerce platform according to the drug identification in the sample; extract the user features and user behavior sequence features corresponding to the sample from the database of the medical e-commerce platform according to the user identification in the sample; extract the interaction features corresponding to the sample from the database of the medical e-commerce platform according to the drug identification and user identification in the sample; input the key features into the drug recommendation layer to obtain the drug recommendation results; wherein the key features include drug features, user features, user behavior sequence features and interaction features; according to the drug recommendation results, train the initial drug recommendation model. The above technical solution obtains drug training data with the help of drug embedding events on the pharmaceutical e-commerce platform, ensuring that the collected drug training data can accurately reflect the actual behavior and user preferences of users, thereby improving the quality of the training data of the pharmaceutical recommendation model; at the same time, feature extraction is performed on the drug training data through the feature extraction layer in the initial pharmaceutical recommendation model to obtain key features in multiple dimensions such as drug features, user features, user behavior sequence features and interaction features, which makes up for the defect of small amount of training data of the pharmaceutical recommendation model and makes the drug recommendation results of the pharmaceutical recommendation model more accurate, thereby improving the online recommendation effect of drugs in the pharmaceutical e-commerce platform, and further improving the shopping efficiency and user satisfaction of users.

[0078] Embodiment 3

[0079] Figure 3 This is a schematic diagram of the structure of a drug recommendation model training device provided in the third embodiment of the present invention. This embodiment can be applied to the situation of collecting and extracting features of training data required in the process of drug recommendation model training. The device can be implemented in the form of hardware and / or software and can be configured in an electronic device. It should be noted that the initial drug recommendation model in the embodiment of the present invention includes a feature extraction layer and a drug recommendation layer. Figure 3 As shown, the device comprises:

[0080] The drug training data acquisition module 301 is used to acquire drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform;

[0081] The key feature extraction module 302 is used to extract features from drug training data through a feature extraction layer to obtain key features;

[0082] The drug recommendation result determination module 303 is used to input key features into the drug recommendation layer to obtain drug recommendation results;

[0083] The medicine recommendation model training module 304 is used to train the initial medicine recommendation model according to the drug recommendation results.

[0084] The technical solution of the embodiment of the present invention obtains drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform; extracts features from the drug training data through the feature extraction layer to obtain key features; inputs the key features into the drug recommendation layer to obtain drug recommendation results; and trains the initial pharmaceutical recommendation model based on the drug recommendation results. The above technical solution obtains drug training data with the help of drug embedding events on the pharmaceutical e-commerce platform, ensuring that the collected drug training data can accurately reflect the actual behavior and user preferences of users, thereby improving the quality of the training data of the pharmaceutical recommendation model; at the same time, the feature extraction layer in the initial pharmaceutical recommendation model extracts features from the drug training data to obtain key features of multiple dimensions, which makes up for the defect of small amount of training data of the pharmaceutical recommendation model, making the drug recommendation results of the pharmaceutical recommendation model more accurate, thereby improving the online recommendation effect of drugs on the pharmaceutical e-commerce platform, and further improving the shopping efficiency and user satisfaction of users.

[0085] Optionally, the drug embedding event includes a drug exposure event, a drug click event, and a drug order event; the drug training data includes first drug training data, second drug training data, and third drug training data;

[0086] The drug training data acquisition module 301 is specifically used for:

[0087] Obtaining first drug training data corresponding to the drug exposure event within a first time period from a database of the pharmaceutical e-commerce platform;

[0088] Acquire second drug training data corresponding to the drug click event in the second time period from the first drug training data; wherein the first time period includes the second time period;

[0089] The third drug training data corresponding to the drug ordering event within the third time period is obtained from the second drug training data; wherein the first time period includes the third time period; and the third time period is greater than the second time period.

[0090] Optionally, the key features include drug features, user features, user behavior sequence features, and interaction features;

[0091] The key feature extraction module 302 includes:

[0092] A drug feature extraction unit is used to extract drug features corresponding to each sample in the drug training data from the database of the pharmaceutical e-commerce platform according to the drug identifier in the sample;

[0093] A user feature extraction unit, used to extract user features and user behavior sequence features corresponding to the sample from a database of the pharmaceutical e-commerce platform according to the user identifier in the sample;

[0094] The interactive feature extraction unit is used to extract the interactive features corresponding to the sample from the database of the pharmaceutical e-commerce platform according to the drug identification and user identification in the sample.

[0095] Optionally, the feature extraction layer includes a learnable feature extraction sublayer, a drug category feature extraction sublayer, and a numerical statistical feature extraction sublayer;

[0096] Drug feature extraction unit, including:

[0097] The drug learnable feature extraction subunit is used to extract the drug learnable features corresponding to the drug identification from the database of the pharmaceutical e-commerce platform through the learnable feature extraction sublayer according to the drug identification in the sample;

[0098] The drug category feature extraction subunit is used to extract the drug category feature corresponding to the drug identifier from the database of the pharmaceutical e-commerce platform through the drug category feature extraction sublayer according to the drug identifier in the sample;

[0099] The drug numerical statistical feature extraction subunit is used to extract the drug numerical statistical features corresponding to the drug identification from the database of the pharmaceutical e-commerce platform through the numerical statistical feature extraction sublayer according to the drug identification in the sample and the preset statistical time;

[0100] The drug feature extraction subunit is used to combine the drug learnable features, drug category features and drug numerical statistical features to obtain the drug features corresponding to the drug identification.

[0101] Optionally, the user feature extraction unit is specifically used to:

[0102] According to the user identifier in the sample, the user learnable features corresponding to the user identifier are extracted from the database of the medical e-commerce platform through the learnable feature extraction sublayer;

[0103] According to the user ID and the preset statistical time in the sample, the user numerical statistical features corresponding to the user ID are extracted from the database of the medical e-commerce platform through the numerical statistical feature extraction sublayer;

[0104] The user's learnable features and the user's numerical statistical features are combined to obtain the user features corresponding to the user ID.

[0105] Optionally, an interactive feature extraction unit is specifically used to:

[0106] According to the drug identification, user identification and preset statistical time in the sample, the interaction features corresponding to the sample are extracted from the database of the pharmaceutical e-commerce platform through the numerical statistical feature extraction sublayer.

[0107] Optionally, the drug category feature extraction subunit is specifically used for:

[0108] According to the drug identification in the sample, extract at least one drug keyword corresponding to the drug identification from a database of the pharmaceutical e-commerce platform;

[0109] Perform word embedding processing on drug keywords to obtain embedding features corresponding to drug keywords;

[0110] The embedded features corresponding to each drug keyword are merged to obtain the drug category features corresponding to the drug identification.

[0111] The medicine recommendation model training device provided in the embodiment of the present invention can execute the medicine recommendation model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each medicine recommendation model training method.

[0112] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0113] Embodiment 4

[0114] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0115] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0116] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0117] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a medicine recommendation model training method.

[0118] In some embodiments, the medicine recommendation model training method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the medicine recommendation model training method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the medicine recommendation model training method in any other appropriate manner (e.g., by means of firmware).

[0119] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0120] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0121] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0122] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0123] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0124] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0125] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0126] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for training a medicine recommendation model, characterized in that: The initial medicine recommendation model includes a feature extraction layer and a medicine recommendation layer, and the method includes: Obtain drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform; Performing feature extraction on the drug training data through the feature extraction layer to obtain key features; Inputting the key features into the drug recommendation layer to obtain drug recommendation results; The initial medicine recommendation model is trained according to the drug recommendation results.

2. The method according to claim 1, characterized in that The drug embedding events include drug exposure events, drug click events, and drug order events; the drug training data include first drug training data, second drug training data, and third drug training data; The step of obtaining drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform includes: Obtaining first drug training data corresponding to the drug exposure event within a first time period from a database of the pharmaceutical e-commerce platform; Acquire second drug training data corresponding to the drug click event within a second time period from the first drug training data; wherein the first time period includes the second time period; Obtain third drug training data corresponding to a drug ordering event within a third time period from the second drug training data; wherein the first time period includes the third time period; and the third time period is greater than the second time period.

3. The method according to claim 1, characterized in that The key features include drug features, user features, user behavior sequence features and interaction features; The feature extraction layer extracts features from the drug training data to obtain key features, including: For each sample in the drug training data, extracting drug features corresponding to the sample from the database of the pharmaceutical e-commerce platform according to the drug identifier in the sample; According to the user identifier in the sample, extract the user characteristics and user behavior sequence characteristics corresponding to the sample from the database of the pharmaceutical e-commerce platform; According to the drug identification and user identification in the sample, the interaction features corresponding to the sample are extracted from the database of the pharmaceutical e-commerce platform.

4. The method according to claim 3, characterized in that The feature extraction layer includes a learnable feature extraction sublayer, a drug category feature extraction sublayer and a numerical statistical feature extraction sublayer; According to the drug identification in the sample, the drug features corresponding to the sample are extracted from the database of the pharmaceutical e-commerce platform, including: According to the drug identification in the sample, extracting the drug learnable features corresponding to the drug identification from the database of the pharmaceutical e-commerce platform through the learnable feature extraction sublayer; According to the drug identification in the sample, extracting the drug category feature corresponding to the drug identification from the database of the pharmaceutical e-commerce platform through the drug category feature extraction sublayer; According to the drug identification in the sample and the preset statistical time, the drug numerical statistical features corresponding to the drug identification are extracted from the database of the pharmaceutical e-commerce platform through the numerical statistical feature extraction sublayer; The drug learnable features, the drug category features and the drug numerical statistical features are combined to obtain the drug features corresponding to the sample.

5. The method according to claim 4, characterized in that According to the user identifier in the sample, the user features corresponding to the sample are extracted from the database of the pharmaceutical e-commerce platform, including: According to the user identifier in the sample, extracting the user learnable feature corresponding to the user identifier from the database of the pharmaceutical e-commerce platform through the learnable feature extraction sublayer; According to the user identifier in the sample and the preset statistical time, the user numerical statistical features corresponding to the user identifier are extracted from the database of the pharmaceutical e-commerce platform through the numerical statistical feature extraction sublayer; The user learnable features and the user numerical statistical features are combined to obtain user features corresponding to the sample.

6. The method according to claim 4, characterized in that According to the drug identifier and user identifier in the sample, the interaction features corresponding to the sample are extracted from the database of the pharmaceutical e-commerce platform, including: According to the drug identification, user identification and the preset statistical time in the sample, the interaction features corresponding to the sample are extracted from the database of the pharmaceutical e-commerce platform through the numerical statistical feature extraction sublayer.

7. The method according to claim 4, characterized in that The extracting, according to the drug identification in the sample, the drug category feature corresponding to the drug identification from the database of the pharmaceutical e-commerce platform through the drug category feature extraction sublayer includes: According to the drug identification in the sample, extracting at least one drug keyword corresponding to the drug identification from a database of the pharmaceutical e-commerce platform; Performing word embedding processing on the drug keywords to obtain embedding features corresponding to the drug keywords; The embedded features corresponding to each drug keyword are merged to obtain the drug category features corresponding to the drug identification.

8. A medicine recommendation model training device, characterized in that: The initial medicine recommendation model includes a feature extraction layer and a medicine recommendation layer, and the device includes: The drug training data acquisition module is used to obtain drug training data corresponding to drug embedding events from the database of the pharmaceutical e-commerce platform; A key feature extraction module, used to extract features from the drug training data through the feature extraction layer to obtain key features; A drug recommendation result determination module, used for inputting the key features into the drug recommendation layer to obtain a drug recommendation result; The medicine recommendation model training module is used to train the initial medicine recommendation model according to the drug recommendation results.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the medicine recommendation model training method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the medicine recommendation model training method according to any one of claims 1 to 7 when executed.