WO2021151323A1 - 药物推荐方法、装置、设备及介质 - Google Patents

药物推荐方法、装置、设备及介质 Download PDF

Info

Publication number
WO2021151323A1
WO2021151323A1 PCT/CN2020/124216 CN2020124216W WO2021151323A1 WO 2021151323 A1 WO2021151323 A1 WO 2021151323A1 CN 2020124216 W CN2020124216 W CN 2020124216W WO 2021151323 A1 WO2021151323 A1 WO 2021151323A1
Authority
WO
WIPO (PCT)
Prior art keywords
drug
recommendation
result
model
words
Prior art date
Application number
PCT/CN2020/124216
Other languages
English (en)
French (fr)
Inventor
刘卓
朱昭苇
孙行智
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021151323A1 publication Critical patent/WO2021151323A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to a drug recommendation method, drug recommendation method, device, device, and medium.
  • most of the existing technical solutions are for positive preference words to recommend, resulting in the recommendation result will contain user dislike information, especially when the positive preference words and negative preference words are ambiguous. As a result, users can view information they do not like, and the recommendation accuracy is not high, which affects the user's experience, and there is a risk of losing users.
  • This application provides a drug recommendation, a drug recommendation method, a device, a computer device, and a storage medium, which enables accurate recommendation of drug data to users, improves the accuracy of drug recommendation, avoids the recommendation of unfavorable drug data to users, and improves To improve user experience satisfaction and improve the effectiveness of topic recommendation, this application is suitable for smart medical and other fields, which can further promote the construction of smart cities.
  • a method of drug recommendation including:
  • the recognition result includes a positive result and a negative result
  • the positive result includes at least one positive characterization word
  • the negative result includes at least one negative characterization word
  • the drug type in the third recommendation result is removed from the first recommendation result to obtain the final recommendation result corresponding to the user's comprehensive information, and the drug type matching the final recommendation result is obtained from the database Medication data, and recommend the acquired medication data to the user.
  • a drug recommendation device including:
  • the obtaining module is used to receive the drug recommendation request of the user, and obtain the user's comprehensive information in the drug recommendation request;
  • the recognition module is configured to perform word sense recognition on the user comprehensive information through a text recognition model to obtain a recognition result; the recognition result includes a positive result and a negative result; the positive result includes at least one positive characterizing word, and the negative result Including at least one negative characterization word;
  • the first recommendation module is configured to input all the positive characterization words into a drug recommendation model, and perform drug type identification on all the positive characterization words through the drug recommendation model to obtain a first recommendation result;
  • the combination module is used to perform word meaning conversion on each of the negative characterization words to obtain the conversion words corresponding to each of the negative characterization words, and respectively combine all the positive characterization words with each of the conversion words to obtain The combination set corresponding to the conversion word;
  • the second recommendation module is configured to input each of the combination sets into the drug recommendation model, and identify the drug type of each combination set through the drug recommendation model to obtain the second corresponding to each combination set. Recommended results;
  • the third recommendation module is used to deduplicate all the drug types in the second recommendation result to obtain the third recommendation result
  • the first output module is configured to remove the drug type in the third recommendation result from the first recommendation result to obtain the final recommendation result corresponding to the user's comprehensive information, and obtain the final recommendation result from the database And recommend the obtained drug data to the user.
  • a computer device includes a memory, a processor, and a computer program that is stored in the memory and can run on the processor, and the processor implements the steps of the drug recommendation method when the computer program is executed.
  • a computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • the recognition result includes a positive result and a negative result
  • the positive result includes at least one positive characterization word
  • the negative result includes at least one negative characterization word
  • the drug type in the third recommendation result is removed from the first recommendation result to obtain the final recommendation result corresponding to the user's comprehensive information, and the drug type matching the final recommendation result is obtained from the database Medication data, and recommend the acquired medication data to the user.
  • One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
  • the recognition result includes a positive result and a negative result
  • the positive result includes at least one positive characterization word
  • the negative result includes at least one negative characterization word
  • the drug type in the third recommendation result is removed from the first recommendation result to obtain the final recommendation result corresponding to the user's comprehensive information, and the drug type matching the final recommendation result is obtained from the database Medication data, and recommend the acquired medication data to the user.
  • a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the steps of the drug recommendation method.
  • the drug recommendation method, device, computer equipment, and storage medium provided in this application obtain the user's comprehensive information in the drug recommendation request by receiving the user's drug recommendation request; use a text recognition model to perform word meaning on the user's comprehensive information Recognize, and obtain the recognition result; input all the positive characterization words into the drug recommendation model, and perform drug type recognition on all the positive characterization words through the drug recommendation model to obtain the first recommendation result; add each of the negative characterization words Perform word meaning conversion to obtain conversion words corresponding to each of the negative characterization words, and combine all the positive characterization words with each of the conversion words to obtain a combination set corresponding to the conversion words; combine each of the combinations
  • the set is input into the drug recommendation model, the drug type identification is performed on each combination set through the drug recommendation model, and the second recommendation result corresponding to each combination set is obtained; all the second recommendation results are
  • the drug type of the user is deduplicated to obtain the third recommendation result; the drug type in the third recommendation result is removed from the first recommendation result, and the final recommendation result corresponding to
  • this application provides a drug recommendation method, which is recognized by a text recognition model by acquiring comprehensive user information
  • the positive characterization words and negative characterization words contained in the user's comprehensive information are entered into the drug recommendation model, and the drug type is identified to obtain the first recommendation result.
  • the negative characterization words are converted into conversion words by word meaning conversion. Combine each conversion word with all positive characterization words to obtain a combination set, identify the drug type of each combination set through the drug recommendation model, and obtain the second recommendation result, de-duplicate all the second recommendation results, and obtain the third recommendation result.
  • the first recommendation result removes the drug type contained in the third recommendation result, and the final recommendation result is obtained and recommended to the user, which realizes the accurate recommendation of drug data to the user, can provide the user's favorite drug list, and improves the accuracy of drug recommendation , To avoid showing the data of unfavorable drugs to users, especially allergic drug data, improve user experience satisfaction, and improve the effectiveness of drug recommendations.
  • FIG. 1 is a schematic diagram of the application environment of the drug recommendation method in an embodiment of the present application
  • Fig. 2 is a flowchart of a drug recommendation method in an embodiment of the present application
  • FIG. 3 is a flowchart of step S10 of the drug recommendation method in an embodiment of the present application.
  • FIG. 4 is a flowchart of step S20 of the drug recommendation method in an embodiment of the present application.
  • FIG. 5 is a flowchart of step S20 of a drug recommendation method in another embodiment of the present application.
  • FIG. 6 is a flowchart of step S70 of the drug recommendation method in an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a medicine recommendation device in an embodiment of the present application.
  • FIG. 8 is a functional block diagram of an acquisition module of a medicine recommendation device in an embodiment of the present application.
  • Fig. 9 is a schematic diagram of a computer device in an embodiment of the present application.
  • the drug recommendation method provided in this application can be applied in the application environment as shown in Fig. 1, in which the client (computer equipment) communicates with the server via the network.
  • the client includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a drug recommendation method is provided, and the technical solution mainly includes the following steps S10-S70:
  • S10 Receive a medication recommendation request from a user, and obtain user comprehensive information in the medication recommendation request.
  • the user is a user with unhealthy symptoms such as poor body surface, low physical fitness, or poor metabolism.
  • a list of recommended drugs that the user likes and the user is not allergic to after the user completes the input of the user’s comprehensive information and confirms it, triggers the drug recommendation request, the drug recommendation request contains the user’s comprehensive information, and the user’s comprehensive information
  • the information is the symptoms and preferences of the user embodied by the user.
  • the user's comprehensive information includes positive characterization words and negative characterization words.
  • the positive characterization words are words that the user expresses symptoms or/and preferences through positive semantics.
  • the negative characterization words are words that the user expresses symptoms or/and preferences through negative semantics.
  • the user’s comprehensive information is "I feel dry and tongue recently, do not have a fever, do not cough, want liquid, non-infusion, non-bitter, "Non-granule conditioning products", the positive characterizing words are “dry mouth”, “dry tongue” and “liquid”, and the negative characterizing words are "no fever”, “no cough”, “non-infusion”, “no bitterness” and " “Non-granules”, in which the method of obtaining the user's comprehensive information can be set according to requirements, for example, it can be read through the text content entered in the application product, and the dialog output can be conducted with the user through the robot dialog management in the application product Obtained from the text content.
  • the recommendation system can also be applied to most application scenarios.
  • the user's preferences will change at every moment, and it is possible to receive different user-related data recommendation requests.
  • the user data in the data recommendation request can be passed in the user
  • the voice data recorded by the app product is then converted into text content, and it can also be obtained from the text content of the user’s emotions after the user photographs the user’s face through the app product.
  • User data is the text description of the data that the user wants to obtain at this time of preferences and non-favors. Affirmative characterization word, negative characterization word, positive characterization word, negative characterization word.
  • the positive words include "recent", "positive” and “hot”, and the negative words include "non-entertainment" and "not scary.”
  • the step S10 that is, the receiving of the user's drug recommendation request, includes:
  • a drug recommendation request from a user is received, and the drug recommendation request includes the information to be recommended, and the information to be recommended is input by the user on the application product that is related to the user's symptoms or/and preferences
  • the method of obtaining the information can be set according to needs. For example, the method of obtaining can be obtained by the user clicking the button after inputting on the application product, or according to the information to be recommended contained in the data recommendation request Storage path acquisition and so on.
  • S102 Identify the file type of the to-be-recommended information through the information recognition model, and obtain a type result.
  • the information recognition model is a preset recognition model for recognizing the information to be recommended
  • the information to be recommended is input to the information recognition model
  • the information recognition model is for the information to be recommended Perform file type recognition, and determine the type result according to the format of the file type of the information to be recommended.
  • the type result includes text, voice, and image.
  • the information to be recommended is an audio file, it is recognized by the information recognition model
  • the type result is speech.
  • S103 Obtain a conversion model that matches the type result, and perform text conversion on the to-be-recommended information through the conversion model to obtain the user comprehensive information.
  • the conversion model corresponding to the type result is determined according to the type result, and the conversion model includes a text conversion model, a voice conversion model, and an image conversion model, that is, if the type result is text, the text is obtained A conversion model. If the type result is speech, then a voice conversion model is obtained. If the type result is an image, then an image conversion model is obtained.
  • the conversion model is a trained neural network model. A targeted conversion model can improve conversion efficiency and accuracy.
  • the user input information is input into a conversion model corresponding to the type result, and a text conversion is performed through the conversion model, and the text conversion is a method of converting the to-be-recommended information of text, voice, or image into plain text content
  • the conversion process, the text conversion includes the conversion process of the voice recognition technology in the voice conversion model, and also includes the conversion process of the facial emotion recognition technology in the image conversion model, wherein the voice recognition technology is a research object of speech,
  • the text in the voice is automatically recognized through the voice-to-text conversion.
  • the process of the voice-to-text conversion is to preprocess the voice information (VAD, that is, the mute removal at the beginning and the end) and the sound is divided into frames, and each frame after the sound is divided into frames Perform feature extraction, extract the feature vector containing sound information in each frame, convert each feature vector into an acoustic model, and convert it into its corresponding phoneme vector. Look up the Chinese or the corresponding phoneme vector of each phoneme vector in the dictionary library. In English, the probability of correlation between words or words and words is recognized through the speech model, and finally the text with the highest probability is obtained, that is, the converted plain text content.
  • the facial emotion recognition technology is After extracting the features of the core parts of the facial expression (eyes, eyebrows, nose and mouth), the technology is used to identify the results related to the emotional description of the person, and the converted plain text content is determined as the user's comprehensive information.
  • the comprehensive user information is obtained from the information to be recommended, which provides more information.
  • This input channel provides users with improved user experience and text conversion of the information to be recommended through a more targeted conversion model, which improves the quality and effectiveness of the conversion, and improves the accuracy of the conversion.
  • S20 Perform word sense recognition on the user comprehensive information through a text recognition model to obtain a recognition result; the recognition result includes a positive result and a negative result; the positive result includes at least one positive characterization word, and the negative result includes at least one Negative representation words.
  • the text recognition model is a neural network model that is based on the Word2vec model and is trained.
  • the text recognition model is used to recognize positive and negative characterization words in the text.
  • the network structure of the text recognition model includes The network structure of the Word2vec model, the text recognition model includes the Word2vec algorithm, the Word2vec algorithm is to convert each word or word of the input text into a corresponding word vector, according to the distance between the converted word vector Judging the (morphological and semantic) similarity between each other, and outputting the recognition result.
  • the word meaning recognition includes positive word meaning recognition and negative word recognition.
  • the word meaning recognition is the recognition of the word meaning of each unit word through the Word2vec algorithm
  • the positive word recognition is to identify the positive features of the noun phrase of the unit words after each sequence labeling to obtain the sentence to be processed
  • the negative word recognition is to label the sequence in the unit sentence as "O" ( "O" means that the unit words that do not belong to any type, that is, do not belong to the noun phrase) are subjected to the negative character feature extraction, and based on the extracted negative character features, it is recognized whether the unit sentence contains a negative word
  • the recognition result includes The affirmative result and the negative result, the recognition result indicates the user's symptoms or/and preferences, and the affirmative result is a collection of words with positive semantics that the user is interested in, likes, and characterized by symptoms
  • the positive result includes several positive characterization words, the positive characterization words are words of interest or preference or symptom characterization, there are no negative words in the positive characterization words, and the positive result is that the user is not interested A collection of words with negative,
  • step S20 that is, performing word sense recognition on the user comprehensive information through a text recognition model, includes:
  • S201 Perform sentence splitting on the user integrated information through the text recognition model to obtain each unit sentence.
  • the sentence splitting is the splitting of the user comprehensive information into the unit sentences
  • the sentence splitting is the splitting of the user comprehensive information according to the punctuation marks in the user comprehensive information.
  • the separated text is determined as the unit sentence, and the unit sentence does not contain punctuation.
  • the user’s comprehensive information is "I feel dry and tongue recently, don’t have a fever, don’t cough, want liquid, non-infusion , Non-bitter, non-infusion conditioning products”, divided into unit sentences: “I feel dry and tongue recently”, “No fever”, “No cough”, “Want liquid”, “Non-infusion”, “No “Bitterness” and “non-granulated conditioning products”.
  • the split word processing is performed on each of the unit sentences through the text recognition model, and the split word processing is to split each of the unit sentences into one word or one word, after being split
  • the word or word of is determined as the unit word, and is associated with the corresponding unit sentence, and each unit word is labeled using the BIO sequence labeling method, and the BIO sequence labeling method is to label each unit word as "BX", "IX" or "O".
  • BX means that the unit word in which the word is located belongs to type X and the word is at the beginning of the unit word
  • IX means that the unit word in which this word is located belongs to type X and the word is in the middle or end of the unit word
  • O means not belonging to any type, where X is expressed as a noun phrase (Noun Phrase, NP).
  • S203 Perform positive word meaning recognition on all the unit words corresponding to the unit sentence through the text recognition model to obtain at least one sentence to be processed, and negate all the unit sentences corresponding to the sentence to be processed Word recognition, detecting whether the unit sentence contains negative words.
  • the positive word sense recognition is performed on each of the unit words. Affirmative features are identified, and the sentence to be processed is obtained.
  • the affirmative features are features similar to the subject, for example: the user’s comprehensive information is "I feel dry and tongue recently, do not have a fever, do not cough, want liquid, non-infusion , Non-bitter, non-granule conditioning products”, after affirmative word meaning recognition, the sentences to be processed are "dry mouth”, “dry tongue”, “fever”, “cough”, “liquid”, “infusion”, “bitterness” , “Infusion” and “Conditioning”.
  • the negative word in the unit sentence corresponding to each sentence to be processed is recognized through the text recognition model, and the negative word recognition is performed on the unit word whose sequence is marked as "O" in the unit sentence.
  • Negative word feature extraction according to the extracted negative word features, identify whether the unit sentence contains negative words, the negative words include "non", “no", “no”, “di”, etc., and the detection is related to each Whether the unit sentence corresponding to the sentence to be processed contains the negative word.
  • the method further includes:
  • the sentence to be processed is recorded as the positive characterizing word.
  • This application realizes the sentence splitting of the user comprehensive information through the text recognition model to obtain each unit sentence; the text recognition model splits the words of the unit sentence to obtain the unit corresponding to the unit sentence Words; through the text recognition model, all the unit words corresponding to the unit sentence are identified to obtain at least one sentence to be processed, and all the unit sentences corresponding to the sentence to be processed are negatived Word recognition, detecting whether the unit sentence contains a negative word; if it is detected that the negative word does not exist in the unit sentence corresponding to the sentence to be processed, the sentence to be processed is determined as the positive characterization Words; all of the positive characterization words are determined as the positive results.
  • sentence splitting and word splitting are realized through the user's comprehensive information, and then positive word recognition and negative word recognition are performed through the text recognition model, and automatic recognition
  • the positive characterization words in the user's comprehensive information are extracted, which improves the accuracy and effectiveness of recognition, and ensures the recognition quality of the positive characterization words.
  • the sentence to be processed and the unit sentence corresponding to the sentence to be processed are The negative words are merged, that is, the negative words in the unit sentence corresponding to the sentence to be processed are placed in front of the sentence to be processed, merged into one word, and the merged word is recorded as the State the negative representation word.
  • This application uses the text recognition model to split the user's comprehensive information to obtain each unit sentence; uses the text recognition model to split the unit sentence to obtain the unit word corresponding to the unit sentence; Perform positive word meaning recognition on all the unit words corresponding to the unit sentence through the text recognition model to obtain at least one sentence to be processed, and perform negative word recognition on all the unit sentences corresponding to the sentence to be processed , It is detected whether the unit sentence contains a negative word; if it is detected that the unit sentence corresponding to the sentence to be processed contains the negative word, the sentence to be processed is corresponding to the sentence to be processed The negative words in the unit sentence of the unit sentence are combined to obtain the negative characterization words; all the negative characterization words are determined as the negative results.
  • S30 Input all the positive characterization words into a drug recommendation model, and perform drug type identification on all the positive characterization words through the drug recommendation model to obtain a first recommendation result.
  • the drug recommendation model is a multi-class neural network model based on deep learning that has been trained, and the network structure of the drug recommendation model can be set according to requirements.
  • the network structure of the drug recommendation model is a random forest model network.
  • the network structure of the support vector machine model or the network structure of the logistic regression model, etc., as a preference, the network structure of the drug recommendation model is the network structure of the support vector machine model, and all the positive characterization words are input to the A drug recommendation model, which performs word vector conversion and splicing on all positive characterization words through the drug recommendation model, and then converts the spliced array into a vector matrix, and performs the drug type identification on the vector matrix, and the drug type Recognition refers to extracting drug features from the converted vector matrix, and identifying a list of recommended drug types based on the extracted drug features.
  • the drug features are features related to the subject, and the list of identified recommended drug types is determined as The first recommendation result, the first recommendation result is a set of drug types whose confidence levels of all drug types identified according to all the positive characterization words are greater than a preset threshold, preferably, the preset threshold is set Set at 60%, the first recommendation result indicates that among all the drug types, the drug types that meet the meanings of all the positive characterizing words.
  • step S30 that is, before inputting all the positive characterization words into the drug recommendation model, the method includes:
  • the preference sample set includes a plurality of the preference samples, and the preference samples are words related to symptoms or/and preferences input by users collected in history, and the preference samples include at least one positive sign Words, the positive characterization words are words expressed by the user through positive semantics, one of the favorite samples is associated with a drug type label array, and the drug type label array is a label set of drug types related to the favorite sample.
  • S302 Input the favorite sample into a multi-class neural network model containing initial parameters.
  • the favorite samples are input into the multi-class neural network model
  • the multi-class neural network model includes the initial parameters
  • the initial parameters are all the parameters of the multi-class neural network model.
  • the parameters include the parameters in the network structure of the multi-class neural network model, and the multi-class neural network model includes the classification and identification of the drug type of the multi-branch task.
  • S303 Perform drug type identification on the favorite sample through the multi-class neural network model to obtain a sample recommendation result.
  • the drug type recognition refers to extracting drug features from the converted vector matrix, and identifying a list of recommended drug types based on the extracted drug features.
  • the drug features are features related to the characteristics of the drugs.
  • the multi-class neural network model performs the drug type recognition on the favorite sample through a multi-branch task, thereby obtaining the sample recommendation result, and the sample recommendation result is all the identification words identified according to the positive characterization words in the favorite sample A collection of drug types whose confidence level is greater than a preset threshold.
  • the sample recommendation result and the drug type label array are input into the loss function in the multi-class neural network model, and the loss value is calculated by the loss function, and the loss function can be set according to requirements.
  • the loss function is set as a multi-label classification loss function.
  • the convergence condition may be a condition that the value of the loss value is very small and will not drop after 2000 calculations, that is, the value of the loss value is very small and will not drop after 2000 calculations.
  • the convergence condition can also be a condition that the loss value is less than a set threshold, that is, when the loss value is less than When the threshold is set, the training is stopped, and the multi-class neural network model after convergence is recorded as a drug recommendation model, so that when the loss value does not reach the preset convergence condition, the multi-class neural network is continuously updated and iterated
  • the initial parameters of the network model and trigger the step of identifying the preferred sample of the drug type through the multi-class neural network model, and obtaining the recommended result of the sample, which can continuously move closer to the accurate result, so that the accuracy of the recognition is getting higher and higher .
  • S40 Perform word meaning conversion on each of the negative characterization words to obtain conversion words corresponding to each of the negative characterization words, and combine all the positive characterization words with each of the conversion words to obtain the conversion words corresponding to the conversion words. Combination set.
  • each of the negative characterization words is subjected to word meaning conversion, and the word meaning conversion is to remove the negative character in the negative characterization word, or the negative characterization word is subjected to antonym conversion, and the meaning after the word meaning conversion is changed.
  • the negative characterization words are determined as the conversion words, and all the positive characterization words are combined with each of the conversion words one by one to obtain the combination set of the same number as the negative characterization words, that is, the combination set and the One-to-one correspondence between conversion words, for example, positive characterization words include “dry mouth”, “dry tongue” and “liquid”, and negative characterization words include “no fever”, “no cough”, “non-infusion”, “no bitterness” and “Non-granules", the combination sets are "dry mouth, dry tongue, liquid, fever”, “dry mouth, dry tongue, liquid, cough”, “dry mouth, dry tongue, liquid, infusion”, “infusion, bitter taste” And “dry mouth, dry tongue, liquid, granules”.
  • S50 Input each of the combination sets into the drug recommendation model, and identify the drug type of each combination set through the drug recommendation model to obtain a second recommendation result corresponding to each combination set.
  • each of the combination sets is input to the drug recommendation model, and the combination set is converted and spliced by word vector through the drug recommendation model, and then the spliced array is converted into a vector matrix.
  • the vector matrix performs the drug type identification to obtain a second recommendation result corresponding to each combination set, and the second recommendation result is that the confidence levels of all the drug types identified according to one combination set are greater than a preset threshold Collection of types of drugs.
  • the drug type in the third recommendation result is removed from all the drug types in the first recommendation result to obtain the final recommendation result, and the final recommendation result is the recommendation to the user that meets the requirements of the user
  • the drug type list of comprehensive information is obtained from the database and the drug data matching all the drug types in the final recommendation result is obtained.
  • the matching method can be set according to requirements, for example, the text similarity algorithm is used to determine the final recommendation result.
  • the drug type is matched with the similarity between the drug type associated with the drug data, and the drug data is all associated with one or more of the drug types, and the drug data is defined and is related to one or more of the drug types.
  • the data related to the drug type is displayed through the display interface of the application product in the client corresponding to the user to recommend the obtained drug data to the user.
  • This application realizes that by receiving the user's drug recommendation request, the user's comprehensive information in the drug recommendation request is obtained; through the text recognition model, the word meaning of the user's comprehensive information is recognized to obtain the recognition result; all the positives are represented In the word input drug recommendation model, the drug type identification is performed on all the positive characterization words through the drug recommendation model, and the first recommendation result is obtained; Corresponding conversion words, and combine all the positive characterization words with each conversion word to obtain a combination set corresponding to the conversion word; input each combination set into the drug recommendation model, and pass all the combination sets into the drug recommendation model.
  • the drug recommendation model identifies the drug type of each combination set, and obtains a second recommendation result corresponding to each combination set; de-duplicates all the drug types in the second recommendation result to obtain a third recommendation result ; Remove the drug type in the third recommendation result from the first recommendation result to obtain the final recommendation result corresponding to the user's comprehensive information, and obtain from the database matching the drug type in the final recommendation result And recommend the obtained drug data to the user. Therefore, this application provides a drug recommendation method. By obtaining the user's comprehensive information, the text recognition model identifies the positive and negative representations contained in the user's comprehensive information Words, input all positive characterization words into the drug recommendation model, and identify the drug type to obtain the first recommendation result.
  • the negative characterization words are converted to conversion words, and each conversion word is combined with all positive characterization words to obtain the first recommendation result.
  • Combination set through the drug recommendation model to identify the drug type of each combination set, get the second recommendation result, de-duplicate all the second recommendation results, and get the third recommendation result, remove the third recommendation result from the first recommendation result.
  • the type of drug, the final recommendation result is obtained and recommended to the user, the drug data can be accurately recommended to the user, and the user's favorite drug list can be provided, which improves the accuracy rate of drug recommendation and avoids the display of the drug data that does not like to the user.
  • allergic drug data has improved user experience satisfaction and improved the effectiveness of drug recommendations.
  • step S70 that is, obtaining the drug data from the database that matches the drug type in the final recommendation result includes:
  • the text similarity model is a trained deep neural network model.
  • the network structure of the text similarity model is the network structure of the Word2vec model, that is, the text similarity model includes Word2vec similarity An algorithm to transfer all the drug types in the final recommendation result to the text similarity model.
  • S702 Calculate the similarity value of the drug type in the final recommendation result and the drug type associated with each drug data in the database through the Word2vec similarity algorithm in the text similarity model;
  • the text similarity model uses a three-layer neural network, and uses Huffman coding technology to activate the content of the hidden layer of similar word frequency vocabulary to approximately the same position according to the word frequency.
  • Kmeans The clustering method gathers similar word vectors together.
  • a deep neural network model based on the Word2vec model is formed.
  • the Word2vec similarity algorithm is to segment sentences and then map each vocabulary into N dimensions In this way, the similarity comparison of two words can be transformed into an algorithm for comparing the similarity of two word vectors.
  • methods such as cosine similarity and Euclidean distance can be used to perform semantic analysis on the words.
  • the drug data in the database are all associated with the drug type, and the word2vec similarity algorithm can be used to calculate the drug type in the final recommendation result and the The similarity value of the drug type associated with each drug data in the database.
  • S703 Determine the drug data corresponding to the similarity value greater than a preset threshold as recommended drug data, sort all the recommended drug data according to the corresponding similarity value in descending order, and sort the All the recommended drug data are determined to be drug data matching the drug type in the final recommended result.
  • the preset threshold value can be set according to requirements, the similarity value greater than the preset threshold value is determined as the recommended similarity value, and the drug type corresponding to the recommended similarity value is determined
  • the drug data is determined as the recommended drug data, all the recommended drug data are sorted in descending order of their corresponding recommended similarity values, and all the recommended drug data after sorting are recorded as the same as all the recommended drug data.
  • This application realizes that the drug type in the final recommendation result is entered into a preset text similarity model; the Word2vec similarity algorithm in the text similarity model is used to calculate the drug type in the final recommendation result and the The similarity value of the drug type associated with each drug data in the database; the drug data corresponding to the similarity value greater than the preset threshold is determined as the recommended drug data, and all the recommended drug data is based on the similarity corresponding to it The values are sorted in descending order, and all the recommended drug data after sorting are determined as the drug data that matches the drug type in the final recommendation result. In this way, the similarity calculated by the Word2vec similarity algorithm is realized Value, and finally determine the matched drug data, which improves the accuracy and reliability of matching.
  • a medication recommendation device is provided, and the medication recommendation device corresponds to the medication recommendation method in the foregoing embodiment in a one-to-one correspondence.
  • the medicine recommendation device includes an acquisition module 11, an identification module 12, a first recommendation module 13, a combination module 14, a second recommendation module 15, a third recommendation module 16 and a first output module 17.
  • each functional module is as follows:
  • the obtaining module 11 is configured to receive a drug recommendation request from a patient, and obtain comprehensive patient information in the drug recommendation request;
  • the recognition module 12 is configured to perform word sense recognition on the comprehensive patient information through a text recognition model to obtain a recognition result; the recognition result includes a positive result and a negative result; the positive result includes at least one positive characterizing word, and the negative The result includes at least one negative characterization word;
  • the first recommendation module 13 is configured to input all the positive characterization words into a drug recommendation model, and perform drug type identification on all the positive characterization words through the drug recommendation model to obtain a first recommendation result;
  • the combination module 14 is used to perform word meaning conversion on each of the negative characterization words to obtain conversion words corresponding to each of the negative characterization words, and respectively combine all the positive characterization words with each of the conversion words to obtain The combination set corresponding to the predicate conversion word;
  • the second recommendation module 15 is configured to input each combination set into the drug recommendation model, and identify the drug type of each combination set through the drug recommendation model, and obtain the first combination set corresponding to each combination set. 2. Recommendation results;
  • the third recommendation module 16 is used to deduplicate all the drug types in the second recommendation result to obtain the third recommendation result;
  • the first output module 17 is configured to remove the drug type in the third recommendation result from the first recommendation result to obtain the final recommendation result corresponding to the patient's comprehensive information, and obtain the final recommendation result from the database.
  • the drug data matched with the drug type in the result, and the obtained drug data is recommended to the patient.
  • the acquiring module 11 includes:
  • the information acquisition sub-module 111 is configured to acquire the information to be recommended in the drug recommendation request;
  • the type identification sub-module 112 is used to identify the file type of the information to be recommended through the information identification model, and obtain the type result;
  • the conversion sub-module 113 is configured to obtain a conversion model that matches the type result, and perform text conversion on the to-be-recommended information through the conversion model to obtain the comprehensive patient information.
  • Each module in the above-mentioned drug recommendation device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a readable storage medium and an internal memory.
  • the readable storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer readable instructions in the readable storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to implement a medicine recommendation method or medicine recommendation method.
  • the readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor.
  • the method for recommending, or the method for recommending drugs in the above embodiments is implemented when the processor executes computer-readable instructions.
  • one or more readable storage media storing computer readable instructions are provided.
  • the readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage. Medium; the readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by one or more processors, the one or more processors implement the drug recommendation method in the foregoing embodiment.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

