Drug data processing method and device, computer equipment and readable storage medium

The output content instructions are generated by matching the text and feature knowledge base, and the language model is used to process the drug instructions, which solves the problem of screening drug instruction information and achieves efficient and accurate medication guidance.

CN118708697APending Publication Date: 2024-09-27CHINA RESOURCES PHARM COMMERCIAL GRP CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410949118.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

The text content of drug instructions is large and professional, making it difficult to filter relevant information efficiently. The data processing process of traditional question and answer methods is simple, resulting in a lack of accuracy and reliability of response information.

Method used

By obtaining the query request of the drug identification, using the text knowledge base and feature knowledge base for matching, generating output content instructions, and outputting the answer information through the language model, multi-dimensional processing of drug instructions is realized.

Benefits of technology

It achieves efficient and accurate processing of drug data, provides reliable medication guidance, and improves the relevance and accuracy of answer information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708697A
    Figure CN118708697A
Patent Text Reader

Abstract

The invention relates to a medicine data processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of obtaining a query request comprising a drug identifier, matching first reference information corresponding to the query request in a text knowledge base corresponding to the drug identifier, and matching second reference information corresponding to the query request in a feature knowledge base corresponding to the drug identifier; generating an output content instruction corresponding to the query request based on the first reference information and the second reference information; and obtaining answer information which is output by a language model according to the first reference information and the second reference information and is matched with the output content instruction, and returning the answer information to a terminal corresponding to the query request. By adopting the method, the medicine data can be efficiently and accurately processed, so that the answer information aiming at the medicine specification can be reliably and adaptively obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a drug data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] Regarding the drug instructions corresponding to the drugs, on the one hand, the text content and length of the drug instructions are relatively long, making it difficult to efficiently filter out relevant information from the drug instructions; on the other hand, the description method of the drug instructions is relatively professional and rigorous, making it difficult to accurately understand the actual medication situation.

[0003] In the traditional technology, the corresponding response information is automatically obtained in the drug instructions through question-and-answer method. However, the current method has a relatively simple data processing process for the drug instructions, so that the obtained response information lacks accuracy and reliability. Summary of the invention

[0004] Based on this, it is necessary to provide a drug data processing method, device, computer equipment, computer-readable storage medium and computer program product that can efficiently and accurately process drug data and reliably and adaptively obtain answer information for drug instructions in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for processing drug data, comprising:

[0006] A query request including a drug identifier is obtained, and first reference information corresponding to the query request is matched in a text knowledge base corresponding to the drug identifier, and second reference information corresponding to the query request is matched in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information;

[0007] generating an output content instruction corresponding to the query request based on the first reference information and the second reference information;

[0008] The language model is acquired to output answer information matching the output content instruction according to the first reference information and the second reference information, and the answer information is returned to the terminal corresponding to the query request.

[0009] In one of the embodiments, before matching the first reference information corresponding to the query request in the text knowledge base corresponding to the drug identification and matching the second reference information corresponding to the query request in the feature knowledge base corresponding to the drug identification, it also includes one of the following two steps: according to the drug identification, matching the drug instructions corresponding to the drug identification in the database; the drug instructions in the database are pre-stored drug instructions; obtaining the drug instructions document corresponding to the drug identification, parsing the drug instructions document to obtain the drug instructions corresponding to the drug identification; the drug instructions document comes from the terminal corresponding to the query request.

[0010] In one of the embodiments, before matching the second reference information corresponding to the query request in the feature knowledge base corresponding to the drug identification, it also includes: obtaining text information in the drug instructions corresponding to the drug identification, segmenting the text information according to the segmentation identifiers in the text information, and obtaining text information segments corresponding to each segmentation identifier; truncating each text information segment according to a preset text length to obtain text information sub-segments matching the text length, performing feature extraction on each text information sub-segment to obtain text feature information corresponding to each text information sub-segment, and obtaining the feature knowledge base corresponding to the drug identification based on the text feature information corresponding to each text information sub-segment.

[0011] In one of the embodiments, after obtaining the query request including the drug identification, it also includes: if the correlation between the query request and the drug identification meets the corresponding threshold condition, matching the first reference information in the text knowledge base and matching the second reference information in the feature knowledge base according to the query request; if the correlation between the query request and the drug instructions does not meet the corresponding threshold condition, ending the query task corresponding to the query request, and returning the preset response information to the terminal corresponding to the query request; after obtaining the language model to output the answer information matching the output content instruction according to the first reference information and the second reference information, it also includes: if the correlation between the answer information and the drug instructions meets the corresponding threshold condition, returning the answer information to the terminal corresponding to the query request; if the correlation between the answer information and the drug identification does not meet the corresponding threshold condition, ending the query task corresponding to the query request, and returning the preset response information to the terminal corresponding to the query request.

[0012] In one of the embodiments, the first reference information corresponding to the query request is matched in the text knowledge base corresponding to the drug identification, and the second reference information corresponding to the query request is matched in the feature knowledge base corresponding to the drug identification, including: matching multiple first reference information corresponding to the query request in the text knowledge base, and matching multiple second reference information corresponding to the query request in the feature knowledge base; based on the similarity between each first reference information and the query request, and the similarity between each text information corresponding to the second reference information and the query request, filtering out third reference information from the multiple first reference information and the text information corresponding to the multiple second reference information; integrating the third reference information into a preset template to obtain an output content instruction corresponding to the query request.

[0013] In one embodiment, the language model is used to output answer information that matches the output content instruction based on the first reference information and the second reference information, including: inputting the output content instruction into the language model, filtering and sorting the information included in the output content instruction through the language model, and obtaining answer information including reference text and response text; the reference text corresponds to the original text in the drug instructions corresponding to the query request, and the response text corresponds to the brief text obtained by sorting the original text according to the query request.

[0014] In a second aspect, the present application also provides a drug data processing device, comprising:

[0015] A matching module, used to obtain a query request including a drug identifier, match first reference information corresponding to the query request in a text knowledge base corresponding to the drug identifier, and match second reference information corresponding to the query request in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information;

[0016] A generating module, configured to generate an output content instruction corresponding to the query request based on the first reference information and the second reference information;

[0017] An output module is used to obtain a language model to output answer information matching the output content instruction according to the first reference information and the second reference information, and return the answer information to a terminal corresponding to the query request.

[0018] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0019] A query request including a drug identifier is obtained, and first reference information corresponding to the query request is matched in a text knowledge base corresponding to the drug identifier, and second reference information corresponding to the query request is matched in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information;

[0020] generating an output content instruction corresponding to the query request based on the first reference information and the second reference information;

[0021] The language model is acquired to output answer information matching the output content instruction according to the first reference information and the second reference information, and the answer information is returned to the terminal corresponding to the query request.

