Recommendation Method, Recommendation Device, Electronic Device and Storage Medium
By obtaining and processing the consultation data of the target object and the outer packaging images of the drug, and using image recognition and database query technology, the problem of inaccurate drug recommendations is solved, and the safety and rationality of drug use is improved.
Patent Information
- Application Number
- CN202210868298.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-07-22
AI Technical Summary
In the prior art, due to lack of experience in staff, it is difficult to accurately recommend drugs, which affects the safety of medication.
By obtaining the target object's disease consultation data and drug outer packaging image data, using the image recognition model for text recognition, obtaining drug text data, and performing vector processing and content matching, inputting drug database for query, and integrating drug use data to improve recommendation accuracy.
It realizes the standardization of drug information and the comprehensiveness of drug use data, improves the rationality and safety of drug use recommendations, and avoids misuse of drugs.
Smart Images

Figure CN115116581B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of digital medicine and artificial intelligence technology, and in particular, to a recommendation method, a recommendation device, an electronic device, and a storage medium. Background Art
[0002] Currently, in the field of digital medicine, drug recommendations are often made according to the different needs of patients through manual guidance. Due to reasons such as the lack of experience of staff, it is often difficult to accurately recommend drugs for patients, which affects the drug safety of patients. Therefore, how to improve the accuracy of drug recommendations has become a technical problem to be solved urgently. Summary of the Invention
[0003] The main purpose of the embodiments of this application is to propose a recommendation method, a recommendation device, an electronic device, and a storage medium, aiming to improve the accuracy of drug recommendations.
[0004] To achieve the above object, the first aspect of the embodiments of this application proposes a recommendation method, and the method includes:
[0005] Obtain target object data, where the target object data includes the medical consultation disease data and the medical consultation prescription data of the target object, and the medical consultation prescription data includes the image data of the outer package of the drug;
[0006] Perform character recognition processing on the image data through a preset image recognition model to obtain target drug text data, where the target drug text data includes drug name information, drug ingredient information, and drug efficacy information;
[0007] Perform vectorization processing on the target drug text data to obtain a target drug text vector;
[0008] Perform content matching processing on the target drug text vector and the preset reference drug information to obtain target drug information;
[0009] Input the target drug information into a preset drug database for query processing to obtain target drug use data;
[0010] Integrate the target drug use data, the medical consultation disease data, and the target drug information to obtain recommended drug use data, and the recommended drug use data is used to guide the target object to use the target drug.
[0011] In some embodiments, the step of performing character recognition processing on the image data through a preset image recognition model to obtain target drug text data includes:
[0012] Perform character recognition processing on the image data through the recognition network of the image recognition model to obtain initial drug text data;
[0013] Align the characters of the initial drug text data with the preset characters of the image recognition model to obtain the target drug text data.
[0014] In some embodiments, the step of performing character recognition processing on the image data through the recognition network of the image recognition model to obtain the initial drug text data includes:
[0015] Perform convolution processing on the image data through the convolutional layer of the recognition network to obtain image convolution features;
[0016] Extract features from the image convolution features through the LSTM layer of the recognition network to obtain image sequence features;
[0017] Perform prediction processing on the image sequence features through the preset function of the recognition network to obtain the initial drug text data.
[0018] In some embodiments, the step of performing vectorization processing on the target drug text data to obtain the target drug text vector includes:
[0019] Perform word segmentation processing on the target drug text data through the preset forward maximum matching algorithm to obtain target drug word segments;
[0020] Perform vectorization processing on the target drug word segments through the preset encoder to obtain the target drug text vector.
[0021] In some embodiments, the step of performing content matching processing on the target drug text vector and the preset reference drug information to obtain the target drug information includes:
[0022] Traverse the preset pharmaceutical dictionary according to the target drug text vector, and calculate the Euclidean distance between the target drug text vector and the reference drug information in the pharmaceutical dictionary to obtain an Euclidean distance value;
[0023] Perform screening processing on the reference drug information according to the Euclidean distance value to obtain the target drug information.
[0024] In some embodiments, the step of performing screening processing on the reference drug information according to the Euclidean distance value to obtain the target drug information includes:
[0025] Compare the Euclidean distance value with a preset distance threshold;
[0026] Use the reference drug information with the Euclidean distance value less than or equal to the distance threshold as the target drug information.
[0027] In some embodiments, the step of integrating and processing the target medication data, the diagnosed disease data, and the target drug information to obtain recommended medication data includes:
[0028] Extract features from the diagnosed disease data to obtain key disease features;
[0029] Complete the target medication data according to the key disease features to obtain current medication data;
[0030] Integrate and process the current medication data and the target drug information according to a preset information template to obtain the recommended medication data.
[0031] To achieve the above object, a second aspect of the embodiments of the present application provides a recommendation device, which includes:
[0032] A data acquisition module, configured to acquire target object data, where the target object data includes the diagnosed disease data and the diagnosed prescription data of the target object, and the diagnosed prescription data includes image data of the outer package of the drug;
[0033] An image recognition module, configured to perform character recognition processing on the image data through a preset image recognition model to obtain target drug text data, where the drug text data includes drug name information, drug ingredient information, and drug efficacy information;
[0034] A vectorization module, configured to perform vectorization processing on the target drug text data to obtain a target drug text vector;
[0035] A matching module, configured to perform content matching processing on the target drug text vector and the preset reference drug information to obtain target drug information;
[0036] A query module, configured to input the target drug information into a preset drug database for query processing to obtain target medication data;
[0037] An integration module, configured to integrate and process the target medication data, the diagnosed disease data, and the target drug information to obtain recommended medication data, and the recommended medication data is used to guide the target object to use the target drug.
[0038] To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, which includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory. When the program is executed by the processor, the method described in the first aspect above is implemented.
[0039] To achieve the above object, a fourth aspect of the embodiments of the present application proposes a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the first aspect above.
[0040] The recommendation method, recommendation device, electronic device and storage medium proposed in the present application obtain target object data, where the target object data includes the medical consultation disease data and medical consultation prescription data of the target object, and the medical consultation prescription data includes the image data of the outer package of the medicine. Through a preset image recognition model, text recognition processing is performed on the image data to obtain target medicine text data, where the target medicine text data includes medicine name information, medicine ingredient information, and medicine efficacy information, which can more conveniently convert the image features of the medicine outer package into corresponding text features and facilitate the target object to consult the relevant information of the medicine. Further, vectorization processing is performed on the target medicine text data to obtain a target medicine text vector; and content matching processing is performed on the target medicine text vector and preset reference medicine information to obtain target medicine information, which can better improve the content standardization of the medicine information. Further, the target medicine information is input into a preset medicine database for query processing to obtain target medication data. This method can more comprehensively obtain all the medication data related to the target medicine, improve the rationality and safety of medication recommendation. Finally, integration processing is performed on the target medication data, medical consultation disease data, and target medicine information to obtain recommended medication data, so as to guide the target object to use the target medicine through the recommended medication data, avoid the misuse of the target medicine by the target object, and improve the accuracy of medication recommendation and medication safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flowchart of the recommendation method provided by the embodiments of the present application;
[0042] Figure 2 is Figure 1 a flowchart of step S102 in
[0043] Figure 3 is Figure 2 a flowchart of step S201 in
[0044] Figure 4 is Figure 1 a flowchart of step S103 in
[0045] Figure 5 is Figure 1 a flowchart of step S104 in
[0046] Figure 6 is Figure 5The flowchart of step S502 in
[0047] Figure 7 is Figure 1 the flowchart of step S106 in
[0048] Figure 8 the schematic structural diagram of the recommendation device provided by the embodiments of the present application;
[0049] Figure 9 the schematic hardware structure diagram of the electronic device provided by the embodiments of the present application. Detailed implementation manners
[0050] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0051] It should be noted that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order from the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
[0053] First, several nouns involved in the present application are analyzed:
[0054] Artificial intelligence (AI): It is a new technical science that studies, develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science. Artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. The research in this field includes robots, speech recognition, image recognition, natural language processing and expert systems, etc. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence also uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results of theories, methods, technologies and application systems.
[0055] Natural Language Processing (NLP): NLP uses computers to process, understand, and apply human languages (such as Chinese, English, etc.). NLP is a branch of artificial intelligence and an interdisciplinary field of computer science and linguistics, and is often referred to as computational linguistics. Natural language processing includes syntactic analysis, semantic analysis, discourse understanding, etc. Natural language processing is commonly used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intention recognition, information extraction and filtering, text classification and clustering, public opinion analysis, and opinion mining. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research related to language processing, and linguistic research related to language computing, etc.
[0056] Information Extraction: A text processing technology that extracts factual information such as entities, relationships, events, etc. of a specified type from natural language texts and forms structured data for output. Information extraction is a technology for extracting specific information from text data. Text data is composed of some specific units, such as sentences, paragraphs, and texts. Text information is exactly composed of some small specific units, such as characters, words, phrases, sentences, paragraphs, or combinations of these specific units. Extracting noun phrases, personal names, place names, etc. from text data are all text information extraction. Of course, the information extracted by text information extraction technology can be various types of information.
[0057] Medical cloud: The medical cloud refers to the use of "cloud computing" to create a medical and health service cloud platform on the basis of new technologies such as cloud computing, mobile technology, multimedia, 4G communication, big data, and the Internet of Things, combined with medical technology, realizing the sharing of medical resources and the expansion of the scope of medical services. Due to the application and combination of cloud computing technology, the medical cloud improves the efficiency of medical institutions and facilitates residents' access to medical services. For example, current hospital appointment registration, electronic medical records, medical insurance, etc. are all the products of the combination of cloud computing and the medical field. The medical cloud also has the advantages of data security, information sharing, dynamic expansion, and overall layout.
[0058] OCR (optical character recognition) text recognition refers to the process in which electronic devices (such as scanners or digital cameras) check the characters printed on paper and then translate the shapes into computer text using character recognition methods; that is, the process of scanning text materials and then analyzing and processing the image files to obtain text and layout information. How to debug or use auxiliary information to improve the recognition accuracy is the most important topic in OCR. The main indicators for measuring the performance of an OCR system include: rejection rate, error rate, recognition speed, friendliness of the user interface, stability of the product, ease of use, and feasibility, etc.
[0059] Long Short-Term Memory (LSTM) network: It is a type of recurrent neural network designed specifically to address the long-term dependency problem existing in general RNNs (recurrent neural networks). All RNNs have a chain-like form of repeating neural network modules. In a standard RNN, this repeating structural module has a very simple structure, such as a tanh layer. LSTM is a type of neural network containing LSTM blocks or other similar structures. In literature or other materials, LSTM blocks may be described as intelligent network units because they can remember numerical values of an indefinite time length. There is a gate in the block that can determine whether the input is important enough to be remembered and whether it can be output.
[0060] BERT (Bidirectional Encoder Representation from Transformers) model: The BERT model further enhances the generalization ability of the word vector model, fully describes character-level, word-level, sentence-level, and even inter-sentence relationship features, and is constructed based on Transformers. There are three types of embeddings in BERT, namely Token Embedding, Segment Embedding, and Position Embedding. Among them, Token Embeddings are word vectors, and the first word is the CLS token, which can be used for subsequent classification tasks. Segment Embeddings are used to distinguish two types of sentences because the pre-training not only performs language modeling but also classification tasks with two sentences as input. Position Embeddings. Here, the position word vectors are not trigonometric functions in Transformer, but are learned by BERT through training. However, BERT directly trains a position embedding to retain position information. A vector is randomly initialized for each position and added to the model for training. Finally, an embedding containing position information is obtained. In the way of combining this position embedding and word embedding, BERT chooses to directly concatenate them.
[0061] Encoder: Transforms the input sequence into a fixed-length vector.
[0062] Decoder: Transforms the previously generated fixed vector back into an output sequence. Among them, the input sequence can be text, speech, image, or video; the output sequence can be text or image.
[0063] Euclidean distance: Euclidean distance generally refers to the Euclidean metric. In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" (i.e. straight-line) distance between two points in Euclidean space. Using this distance, Euclidean space becomes a metric space. The associated norm is called the Euclidean norm. Earlier literature called it the Pythagorean metric. The Euclidean metric (also called Euclidean distance) is a commonly used definition of distance, referring to the real distance between two points in m-dimensional space, or the natural length of a vector (i.e. the distance from the point to the origin). The Euclidean distance in two-dimensional and three-dimensional space is the actual distance between two points.
[0064] At present, in the field of digital medicine, medication recommendations are often made based on the different needs of patients through manual guidance. Due to the lack of experience of staff and other reasons, it is often difficult to accurately recommend medications to patients, which affects the safety of patients' medication. Therefore, how to improve the accuracy of medication recommendations has become a technical problem that needs to be solved urgently.
[0065] Based on this, the embodiments of the present application provide a recommendation method, a recommendation device, an electronic device and a storage medium, aiming to improve the accuracy of medication recommendations.
[0066] The recommendation method, recommendation device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the recommendation method in the embodiments of the present application is described.
[0067] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0068] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0069] The recommendation method provided by the embodiments of this application relates to the field of artificial intelligence technology. The recommendation method provided by the embodiments of this application can be applied to a terminal, or to a server side, or can also be software running on a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can also be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the recommendation method, etc., but is not limited to the above forms.
[0070] This application can be used in many general or specific computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment, where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0071] Figure 1 is an optional flowchart of the recommendation method provided by the embodiments of this application, Figure 1 The method in can include but is not limited to steps S101 to S106.
[0072] Step S101, obtain target object data, where the target object data includes the medical consultation disease data and the medical consultation prescription data of the target object, and the medical consultation prescription data includes the image data of the outer package of the medicine;
[0073] Step S102, perform character recognition processing on the image data through a preset image recognition model to obtain target medicine text data, where the target medicine text data includes medicine name information, medicine ingredient information, and medicine efficacy information;
[0074] Step S103, perform vectorization processing on the target medicine text data to obtain a target medicine text vector;
[0075] Step S104: Perform content matching processing on the target drug text vector and the preset reference drug information to obtain the target drug information;
[0076] Step S105: Input the target drug information into the preset drug database for query processing to obtain the target medication data;
[0077] Step S106: Integrate the target medication data, the medical consultation disease data, and the target drug information to obtain the recommended medication data, which is used to guide the target object to use the target drug.
[0078] Steps S101 to S106 shown in the embodiments of the present application, by obtaining the target object data, wherein the target object data includes the medical consultation disease data and the medical consultation prescription data of the target object, and the medical consultation prescription data includes the image data of the drug outer package. Through the preset image recognition model, the text recognition processing is performed on the image data to obtain the target drug text data, wherein the target drug text data includes the drug name information, the drug ingredient information, and the drug efficacy information, which can more conveniently convert the image features of the drug outer package into the corresponding text features and facilitate the target object to consult the relevant information of the drug. Further, the target drug text data is vectorized to obtain the target drug text vector; and the content matching processing is performed on the target drug text vector and the preset reference drug information to obtain the target drug information, which can better improve the content standardization of the drug information. Further, the target drug information is input into the preset drug database for query processing to obtain the target medication data, and this method can more comprehensively obtain all the medication data related to the target drug, improving the rationality and safety of the medication recommendation. Finally, the target medication data, the medical consultation disease data, and the target drug information are integrated to obtain the recommended medication data, so that the target object can be guided to use the target drug through the recommended medication data, avoiding the misuse of the target drug by the target object, and improving the accuracy of the medication recommendation and the medication safety.
[0079] In step S101 of some embodiments, the target object data can be obtained by writing a web crawler and performing targeted data crawling after setting the data source. The target object data can also be obtained by other means, not limited to this. Among them, the target object data includes the medical consultation disease data and the medical consultation prescription data of the target object. The target object can be the patient himself or the patient's family member, etc. The medical consultation disease data includes the diseases, symptoms, or conditions of the target object, for example, the medical consultation disease data includes sore throat, hypertension, hyperglycemia, etc. The medical consultation prescription data includes the image data of the outer package of a certain drug with patterns, texts, etc., that is, the image data of the drug outer package.
[0080] Please refer to Figure 2, in some embodiments, step S102 may include but is not limited to steps S201 to S202:
[0081] Step S201, perform character recognition processing on the image data through the recognition network of the image recognition model to obtain initial drug text data;
[0082] Step S202, perform character alignment on the initial drug text data through the preset characters of the image recognition model to obtain target drug text data.
[0083] In step S201 of some embodiments, the image recognition model may be constructed by a CRNN model and a CTC loss function. The convolutional layer of the recognition network of the image recognition model extracts features from the image data of the drug outer packaging to obtain the image convolution features of the image data, and then the LSTM layer of the recognition network extracts sequence features from the extracted image convolution features and performs recognition processing on the extracted sequence features, thereby obtaining the initial drug text data.
[0084] In step S202 of some embodiments, the CTC loss function is used to perform forward recursion and backward recursion on the preset characters and the initial drug text data to obtain the forward recursion probability and the backward recursion probability, and thus the preset characters are supplemented to the initial drug text data according to the forward recursion probability and the backward recursion probability to obtain the target drug text data, where the target drug text data includes drug name information, drug ingredient information, and drug efficacy information. The preset characters can be set according to the actual situation without limitation. For example, the preset character is a blank character, that is, a blank character. By introducing the CTC loss function, the problem of character misalignment can be effectively solved, and the text normality of the target drug text data can be improved.
[0085] Please refer to Figure 3 , in some embodiments, step S201 may include but is not limited to steps S301 to S303:
[0086] Step S301, perform convolution processing on the image data through the convolutional layer of the recognition network to obtain image convolution features;
[0087] Step S302, extract features from the image convolution features through the LSTM layer of the recognition network to obtain image sequence features;
[0088] Step S303, perform prediction processing on the image sequence features through the preset function of the recognition network to obtain the initial drug text data.
[0089] In step S301 of some embodiments, the convolutional layer of the recognition network performs convolutional processing on the image data, converts the image features of the image data into a convolutional feature matrix of a fixed size, and obtains the image convolutional features.
[0090] In step S302 of some embodiments, the LSTM of the recognition network performs bidirectional sequence feature extraction on the image convolutional features, that is, encodes the image convolutional features in the order from left to right to obtain the first encoded feature, and then encodes the image convolutional features in the order from right to left to obtain the second encoded feature. Finally, the first encoded feature and the second encoded feature are fused to obtain the image sequence features. Through the LSTM algorithm, the text sequence features of the image data can be more conveniently extracted.
[0091] In step S303 of some embodiments, the preset function is the softmax function. The softmax function creates a probability distribution for each reference character in the preset character dictionary for the image sequence features, that is, obtains a posterior probability matrix. Through this posterior probability matrix, the correlation degree between the image sequence features and each reference character can be reflected. Therefore, according to the probability values of each reference character on the posterior probability matrix, the reference character combinations with higher probability values can be selected to form the initial drug text data.
[0092] Please refer to Figure 4 , in some embodiments, step S103 may include but is not limited to steps S401 to S402:
[0093] Step S401, perform word segmentation on the target drug text data through a preset forward maximum matching algorithm to obtain the target drug word segments;
[0094] Step S402, perform vectorization processing on the target drug word segments through a preset encoder to obtain the target drug text vector.
[0095] In step S401 of some embodiments, the preset forward maximum matching algorithm is based on a preset reference dictionary, selects the longest word in the reference dictionary as the scanning string for the first word-taking quantity, performs text scanning on the target drug text data according to this scanning string to obtain the first word segmentation result; then modifies the content of the scanning string according to the words in the reference dictionary, and continues to perform text scanning on the target drug text data, and so on, until all the words in the reference dictionary are traversed to obtain the target drug word segments. For example, the target drug text data "Compound Ganmaoling Granules" after word segmentation will become the target drug word segments "Compound, Cold, Spirit, Granules".
[0096] In step S402 of some embodiments, the preset encoder can be a BERT encoder or others, without limitation. Taking the BERT encoder as an example, the target drug word segment is mapped from the semantic space to the preset vector space through the preset encoder, so as to realize the vectorization of the target drug word segment and obtain the target drug text vector.
[0097] Please refer to Figure 5 , in some embodiments, step S104 may include but is not limited to steps S501 to S502:
[0098] Step S501, traverse the preset pharmaceutical dictionary according to the target drug text vector, and calculate the Euclidean distance between the target drug text vector and the reference drug information in the pharmaceutical dictionary to obtain the Euclidean distance value;
[0099] Step S502, perform screening processing on the reference drug information according to the Euclidean distance value to obtain the target drug information.
[0100] In step S501 of some embodiments, traverse the preset pharmaceutical dictionary according to the target drug text vector, perform vectorization processing on the reference drug information in the pharmaceutical dictionary to obtain the reference drug vector, and sequentially calculate the Euclidean distance between the target drug text vector and the reference drug vector to obtain the Euclidean distance value between each reference drug information and the target drug text vector.
[0101] For example, the Euclidean distance value between the target drug text vector "Compound Ganmaoling Granules" and the reference drug information "Compound Ganmaoling Granules" is 0. The Euclidean distance value between the target drug text vector "Cold" and the reference drug information "Ganmao Shuke Granules" is 1.5.
[0102] In step S502 of some embodiments, since the magnitude of the Euclidean distance value can reflect the proximity between the text content of the reference drug information and the semantic content of the target drug text vector, the smaller the Euclidean distance value, the closer the semantic representation content of the reference drug information is to the target drug text vector. Therefore, the reference drug information can be screened according to the Euclidean distance value, compare the Euclidean distance value with the preset distance threshold, include the reference drug information with the Euclidean distance value less than or equal to the distance threshold in the same set, and then perform screening processing on the reference drug information in this set to obtain the target drug information. For example, select the reference drug information with the smallest Euclidean distance value in this set as the target drug information.
[0103] Please refer to Figure 6 , in some embodiments, step S502 includes but is not limited to steps S601 to S602:
[0104] Step S601, compare the Euclidean distance value with the preset distance threshold;
[0105] Step S602: Use the reference drug information with the Euclidean distance value less than or equal to the distance threshold as the target drug information.
[0106] In step S601 of some embodiments, compare the Euclidean distance value with a preset distance threshold. The preset distance threshold can be set according to actual business requirements without limitation. The magnitude of the Euclidean distance value can reflect the proximity between the text content of the reference drug information and the semantic content of the target drug text vector. The smaller the Euclidean distance value, the closer the semantic representation content of the reference drug information is to the target drug text vector.
[0107] In step S602 of some embodiments, select the reference drug information with the Euclidean distance value less than the preset distance threshold to form candidate drug information. This candidate drug information is the drug information with relatively similar semantic content to the target drug text vector. According to actual business needs, select some or all of the candidate drug information from this candidate drug information as the target drug information. For example, to improve the matching accuracy, select the candidate drug information with the smallest Euclidean distance value as the target drug information. This target drug information includes the target drug name, target drug ingredients, etc.
[0108] In step S105 of some embodiments, the target drug information can be input into a preset drug database for query processing through robotic process automation or other means to obtain target medication data. This target medication data includes data such as the functions and efficacy of the target drug. For example, when the target drug information is "Cold Granules", input the field "Cold Granules" into the drug database through robotic process automation for query processing, and the corresponding target medication data can be obtained as "The efficacy of Cold Granules is to disperse wind-heat, relieve the exterior and diffuse the lungs. It is used for wind-heat colds, headache and general fatigue, fever and aversion to cold, nasal congestion and runny nose, cough and sore throat." Through this method, automated query of target medication data can be achieved, improving the query efficiency.
[0109] Please refer to Figure 7 , in some embodiments, step S106 may include but is not limited to steps S701 to S703:
[0110] Step S701: Extract features from the medical consultation disease data to obtain key disease features;
[0111] Step S702: Complement the target medication data according to the key disease features to obtain the current medication data;
[0112] Step S703: Integrate and process the current medication data and the target drug information according to a preset information template to obtain the recommended medication data.
[0113] In step S701 of some embodiments, feature extraction is performed on the medical consultation disease data according to a preset keyword list to obtain fields related to disease descriptions or symptom descriptions in the medical consultation disease data, and key disease features are obtained. For example, the key disease features include sore throat, runny nose, and so on.
[0114] In step S702 of some embodiments, according to the key disease features and the basic information of the target object, the precautions for using each target drug are extracted. The precautions for using the drug include data such as restrictions on the population using the drug. According to the precautions for using the drug, the target drug use data is supplemented to improve the content richness of the target drug use data, and the current drug use data is obtained. The current drug use data includes the drug ingredients, usage instructions, precautions, and therapeutic effects of the target drug, etc.
[0115] In step S703 of some embodiments, the preset information template can be set according to the actual application scenario. The information template can be in the form of a table or in the form of a flowchart, tree diagram, etc., without limitation. Taking the form of a table as an example, the column name information of the information template includes disease type / symptom type, target drug name, target drug efficacy, usage instructions and precautions of the target drug, etc. According to the column name information, information extraction is performed on the current drug use data and the target drug information, and the extracted field information is filled into the corresponding columns, so as to realize the integration processing of drug information, obtain the recommended drug use data, and push the recommended drug use data to the target object to guide the target object to use the target drug according to the recommended drug use data.
[0116] The recommendation method of the embodiment of the present application obtains target object data, where the target object data includes the diagnosed disease data and the diagnosed prescription data of the target object, and the diagnosed prescription data includes the image data of the drug outer package. By using a preset image recognition model to perform character recognition processing on the image data of the drug outer package, target drug text data is obtained, where the target drug text data includes drug name information, drug ingredient information, and drug efficacy information, which can more conveniently convert the image features of the drug outer package into corresponding text features and facilitate the target object to consult the relevant information of the drug. Further, vectorization processing is performed on the target drug text data to obtain a target drug text vector; and content matching processing is performed on the target drug text vector and the preset reference drug information to obtain target drug information, which can better improve the content standardization of drug information. Further, the target drug information is input into a preset drug database for query processing to obtain target drug use data. This method can more comprehensively obtain all drug use data related to the target drug and improve the rationality and safety of drug recommendation. Finally, integration processing is performed on the target drug use data, the diagnosed disease data, and the target drug information to obtain recommended drug use data, so that the target object can be guided to use the target drug through the recommended drug use data, avoiding the misuse of the target drug by the target object and improving the accuracy of drug recommendation and drug use safety.
[0117] Please refer to Figure 8 , the embodiment of the present application further provides a recommendation device that can implement the above recommendation method. The device includes:
[0118] A data acquisition module 801, configured to acquire target object data, where the target object data includes the diagnosed disease data and the diagnosed prescription data of the target object, and the diagnosed prescription data includes the image data of the drug outer package;
[0119] An image recognition module 802, configured to perform character recognition processing on the image data through a preset image recognition model to obtain target drug text data, where the drug text data includes drug name information, drug ingredient information, and drug efficacy information;
[0120] A vectorization module 803, configured to perform vectorization processing on the target drug text data to obtain a target drug text vector;
[0121] A matching module 804, configured to perform content matching processing on the target drug text vector and the preset reference drug information to obtain target drug information;
[0122] A query module 805, configured to input the target drug information into a preset drug database for query processing to obtain target drug use data;
[0123] An integration module 806 for integrally processing target medication data, medical history disease data, and target drug information to obtain recommended medication data, which is used to guide the target object to use the target drug.
[0124] In some embodiments, the image recognition module 802 includes:
[0125] A text recognition unit for performing text recognition processing on the image data through the recognition network of the image recognition model to obtain initial drug text data;
[0126] A character alignment unit for aligning the characters of the initial drug text data through the preset characters of the image recognition model to obtain target drug text data.
[0127] In some embodiments, the text recognition unit includes:
[0128] A convolution subunit for performing convolution processing on the image data through the convolution layer of the recognition network to obtain image convolution features;
[0129] A feature extraction subunit for extracting features from the image convolution features through the LSTM layer of the recognition network to obtain image sequence features;
[0130] A prediction subunit for performing prediction processing on the image sequence features through the preset function of the recognition network to obtain initial drug text data.
[0131] In some embodiments, the vectorization module 803 includes:
[0132] A word segmentation unit for performing word segmentation processing on the target drug text data through the preset forward maximum matching algorithm to obtain target drug word segments;
[0133] A vectorization unit for performing vectorization processing on the target drug word segments through the preset encoder to obtain target drug text vectors.
[0134] In some embodiments, the matching module 804 includes:
[0135] A traversal unit for traversing the preset pharmaceutical dictionary according to the target drug text vector and calculating the Euclidean distance between the target drug text vector and the reference drug information in the pharmaceutical dictionary to obtain an Euclidean distance value;
[0136] A screening unit for screening the reference drug information according to the Euclidean distance value to obtain target drug information.
[0137] In some embodiments, the screening unit includes:
[0138] A comparison subunit for comparing the Euclidean distance value with the preset distance threshold;
[0139] An information selection subunit, configured to use the reference drug information with an Euclidean distance less than or equal to the distance threshold as the target drug information.
[0140] In some embodiments, the integration module 806 includes:
[0141] An extraction unit, configured to perform feature extraction on the medical consultation disease data to obtain key disease features;
[0142] A data completion unit, configured to complete the target medication data according to the key disease features to obtain the current medication data;
[0143] An integration unit, configured to perform integration processing on the current medication data and the target drug information according to a preset information template to obtain recommended medication data.
[0144] The specific implementation manner of this recommendation device is basically the same as the specific embodiments of the above-mentioned recommendation method, and will not be elaborated here.
[0145] An embodiment of the present application further provides an electronic device, which includes: a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory. When the program is executed by the processor, the above-mentioned recommendation method is implemented. This electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0146] Please refer to Figure 9 , Figure 9 which illustrates the hardware structure of an electronic device in another embodiment. The electronic device includes:
[0147] A processor 901, which can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present application;
[0148] A memory 902, which can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 902 can store an operating system and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 902 and are called by the processor 901 to execute the recommendation method of the embodiments of the present application;
[0149] The input / output interface 903 is used to implement information input and output;
[0150] The communication interface 904 is used to implement communication interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);
[0151] The bus 905 transmits information between various components of the device (such as the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0152] Among them, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are communicatively connected to each other inside the device through the bus 905.
[0153] The embodiment of the present application also provides a storage medium. The storage medium is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned recommended method.
[0154] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include high-speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes a memory remotely located relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0155] The recommendation method, recommendation device, electronic device and storage medium provided in the embodiment of the present application obtain target object data, wherein the target object data includes the target object's disease inquiry data and prescription inquiry data, and the prescription inquiry data includes the image data of the drug outer packaging. The image data is processed by a preset image recognition model to obtain the target drug text data, wherein the target drug text data includes drug name information, drug ingredient information, and drug efficacy information, and the drug outer packaging image features can be more conveniently converted into corresponding text features, which is convenient for the target object to consult the relevant information of the drug. Further, the target drug text data is vectorized to obtain the target drug text vector; and the target drug text vector and the preset reference drug information are matched to obtain the target drug information, which can better improve the content standardization of the drug information. Further, the target drug information is input into the preset drug database for query processing to obtain the target medication data. This method can obtain all the medication data related to the target drug in a more comprehensive manner, and improve the rationality and safety of medication recommendations. Finally, the target medication data, disease consultation data and target drug information are integrated and processed to obtain recommended medication data, which can guide the target subjects to use the target drugs through the recommended medication data, avoid the target subjects' misuse of the target drugs, and improve the accuracy of medication recommendations and medication safety.
[0156] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0157] It can be understood by those skilled in the art that Figure 1-7 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.
[0158] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0159] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0160] In the description of this application and the above-mentioned accompanying drawings, the terms "first", "second", "third", "fourth", etc. (if any) 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 under appropriate circumstances so that the embodiments of this application described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that comprises a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0161] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally means that the associated objects before and after are in an "or" relationship. "At least one (one) of the following" or its similar expression means any combination of these items, including any combination of single items (ones) or plural items (ones). For example, at least one (one) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0162] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above-mentioned division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.
[0163] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, may exist separately as individual physical units, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0165] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0166] The preferred embodiments of the embodiments of the present application have been described above with reference to the accompanying drawings. However, this does not limit the scope of the rights of the embodiments of the present application. Any modification, equivalent replacement, and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the rights of the embodiments of the present application.
Claims
1. A recommendation method, characterized in that, the method includes: Obtain target object data, where the target object data includes the diagnosed disease data and the diagnosed prescription data of the target object, and the diagnosed prescription data includes the image data of the outer packaging of the medicine; Perform character recognition processing on the image data through a preset image recognition model to obtain target medicine text data, where the target medicine text data includes medicine name information, medicine ingredient information, and medicine efficacy information; Perform vectorization processing on the target medicine text data to obtain a target medicine text vector; perform content matching processing on the target medicine text vector and preset reference medicine information to obtain target medicine information; input the target medicine information into a preset medicine database for query processing to obtain target medication data; Integrate the target medication data, the diagnosed disease data, and the target medicine information to obtain recommended medication data, and the recommended medication data is used to guide the target object to use the target medicine; The image recognition model includes a recognition network and a CTC loss function, and the recognition network includes a convolutional layer, an LSTM layer, and the preset function; the step of performing character recognition processing on the image data through the preset image recognition model to obtain target medicine text data includes: Perform convolutional processing on the image data through the convolutional layer to obtain image convolutional features; perform bidirectional sequence feature extraction on the image convolutional features through the LSTM layer to obtain image sequence features; perform prediction processing on the image sequence features through the preset function to obtain initial medicine text data; Perform forward recursion and backward recursion on the preset characters and the initial medicine text data through the CTC loss function to obtain forward recursion probability and backward recursion probability, and supplement the preset characters to the initial medicine text data according to the forward recursion probability and the backward recursion probability to obtain the target medicine text data; The step of performing vectorization processing on the target medicine text data to obtain a target medicine text vector includes: Through a preset forward maximum matching algorithm, based on a preset reference dictionary, select the longest word in the reference dictionary as the scanning string for the first word-taking quantity, perform text scanning on the target medicine text data according to the scanning string to obtain the first word segmentation result; modify the content of the scanning string according to the words in the reference dictionary, and continue to perform text scanning on the target medicine text data, and so on, until all the words in the reference dictionary are traversed to obtain the target medicine word segments; Perform vectorization processing on the target medicine word segments through a preset encoder to obtain the target medicine text vector.
2. The recommendation method according to claim 1, characterized in that, the step of performing content matching processing on the target medicine text vector and preset reference medicine information to obtain target medicine information includes: Traverse a preset pharmaceutical dictionary according to the target medicine text vector, and calculate the Euclidean distance between the target medicine text vector and the reference medicine information in the pharmaceutical dictionary to obtain an Euclidean distance value; Screen the reference drug information according to the Euclidean distance value to obtain the target drug information.
3. The recommendation method according to claim 2, wherein, the step of screening the reference drug information according to the Euclidean distance value to obtain the target drug information includes: Compare the Euclidean distance value with a preset distance threshold; Use the reference drug information with the Euclidean distance value less than or equal to the distance threshold as the target drug information.
4. The recommendation method according to any one of claims 1 to 3, wherein, the step of integrating and processing the target medication data, the medical consultation disease data, and the target drug information to obtain recommended medication data includes: Extract features from the medical consultation disease data to obtain key disease features; Complete the target medication data according to the key disease features to obtain the current medication data; Integrate and process the current medication data and the target drug information according to a preset information template to obtain the recommended medication data.
5. A recommendation device, wherein, the device includes: A data acquisition module for acquiring target object data, where the target object data includes the medical consultation disease data and the medical consultation prescription data of the target object, and the medical consultation prescription data includes the image data of the drug outer package; An image recognition module for performing character recognition processing on the image data through a preset image recognition model to obtain target drug text data, where the drug text data includes drug name information, drug ingredient information, and drug efficacy information; A vectorization module for vectorizing the target drug text data to obtain a target drug text vector; A matching module for performing content matching processing on the target drug text vector and preset reference drug information to obtain target drug information; A query module for inputting the target drug information into a preset drug database for query processing to obtain target medication data; An integration module for integrating and processing the target medication data, the medical consultation disease data, and the target drug information to obtain recommended medication data, and the recommended medication data is used to guide the target object to use the target drug; The image recognition model includes a recognition network and a CTC loss function, and the recognition network includes a convolutional layer, an LSTM layer, and the preset function; the step of performing character recognition processing on the image data through the preset image recognition model to obtain target drug text data includes: Performing convolutional processing on the image data through the convolutional layer to obtain image convolutional features; performing bidirectional sequence feature extraction on the image convolutional features through the LSTM layer to obtain image sequence features; performing prediction processing on the image sequence features through the preset function to obtain initial drug text data; Forward and backward recursion are performed on the preset characters and the initial drug text data through the CTC loss function to obtain the forward recursion probability and the backward recursion probability. The preset characters are supplemented to the initial drug text data according to the forward recursion probability and the backward recursion probability to obtain the target drug text data; The vectorization process of the target drug text data to obtain a target drug text vector includes: Through a preset forward maximum matching algorithm, based on a preset reference dictionary, the longest word in the reference dictionary is selected as the scanning string for the first word-taking quantity. The target drug text data is scanned according to the scanning string to obtain the first word segmentation result; the content of the scanning string is modified according to the words in the reference dictionary, and the target drug text data is continuously scanned, and so on, until all the words in the reference dictionary are traversed to obtain the target drug word segments; The target drug word segments are vectorized through a preset encoder to obtain the target drug text vector.
6. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory. When the program is executed by the processor, the steps of the recommendation method according to any one of claims 1 to 4 are realized.
7. A storage medium, the storage medium is a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize the steps of the recommendation method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Medicine information identification method, device, computer equipment and storage medium
CN109920509A
Medicine use data pushing method and device
CN111048173A
Prescription recommendation system
CN113628716A