本申请涉及人工智能技术领域,提供一种药物推荐方法、装置、设备及介质,方法包括:通过获取用户综合信息,通过文本识别模型识别出用户综合信息中包含的肯定表征词和否定表征词,通过药物推荐模型对所有肯定表征词进行药物类型识别,得到第一推荐结果,同时将否定表征词进行词意转换得到转换词,并将各转换词与所有肯定表征词组合得到组合集,通过药物推荐模型进行药物类型识别,得到第二推荐结果,去重得到第三推荐结果,第一推荐结果中去除第三推荐结果中包含的药物类型,得到最终推荐结果并推荐给用户。本申请实现准确地推荐药物数据给用户,提高了药物推荐的准确率。本申请适用于智慧医疗等领域,可进一步推动智慧城市的建设。

Description

药物推荐方法、装置、设备及介质
本申请要求于2020年9月9日提交中国专利局、申请号为202010940800.7,发明名称为“药物推荐方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种药物推荐方法、药物推荐方法、装置、设备及介质。
背景技术
互联网的出现和普及给用户带来了大量的信息,满足了用户在信息时代对信息的需求,但是随着互联网的迅速发展,信息量也在大幅增长,这会导致用户在面对大量信息时无法从中获得自己真正需要的信息,从而降低了对信息的使用效率。解决这一问题较好的办法就是推荐系统,它可以在大量的信息中为用户推荐合适的内容,以便用户从推荐的内容中获取自己喜好的信息。
发明人发现在实际的大多数应用场景中,用户都希望通过应用程序的相关推荐系统获取自己喜好的信息,比如,如果用户想获取当天自己喜好的最新新闻,就通过应用程序产品的新闻推荐系统推荐相关新闻,如果用户想获取针对症状的喜好的药物,就通过应用程序产品的药物推荐系统推荐药物清单,如果用户想获取最近自己喜欢的发布歌曲,就通过应用程序产品的音乐推荐系统推荐歌曲清单,但是,在现有的技术方案中大部分都是针对肯定喜好词进行推荐,导致推荐结果会存在用户不喜好的信息,特别是在肯定喜好词与否定喜好词模棱两可的情况下,就会造成用户查看到不喜好的信息,推荐准确度不高,影响用户的使用体验,还会存在流失用户的风险。
发明内容
本申请提供一种药物推荐、药物推荐方法、装置、计算机设备及存储介质,实现了准确地推荐药物数据给用户,提高了药物推荐的准确率,避免了不喜好的药物数据推荐给用户,提升了用户的体验满意度,并提升了主题推荐的有效性,本申请适用于智慧医疗等领域,可进一步推动智慧城市的建设。
一种药物推荐方法,包括:
接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;
通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词;
将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;
将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;
将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;
将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;
从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信 息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户。
一种药物推荐装置,包括:
获取模块,用于接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;
识别模块,用于通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词;
第一推荐模块,用于将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;
组合模块,用于将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;
第二推荐模块,用于将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;
第三推荐模块,用于将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;
第一输出模块,用于从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户。一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述药物推荐方法的步骤。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;
通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词;
将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;
将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;
将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;
将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;
从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户。
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;
通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词;
将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定 表征词进行药物类型识别,得到第一推荐结果;
将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;
将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;
将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;
从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户。
一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现上述药物推荐方法的步骤。
本申请提供的药物推荐方法、装置、计算机设备及存储介质,通过接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户,因此,本申请提供了药物推荐方法,通过获取用户综合信息,通过文本识别模型识别出用户综合信息中包含的肯定表征词和否定表征词,将所有肯定表征词输入药物推荐模型中,并进行药物类型识别,得到第一推荐结果,同时将否定表征词进行词意转换得到转换词,并将各转换词与所有肯定表征词组合得到组合集,通过药物推荐模型对各组合集进行药物类型识别,得到第二推荐结果,对所有第二推荐结果去重,得到第三推荐结果,第一推荐结果中去除第三推荐结果中包含的药物类型,得到最终推荐结果并推荐给用户,实现了准确地推荐药物数据给用户,能够提供给用户喜好的药物清单,提高了药物推荐的准确率,避免了不喜好的药物数据展示给用户,特别是过敏的药物数据,提升了用户的体验满意度,并提升了药物推荐的有效性。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中药物推荐方法的应用环境示意图;
图2是本申请一实施例中药物推荐方法的流程图;
图3是本申请一实施例中药物推荐方法的步骤S10的流程图;
图4是本申请一实施例中药物推荐方法的步骤S20的流程图;
图5是本申请另一实施例中药物推荐方法的步骤S20的流程图;
图6是本申请一实施例中药物推荐方法的步骤S70的流程图;
图7是本申请一实施例中药物推荐装置的原理框图;
图8是本申请一实施例中药物推荐装置的获取模块的原理框图;
图9是本申请一实施例中计算机设备的示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的药物推荐方法,可应用在如图1的应用环境中,其中,客户端(计算机设备)通过网络与服务器进行通信。其中,客户端(计算机设备)包括但不限于为各种个人计算机、笔记本电脑、智能手机、平板电脑、摄像头和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一实施例中,如图2所示,提供一种药物推荐方法,其技术方案主要包括以下步骤S10-S70:
S10,接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息。
可理解地,在药物推荐系统的应用场景下,所述用户为自身感觉体表欠佳、体能低或代谢差等不良症状的用户,用户希望能够通过应用程序产品获取针对用户当前的症状情况而推荐的用户喜好的和用户不过敏的药物清单,在用户输入完成所述用户综合信息并确认之后,触发所述药物推荐请求,所述药物推荐请求包含有所述用户综合信息,所述用户综合信息为用户自身体现的症状情况以及对药物喜好的信息,所述用户综合信息包括肯定表征词和否定表征词,所述肯定表征词为用户通过肯定的语义表达症状或/和喜好的词语,所述否定表征词为用户通过否定的语义表达症状或/和喜好的词语,例如:用户综合信息为“最近感觉口干舌燥,不发烧,不咳嗽,想要液体的、非输液、不苦味、非冲剂的调理产品”,肯定表征词有“口干”、“舌燥”和“液体”,否定表征词有“不发烧”、“不咳嗽”、“非输液”、“不苦味”和“非冲剂”,其中,获取所述用户综合信息的方式可以根据需求设定,比如可以通过读取应用程序产品中输入完成的文本内容,可以通过应用程序产品中的机器人对话管理与用户进行对话输出的文本内容中获取。
其中,推荐系统还可以应用在大多数应用场景中,每个时刻用户的喜好都会变化,都有可能接收到用户的不同与喜好相关的数据推荐请求,数据推荐请求中的用户数据可以通过在用户通过应用程序产品录制的语音数据之后将其转换成的文本内容中获取,还可以通过在用户通过应用程序产品拍摄用户的人脸之后进行情绪识别出用户情绪的文本内容中获取等等,所述用户数据为用户此时希望获取到喜好和非喜好的数据的文本描述,肯定表征词否定表征词肯定表征词否定表征词例如:用户数据为“想查看近期发生的积极的、有热度、非娱乐和不惊悚的新闻”,肯定的词语有“近期”“积极”和“热度”,否定的词语有“非娱乐”和“不惊悚”。
在一实施例中,如图3所示,所述步骤S10中,即所述接收到用户的药物推荐请求,包括:
S101,获取所述药物推荐请求中的待推荐信息。
可理解地,接收到用户的药物推荐请求,所述药物推荐请求中包含所述待推荐信息,所述待推荐信息为用户在应用程序产品上输入的与所述用户的症状或/和喜好相关的信息,其获取方式可以根据需要设定,比如获取方式可以为通过所述用户在应用程序产品上输入完后点击按键获取,也可以根据所述数据推荐请求中包含的所述待推荐信息的存储路径获取等等。
S102,通过信息识别模型识别出所述待推荐信息的文件类型,得到类型结果。
可理解地,所述信息识别模型为对所述待推荐信息进行识别的预设的识别模型,将所述待推荐信息输入至所述信息识别模型,所述信息识别模型对所述待推荐信息进行文件类型的识别,根据所述待推荐信息的文件类型的格式确定所述类型结果,所述类型结果包括文本、语音和图像,例如:待推荐信息为音频文件时,通过信息识别模型识别后得到类型结果为语音。
S103,获取与所述类型结果匹配的转换模型,通过所述转换模型对所述待推荐信息进行文本转换,得到所述用户综合信息。
可理解地,根据所述类型结果确定与所述类型结果对应的转换模型,所述转换模型包括文本转换模型、语音转换模型和图像转换模型,即若所述类型结果为文本时,则获取文本转换模型,若所述类型结果为语音时,则获取语音转换模型,若所述类型结果为图像时,则获取图像转换模型,所述转换模型为训练完成的神经网络模型,如此,获取更具针对性的转换模型能够提升转换效率和准确率。将所述用户输入信息输入至与所述类型结果对应的转换模型,通过所述转换模型进行文本转换,所述文本转换为将文本、语音或图像的所述待推荐信息转换成纯文本内容的转换过程,所述文本转换包括语音转换模型中的语音识别技术的转换过程,也包括图像转换模型中的人脸情绪识别技术的转换过程,其中,所述语音识别技术为以语音为研究对象,通过语音文本转换自动识别出语音中的文字,所述语音文本转换的过程为对语音的信息进行预处理(VAD,即首尾端的静音切除)及声音分帧,将声音分帧后的每一帧进行特征提取,提取出每一帧的包含声音信息的特征向量,在将每一特征向量进行声学模型的转换,转成与其对应的音素向量,通过字典库中查找每一个音素向量对应的中文或者英文,再通过语音模型识别出字与字之间或者词语与词语之间的相互关联的概率,最后得出最高概率的文本,即为转换后的纯文本内容,所述人脸情绪识别技术为提取人脸表情核心部位(眼睛,眉毛,鼻子和嘴巴)的特征后进行识别出与人的情绪描述相关的结果的技术,将转换后的纯文本内容确定为所述用户综合信息。
如此,通过对用户输入的所述待推荐信息进行文本、语音和图像的识别,根据不同的识别结果对应不同的转换模型,从所述待推荐信息中获取出所述用户综合信息,提供了多种输入渠道给用户,提升了用户体验度,以及通过更具针对性的转换模型对所述待推荐信息进行文本转换,提高了转换的质量和有效性,并提升了转换的准确率。
S20,通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词。
可理解地,所述文本识别模型为基于Word2vec模型且训练完成的神经网络模型,所述文本识别模型用于识别文本中肯定表征词和否定表征词的模型,所述文本识别模型的网络结构包括所述Word2vec模型的网络结构,所述文本识别模型包含Word2vec算法,所述Word2vec算法为将输入的文本的各个字或词语转换成与其对应的词向量,根据转换后的词向量之间的距离来判断彼此之间的(词法、语义上的)相似性,输出识别结果,所述词义识别包括肯定词义识别和否定字识别,所述词义识别为通过所述Word2vec算法识别出各单元词的词义,所述肯定词义识别为对各序列标注后的所述单元词进行名词短语的肯定特征进行识别,得到所述待处理语句,所述否定字识别为对单元句中的序列标注为“O”(“O”表示不属于任何类型,即不属于名词短语)的单元词进行所述否定字特征提取,根据提取的所述否定字特征识别出单元句中是否包含有否定字,所述识别结果包括所述肯定结果和所述否定结果,所述识别结果表明了用户的症状或/和喜好结果,所述肯定结果为用户感兴趣的、喜好的、症状表征的、带有肯定语义的词语的集合,所述肯定结果包括若干个所述肯定表征词,所述肯定表征词为感兴趣的或者喜好的或者症状表征的词语,所述肯定表征词中无否定字,所述肯定结果为用户不感兴趣的、不喜好的、非症状表征的、带有否定语义的词语的集合,所述否定结果包括若干个所述否定表征词,所述否定表征词为不感兴趣 的或者不喜好的或者非症状表征的词语,所述否定表征词中含有否定字。
在一实施例中,如图4所示,所述步骤S20中,即所述通过文本识别模型,对所述用户综合信息进行词义识别,包括:
S201,通过所述文本识别模型对所述用户综合信息进行语句拆分,得到各单元句。
可理解地,所述语句拆分为将所述用户综合信息拆分成一个个所述单元句,所述语句拆分为将所述用户综合信息按照所述用户综合信息中的标点符号进行隔开,将隔开的文本确定为所述单元句,所述单元句不包含标点符号,例如:用户综合信息为“最近感觉口干舌燥,不发烧,不咳嗽,想要液体的、非输液、不苦味、非冲剂的调理产品”,拆分成单元句为“最近感觉口干舌燥”、“不发烧”、“不咳嗽”、“想要液体的”、“非输液”、“不苦味”和“非冲剂的调理产品”。
S202,通过所述文本识别模型对所述单元句拆分词语,得到与所述单元句对应的单元词。
可理解地,通过所述文本识别模型对各所述单元句进行所述拆分词语处理,所述拆分词语处理为将各所述单元句拆分成一个字或一个词语,被拆分后的字或词语确定为所述单元词,并与其对应的所述单元句关联,以及运用BIO序列标注法给各所述单元词进行标注,所述BIO序列标注法为将每个单元词标注为“B-X”、“I-X”或者“O”。其中,“B-X”表示此字所在的单元词属于X类型并且此字在此单元词的开头,“I-X”表示此字所在的单元词属于X类型并且此字在此单元词的中间或结尾位置,“O”表示不属于任何类型,其中,将X表示为名词短语(Noun Phrase,NP)。
S203,通过所述文本识别模型对所有与所述单元句对应的所述单元词进行肯定词义识别,得到至少一个待处理语句,并对所有与所述待处理语句对应的所述单元句进行否定字识别,检测所述单元句中是否包含有否定字。
可理解地,通过所述文本识别模型中的所述Word2vec算法,对各所述单元词进行所述肯定词义识别,所述肯定词义识别为对各序列标注后的所述单元词进行名词短语的肯定特征进行识别,得到所述待处理语句,所述肯定特征为与主题相似的特征,例如:用户综合信息为“最近感觉口干舌燥,不发烧,不咳嗽,想要液体的、非输液、不苦味、非冲剂的调理产品”,经过肯定词义识别后得到待处理语句有“口干”、“舌燥”、“发烧”、“咳嗽”、“液体”、“输液”、“苦味”、“冲剂”和“调理”。
其中,通过所述文本识别模型识别与各所述待处理语句对应的所述单元句中的否定字,所述否定字识别为对单元句中的序列标注为“O”的单元词进行所述否定字特征提取,根据提取的所述否定字特征识别出单元句中是否包含有否定字,所述否定字包括“非”、“不”、“没”和“除”等等,检测与各所述待处理语句对应的所述单元句中是否包含有所述否定字。
在一实施例中,如图5所示,所述步骤S203之后,即所述检测所述单元句中是否包含有否定字之后,还包括:
S206,若检测到与所述待处理语句对应的所述单元句中不存在所述否定字,将所述待处理语句确定为所述肯定表征词。
可理解地,如果检测到与所述待处理语句对应的所述单元句中不包含任何一个所述否定字,将所述待处理语句记录为所述肯定表征词。
S207,将所有所述肯定表征词确定为所述肯定结果。
可理解地,将所有所述肯定表征词进行汇总,得到所述肯定结果。
本申请实现了通过所述文本识别模型对所述用户综合信息进行语句拆分,得到各单元句;通过所述文本识别模型对所述单元句拆分词语,得到与所述单元句对应的单元词;通过所述文本识别模型对所有与所述单元句对应的所述单元词进行肯定词义识别,得到至少一个待处理语句,并对所有与所述待处理语句对应的所述单元句进行否定字识别,检测所 述单元句中是否包含有否定字;若检测到与所述待处理语句对应的所述单元句中不存在所述否定字,将所述待处理语句确定为所述肯定表征词;将所有所述肯定表征词确定为所述肯定结果,如此,实现了通过对用户综合信息进行语句拆分和拆分词语,再通过文本识别模型进行肯定词义识别和否定字识别,自动识别出用户综合信息中的肯定表征词,提高了识别的准确率和有效性,并且保证了肯定表征词的识别质量。
S204,若检测到与所述待处理语句对应的所述单元句中包含有所述否定字,将所述待处理语句和与所述待处理语句对应的所述单元句中的所述否定字进行组合,得到所述否定表征词。
可理解地,如果检测到与所述待处理语句对应的所述单元句中包含有任何一个所述否定字,将所述待处理语句和与所述待处理语句对应的所述单元句中的所述否定字进行合并,即与所述待处理语句对应的所述单元句中的所述否定字放在所述待处理语句的前面,合并成一个词语,将合并后的该词语记录为所述否定表征词。
S205,将所有所述否定表征词确定为所述否定结果。
可理解地,将所有所述否定表征词进行汇总,得到所述否定结果。
本申请通过所述文本识别模型对所述用户综合信息进行语句拆分,得到各单元句;通过所述文本识别模型对所述单元句拆分词语,得到与所述单元句对应的单元词;通过所述文本识别模型对所有与所述单元句对应的所述单元词进行肯定词义识别,得到至少一个待处理语句,并对所有与所述待处理语句对应的所述单元句进行否定字识别,检测所述单元句中是否包含有否定字;若检测到与所述待处理语句对应的所述单元句中包含有所述否定字,将所述待处理语句和与所述待处理语句对应的所述单元句中的所述否定字进行组合,得到所述否定表征词;将所有所述否定表征词确定为所述否定结果,如此,实现了通过对用户综合信息进行语句拆分和拆分词语,再通过文本识别模型进行肯定词义识别和否定字识别,自动识别出用户综合信息中的否定表征词,提高了识别的准确率和有效性,并且保证了否定表征词的识别质量。
S30,将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果。
可理解地,所述药物推荐模型为训练完成的基于深度学习的多分类神经网络模型,所述药物推荐模型的网络结构可以根据需求设定,比如药物推荐模型的网络结构为随机森林模型的网络结构、支持向量机模型的网络结构或者逻辑回归模型的网络结构等等,作为优选,所述药物推荐模型的网络结构为支持向量机模型的网络结构,将所有所述肯定表征词输入至所述药物推荐模型,通过所述药物推荐模型对所有所述肯定表征词进行词向量转换及拼接,再将拼接后的数组转换成向量矩阵,对该向量矩阵进行所述药物类型识别,所述药物类型识别为对转换后的向量矩阵进行药物特征提取,根据提取的药物特征进行识别出推荐的药物类型的清单,所述药物特征为与主题相关的特征,将识别出推荐的药物类型的清单确定为所述第一推荐结果,所述第一推荐结果为根据所有所述肯定表征词识别出的所有的药物类型的置信度大于预设阈值的药物类型的集合,优选地,所述预设阈值设定为60%,所述第一推荐结果表明了在所有药物类型中符合所有所述肯定表征词的词义的药物类型。
在一实施例中,所述步骤S30之前,即所述将所有所述肯定表征词输入药物推荐模型中之前,包括:
S301,获取包含多个喜好样本的喜好样本集;一个所述喜好样本与一个药物类型标签数组关联;一个所述喜好样本包括至少一个肯定表征词。
可理解地,所述喜好样本集包含有多个所述喜好样本,所述喜好样本为历史收集的用户输入的与症状或/和喜好相关的词语,所述喜好样本中包含有至少一个肯定表征词,所述肯定表征词为用户通过肯定的语义表达的词语,一个所述喜好样本与一个药物类型标签数组关联,所述药物类型标签数组为与所述喜好样本相关的药物类型的标签集合。
S302,将所述喜好样本输入含有初始参数的多分类神经网络模型。
可理解地,将所述喜好样本输入所述多分类神经网络模型,所述多分类神经网络模型包括所述初始参数,所述初始参数为所述多分类神经网络模型的所有参数,所述初始参数包括所述多分类神经网络模型的网络结构中的参数,所述多分类神经网络模型中包含有多分支任务的药物类型的分类识别。
S303,通过所述多分类神经网络模型对所述喜好样本进行药物类型识别,得到样本推荐结果。
可理解地,所述药物类型识别为对转换后的向量矩阵进行药物特征提取,根据提取的药物特征进行识别出推荐的药物类型的清单,所述药物特征为与药物的特性相关的特征,所述多分类神经网络模型通过多分支任务对所述喜好样本进行所述药物类型识别,从而得到所述样本推荐结果,所述样本推荐结果为根据所述喜好样本中的肯定表征词识别出的所有的药物类型的置信度大于预设阈值的药物类型的集合。
S304,根据所述样本推荐结果和所述药物类型标签数组,得到损失值。
可理解地,将所述样本推荐结果和所述药物类型标签数组输入所述多分类神经网络模型中的损失函数,通过所述损失函数计算出所述损失值,所述损失函数可以根据需求设定,比如交叉熵损失函数,多标签分类损失函数等等,作为优选,所述损失函数设定为多标签分类损失函数。
S305,在所述损失值未达到预设的收敛条件时,迭代更新所述多分类神经网络模型的初始参数,直至所述损失值达到所述预设的收敛条件时,将收敛之后的所述多分类神经网络模型记录为药物推荐模型。
可理解地,所述收敛条件可以为所述损失值经过了2000次计算后值为很小且不会再下降的条件,即在所述损失值经过2000次计算后值为很小且不会再下降时,停止训练,并将收敛之后的所述多分类神经网络模型记录为药物推荐模型;所述收敛条件也可以为所述损失值小于设定阈值的条件,即在所述损失值小于设定阈值时,停止训练,并将收敛之后的所述多分类神经网络模型记录为药物推荐模型,如此,在所述损失值未达到预设的收敛条件时,不断更新迭代所述多分类神经网络模型的初始参数,并触发通过所述多分类神经网络模型对所述喜好样本进行药物类型识别,得到样本推荐结果的步骤,可以不断向准确的结果靠拢,让识别的准确率越来越高。
S40,将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集。
可理解地,将各所述否定表征词进行词义转换,所述词义转换为将所述否定表征词中的否定字去除,或者将所述否定表征词进行反义词转换,将词义转换后的所述否定表征词确定为所述转换词,将所有所述肯定表征词与各个所述转换词一一组合,得到与所述否定表征词相同数量的所述组合集,即所述组合集与所述转换词一一对应,例如:肯定表征词有“口干”、“舌燥”和“液体”,否定表征词有“不发烧”、“不咳嗽”、“非输液”、“不苦味”和“非冲剂”,组合集分别为“口干,舌燥,液体,发烧”、“口干,舌燥,液体,咳嗽”、“口干,舌燥,液体,输液”、“输液,苦味”和“口干,舌燥,液体,冲剂”。
S50,将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果。
可理解地,将各所述组合集分别输入至所述药物推荐模型,通过所述药物推荐模型对所述组合集进行词向量转换及拼接,再将拼接后的数组转换成向量矩阵,对该向量矩阵进行所述药物类型识别,得到与各所述组合集对应的第二推荐结果,所述第二推荐结果为根据一个所述组合集识别出的所有的药物类型的置信度大于预设阈值的药物类型的集合。
S60,将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果。
可理解地,对所有所述第二推荐结果进行汇总,并对汇总后的所有所述第二推荐结果进行去重处理,所述去重处理为删除重复的药物类型,将去重后的药物类型的清单确定为所述第三推荐结果。
S70,从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户。
可理解地,在所述第一推荐结果中的所有药物类型中去除所述第三推荐结果中的药物类型,得到所述最终推荐结果,所述最终推荐结果为向用户推荐的符合所述用户综合信息的药物类型清单,从数据库中获取与所述最终推荐结果中的所有药物类型相匹配的药物数据,所述匹配方式可以根据需求设定,比如通过文本相似度算法将最终推荐结果中的药物类型与所述药物数据关联的药物类型之间的相似度进行匹配,所述药物数据都会与一个或多个所述药物类型关联,所述药物数据为已定义的且与一种或多种药物类型相关的数据,将获取的所述药物数据通过与所述用户对应的客户端中的应用程序产品的显示界面进行展示,以推荐给用户。
本申请实现了通过接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户,因此,本申请提供了药物推荐方法,通过获取用户综合信息,通过文本识别模型识别出用户综合信息中包含的肯定表征词和否定表征词,将所有肯定表征词输入药物推荐模型中,并进行药物类型识别,得到第一推荐结果,同时将否定表征词进行词意转换得到转换词,并将各转换词与所有肯定表征词组合得到组合集,通过药物推荐模型对各组合集进行药物类型识别,得到第二推荐结果,对所有第二推荐结果去重,得到第三推荐结果,第一推荐结果中去除第三推荐结果中包含的药物类型,得到最终推荐结果并推荐给用户,实现了准确地推荐药物数据给用户,能够提供给用户喜好的药物清单,提高了药物推荐的准确率,避免了不喜好的药物数据展示给用户,特别是过敏的药物数据,提升了用户的体验满意度,并提升了药物推荐的有效性。
在一实施例中,如图6所示,所述步骤S70中,即所述自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,包括:
S701,将所述最终推荐结果中的药物类型输入预设的文本相似度模型;
可理解地,所述文本相似度模型为训练完成的深度神经网络模型,作为优选,所述文本相似度模型的网络结构为Word2vec模型的网络结构,即所述文本相似度模型包含有Word2vec相似度算法,将所述最终推荐结果中的所有所述药物类型至所述文本相似度模型中。
S702,通过文本相似度模型中的Word2vec相似度算法计算出所述最终推荐结果中的药物类型和与所述数据库中的各药物数据关联的药物类型的相似度值;
可理解地,所述文本相似度模型采用了一个具有三层的神经网络,并且根据词频用哈夫曼编码技术将相似词频词汇的隐藏层激活的内容出于大致相同的位置,最后,通过Kmeans聚类方法,将相似的词向量聚在一起,最后训练完成后形成了基于Word2vec模型 的深度神经网络模型,所述Word2vec相似度算法为通过将句子进行分词,然后将每个词汇映射成N维的词向量,这样可以将两个词汇的相似度比较转化为对两个词向量的相似度比较的算法,其计算过程中可以利用余弦相似度、欧氏距离等方法对词汇进行语义分析,如此,获取所述数据库中所述有所述药物数据,所述数据库中的所述药物数据均与药物类型关联,通过Word2vec相似度算法能够计算出所述最终推荐结果中的药物类型和与所述数据库中的各药物数据关联的药物类型的相似度值。
S703,将与大于预设阈值的所述相似度值对应的药物数据确定为推荐药物数据,将所有推荐药物数据按照与其对应的所述相似度值由大到小的顺序排序,将排序后的所有所述推荐药物数据确定为与所述最终推荐结果中的药物类型相匹配的药物数据。
可理解地,所述预设阈值可以根据需求设置,将大于所述预设阈值的所述相似度值确定为推荐相似值,将与所述推荐相似值对应的所述药物类型对应的所述药物数据确定为所述推荐药物数据,将所有所述推荐药物数据按照与其对应的所述推荐相似值由大到小的顺序进行排序,并将排序后的所有所述推荐药物数据记录为与所述最终推荐结果中的药物类型相匹配的药物数据。
本申请实现了通过将所述最终推荐结果中的药物类型输入预设的文本相似度模型;通过文本相似度模型中的Word2vec相似度算法计算出所述最终推荐结果中的药物类型和与所述数据库中的各药物数据关联的药物类型的相似度值;将与大于预设阈值的所述相似度值对应的药物数据确定为推荐药物数据,将所有推荐药物数据按照与其对应的所述相似度值由大到小的顺序排序,将排序后的所有所述推荐药物数据确定为与所述最终推荐结果中的药物类型相匹配的药物数据,如此,实现了通过Word2vec相似度算法计算出相似度值,最终确定匹配的药物数据,提高了匹配的准确性和可靠性。
在一实施例中,提供一种药物推荐装置,该药物推荐装置与上述实施例中药物推荐方法一一对应。如图7所示,该药物推荐装置包括获取模块11、识别模块12、第一推荐模块13、组合模块14、第二推荐模块15、第三推荐模块16和第一输出模块17。各功能模块详细说明如下:
获取模块11,用于接收到患者的药物推荐请求,获取所述药物推荐请求中的患者综合信息;
识别模块12,用于通过文本识别模型,对所述患者综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词;
第一推荐模块13,用于将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;
组合模块14,用于将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;
第二推荐模块15,用于将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;
第三推荐模块16,用于将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;
第一输出模块17,用于从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述患者综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给患者。
在一实施例中,如图8所示,所述获取模块11包括:
信息获取子模块111,用于获取所述药物推荐请求中的待推荐信息;
类型识别子模块112,用于通过信息识别模型识别出所述待推荐信息的文件类型,得 到类型结果;
转换子模块113,用于获取与所述类型结果匹配的转换模型,通过所述转换模型对所述待推荐信息进行文本转换,得到所述患者综合信息。
关于药物推荐装置的具体限定可以参见上文中对于药物推荐方法的限定,在此不再赘述。上述药物推荐装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括可读存储介质、内存储器。该可读存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为可读存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种药物推荐方法,或者药物推荐方法。本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中药物推荐方法,或者处理器执行计算机可读指令时实现上述实施例中药物推荐方法。
在一个实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质;该可读存储介质上存储有计算机可读指令,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现上述实施例中药物推荐方法。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质或易失性可读存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种药物推荐方法,其中,包括:
    接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;
    通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词;
    将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;
    将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;
    将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;
    将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;
    从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户。
  2. 如权利要求1所述的药物推荐方法,其中,所述接收到用户的药物推荐请求,包括:
    获取所述药物推荐请求中的待推荐信息;
    通过信息识别模型识别出所述待推荐信息的文件类型,得到类型结果;
    获取与所述类型结果匹配的转换模型,通过所述转换模型对所述待推荐信息进行文本转换,得到所述用户综合信息。
  3. 如权利要求1所述的药物推荐方法,其中,所述通过文本识别模型,对所述用户综合信息进行词义识别,包括:
    通过所述文本识别模型对所述用户综合信息进行语句拆分,得到各单元句;
    通过所述文本识别模型对所述单元句拆分词语,得到与所述单元句对应的单元词;
    通过所述文本识别模型对所有与所述单元句对应的所述单元词进行肯定词义识别,得到至少一个待处理语句,否定字识别并对所有与所述待处理语句对应的所述单元句进行否定字识别,检测所述单元句中是否包含有否定字;
    若检测到与所述待处理语句对应的所述单元句中包含有所述否定字,将所述待处理语句和与所述待处理语句对应的所述单元句中的所述否定字进行组合,得到所述否定表征词;
    将所有所述否定表征词确定为所述否定结果。
  4. 如权利要求3所述的药物推荐方法,其中,所述检测所述单元句中是否包含有否定字之后,还包括:
    若检测到与所述待处理语句对应的所述单元句中不存在所述否定字,将所述待处理语句确定为所述肯定表征词;
    将所有所述肯定表征词确定为所述肯定结果。
  5. 如权利要求1所述的药物推荐方法,其中,所述将所有所述肯定表征词输入药物推荐模型中之前,包括:
    获取包含多个喜好样本的喜好样本集;一个所述喜好样本与一个药物类型标签数组关联;一个所述喜好样本包括至少一个肯定表征词;
    将所述喜好样本输入含有初始参数的多分类神经网络模型;
    通过所述多分类神经网络模型对所述喜好样本进行药物类型识别,得到样本推荐结果;
    根据所述样本推荐结果和所述药物类型标签数组,得到损失值;
    在所述损失值未达到预设的收敛条件时,迭代更新所述多分类神经网络模型的初始参 数,直至所述损失值达到所述预设的收敛条件时,将收敛之后的所述多分类神经网络模型记录为药物推荐模型。
  6. 如权利要求1所述的药物推荐方法,其中,所述自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,包括:
    将所述最终推荐结果中的药物类型输入预设的文本相似度模型;
    通过文本相似度模型中的Word2vec相似度算法计算出所述最终推荐结果中的药物类型和与所述数据库中的各药物数据关联的药物类型的相似度值;
    将与大于预设阈值的所述相似度值对应的药物数据确定为推荐药物数据,将所有推荐药物数据按照与其对应的所述相似度值由大到小的顺序排序,将排序后的所有所述推荐药物数据确定为与所述最终推荐结果中的药物类型相匹配的药物数据。
  7. 一种药物推荐装置,其中,包括:
    获取模块,用于接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;
    识别模块,用于通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词;
    第一推荐模块,用于将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;
    组合模块,用于将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;
    第二推荐模块,用于将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;
    第三推荐模块,用于将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;
    第一输出模块,用于从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户。
  8. 如权利要求7所述的药物推荐装置,其中,所述获取模块包括:
    信息获取子模块,用于获取所述药物推荐请求中的待推荐信息;
    类型识别子模块,用于通过信息识别模型识别出所述待推荐信息的文件类型,得到类型结果;
    转换子模块,用于获取与所述类型结果匹配的转换模型,通过所述转换模型对所述待推荐信息进行文本转换,得到所述用户综合信息。
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现如下步骤:
    接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;
    通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词;
    将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;
    将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;
    将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合 集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;
    将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;
    从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户。
  10. 如权利要求9所述的计算机设备,其中,所述接收到用户的药物推荐请求,包括:
    获取所述药物推荐请求中的待推荐信息;
    通过信息识别模型识别出所述待推荐信息的文件类型,得到类型结果;
    获取与所述类型结果匹配的转换模型,通过所述转换模型对所述待推荐信息进行文本转换,得到所述用户综合信息。
  11. 如权利要求9所述的计算机设备,其中,所述通过文本识别模型,对所述用户综合信息进行词义识别,包括:
    通过所述文本识别模型对所述用户综合信息进行语句拆分,得到各单元句;
    通过所述文本识别模型对所述单元句拆分词语,得到与所述单元句对应的单元词;
    通过所述文本识别模型对所有与所述单元句对应的所述单元词进行肯定词义识别,得到至少一个待处理语句,否定字识别并对所有与所述待处理语句对应的所述单元句进行否定字识别,检测所述单元句中是否包含有否定字;
    若检测到与所述待处理语句对应的所述单元句中包含有所述否定字,将所述待处理语句和与所述待处理语句对应的所述单元句中的所述否定字进行组合,得到所述否定表征词;
    将所有所述否定表征词确定为所述否定结果。
  12. 如权利要求11所述的计算机设备,其中,所述检测所述单元句中是否包含有否定字之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    若检测到与所述待处理语句对应的所述单元句中不存在所述否定字,将所述待处理语句确定为所述肯定表征词;
    将所有所述肯定表征词确定为所述肯定结果。
  13. 如权利要求9所述的计算机设备,其中,所述将所有所述肯定表征词输入药物推荐模型中之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    获取包含多个喜好样本的喜好样本集;一个所述喜好样本与一个药物类型标签数组关联;一个所述喜好样本包括至少一个肯定表征词;
    将所述喜好样本输入含有初始参数的多分类神经网络模型;
    通过所述多分类神经网络模型对所述喜好样本进行药物类型识别,得到样本推荐结果;
    根据所述样本推荐结果和所述药物类型标签数组,得到损失值;
    在所述损失值未达到预设的收敛条件时,迭代更新所述多分类神经网络模型的初始参数,直至所述损失值达到所述预设的收敛条件时,将收敛之后的所述多分类神经网络模型记录为药物推荐模型。
  14. 如权利要求9所述的计算机设备,其中,所述自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,包括:
    将所述最终推荐结果中的药物类型输入预设的文本相似度模型;
    通过文本相似度模型中的Word2vec相似度算法计算出所述最终推荐结果中的药物类型和与所述数据库中的各药物数据关联的药物类型的相似度值;
    将与大于预设阈值的所述相似度值对应的药物数据确定为推荐药物数据,将所有推荐药物数据按照与其对应的所述相似度值由大到小的顺序排序,将排序后的所有所述推荐药物数据确定为与所述最终推荐结果中的药物类型相匹配的药物数据。
  15. 一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    接收到用户的药物推荐请求,获取所述药物推荐请求中的用户综合信息;
    通过文本识别模型,对所述用户综合信息进行词义识别,得到识别结果;所述识别结果包括肯定结果和否定结果;所述肯定结果包括至少一个肯定表征词,所述否定结果包括至少一个否定表征词;
    将所有所述肯定表征词输入药物推荐模型中,通过所述药物推荐模型对所有所述肯定表征词进行药物类型识别,得到第一推荐结果;
    将各所述否定表征词进行词义转换,得到与各所述否定表征词对应的转换词,并将所有所述肯定表征词与各所述转换词分别组合,得到与所述转换词对应的组合集;
    将各所述组合集分别输入所述药物推荐模型中,通过所述药物推荐模型对各所述组合集进行药物类型识别,得到与各所述组合集对应的第二推荐结果;
    将所有所述第二推荐结果中的药物类型进行去重,得到第三推荐结果;
    从所述第一推荐结果中去除所述第三推荐结果中的药物类型,得到与所述用户综合信息对应的最终推荐结果,自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,并将获取的所述药物数据推荐给用户。
  16. 如权利要求15所述的可读存储介质,其中,所述接收到用户的药物推荐请求,包括:
    获取所述药物推荐请求中的待推荐信息;
    通过信息识别模型识别出所述待推荐信息的文件类型,得到类型结果;
    获取与所述类型结果匹配的转换模型,通过所述转换模型对所述待推荐信息进行文本转换,得到所述用户综合信息。
  17. 如权利要求15所述的可读存储介质,其中,所述通过文本识别模型,对所述用户综合信息进行词义识别,包括:
    通过所述文本识别模型对所述用户综合信息进行语句拆分,得到各单元句;
    通过所述文本识别模型对所述单元句拆分词语,得到与所述单元句对应的单元词;
    通过所述文本识别模型对所有与所述单元句对应的所述单元词进行肯定词义识别,得到至少一个待处理语句,否定字识别并对所有与所述待处理语句对应的所述单元句进行否定字识别,检测所述单元句中是否包含有否定字;
    若检测到与所述待处理语句对应的所述单元句中包含有所述否定字,将所述待处理语句和与所述待处理语句对应的所述单元句中的所述否定字进行组合,得到所述否定表征词;
    将所有所述否定表征词确定为所述否定结果。
  18. 如权利要求17所述的可读存储介质,其中,所述检测所述单元句中是否包含有否定字之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    若检测到与所述待处理语句对应的所述单元句中不存在所述否定字,将所述待处理语句确定为所述肯定表征词;
    将所有所述肯定表征词确定为所述肯定结果。
  19. 如权利要求15所述的可读存储介质,其中,所述将所有所述肯定表征词输入药物推荐模型中之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    获取包含多个喜好样本的喜好样本集;一个所述喜好样本与一个药物类型标签数组关联;一个所述喜好样本包括至少一个肯定表征词;
    将所述喜好样本输入含有初始参数的多分类神经网络模型;
    通过所述多分类神经网络模型对所述喜好样本进行药物类型识别,得到样本推荐结果;
    根据所述样本推荐结果和所述药物类型标签数组,得到损失值;
    在所述损失值未达到预设的收敛条件时,迭代更新所述多分类神经网络模型的初始参 数,直至所述损失值达到所述预设的收敛条件时,将收敛之后的所述多分类神经网络模型记录为药物推荐模型。
  20. 如权利要求15所述的可读存储介质,其中,所述自数据库中获取与所述最终推荐结果中的药物类型相匹配的药物数据,包括:
    将所述最终推荐结果中的药物类型输入预设的文本相似度模型;
    通过文本相似度模型中的Word2vec相似度算法计算出所述最终推荐结果中的药物类型和与所述数据库中的各药物数据关联的药物类型的相似度值;
    将与大于预设阈值的所述相似度值对应的药物数据确定为推荐药物数据,将所有推荐药物数据按照与其对应的所述相似度值由大到小的顺序排序,将排序后的所有所述推荐药物数据确定为与所述最终推荐结果中的药物类型相匹配的药物数据。