[0022] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0023] A query request including a drug identifier is obtained, and first reference information corresponding to the query request is matched in a text knowledge base corresponding to the drug identifier, and second reference information corresponding to the query request is matched in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information;

[0024] generating an output content instruction corresponding to the query request based on the first reference information and the second reference information;

[0025] The language model is acquired to output answer information matching the output content instruction according to the first reference information and the second reference information, and the answer information is returned to the terminal corresponding to the query request.

[0026] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0027] A query request including a drug identifier is obtained, and first reference information corresponding to the query request is matched in a text knowledge base corresponding to the drug identifier, and second reference information corresponding to the query request is matched in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information;

[0028] generating an output content instruction corresponding to the query request based on the first reference information and the second reference information;

[0029] The language model is acquired to output answer information matching the output content instruction according to the first reference information and the second reference information, and the answer information is returned to the terminal corresponding to the query request.

[0030] The above-mentioned drug data processing method, device, computer equipment, computer-readable storage medium and computer program product, according to the query request including the drug identification obtained, matches the corresponding first reference information in the dimension of text through the text knowledge base, and matches the corresponding second reference information in the dimension of text features through the feature knowledge base; generates an output content instruction corresponding to the query request based on the first reference information and the second reference information, and the language model outputs answer information matching the output content instruction based on the first reference information and the second reference information; based on this, in the scenario of requesting medication instructions, based on the dimensions of text and text features, first matches the corresponding data, and then analyzes and processes the data through the language model to obtain the corresponding answer information, thereby realizing multi-dimensional, efficient and accurate data processing, and then reliably and adaptively obtaining the answer information corresponding to the above-mentioned scenario of requesting medication instructions. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 is an application environment diagram of a drug data processing method in an embodiment;

[0033] Figure 2 is a flowchart of a method for processing drug data in one embodiment;

[0034] Figure 3 A schematic diagram of a flow chart of a drug data processing method in another embodiment;

[0035] Figure 4 is a structural block diagram of a drug data processing device in one embodiment;

[0036] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with 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.

[0038] The drug data processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0039] Terminal 102 sends a query request including a drug identification to server 104; after receiving the query request, server 104 matches the first reference information corresponding to the query request in a text knowledge base corresponding to the drug identification, and matches the second reference information corresponding to the query request in a feature knowledge base corresponding to the drug identification; server 104 then generates an output content instruction corresponding to the query request based on the first reference information and the second reference information, inputs the output content instruction into a language model, and the language model outputs answer information matching the output content instruction based on the first reference information and the second reference information; server 104 then returns the answer information to terminal 102.

[0040] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0041] In an exemplary embodiment, Figure 2 As shown, a drug data processing method is provided, and the method is applied to Figure 1 The server in is taken as an example to illustrate, including the following steps S202 to S206, wherein:

[0042] Step S202, obtain a query request including a drug identifier, match first reference information corresponding to the query request in a text knowledge base corresponding to the drug identifier, and match second reference information corresponding to the query request in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information.

[0043] Among them, the drug identification is the unique identification corresponding to the drug, which is used to accurately distinguish different drugs; the drug identification can be expressed as the drug's name, product number, code and other unique identification information, and the code is presented in the form of QR code, barcode, etc.

[0044] The query request is used to request relevant information of the medication instructions and medication guidance corresponding to the drug before using the drug corresponding to the drug identification; wherein the relevant information of the medication instructions and medication guidance is obtained based on the drug instructions corresponding to the drug.

[0045] Among them, drug data processing can be represented as the data processing process involved in the scenario of requesting medication guidance, including data acquisition, data analysis, data output and other data processing processes.

[0046] Among them, the text knowledge base corresponding to the drug identification includes the text information of the drug instructions corresponding to the drug identification; the feature knowledge base corresponding to the drug identification includes the text feature information of the drug instructions corresponding to the drug identification.

[0047] Optionally, the text information in the text knowledge base may include all text data corresponding to the drug instructions, and may also include text data obtained by screening all text data, such as eliminating mixed sentences; the text information in the text knowledge base also includes text data obtained by segmenting, sentence segmenting or word segmentation of all text data.

[0048] Optionally, the text feature information in the feature knowledge base may include semantic feature information corresponding to the text information, such as grammatical structure, grammatical relationship, contextual semantic association and other information describing the semantic meaning; it may also include lexical feature information corresponding to the text information, such as word frequency, part of speech, word length and other information describing the characteristics of words; it may also include logical feature information corresponding to the text information, such as logical conjunctions, conditional statements, argumentation structure and other information describing the logical structure.

[0049] Optionally, text feature information can be represented as a text vector, that is, information represented in the form of a digital vector; based on technologies such as Bag-of-Words, Word Embeddings, TF-IDF (Term Frequency-Inverse Document Frequency), etc., words, phrases, sentences or paragraphs in the text can be converted into the form of mathematical vectors, thereby converting unstructured text information into a form that can be understood and processed by machines, so as to perform various natural language processing tasks such as text analysis, classification, clustering and modeling.

[0050] Exemplarily, the first reference information matched in the text knowledge base is information expressed in text form; the second reference information matched in the feature knowledge base is information expressed in the form of text features; that is, it is equivalent to that the query request matches the corresponding text information and text feature information at the text level and at the text feature level, respectively.

[0051] Step S204: Generate an output content instruction corresponding to the query request based on the first reference information and the second reference information.

[0052] Among them, the output content instructions are used to guide and standardize the output content. They can help the artificial intelligence model better understand user needs and generate more relevant and pertinent answers by providing clear prompts or instructions.

[0053] Optionally, an output content instruction corresponding to the query request can be generated based on the first reference information expressed in text form and the text information corresponding to the second reference information expressed in the form of text features; wherein the text information corresponding to the second reference information can be represented as the original text data corresponding to the text feature information before feature extraction is performed on the text information to obtain the text feature information.

[0054] Optionally, the output content instruction can be expressed as a prompt, which is a method of instructing a machine learning model to start up, which can be expressed in the form of text or sentences to guide the machine learning model to generate output of a specific type, subject or format; based on the provided prompt, it helps to guide the machine learning model to produce output that is more in line with user expectations, thereby providing a better user experience and improving communication efficiency and quality.

[0055] Step S206, the language model is acquired to output answer information matching the output content instruction according to the first reference information and the second reference information, and the answer information is returned to the terminal corresponding to the query request.

[0056] Among them, the language model is a machine learning model that helps understand the structure of the language and generates text data that conforms to grammatical and semantic rules in natural language processing tasks such as language translation, speech recognition, question and answer analysis, and text summarization, thereby improving the efficiency and accuracy of automated text processing.

[0057] Optionally, the language model deployed on the server may be called directly, or an external language model may be called through a communication interface of the server, and the output result of the language model may be obtained through the communication interface.