PCT/CN2020/124216 2020-09-09 2020-10-28 药物推荐方法、装置、设备及介质 WO2021151323A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010940800.7A CN112015994B (zh) 2020-09-09 2020-09-09 药物推荐方法、装置、设备及介质
CN202010940800.7 2020-09-09

Publications (1)

Publication Number Publication Date
WO2021151323A1 true WO2021151323A1 (zh) 2021-08-05

Family

ID=73523127

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124216 WO2021151323A1 (zh) 2020-09-09 2020-10-28 药物推荐方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN112015994B (zh)
WO (1) WO2021151323A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117689452A (zh) * 2024-02-01 2024-03-12 北京未来聚典信息技术有限公司 一种基于购药规律的医药精准营销管理方法及系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113744867B (zh) * 2021-08-30 2024-03-08 平安科技(深圳)有限公司 一种药物推荐循证支持方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202299A (zh) * 2016-07-01 2016-12-07 复旦大学 一种基于残疾人特征的残疾人权威用户推荐方法
CN107291899A (zh) * 2017-06-22 2017-10-24 努比亚技术有限公司 一种基于标签的推荐方法和终端以及计算机可读存储介质
CN107908753A (zh) * 2017-11-20 2018-04-13 合肥工业大学 基于社交媒体评论数据的客户需求挖掘方法及装置
CN110717104A (zh) * 2019-10-11 2020-01-21 广州市丰申网络科技有限公司 关键词广告投放自动化否定关键词方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202299A (zh) * 2016-07-01 2016-12-07 复旦大学 一种基于残疾人特征的残疾人权威用户推荐方法
CN107291899A (zh) * 2017-06-22 2017-10-24 努比亚技术有限公司 一种基于标签的推荐方法和终端以及计算机可读存储介质
CN107908753A (zh) * 2017-11-20 2018-04-13 合肥工业大学 基于社交媒体评论数据的客户需求挖掘方法及装置
CN110717104A (zh) * 2019-10-11 2020-01-21 广州市丰申网络科技有限公司 关键词广告投放自动化否定关键词方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117689452A (zh) * 2024-02-01 2024-03-12 北京未来聚典信息技术有限公司 一种基于购药规律的医药精准营销管理方法及系统
CN117689452B (zh) * 2024-02-01 2024-04-30 北京未来聚典信息技术有限公司 一种基于购药规律的医药精准营销管理方法及系统