[0058] Optionally, the language model can be a traditional n-gram model based on statistical methods, or a modern neural network language model based on deep learning, such as the GPT (Generative Pre-trained Transformer) series of models.

[0059] Exemplarily, the first reference information and the second reference information provide text data for analysis and processing by the language model, and the output content instruction guides and regulates the output content of the language model, based on which the answer information output by the language model is obtained.

[0060] In the above-mentioned drug data processing method, according to the query request including the drug identification obtained, the corresponding first reference information is matched in the dimension of text through the text knowledge base, and the corresponding second reference information is matched in the dimension of text features through the feature knowledge base; based on the first reference information and the second reference information, an output content instruction corresponding to the query request is generated, and the language model outputs answer information matching the output content instruction according to the first reference information and the second reference information; based on this, in the scenario of requesting medication instructions, based on the dimensions of text and text features, the corresponding data is first matched, and then the data is analyzed and processed through the language model to obtain the corresponding answer information, thereby realizing multi-dimensional, efficient and accurate data processing, and then reliably and adaptively obtaining the answer information corresponding to the above-mentioned scenario of requesting medication instructions.

[0061] In an exemplary embodiment, before the first reference information corresponding to the query request is matched in the text knowledge base corresponding to the drug identification, and the second reference information corresponding to the query request is matched in the feature knowledge base corresponding to the drug identification, the method further includes steps S302 to S304, wherein:

[0062] Step S302, according to the drug identification, obtain the drug instructions corresponding to the drug identification in the database; the drug instructions in the database are pre-stored drug instructions.

[0063] Optionally, the drug instructions pre-stored in the database can be represented as providing drug instructions for various drugs in the drug information platform, and the drug instructions for various drugs in the drug information platform can be pre-collected into the database, organized and classified; or the drug instructions for various drugs in the drug information platform can be accessed in real time according to the communication interface. Among them, the drug information platform is an online platform or system that specializes in providing drug-related information, and is used to collect, organize, store and share information on various drugs.

[0064] Optionally, the drug instructions pre-stored in the database can also be represented as the drug instructions uploaded to the server through the terminal by other users in the historical period, so that the server provides relevant information of medication guidance through the uploaded drug instructions. After the server provides the relevant information of medication guidance to the user corresponding to the terminal, the server organizes and stores the drug instructions according to the corresponding drug identification.

[0065] Step S304, obtaining a drug instruction sheet document corresponding to the drug identification, parsing the drug instruction sheet document, and obtaining a drug instruction sheet corresponding to the drug identification; the drug instruction sheet document comes from a terminal corresponding to the query request.

[0066] Among them, the drug insert document represents the drug insert in the form of electronic files, scanned files and other documents; electronic files include files in PDF, HTML, EPUB and other formats, and scanned files include digital image files obtained by scanning paper materials.

[0067] Optionally, the paper version of the drug instructions can be photographed and scanned through a terminal with a camera function to obtain a corresponding scanned file.

[0068] Exemplarily, parsing a drug instruction sheet document may be represented as processing a digitized drug instruction sheet document, identifying words and characters therein, and converting them into a text format that is editable and searchable by a computer.

[0069] Optionally, the drug instructions document can be parsed by OCR (Optical Character Recognition) technology to obtain the text information in the drug instructions. The parsing tool pdfminer can be used to extract text, metadata and other contents from the drug instructions document in PDF file format.

[0070] Optionally, after obtaining the drug instructions corresponding to the drug identification, the text information in the drug instructions is extracted to construct a text knowledge base corresponding to the drug identification based on the extracted text information; feature extraction is performed on the text information to construct a feature knowledge base corresponding to the drug identification based on the extracted text feature information, thereby adaptively and real-timely constructing a text knowledge base and a feature knowledge base corresponding to the drug identification based on data processing of the drug instructions.

[0071] Optionally, if the drug instructions have been pre-stored in a database, it means that the text knowledge base and feature knowledge base of the drug identification of the drug instructions are also stored in the database. The existing text knowledge base and the existing feature knowledge base can be directly matched according to the drug identification without rebuilding them, thereby improving data processing efficiency and saving computer resources.

[0072] In this embodiment, on the one hand, the pre-stored drug instructions can be matched directly in the database according to the drug identification; on the other hand, the drug instructions document corresponding to the drug identification can be parsed to obtain the drug instructions; based on this, the diversity of ways to obtain drug instructions is ensured to meet the different usage needs and preferences of users.

[0073] In an exemplary embodiment, before the second reference information corresponding to the query request is matched in the feature knowledge base corresponding to the drug identification, the method further includes steps S302 to S404, wherein:

[0074] Step S402, obtaining text information in the drug instructions corresponding to the drug identification, segmenting the text information according to the segmentation identification in the text information, and obtaining text information segments corresponding to each segmentation identification.

[0075] The segment identifier may be represented as a specific mark or symbol used to identify different parts or paragraphs.

[0076] Optionally, in the text information of the drug instructions, the segment identifier may include a number identifier, such as identifying different parts by numbers or letters; the segment identifier may include a title identifier, such as indicating the title content of each part by bold or specific font size; the segment identifier may include a symbol identifier, such as identifying different parts by specific symbols or icons such as arrows, asterisks, and signs; the segment identifier may include a color identifier, such as identifying different parts by different colors or background colors; the segment identifier may include indents or separators, that is, separating different paragraphs or parts by indents or horizontal separators.

[0077] Optionally, in the drug instructions, the text information can be segmented by title labels such as ingredients, usage and dosage, adverse reactions, contraindications, storage conditions, etc., to obtain text information segments corresponding to each title, which are equivalent to different chapter contents in the drug instructions corresponding to each text information segment, forming a logical chapter division and organization.

[0078] Step S404, truncate each text information segment according to a preset text length to obtain text information sub-segments with matching text lengths, perform feature extraction on each text information sub-segment to obtain text feature information corresponding to each text information sub-segment, and obtain a feature knowledge base corresponding to the drug identification based on the text feature information corresponding to each text information sub-segment.

[0079] Optionally, if a text information segment is intercepted to obtain a first text information sub-segment and a second text information sub-segment in sequence, the text at the end of the first text information sub-segment can be matched with the text at the beginning of the second text information sub-segment; based on this, by allowing the texts between adjacent text information sub-segments to retain overlapping content, an association relationship between adjacent text information sub-segments is established to ensure the contextual coherence of the intercepted text information sub-segments in logical expression.

[0080] Optionally, feature extraction may be performed on a combination of multiple text information sub-segments to obtain text feature information corresponding to the combination of the multiple text information sub-segments; wherein the multiple text information sub-segments may be represented as multiple adjacent and logically coherent text information sub-segments.

[0081] Optionally, in the process of extracting features from each text information sub-segment, each text information sub-segment can be vectorized using an open source Chinese pre-trained representation model (paraphrase-multilingual-MiniLM-L12-v2) to obtain text feature information represented by a digital vector.

[0082] In this embodiment, by segmenting the text information, intercepting the text information segments obtained after the segmentation, and extracting features from the text information sub-segments obtained after the interception, the information to be feature extracted is further refined in the dimension of information size, so as to extract features from the text information more accurately and meticulously, thereby ensuring that the obtained text feature information can describe the features of the text information in detail and specifically.

[0083] In an exemplary embodiment, after obtaining a query request including a drug identification, the method further includes steps S502 to S504; after obtaining the language model to output answer information matching the output content instruction according to the first reference information and the second reference information, the method further includes steps S506 to S508, wherein:

[0084] Step S502: if the correlation between the query request and the drug instructions meets the corresponding threshold condition, the first reference information is matched in the text knowledge base according to the query request, and the second reference information is matched in the feature knowledge base.

[0085] Exemplarily, the correlation between the query request and the drug instructions satisfies the corresponding threshold condition, which can be understood as the question corresponding to the query request is a question that can be derived from the content in the drug instructions, that is, the question corresponding to the query request can be answered accordingly based on the content in the drug instructions.

[0086] Optionally, the correlation between the query request and the drug instructions can be expressed as the degree of match between the information in the query request and the information in the drug instructions; if the question corresponding to the query request is a question about the content in the drug instructions, such as "What are the ingredients of the drug?", "What are the adverse reactions after taking the drug?", etc., then it is judged that the query request has a high correlation with the drug instructions.

[0087] If the question corresponding to the query request is not about the content in the drug instructions, such as "How is the weather today?", or is about content beyond the drug instructions, such as "Does the current weather affect the use of this drug?", then it is judged that the query request has a low relevance to the drug instructions.

[0088] Optionally, if it is detected that the query request contains keywords in the drug instructions such as drug name, drug ingredients, usage and dosage, medical terms, symptom description, etc., then the query request is judged to have a high correlation with the drug instructions; by accessing the previous query history of multiple users for the same drug identification, if the current user's query request has a low correlation with the query history of other users, then the current user's query request is judged to have a low correlation with the drug instructions; by accessing the previous query history of the same user, if the user has previously searched for drug information, medical conditions or related health topics, then the query request is judged to have a high correlation with the drug instructions.

[0089] Step S504: if the correlation between the query request and the drug identification does not meet the corresponding threshold condition, the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request.

[0090] Exemplarily, the correlation between the query request and the drug instructions does not meet the corresponding threshold condition. It can be understood that the question corresponding to the query request does not belong to the questions that can be derived from the content in the drug instructions, that is, the question corresponding to the query request cannot be answered accordingly based on the content in the drug instructions.

[0091] Optionally, the preset response information may be expressed as a fixed response phrase set for a scenario where the relevance between the query request and the drug instructions does not meet a corresponding threshold condition, such as "Based on the drug instructions, related questions cannot be answered."

[0092] Optionally, information with low relevance to the drug instructions may be extracted from the query request information to customize and adaptively set the response words. For example, if the question is "How is the weather today?", the response words may be "According to the drug instructions, questions related to the weather cannot be answered."

[0093] Step S506: If the correlation between the answer information and the drug instructions meets the corresponding threshold condition, the answer information is returned to the terminal corresponding to the query request.

[0094] Exemplarily, the correlation between the answer information and the drug instructions satisfies the corresponding threshold condition, which can be understood as the answer content corresponding to the answer information is an answer that can be obtained based on the content in the drug instructions, or it can be understood as an answer that can be obtained in the drug instructions based on the question corresponding to the query request.

[0095] Optionally, the correlation between the answer information and the drug instructions can be expressed as the degree of match between the information in the answer information and the information in the drug instructions; if the answer content corresponding to the answer information is obtained based on the content in the drug instructions, for example, the answer content is "the ingredients of the drug include A, B and C", "the adverse reaction after taking the drug is drowsiness", etc., then it is judged that the query request is highly correlated with the drug instructions.

[0096] If the answer content corresponding to the answer information is not obtained based on the content in the drug instructions for the query request, for example, the question corresponding to the query request is "What are the components of the drug?", and the answer content is "The drug should be taken once a day", then it is judged that the answer information has a low correlation with the drug instructions; if the answer content corresponding to the answer information is not obtained based on the content in the drug instructions, for example, "The price of the drug is X", then it is judged that the answer information has a low correlation with the drug instructions; if the answer content corresponding to the answer information is obtained based on the content in the drug instructions, but there are errors in the semantic expression, for example, "The adverse reaction after taking the drug is improved sleep quality", then it is judged that the answer information has a low correlation with the drug instructions.

[0097] Optionally, if it is detected that the answer information contains keywords in the drug instructions such as drug name, drug ingredients, usage and dosage, medical terms, symptom description, etc., and the answer information matches the keywords in the query request, then it is judged that the answer information and the drug instructions have a high correlation; by accessing the historical records of answers previously obtained by multiple users for the same drug identification, if the answer information obtained by the current user has a low correlation with the historical records of answers obtained by other users, then it is judged that the answer information of the current user has a low correlation with the drug instructions.

[0098] Step S508: If the correlation between the answer information and the drug identification does not meet the corresponding threshold condition, the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request.

[0099] Exemplarily, the correlation between the answer information and the drug instructions does not meet the corresponding threshold condition. It can be understood that the answer content corresponding to the answer information does not belong to the answer that can be obtained based on the content in the drug instructions, and it can also be understood that the answer cannot be obtained in the drug instructions based on the question corresponding to the query request.

[0100] Optionally, the preset response information may be expressed as a fixed response phrase set for a scenario where the relevance of the answer information to the drug instructions does not meet a corresponding threshold condition, such as "Based on the drug instructions, the relevant questions cannot be answered."

[0101] Optionally, if the relevance between the answer information and the drug instructions does not meet the corresponding threshold condition, data processing may be re-performed based on the original query request to obtain the answer information again and re-judge the relevance between the answer information and the drug instructions.

[0102] Optionally, the relevance between the query request and the drug instructions, as well as the relevance between the answer information and the drug instructions, can be analyzed and screened through an agent intelligent body model to retain qualified query requests and answer information and filter out unqualified query requests and answer information; wherein, the agent intelligent body model is a filter for screening, identifying, and classifying information, which can be applied to natural language processing, data analysis, information management and other scenarios.

[0103] Optionally, if the correlation is expressed in numerical form, for example, by a numerical value between 1 and 10, the threshold condition corresponding to the correlation can be expressed as a maximum numerical threshold and / or a minimum numerical threshold; if the correlation is expressed in level form, for example, by high, medium, and low levels, the threshold condition corresponding to the correlation can be expressed as a specified level or level range.