Also Published As

Publication number Publication date
CN112015994B (zh) 2023-09-15
CN112015994A (zh) 2020-12-01

Similar Documents

Publication Publication Date Title
US10319370B2 (en) System and method for data-driven socially customized models for language generation
US10303768B2 (en) Exploiting multi-modal affect and semantics to assess the persuasiveness of a video
Gu et al. Hybrid attention based multimodal network for spoken language classification
WO2020147428A1 (zh) 交互内容生成方法、装置、计算机设备及存储介质
US20210201143A1 (en) Computing device and method of classifying category of data
CN109509470B (zh) 语音交互方法、装置、计算机可读存储介质及终端设备
CN104598644B (zh) 喜好标签挖掘方法和装置
WO2017127296A1 (en) Analyzing textual data
CN113094578B (zh) 基于深度学习的内容推荐方法、装置、设备及存储介质
WO2021159733A1 (zh) 医学属性知识图谱构建方法、装置、设备及介质
CN111984851B (zh) 医学资料搜索方法、装置、电子装置及存储介质
CN107004212B (zh) 根据社交媒体和其它数字轨迹对动作、结果和目标实现进行建模
CN109086265B (zh) 一种语义训练方法、短文本中多语义词消歧方法
WO2021151323A1 (zh) 药物推荐方法、装置、设备及介质
CN111291177A (zh) 一种信息处理方法、装置和计算机存储介质
KR20210015010A (ko) 심리상담 데이터를 이용한 텍스트 내 감정분석을 위한 시스템 및 방법
WO2021190662A1 (zh) 医学文献排序方法、装置、电子设备及存储介质
WO2022257452A1 (zh) 表情回复方法、装置、设备及存储介质
CN111145903A (zh) 获取眩晕症问诊文本的方法、装置、电子设备及问诊系统
CN111180025A (zh) 表示病历文本向量的方法、装置及问诊系统
WO2019173085A1 (en) Intelligent knowledge-learning and question-answering
CN112632258A (zh) 文本数据处理方法、装置、计算机设备和存储介质
CN110969005B (zh) 一种确定实体语料之间的相似性的方法及装置
CN113343108B (zh) 推荐信息处理方法、装置、设备及存储介质
US20230350929A1 (en) Method and system for generating intent responses through virtual agents

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20916675

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20916675

Country of ref document: EP

Kind code of ref document: A1