[0104] In this embodiment, on the one hand, query requests are screened according to their relevance to the drug instructions, and the feasibility of obtaining corresponding answers can be ensured by retaining query requests, while the economical utilization of computer resources can be ensured by filtering query requests. On the other hand, answer information is screened according to its relevance to the drug instructions to ensure the reliability and accuracy of the content of the output answer information.

[0105] In an exemplary embodiment, first reference information corresponding to the query request is matched in a text knowledge base corresponding to the drug identifier, and second reference information corresponding to the query request is matched in a feature knowledge base corresponding to the drug identifier, including steps S602 to S606, wherein:

[0106] Step S602: Match multiple first reference information corresponding to the query request in the text knowledge base, and match multiple second reference information corresponding to the query request in the feature knowledge base.

[0107] Exemplarily, based on the text content in the query request, first reference information represented in text form is matched in the text knowledge base; the query request is converted into a digital vector, and second reference information represented in the form of a digital vector is matched in the feature knowledge base.

[0108] Optionally, the text knowledge base includes multiple text information sub-segments, and the text information sub-segments are obtained based on segmentation and interception processing of the text information; the similarity between the query request and each text information sub-segment in the text knowledge base is obtained, and the text information sub-segment whose similarity reaches a preset threshold is used as the first reference information; the text information sub-segments can also be arranged in descending order according to the size of the similarity, and the text information sub-segment whose ranking reaches a preset threshold is used as the first reference information.

[0109] Optionally, the feature knowledge base includes text feature information corresponding to each text information sub-segment, and the similarity between the query request and each text feature information in the feature knowledge base is obtained, and the text feature information whose similarity reaches a preset threshold is used as the second reference information; or the text feature information can be sorted in descending order according to the similarity, and the text feature information whose ranking reaches a preset threshold is used as the second reference information.

[0110] Optionally, the similarity between the query request represented in text form and the text information sub-segment may be calculated by comparing the content, structure or character level of the text.

[0111] Optionally, the similarity between the query request and the text feature information represented in the form of a digital vector may be calculated by using a vector similarity calculation method such as cosine similarity and Euclidean distance.

[0112] Step S604, based on the similarity between each first reference information and the query request, and the similarity between each text information corresponding to the second reference information and the query request, third reference information is screened from multiple first reference information and multiple text information corresponding to the second reference information.

[0113] Exemplarily, according to the size of the similarity, each first reference information and each second reference information are arranged in descending order, and the information whose ranking reaches a preset threshold is used as the third reference information; wherein, if the similarity corresponding to a certain first reference information meets the preset threshold, the first reference information is directly used as the third reference information; if the similarity corresponding to a certain second reference information meets the preset threshold, the text information sub-segment corresponding to the second reference information is used as the third reference information.

[0114] Step S606: integrate the third reference information into the preset template to obtain an output content instruction corresponding to the query request.

[0115] The template may be represented as a template corresponding to the output content instruction, which is used to exemplarily standardize the architecture of the output content instruction to improve the accuracy and quality of the generated content.

[0116] Exemplarily, the third reference information is integrated into the preset template, that is, the drug instruction data is integrated into the template, so that the output content instruction carries the drug instruction data, thereby enabling the language model to process the drug instruction data specified by the output content instruction.

[0117] Optionally, the query request may be integrated into a preset template so that the output content instruction carries both the drug instructions data and the query data used for the query, thereby enabling the language model to process the specified drug instructions data according to the query data specified by the output content instruction.

[0118] In this embodiment, the first reference information and the second reference information matched in the text knowledge base and the feature knowledge base respectively are comprehensively screened to obtain more accurate drug instruction data, thereby improving the content conciseness and data accuracy of the output content instruction.

[0119] In an exemplary embodiment, obtaining a language model to output answer information matching an output content instruction according to first reference information and second reference information includes step S702, wherein:

[0120] Step S702, input the output content instruction into the language model, and use the language model to filter and organize the information included in the output content instruction to obtain answer information including reference text and response text; the reference text corresponds to the original text corresponding to the query request in the drug instructions, and the response text corresponds to the brief text obtained by organizing the original text according to the query request.

[0121] Optionally, the reference text may be represented as the text content matched by the query request in the text knowledge base, and the text content corresponding to the text feature information matched by the query request in the feature knowledge base.

[0122] Furthermore, the reference text may be represented as a text information sub-segment matched by the query request in the text knowledge base, and a text information sub-segment corresponding to text feature information matched by the query request in the feature knowledge base.

[0123] Exemplarily, the output content instruction carries drug instruction data and a query request. The language model filters and organizes the drug instruction data according to the query request, that is, the drug instruction data is used as a reference text, and the filtered and organized data is used as a response text. The reference text and the response text are combined to obtain answer information.

[0124] Optionally, the process of the language model screening and organizing the information included in the output content instruction can be expressed as filtering the drug instruction data, such as removing repeated sentences, removing entity names with lower importance, etc.; it can also be expressed as integrating the drug instruction data, such as summarizing the data in points, refining key words, etc.; it can also be expressed as correcting the drug instruction data, such as polishing the data in terms of wording and correcting the semantics, etc.

[0125] In this embodiment, the information included in the output content instruction is screened and sorted through a language model to obtain corresponding answer information, which includes a reference text and a response text, thereby ensuring the content integrity of the answer information.

[0126] In an exemplary embodiment, Figure 3 As shown, in the scenario of requesting medication guidance for a certain drug, that is, in the scenario based on the auxiliary understanding and medication guidance of the drug instructions, the drug identification corresponding to the drug is obtained, and the existing drug instructions, text knowledge base, and feature knowledge base are directly matched in the database according to the drug identification; among them, the drug identification of the drug can be identified by obtaining the QR code information on the surface of the drug packaging box, and the drug identification of the drug can also be identified by obtaining the input drug name.

[0127] It is also possible to obtain the uploaded drug instruction manual document and parse it through the parsing tool pdfminer or OCR technology to obtain the drug instruction manual corresponding to the drug identification, and adaptively construct a text knowledge base and feature knowledge base corresponding to the drug identification based on the drug instruction manual.

[0128] Among them, the text information in the drug instruction manual is extracted to obtain a text knowledge base corresponding to the drug identification; further, the text information of the drug instruction manual can be segmented according to the chapter identification to obtain the text information segment corresponding to each chapter identification, and each text information segment is cut according to the preset text length to obtain different text information sub-segments, and the different text information sub-segments are merged into the text knowledge base corresponding to the drug identification; adjacent text information sub-segments have overlapping text parts to ensure the relevance and logical coherence between adjacent text information sub-segments.

[0129] Among them, each text information sub-segment is vectorized through an open source Chinese pre-trained representation model to obtain the text feature information corresponding to each text information sub-segment, and the feature knowledge base corresponding to the drug identification is obtained based on different text feature information.

[0130] After obtaining the text knowledge base and feature knowledge base corresponding to the drug identification, a query request from the terminal is obtained; wherein the query request can be expressed in text form or in voice form; if the query request is expressed in voice form, it needs to be converted into text form for understanding and processing.

[0131] Among them, the query request expressed in text form can be explained by the following examples: "What is the name of this medicine?", "What are the ingredients of the medicine?", "What are the precautions? Are there any side effects?", "How to take this medicine? How many times a day, how many tablets at a time?", "I feel a little dizzy and have angina pectoris after taking this medicine, what should I do?", "Can pregnant women and children take this medicine?", etc.

[0132] Determine whether the query request satisfies the screening condition corresponding to the first filter; if so, it means that the relevance of the query request to the drug instructions meets the corresponding threshold condition, and the question corresponding to the query request can be derived from the content in the drug instructions.

[0133] Based on the text information in the text knowledge base, an ES (Elasticsearch) index library is constructed, and the text information sub-segments corresponding to the n first reference information with the highest similarity to the query request are queried through the ES index library. Among them, ES is a retrieval database engine that can store and search various types of data and provide powerful query and analysis functions.

[0134] Obtain a query request represented by embedding vectorization, and match the text information sub-segments corresponding to the n second reference information with the highest similarity to the query request in the feature knowledge base according to the query request represented by the vectorization. In the field of natural language processing, embedding is the process of mapping data to a low-dimensional vector space, thereby converting text information into a form that can be processed by a machine learning algorithm.

[0135] Among the above 2n text information sub-segments, the n third reference information with the highest similarity are screened; the third reference information is integrated into the preset template to generate a prompt. The third reference information is screened based on the semantic similarity between the vector representation of the text information field and the vector representation of the query request, so as to better ensure the comprehensiveness and accuracy of the screened text fragments; the vector similarity can be calculated by the cosine similarity method.

[0136] Among them, the preset template may include: reference text, that is, the original text in the drug instructions corresponding to the query request, which can be expressed as data after string concatenation of the above-mentioned n third reference information; response text, that is, a brief text obtained by arranging the above-mentioned original text according to the query request; question text, that is, the text content corresponding to the query request.

[0137] Understandably, in the generated prompt, the language model is guided to analyze and process the reference text according to the question text to obtain the answer text.

[0138] Optionally, in the generated prompt, it is also used to guide the language model to answer strictly according to the quoted text to avoid the content that does not exist in the quoted text; it is also used to guide the language model to return a fixed response if it cannot answer the user's current question, such as "Based on the content of the drug instructions, the current question cannot be answered."

[0139] Optionally, only the n first reference information with the highest similarity to the query request matched in the text knowledge base may be merged into a preset template to generate a prompt.

[0140] The prompt is input into the language model, which filters and organizes the drug instructions data in the prompt and obtains answer information based on the drug instructions data.

[0141] Among them, the language model can be expressed as a large language model (LLM), which is an artificial intelligence model designed to understand and generate human language. Large language models can be deployed using large model services such as ChatGPT and Wenxinyiyan, or local private large model services deployed in open source.

[0142] Determine whether the answer information meets the screening condition corresponding to the second filter; if so, it means that the correlation between the answer information and the drug instructions meets the corresponding threshold condition, and then return the answer information to the terminal corresponding to the query request.

[0143] If the query request does not meet the screening conditions corresponding to the first filter, it means that the relevance of the query request to the drug instructions does not meet the corresponding threshold conditions, and it is difficult to obtain the answer corresponding to the query request from the content in the drug instructions. The preset response information is returned to the terminal corresponding to the query request.

[0144] If the answer information does not meet the screening conditions corresponding to the second filter, it means that the relevance of the answer information to the drug instructions does not meet the corresponding threshold conditions, and the obtained answer content does not exist in the drug instructions, then the preset response information will be returned to the terminal corresponding to the query request.

[0145] Optionally, the filter can be a designed and implemented expert knowledge base engine, a classification and recognition model constructed by self-service training, or a discriminator constructed in combination with the LLM large model engine.

[0146] Among them, the preset response information can be expressed as "Hello, according to the drug instructions, the relevant questions cannot be answered", so as to ensure the feasibility of the input and the reliability of the output, avoid processing irrelevant and invalid questions, and avoid feedback of general and invalid answers.

[0147] Based on this, in the scenario of requesting medication guidance for a certain drug, users are provided with more efficient, accurate, and high-quality auxiliary understanding and medication guidance services based on the drug instructions.

[0148] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0149] Based on the same inventive concept, the embodiment of the present application also provides a drug data processing device for implementing the drug data processing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more drug data processing device embodiments provided below can refer to the limitations of the drug data processing method above, and will not be repeated here.

[0150] In an exemplary embodiment, Figure 4 As shown, a drug data processing device is provided, including: a matching module 402, a generating module 404 and an output module 406, wherein:

[0151] The matching module 402 is used to obtain a query request including a drug identifier, match the first reference information corresponding to the query request in the text knowledge base corresponding to the drug identifier, and match the second reference information corresponding to the query request in the feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting the text information in the drug instructions corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information;

[0152] A generating module 404, configured to generate an output content instruction corresponding to the query request based on the first reference information and the second reference information;

[0153] The output module 406 is used to obtain the answer information that matches the output content instruction output by the language model according to the first reference information and the second reference information, and return the answer information to the terminal corresponding to the query request.

[0154] In an exemplary embodiment, the device also includes an acquisition module, which is used to: match the drug instructions corresponding to the drug identification in the database according to the drug identification; the drug instructions in the database are pre-stored drug instructions; obtain the drug instructions document corresponding to the drug identification, parse the drug instructions document, and obtain the drug instructions corresponding to the drug identification; the drug instructions document comes from the terminal corresponding to the query request.

[0155] In an exemplary embodiment, the acquisition module is also used to: acquire text information in a drug instruction sheet corresponding to a drug identification, segment the text information according to segmentation identifiers in the text information, and obtain text information segments corresponding to each segmentation identifier; intercept each text information segment according to a preset text length to obtain text information sub-segments matching the text length, perform feature extraction on each text information sub-segment to obtain text feature information corresponding to each text information sub-segment, and obtain a feature knowledge base corresponding to the drug identification based on the text feature information corresponding to each text information sub-segment.

[0156] In an exemplary embodiment, the matching module 402 is also used for: if the correlation between the query request and the drug identification meets the corresponding threshold condition, then matching the first reference information in the text knowledge base and matching the second reference information in the feature knowledge base according to the query request; if the correlation between the query request and the drug instructions does not meet the corresponding threshold condition, then terminating the query task corresponding to the query request, and returning the preset response information to the terminal corresponding to the query request; if the correlation between the answer information and the drug instructions meets the corresponding threshold condition, then returning the answer information to the terminal corresponding to the query request; if the correlation between the answer information and the drug identification does not meet the corresponding threshold condition, then terminating the query task corresponding to the query request, and returning the preset response information to the terminal corresponding to the query request.

[0157] In an exemplary embodiment, the matching module 402 is also used to: match multiple first reference information corresponding to the query request in the text knowledge base, and match multiple second reference information corresponding to the query request in the feature knowledge base; based on the similarity between each first reference information and the query request, and the similarity between each second reference information corresponding to the text information and the query request, filter out third reference information from the multiple first reference information and from the text information corresponding to the multiple second reference information; integrate the third reference information into the preset template to obtain the output content instruction corresponding to the query request.

[0158] In an exemplary embodiment, the output module 406 is also used to: input the output content instruction into the language model, filter and organize the information included in the output content instruction through the language model, and obtain answer information including reference text and response text; the reference text corresponds to the original text corresponding to the query request in the drug instructions, and the response text corresponds to the brief text obtained by organizing the original text according to the query request.

[0159] Each module in the above-mentioned drug data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0160] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data for processing drug data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a drug data processing method is implemented.

[0161] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0162] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0163] Obtaining a query request including a drug identifier, matching first reference information corresponding to the query request in a text knowledge base corresponding to the drug identifier, and matching second reference information corresponding to the query request in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information;

[0164] generating an output content instruction corresponding to the query request based on the first reference information and the second reference information;

[0165] The language model is obtained to output answer information matching the output content instruction according to the first reference information and the second reference information, and the answer information is returned to the terminal corresponding to the query request.

[0166] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to the drug identification, the drug instructions corresponding to the drug identification are matched in the database; the drug instructions in the database are pre-stored drug instructions; the drug instructions document corresponding to the drug identification is obtained, and the drug instructions document is parsed to obtain the drug instructions corresponding to the drug identification; the drug instructions document comes from the terminal corresponding to the query request.

[0167] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining text information in the drug instructions corresponding to the drug identification, segmenting the text information according to the segmentation identifiers in the text information, and obtaining text information segments corresponding to each segmentation identifier; intercepting each text information segment according to a preset text length to obtain text information sub-segments matching the text length, performing feature extraction on each text information sub-segment to obtain text feature information corresponding to each text information sub-segment, and obtaining a feature knowledge base corresponding to the drug identification based on the text feature information corresponding to each text information sub-segment.

[0168] In one embodiment, when the processor executes the computer program, the following steps are also implemented: if the correlation between the query request and the drug identification meets the corresponding threshold condition, the first reference information is matched in the text knowledge base and the second reference information is matched in the feature knowledge base according to the query request; if the correlation between the query request and the drug instructions does not meet the corresponding threshold condition, the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request; if the correlation between the answer information and the drug instructions meets the corresponding threshold condition, the answer information is returned to the terminal corresponding to the query request; if the correlation between the answer information and the drug identification does not meet the corresponding threshold condition, the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request.

[0169] In one embodiment, when the processor executes the computer program, the following steps are also implemented: matching multiple first reference information corresponding to the query request in the text knowledge base, and matching multiple second reference information corresponding to the query request in the feature knowledge base; based on the similarity between each first reference information and the query request, and the similarity between each text information corresponding to the second reference information and the query request, filtering out third reference information from the multiple first reference information and from the text information corresponding to the multiple second reference information; integrating the third reference information into a preset template to obtain an output content instruction corresponding to the query request.

[0170] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the output content instruction is input into the language model, and the information included in the output content instruction is screened and sorted through the language model to obtain answer information including reference text and response text; the reference text corresponds to the original text corresponding to the query request in the drug instructions, and the response text corresponds to the brief text obtained by sorting the original text according to the query request.

[0171] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0172] Obtaining a query request including a drug identifier, matching first reference information corresponding to the query request in a text knowledge base corresponding to the drug identifier, and matching second reference information corresponding to the query request in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information;

[0173] generating an output content instruction corresponding to the query request based on the first reference information and the second reference information;

[0174] The language model is obtained to output answer information matching the output content instruction according to the first reference information and the second reference information, and the answer information is returned to the terminal corresponding to the query request.

[0175] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the drug identification, the drug instructions corresponding to the drug identification are matched in the database; the drug instructions in the database are pre-stored drug instructions; the drug instructions document corresponding to the drug identification is obtained, and the drug instructions document is parsed to obtain the drug instructions corresponding to the drug identification; the drug instructions document comes from the terminal corresponding to the query request.

[0176] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining text information in the drug instructions corresponding to the drug identification, segmenting the text information according to the segmentation identifiers in the text information, and obtaining text information segments corresponding to each segmentation identifier; intercepting each text information segment according to a preset text length to obtain text information sub-segments matching the text length, performing feature extraction on each text information sub-segment to obtain text feature information corresponding to each text information sub-segment, and obtaining a feature knowledge base corresponding to the drug identification based on the text feature information corresponding to each text information sub-segment.

[0177] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the correlation between the query request and the drug identification meets the corresponding threshold condition, the first reference information is matched in the text knowledge base and the second reference information is matched in the feature knowledge base according to the query request; if the correlation between the query request and the drug instructions does not meet the corresponding threshold condition, the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request; if the correlation between the answer information and the drug instructions meets the corresponding threshold condition, the answer information is returned to the terminal corresponding to the query request; if the correlation between the answer information and the drug identification does not meet the corresponding threshold condition, the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request.

[0178] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: matching multiple first reference information corresponding to the query request in the text knowledge base, and matching multiple second reference information corresponding to the query request in the feature knowledge base; based on the similarity between each first reference information and the query request, and the similarity between each second reference information corresponding to the text information and the query request, filtering out third reference information from the multiple first reference information and the text information corresponding to the multiple second reference information; integrating the third reference information into the preset template to obtain an output content instruction corresponding to the query request.

[0179] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the output content instruction is input into the language model, and the information included in the output content instruction is screened and sorted through the language model to obtain answer information including reference text and response text; the reference text corresponds to the original text corresponding to the query request in the drug instructions, and the response text corresponds to the brief text obtained by sorting the original text according to the query request.

[0180] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0181] Obtaining a query request including a drug identifier, matching first reference information corresponding to the query request in a text knowledge base corresponding to the drug identifier, and matching second reference information corresponding to the query request in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information;

[0182] generating an output content instruction corresponding to the query request based on the first reference information and the second reference information;

[0183] The language model is obtained to output answer information matching the output content instruction according to the first reference information and the second reference information, and the answer information is returned to the terminal corresponding to the query request.

[0184] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the drug identification, the drug instructions corresponding to the drug identification are matched in the database; the drug instructions in the database are pre-stored drug instructions; the drug instructions document corresponding to the drug identification is obtained, and the drug instructions document is parsed to obtain the drug instructions corresponding to the drug identification; the drug instructions document comes from the terminal corresponding to the query request.

[0185] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining text information in the drug instructions corresponding to the drug identification, segmenting the text information according to the segmentation identifiers in the text information, and obtaining text information segments corresponding to each segmentation identifier; intercepting each text information segment according to a preset text length to obtain text information sub-segments matching the text length, performing feature extraction on each text information sub-segment to obtain text feature information corresponding to each text information sub-segment, and obtaining a feature knowledge base corresponding to the drug identification based on the text feature information corresponding to each text information sub-segment.

[0186] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the correlation between the query request and the drug identification meets the corresponding threshold condition, the first reference information is matched in the text knowledge base and the second reference information is matched in the feature knowledge base according to the query request; if the correlation between the query request and the drug instructions does not meet the corresponding threshold condition, the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request; if the correlation between the answer information and the drug instructions meets the corresponding threshold condition, the answer information is returned to the terminal corresponding to the query request; if the correlation between the answer information and the drug identification does not meet the corresponding threshold condition, the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request.

[0187] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: matching multiple first reference information corresponding to the query request in the text knowledge base, and matching multiple second reference information corresponding to the query request in the feature knowledge base; based on the similarity between each first reference information and the query request, and the similarity between each second reference information corresponding to the text information and the query request, filtering out third reference information from the multiple first reference information and the text information corresponding to the multiple second reference information; integrating the third reference information into the preset template to obtain an output content instruction corresponding to the query request.

[0188] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the output content instruction is input into the language model, and the information included in the output content instruction is screened and sorted through the language model to obtain answer information including reference text and response text; the reference text corresponds to the original text corresponding to the query request in the drug instructions, and the response text corresponds to the brief text obtained by sorting the original text according to the query request.

[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0190] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0191] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0192] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A drug data processing method, characterized in that: The method comprises: A query request including a drug identifier is obtained, and first reference information corresponding to the query request is matched in a text knowledge base corresponding to the drug identifier, and second reference information corresponding to the query request is matched in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information; generating an output content instruction corresponding to the query request based on the first reference information and the second reference information; The language model is acquired to output answer information matching the output content instruction according to the first reference information and the second reference information, and the answer information is returned to the terminal corresponding to the query request.

2. The method according to claim 1, characterized in that Before the first reference information corresponding to the query request is matched in the text knowledge base corresponding to the drug identification, and the second reference information corresponding to the query request is matched in the feature knowledge base corresponding to the drug identification, one of the following two steps is also included: According to the drug identification, a drug instruction sheet corresponding to the drug identification is obtained by matching in a database; the drug instruction sheet in the database is a pre-stored drug instruction sheet; A drug instruction manual document corresponding to the drug identification is obtained, and the drug instruction manual document is parsed to obtain a drug instruction manual corresponding to the drug identification; the drug instruction manual document comes from a terminal corresponding to the query request.

3. The method according to claim 1, characterized in that Before matching the second reference information corresponding to the query request in the feature knowledge base corresponding to the drug identification, the method further includes: Acquire text information in the drug instructions corresponding to the drug identifier, and segment the text information according to segment identifiers in the text information to obtain text information segments corresponding to the segment identifiers; Each text information segment is truncated according to a preset text length to obtain a text information sub-segment with matching text length, and features are extracted for each text information sub-segment to obtain text feature information corresponding to each text information sub-segment. Based on the text feature information corresponding to each text information sub-segment, a feature knowledge base corresponding to the drug identification is obtained.

4. The method according to claim 1, characterized in that: After obtaining the query request including the drug identification, the method further includes: If the correlation between the query request and the drug identification meets the corresponding threshold condition, matching the first reference information in the text knowledge base and matching the second reference information in the feature knowledge base according to the query request; If the correlation between the query request and the drug instructions does not meet the corresponding threshold condition, then the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request; After the language model is acquired to output answer information matching the output content instruction according to the first reference information and the second reference information, the method further includes: If the correlation between the answer information and the drug instructions meets the corresponding threshold condition, the answer information is returned to the terminal corresponding to the query request; If the correlation between the answer information and the drug identification does not meet the corresponding threshold condition, the query task corresponding to the query request is terminated, and the preset response information is returned to the terminal corresponding to the query request.

5. The method according to claim 1, characterized in that The first reference information corresponding to the query request is matched in the text knowledge base corresponding to the drug identification, and the second reference information corresponding to the query request is matched in the feature knowledge base corresponding to the drug identification, including: Matching a plurality of first reference information corresponding to the query request in the text knowledge base, and matching a plurality of second reference information corresponding to the query request in the feature knowledge base; Based on the similarities between each first reference information and the query request, and the similarities between each text information corresponding to the second reference information and the query request, filtering out third reference information from the plurality of first reference information and the text information corresponding to the plurality of second reference information; The third reference information is integrated into a preset template to obtain an output content instruction corresponding to the query request.

6. The method according to claim 1, characterized in that The acquiring language model outputs answer information matching the output content instruction according to the first reference information and the second reference information, including: The output content instruction is input into the language model, and the information included in the output content instruction is screened and sorted through the language model to obtain answer information including reference text and response text; the reference text corresponds to the original text in the drug instructions corresponding to the query request, and the response text corresponds to the brief text obtained by sorting the original text according to the query request.

7. A drug data processing device, characterized in that: The device comprises: A matching module, used to obtain a query request including a drug identifier, match first reference information corresponding to the query request in a text knowledge base corresponding to the drug identifier, and match second reference information corresponding to the query request in a feature knowledge base corresponding to the drug identifier; the information in the text knowledge base is obtained by pre-extracting text information in a drug instruction sheet corresponding to the drug identifier, and the information in the feature knowledge base is obtained by pre-extracting features from the text information; A generating module, configured to generate an output content instruction corresponding to the query request based on the first reference information and the second reference information; An output module is used to obtain a language model to output answer information matching the output content instruction according to the first reference information and the second reference information, and return the answer information to a terminal corresponding to the query request.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Data processing method and device, storage medium and electronic terminal

    CN111008269A

  • Medication guidance method, medication guidance device and computer readable storage medium

    CN112053760A

  • Question and answer reply method and system based on large model, terminal and storage medium

    CN117609475A

  • Drug retrieval processing method and device, computer equipment and readable storage medium

    CN117877760A

  • Drug knowledge question-answering method and device, electronic equipment and storage medium

    CN118051598A