CN119202155A - Problem-solving method, device, computer equipment and medium based on artificial intelligence - Google Patents

Problem-solving method, device, computer equipment and medium based on artificial intelligence Download PDF

Info

Publication number
CN119202155A
CN119202155A CN202411155830.1A CN202411155830A CN119202155A CN 119202155 A CN119202155 A CN 119202155A CN 202411155830 A CN202411155830 A CN 202411155830A CN 119202155 A CN119202155 A CN 119202155A
Authority
CN
China
Prior art keywords
target
text
question
document
answer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411155830.1A
Other languages
Chinese (zh)
Inventor
朱威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202411155830.1A priority Critical patent/CN119202155A/en
Publication of CN119202155A publication Critical patent/CN119202155A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • G06N5/025Extracting rules from data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/041Abduction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/043Distributed expert systems; Blackboards
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请属于人工智能领域与数字医疗领域,涉及一种基于人工智能的问题处理方法、装置、计算机设备及存储介质,包括:接收用户输入的问题文本;对问题文本进行预处理得到目标问题文本;从医疗知识库中查询出与目标问题文本符合相关关系的目标文档;基于目标问题文本与目标文档生成第一模型输入,并通过目标语言模型对第一模型输入进行信息提取得到目标信息;基于目标问题文本与目标信息生成第二模型输入,并通过目标语言模型对第二模型输入进行推理处理得到回答文本;对回答文本进行优化得到目标回答文本;将目标回答文本返回给用户。此外,本申请还涉及区块链技术,目标回答文本可存储于区块链中。本申请提高了医疗问答的处理效率与回答准确性。

The present application belongs to the field of artificial intelligence and digital medicine, and relates to a problem processing method, device, computer equipment and storage medium based on artificial intelligence, including: receiving a question text input by a user; preprocessing the question text to obtain a target question text; querying a target document that is relevant to the target question text from a medical knowledge base; generating a first model input based on the target question text and the target document, and extracting information from the first model input through a target language model to obtain target information; generating a second model input based on the target question text and the target information, and inferring the second model input through a target language model to obtain an answer text; optimizing the answer text to obtain a target answer text; and returning the target answer text to the user. In addition, the present application also relates to blockchain technology, and the target answer text can be stored in a blockchain. The present application improves the processing efficiency and answer accuracy of medical questions and answers.

Description

Problem processing method and device based on artificial intelligence, computer equipment and medium
Technical Field
The application relates to the technical field of artificial intelligence development and the field of digital medical treatment, in particular to a problem processing method, a device, computer equipment and a storage medium based on artificial intelligence.
Background
With the rapid development of artificial intelligence technology, a local knowledge base question-answering system based on a large model has become an important means for improving the quality and efficiency of information service, and particularly in the medical field, accurate and efficient information acquisition has immeasurable value for clinical decisions, patient education and scientific research activities. However, user privacy protection becomes a non-negligible core problem when constructing such systems. Advanced large language models such as ChatGPT in the current market have strong natural language processing and knowledge reasoning capabilities, but high deployment cost, data privacy processing complexity and dependence on external data, so that the direct application to a local knowledge base question-answering system faces a plurality of challenges.
First, large models, either open-sourced or proprietary, but limited in capabilities, appear to be frustrating when dealing with complex problems in the medical field. The medical data has high professional, privacy and timeliness, and the model is required to have deep medical knowledge accumulation and can be used for efficient and accurate information extraction and reasoning on the premise of protecting privacy. The current available models are difficult to meet actual demands in terms of automatic summarization, reasoning and personalized response capability in massive medical data.
Second, the workflow of the conventional local knowledge base question-answering system has significant drawbacks. Such systems typically rely on a simple search recall mechanism to splice the retrieved relevant documents directly with the questions as input to a large language model. The processing mode not only increases the processing burden of the model and requires the model to have extremely high text understanding and generating capability, but also is extremely easy to cause lengthy and unfocused generated answers and low accuracy, thereby affecting the user experience.
Disclosure of Invention
The embodiment of the application aims to provide a problem processing method, device, computer equipment and storage medium based on artificial intelligence, so as to solve the technical problem that the generated answer accuracy is low in the existing local knowledge base question-answering system.
In order to solve the above technical problems, the embodiment of the present application provides a problem processing method based on artificial intelligence, which adopts the following technical scheme:
receiving a question text input by a user;
Preprocessing the question text to obtain a corresponding target question text;
Inquiring a target document which accords with a preset correlation with the target problem text from a preset medical knowledge base;
generating a corresponding first model input based on the target problem text and the target document, and extracting information from the first model input through a preset target language model to extract target information related to the problem text from the target document;
generating a corresponding second model input based on the target question text and the target information, and carrying out reasoning processing on the second model input through the target language model to obtain a corresponding answer text;
Optimizing the answer text to obtain a corresponding target answer text;
And returning the target answer text to the user.
Further, the step of querying the target document which accords with the preset correlation with the target question text from the preset medical knowledge base specifically includes:
Invoking a pre-trained document vector characterization model;
converting the problem text into a corresponding problem vector based on the vector characterization model;
Respectively calculating the similarity between the problem vector and the vector of each document in the medical knowledge base;
Sorting all the documents based on the order of the similarity from large to small to obtain a corresponding document sorting list;
sequentially screening out first documents with target quantity from the document sorting list;
extracting key contents from the first document to obtain a corresponding second document;
And taking the second document as the target document.
Further, the step of optimizing the answer text to obtain a corresponding target answer text specifically includes:
Removing redundancy processing is carried out on the answer text, and a corresponding first answer text is obtained;
carrying out grammar correction processing on the first answer text to obtain a corresponding second answer text;
and taking the second answer text as the target answer text.
Further, the step of returning the target answer text to the user specifically includes:
obtaining a target display format;
converting the target answer text based on the target display format to obtain a converted target answer text;
calling a preset user interface;
the target answer text is presented to the user based on the user interface.
Further, the step of preprocessing the question text to obtain a corresponding target question text specifically includes:
performing irrelevant information removal processing on the question text to obtain a corresponding first question text;
Acquiring a preset standard format;
Performing format conversion processing on the first question text based on the standard format to obtain a corresponding second question text;
and taking the second question text as the target question text.
Further, before the step of generating the first model input corresponding to the target document based on the target question text and extracting information from the first model input through a preset target language model to extract target information related to the question text from the target document, the method further includes:
Constructing a medical question-answer pair based on a preset large language model;
labeling the medical question-answering pair to obtain corresponding medical sample data;
dividing the medical sample data into a training set and a testing set;
calling a preset language model;
Acquiring a preset improved cross entropy loss function;
Fine tuning the language model by using the improved cross entropy loss function and the training set to obtain a corresponding appointed language model;
performing performance testing on the specified language model based on the test set;
and if the appointed language model passes the performance test, taking the appointed language model as the target language model.
Further, the step of obtaining a preset improved cross entropy loss function specifically includes:
Acquiring a cross entropy loss function;
Acquiring a preset weight adjustment strategy;
adjusting the cross entropy loss function based on the weight adjustment strategy to obtain an adjusted cross entropy loss function;
And taking the adjusted cross entropy loss function as the improved cross entropy loss function.
In order to solve the above technical problems, the embodiment of the present application further provides an artificial intelligence-based problem processing apparatus, which adopts the following technical scheme:
the receiving module is used for receiving the question text input by the user;
the preprocessing module is used for preprocessing the question text to obtain a corresponding target question text;
The query module is used for querying a target document which accords with a preset correlation with the target problem text from a preset medical knowledge base;
The extraction module is used for generating corresponding first model input based on the target problem text and the target document, and extracting information from the first model input through a preset target language model so as to extract target information related to the problem text from the target document;
the reasoning module is used for generating a corresponding second model input based on the target question text and the target information, and carrying out reasoning processing on the second model input through the target language model to obtain a corresponding answer text;
the optimizing module is used for optimizing the answer text to obtain a corresponding target answer text;
and the return module is used for returning the target answer text to the user.
In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical schemes:
receiving a question text input by a user;
Preprocessing the question text to obtain a corresponding target question text;
Inquiring a target document which accords with a preset correlation with the target problem text from a preset medical knowledge base;
generating a corresponding first model input based on the target problem text and the target document, and extracting information from the first model input through a preset target language model to extract target information related to the problem text from the target document;
generating a corresponding second model input based on the target question text and the target information, and carrying out reasoning processing on the second model input through the target language model to obtain a corresponding answer text;
Optimizing the answer text to obtain a corresponding target answer text;
And returning the target answer text to the user.
In order to solve the above technical problems, an embodiment of the present application further provides a computer readable storage medium, which adopts the following technical schemes:
receiving a question text input by a user;
Preprocessing the question text to obtain a corresponding target question text;
Inquiring a target document which accords with a preset correlation with the target problem text from a preset medical knowledge base;
generating a corresponding first model input based on the target problem text and the target document, and extracting information from the first model input through a preset target language model to extract target information related to the problem text from the target document;
generating a corresponding second model input based on the target question text and the target information, and carrying out reasoning processing on the second model input through the target language model to obtain a corresponding answer text;
Optimizing the answer text to obtain a corresponding target answer text;
And returning the target answer text to the user.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
The method comprises the steps of firstly receiving a question text input by a user, preprocessing the question text to obtain a corresponding target question text, inquiring a target document which accords with a preset correlation with the target question text from a preset medical knowledge base, generating a corresponding first model input based on the target question text and the target document, extracting information from the first model input through a preset target language model to extract target information related to the question text from the target document, generating a corresponding second model input based on the target question text and the target information, performing inference processing on the second model input through the target language model to obtain a corresponding answer text, further performing optimization processing on the answer text to obtain a corresponding target answer text, and finally returning the target answer text to the user. The application constructs the local knowledge question-answering system aiming at the medical field and based on the preset target language model, and can accurately answer the question text input by the user by using the local knowledge question-answering system, thereby improving the processing efficiency of the medical question-answering and the accuracy of the generated target answer text.
Drawings
In order to more clearly illustrate the solution of the present application, a brief description will be given below of the drawings required for the description of the embodiments of the present application, it being apparent that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without the exercise of inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of an artificial intelligence based problem processing method in accordance with the present application;
FIG. 3 is a schematic diagram illustrating one embodiment of an artificial intelligence based problem processing apparatus in accordance with the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device in accordance with the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs, the terms used in the description herein are used for the purpose of describing particular embodiments only and are not intended to limit the application, and the terms "comprising" and "having" and any variations thereof in the description of the application and the claims and the above description of the drawings are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to make the person skilled in the art better understand the solution of the present application, the technical solution of the embodiment of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Mov i ng P i cture Experts G roup Aud i o Layer I I I, dynamic video expert compression standard audio plane 3), MP4 (Mov i ng P i ctu re Experts G roup Aud i o Layer I V, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the problem processing method based on artificial intelligence provided by the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the problem processing device based on artificial intelligence is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow chart of one embodiment of an artificial intelligence based problem processing method in accordance with the present application is shown. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs. The problem processing method based on the artificial intelligence provided by the embodiment of the application can be applied to any scene needing medical knowledge question and answer, and can be applied to products of the scenes, such as medical knowledge question and answer in the digital medical field. The problem processing method based on artificial intelligence comprises the following steps:
step S201, receiving a question text input by a user.
In this embodiment, the electronic device (e.g., the server/terminal device shown in fig. 1) on which the artificial intelligence-based problem processing method operates may acquire the problem text through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection may include, but is not limited to, 3G/4G/5G connections, wifi connections, bluetooth connections, wimax connections, Z i gbee connections, UWB (u l t ra W i deband) connections, and other now known or later developed wireless connection means. The application can be applied to the business scenario of medical knowledge questions and answers in the digital medical field, and the execution subject of the application can be a medical knowledge question and answer system. Wherein, a user friendly interface is designed in advance in the medical knowledge question-answering system, allowing the user to input questions. And receives the question text input by the user in the user-friendly interface through the related interface or the front-end form submitting mechanism. The above-mentioned problem text is specifically a medical related problem, for example, "is a bar on a pregnancy test stick obvious, is a shallow bar, is a pregnancy.
Step S202, preprocessing the question text to obtain a corresponding target question text.
In this embodiment, the specific implementation process of preprocessing the question text to obtain the corresponding target question text will be described in further detail in the following specific embodiments, which will not be described herein.
Step S203, inquiring a target document which accords with a preset correlation with the target question text from a preset medical knowledge base.
In this embodiment, the medical knowledge base is a local medical knowledge base. The process of building a medical knowledge base includes collecting data by collecting medical related documents from various sources such as medical books, research papers, medical websites, government reports, etc. And cleaning and finishing, namely cleaning the collected documents, including removing irrelevant information, unifying formats and the like. And storing the cleaned and tidied document in a local database to ensure quick access. The specific implementation process of querying the target document which accords with the preset correlation with the target question text from the preset medical knowledge base will be described in further detail in the following specific embodiments, and will not be described in any more detail herein.
Step S204, generating a corresponding first model input based on the target question text and the target document, and extracting information from the first model input through a preset target language model to extract target information related to the question text from the target document.
In this embodiment, the target question text and the target document are input as the first model by stitching them into a format that can be understood by the target language model. And extracting information from the first model input by using a target language model through an extraction method, extracting information related to a target problem text, and arranging the extracted information into a structured form (such as JSON, XML and the like) to obtain the target information. The present application will be described in further detail in the following embodiments, and the description will not be repeated here.
Step S205, generating a corresponding second model input based on the target question text and the target information, and performing reasoning processing on the second model input through the target language model to obtain a corresponding answer text.
In this embodiment, the target question text and the target information are input as the second model by concatenating them into a format that can be understood by the target language model. And then, the target language model is used again, and a section of coherent and accurate answer text is generated according to the input information in a generation mode.
And S206, performing optimization processing on the answer text to obtain a corresponding target answer text.
In this embodiment, the foregoing specific implementation process of optimizing the answer text to obtain the corresponding target answer text will be described in further detail in the following specific embodiments, which will not be described herein.
And step S207, returning the target answer text to the user.
In this embodiment, the above implementation process of returning the target answer text to the user, which will be described in further detail in the following embodiments, will not be described herein.
The method comprises the steps of firstly receiving a question text input by a user, preprocessing the question text to obtain a corresponding target question text, inquiring a target document which accords with a preset correlation with the target question text from a preset medical knowledge base, generating a corresponding first model input based on the target question text and the target document, extracting information from the first model input through a preset target language model to extract target information related to the question text from the target document, generating a corresponding second model input based on the target question text and the target information, performing inference processing on the second model input through the target language model to obtain a corresponding answer text, further performing optimization processing on the answer text to obtain a corresponding target answer text, and finally returning the target answer text to the user. The application constructs the local knowledge question-answering system aiming at the medical field and based on the preset target language model, and can accurately answer the question text input by the user by using the local knowledge question-answering system, thereby improving the processing efficiency of the medical question-answering and the accuracy of the generated target answer text.
In some alternative implementations, step S203 includes the steps of:
invoking a pre-trained document vector characterization model.
In this embodiment, a document vector characterization model having a model function of converting a document into a high-dimensional vector may be constructed by selecting a part of the document from the medical knowledge base as a training data set and training a pre-selected initial model. Wherein, the initial model adopts a model based on T ransformer, such as BERT, roBERTa and the like.
And converting the problem text into a corresponding problem vector based on the vector characterization model.
In this embodiment, the question text is input into the vector characterization model, so that the question text is converted into a corresponding question vector through the vector characterization model.
And respectively calculating the similarity between the problem vector and the vector of each document in the medical knowledge base.
In this embodiment, the similarity between the problem vector and the vector of each document in the medical knowledge base may be calculated by using a similarity algorithm, respectively. The selection of the similarity algorithm is not particularly limited, and for example, cosine similarity, euclidean distance, and the like can be adopted.
And sorting all the documents based on the order of the similarity from large to small to obtain a corresponding document sorting list.
In this embodiment, all the documents may be ranked in order of high similarity, and the document with the highest similarity score is most relevant to the problem entered by the user.
And sequentially screening the first documents with the target quantity from the document sorting list.
In this embodiment, the first document may be selected by selecting the first m most relevant documents (doc_1, doc_2,..doc_m) from the ranked document ranking list. The value of the target number m is not specifically limited, and may be set according to actual service usage requirements, for example, may be set to 5.
And extracting the key content of the first document to obtain a corresponding second document.
In this embodiment, the key content extraction process is performed on the first document to extract the key paragraphs in the first document, so as to obtain the second document, so that the workload of data processing can be reduced when information extraction is performed subsequently, and the extraction efficiency of information extraction is improved.
And taking the second document as the target document.
The method comprises the steps of calling a pre-trained document vector characterization model, converting a problem text into a corresponding problem vector based on the vector characterization model, then respectively calculating the similarity between the problem vector and the vector of each document in the medical knowledge base, then sequencing all the documents based on the sequence from big to small of the similarity to obtain a corresponding document sequencing list, sequentially screening out a target number of first documents from the document sequencing list, further carrying out key content extraction processing on the first documents to obtain a corresponding second document, and finally taking the second document as the target document. According to the application, the medical knowledge base is subjected to the document query processing of the target problem text based on the use of the document vector characterization model and the processing mode of vector similarity calculation, so that the target document most relevant to the target problem text can be rapidly and accurately queried from the medical knowledge base, the query efficiency of the target document is improved, and the data accuracy of the obtained target document is ensured.
In some alternative implementations of the present embodiment, step S206 includes the steps of:
And removing redundancy processing is carried out on the answer text, so that a corresponding first answer text is obtained.
In this embodiment, the redundant removal process is completed by removing irrelevant contents, such as a word of a mood, a stop word, and the like, from the answer text, and a corresponding first answer text is obtained.
And carrying out grammar correction processing on the first answer text to obtain a corresponding second answer text.
In this embodiment, the above grammar correction processing refers to processing of correcting grammar errors on the first answer text, so that grammar accuracy of the obtained second answer text can be ensured.
And taking the second answer text as the target answer text.
The method comprises the steps of removing redundancy from the answer text to obtain a corresponding first answer text, correcting grammar processing on the first answer text to obtain a corresponding second answer text, and taking the second answer text as the target answer text. According to the application, after the second model input is processed by reasoning through the target language model to obtain the corresponding answer text, redundant processing and grammar correction processing are further carried out on the answer text to obtain the corresponding target answer text, so that the simplicity and accuracy of the target answer text are effectively ensured. And the target answer text is returned to the user, so that the user's experience can be ensured.
In some alternative implementations, step S207 includes the steps of:
And obtaining a target display format.
In this embodiment, the selection of the target display mode is not specifically limited, and may be a mode suitable for display, for example, HTML, mar kdown, etc.
And converting the target answer text based on the target display format to obtain a converted target answer text.
In this embodiment, the target answer text is converted into a format matching the target presentation format, so as to obtain a converted target answer text.
And calling a preset user interface.
In this embodiment, the user interface is a pre-built interface for data interaction with a user.
The target answer text is presented to the user based on the user interface.
In this embodiment, the target answer text is displayed to the user by using the user interface, for example, the target answer text may be displayed directly in the client, or the user may be notified by mail, short message, or the like.
The method comprises the steps of obtaining a target display format, converting the target answer text based on the target display format to obtain a converted target answer text, calling a preset user interface, and displaying the target answer text to the user based on the user interface. After the answer text is optimized to obtain the corresponding target answer text, the method and the device also intelligently convert the target answer text based on the target display format to obtain the converted target answer text so as to convert the target answer text into a format suitable for display. And then displaying the target answer text to the user based on a preset user interface, so that the user can conveniently and comfortably check the target answer text, the use experience of the user is further improved, and the display intelligence of the target answer text is improved.
In some alternative implementations, step S202 includes the steps of:
and performing irrelevant information removal processing on the question text to obtain a corresponding first question text.
In this embodiment, the irrelevant information may specifically include irrelevant symbols.
And acquiring a preset standard format.
In this embodiment, the standard format may be a preset text standard format, for example, a unified lower case format or a unified upper case format.
And carrying out format conversion processing on the first question text based on the standard format to obtain a corresponding second question text.
In this embodiment, the first question text is converted into a format matching the standard format, so as to obtain a corresponding second question text.
And taking the second question text as the target question text.
The method comprises the steps of obtaining a corresponding first question text by removing irrelevant information from the question text, obtaining a preset standard format, performing format conversion processing on the first question text based on the standard format to obtain a corresponding second question text, and taking the second question text as the target question text. According to the method, the device and the system, the problem text is subjected to irrelevant information removal processing and format conversion processing based on a standard format, so that the problem text is preprocessed rapidly and intelligently, and the accuracy of the obtained target problem text is guaranteed.
In some optional implementations of this embodiment, before step S204, the electronic device may further perform the following steps:
And constructing medical question-answer pairs based on a preset large language model.
In this embodiment, the large language model may specifically be a large language model such as ChatGPT. The process of constructing a medical question-answer pair includes designing a series of medical-related question templates according to actual medical treatment requirements, or automatically generating medical questions directly using ChatGPT models. And then, answering the medical questions by using the basic data set or an external knowledge base (such as an online medical forum and a question-answer community) to generate corresponding medical question-answer pairs.
And labeling the medical question-answering pair to obtain corresponding medical sample data.
In this embodiment, the medical expert or the trained data annotator may perform manual examination and annotation processing on the generated medical question-answer pair, and ensure accuracy, relevance and reasonability of the medical question-answer pair, so as to obtain corresponding initial medical sample data. In addition, the marked initial medical sample data is arranged into a format suitable for model training, so that the medical sample data is obtained.
The medical sample data is divided into a training set and a testing set.
In this embodiment, the medical sample data may be divided into a training set and a test set according to a preset division ratio. The numerical selection of the dividing ratio is not particularly limited, and for example, 7:3 may be used.
Calling a preset language model.
In this embodiment, the language model may specifically be a BERT, GPT, transformer language model. And according to the actual model construction requirement, setting super parameters such as learning rate, batch size, training round and the like of the language model. And configures the optimizers (e.g., adam, adamW) and schedulers (e.g., warmup-Cos I NE ANNEA L I NG). Where fine tuning typically uses smaller data sets, smaller batch sizes and more training rounds are employed. In addition, the model architecture may be adapted as needed, such as adding task-specific layers (e.g., classification layers, decoding layers, etc.) to support the medical question-answering task.
And acquiring a preset improved cross entropy loss function.
In this embodiment, the above specific implementation process of obtaining the preset improved cross entropy loss function will be described in further detail in the following specific embodiments, which will not be described herein.
And fine tuning the language model by using the improved cross entropy loss function and the training set to obtain a corresponding appointed language model.
In this embodiment, the language model learns the manually labeled answers through training, thereby achieving a better generating effect. The step takes the answer after manual labeling as a standard, and the training target is to make the probability of the language model to generate the sentence become larger, or to say, make the log likelihood function of the answer under the language model maximized. Specifically, the training set and the improved cross entropy loss function are used for fine tuning the language model, indexes such as loss values, accuracy and the like are monitored in the training process, parameter adjustment or model optimization of the language model is carried out according to requirements, strategies such as an early-stop method (ear l y stopp i ng) are adopted for preventing overfitting, and accordingly the corresponding appointed language model is obtained through training.
And performing performance test on the appointed language model based on the test set.
In this embodiment, the test set is input into the specified language model to perform a test, and the model performance (question-answer accuracy and generation quality) of the trimmed specified language model is evaluated on the test set, if the obtained question-answer accuracy is greater than a preset accuracy threshold and the generation quality meets a preset quality standard, the specified language model is determined to pass the performance test, otherwise, the specified language model is determined to not pass the performance test.
And if the appointed language model passes the performance test, taking the appointed language model as the target language model.
In this embodiment, if the specified language model passes the performance test, it is determined that the prediction capability of the specified language model meets the construction requirement, and then the specified language model is used as the target language model. And deploying the trained target language model to a production environment for use, monitoring the model performance of the target language model in real time, collecting user feedback, and performing continuous optimization.
The method comprises the steps of constructing a medical question-answer pair based on a preset large language model, marking the medical question-answer pair to obtain corresponding medical sample data, dividing the medical sample data into a training set and a testing set, calling the preset language model, obtaining a preset improved cross entropy loss function, performing fine tuning on the language model by using the improved cross entropy loss function and the training set to obtain a corresponding appointed language model, performing performance test on the appointed language model based on the testing set, and taking the appointed language model as the target language model if the appointed language model passes the performance test. According to the application, the medical question-answer pair is constructed based on the preset large language model, and the medical question-answer pair is marked to obtain the corresponding medical sample data, and then the preset language model is subjected to fine tuning and testing processing by using the improved cross entropy loss function and the medical sample data, so that the target language model meeting the requirements is constructed rapidly and intelligently, the construction efficiency of the target language model is improved, and the model effect of the obtained target language model is ensured. In addition, the improved cross entropy loss function is used for fine tuning the language model, so that the overfitting phenomenon of the language model can be relieved in the training of the language model, the training effect of the language model is enhanced, and the performance of the language model in question-answering tasks is further improved.
In some optional implementations of the present embodiment, the obtaining a preset improved cross entropy loss function includes the following steps:
a cross entropy loss function is obtained.
In this embodiment, the cross entropy loss function specifically includes l= Σt ilog(pi). Wherein L is a cross entropy loss function, t i takes a value of 0 or 1,1 represents that the real label is equal to i, and p i is the probability of predicting the label i by the model.
And acquiring a preset weight adjustment strategy.
In this embodiment, the cross entropy loss function is weighted uniformly for each token, which tends to result in a model that fits quickly over a simple token prediction, thus quickly reducing the level of the loss function to a very low level, trapping in a locally optimal solution. The model's predictions on difficult token remain poor. Therefore, the application proposes an improvement that the content of the weight adjustment strategy comprises, for each prediction token i, the probability distribution of the current model prediction is P i, and by calculating the entropy of the probability distribution E i=Entropy(Pi). For a distribution with larger entropy, the uncertainty is larger, which means that the model has no confidence on the prediction, so that a larger weight is required to be given to the loss of the token, namely beta i=*(i) +b, wherein the value of a is a positive number, and the degree of influence of the entropy on the weight is controlled. b is a constant (to ensure that the weight is not zero even though the entropy is small).
And adjusting the cross entropy loss function based on the weight adjustment strategy to obtain an adjusted cross entropy loss function.
In this embodiment, the cross entropy loss function may be adjusted according to the policy content of the weight adjustment policy, so as to obtain an adjusted cross entropy loss function. Specifically, the modified cross entropy loss function, namely the modified cross entropy loss function, specifically comprises L= Σβ i*ti*log(pi). Wherein L is an improved cross entropy loss function, beta i is the weight of each prediction token, t i takes a value of 0 or 1, 1 represents the probability that a real label is equal to i, and p i is the probability that a model predicts the label i.
And taking the adjusted cross entropy loss function as the improved cross entropy loss function.
In this embodiment, an improved cross entropy loss function is introduced to weight the loss of each token based on its predicted uncertainty to improve the predictive power of the model on difficult tokens.
The method comprises the steps of obtaining a cross entropy loss function, obtaining a preset weight adjustment strategy, adjusting the cross entropy loss function based on the weight adjustment strategy to obtain an adjusted cross entropy loss function, and taking the adjusted cross entropy loss function as the improved cross entropy loss function. According to the application, the cross entropy loss function is adjusted by using the preset weight adjustment strategy, so that the required improved cross entropy loss function is intelligently generated, and the overfitting phenomenon of the language model can be relieved in the training of the language model when the improved cross entropy loss function and the training set are used for fine tuning the language model in the follow-up process, the training effect of the language model is enhanced, and the performance of the language model in a question-answer task is further improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
It is emphasized that, to further ensure the privacy and security of the target answer text, the target answer text may also be stored in a blockchain node.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain (B l ockcha i n), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (ART I F I C I A L I NTE L L I GENCE, A I) is the theory, method, technique, and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-On-y Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of an artificial intelligence-based problem processing apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 3, the artificial intelligence based problem processing apparatus 300 according to the present embodiment includes a receiving module 301, a preprocessing module 302, a query module 303, an extracting module 304, an reasoning module 305, an optimizing module 306, and a returning module 307. Wherein:
A receiving module 301, configured to receive a question text input by a user;
the preprocessing module 302 is configured to preprocess the question text to obtain a corresponding target question text;
The query module 303 is configured to query a target document that accords with a preset correlation with the target question text from a preset medical knowledge base;
the extracting module 304 is configured to generate a corresponding first model input based on the target question text and the target document, and extract information from the first model input through a preset target language model, so as to extract target information related to the question text from the target document;
the reasoning module 305 is configured to generate a corresponding second model input based on the target question text and the target information, and perform reasoning processing on the second model input through the target language model to obtain a corresponding answer text;
The optimizing module 306 is configured to perform optimizing processing on the answer text to obtain a corresponding target answer text;
A return module 307, configured to return the target answer text to the user.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the artificial intelligence-based problem processing method in the foregoing embodiment, and are not described herein again.
In some alternative implementations of the present embodiment, the query module 303 includes:
The first invoking submodule is used for invoking a pre-trained document vector characterization model;
The first conversion sub-module is used for converting the problem text into a corresponding problem vector based on the vector characterization model;
A computing sub-module for computing the similarity between the problem vector and the vector of each document in the medical knowledge base;
the sorting sub-module is used for sorting all the documents based on the order of the similarity from large to small to obtain a corresponding document sorting list;
The screening submodule is used for sequentially screening the first documents with the target quantity from the document sorting list;
The extraction sub-module is used for extracting the key content of the first document to obtain a corresponding second document;
and the first determining submodule is used for taking the second document as the target document.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the artificial intelligence-based problem processing method in the foregoing embodiment, and are not described herein again.
In some alternative implementations of the present embodiment, the optimization module 306 includes:
the first processing sub-module is used for removing redundancy processing for the answer text to obtain a corresponding first answer text;
The second processing sub-module is used for carrying out grammar correction processing on the first answer text to obtain a corresponding second answer text;
And the second determining submodule is used for taking the second answer text as the target answer text.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the artificial intelligence-based problem processing method in the foregoing embodiment, and are not described herein again.
In some alternative implementations of the present embodiment, the return module 307 includes:
the first acquisition sub-module is used for acquiring a target display format;
The second conversion sub-module is used for converting the target answer text based on the target display format to obtain a converted target answer text;
the second calling sub-module is used for calling a preset user interface;
and the display sub-module is used for displaying the target answer text to the user based on the user interface.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the artificial intelligence-based problem processing method in the foregoing embodiment, and are not described herein again.
In some alternative implementations of the present embodiment, the preprocessing module 302 includes:
The third processing sub-module is used for removing irrelevant information from the question text to obtain a corresponding first question text;
The second acquisition sub-module is used for acquiring a preset standard format;
the third conversion sub-module is used for carrying out format conversion processing on the first question text based on the standard format to obtain a corresponding second question text;
and the third determining submodule is used for taking the second question text as the target question text.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the artificial intelligence-based problem processing method in the foregoing embodiment, and are not described herein again.
In some optional implementations of the present embodiments, the artificial intelligence based problem processing apparatus further includes:
the construction module is used for constructing medical question-answer pairs based on a preset large language model;
The labeling module is used for labeling the medical question-answering pair to obtain corresponding medical sample data;
the dividing module is used for dividing the medical sample data into a training set and a testing set;
the calling module is used for calling a preset language model;
The acquisition module is used for acquiring a preset improved cross entropy loss function;
the fine tuning module is used for fine tuning the language model by using the improved cross entropy loss function and the training set to obtain a corresponding appointed language model;
The test module is used for performing performance test on the appointed language model based on the test set;
and the determining module is used for taking the appointed language model as the target language model if the appointed language model passes the performance test.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the artificial intelligence-based problem processing method in the foregoing embodiment, and are not described herein again.
In some optional implementations of this embodiment, the acquiring module includes:
The third acquisition submodule is used for acquiring a cross entropy loss function;
A fourth obtaining sub-module, configured to obtain a preset weight adjustment policy;
the adjustment sub-module is used for adjusting the cross entropy loss function based on the weight adjustment strategy to obtain an adjusted cross entropy loss function;
And a fourth determination submodule, configured to take the adjusted cross entropy loss function as the modified cross entropy loss function.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the artificial intelligence-based problem processing method in the foregoing embodiment, and are not described herein again.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It should be noted that only computer device 4 having components 41-43 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware thereof includes, but is not limited to, a microprocessor, an application specific integrated circuit (APP L I CAT I on SPEC I F I C I NTEGRATED C I rcu I t, AS IC), a programmable gate array (Fie l d-Programmab L E GATE AR RAY, FPGA), a digital Processor (D I G I TA L S I GNA L Processor, DSP), an embedded device, and the like.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (SMART MED I A CARD, SMC), a secure digital (Secu RE D I G I TA L, SD) card, a flash memory card (F L ASH CARD) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used to store an operating system and various application software installed on the computer device 4, such as computer readable instructions of an artificial intelligence-based problem handling method. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Cent ra lProcess i ng Un i t, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the artificial intelligence based problem processing method.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
According to the method, a question text input by a user is received, the question text is preprocessed to obtain a corresponding target question text, a target document which accords with a preset correlation with the target question text is queried from a preset medical knowledge base, a first model input corresponding to the target question text is generated based on the target question text and the target document, information extraction is conducted on the first model input through a preset target language model to extract target information related to the question text from the target document, a second model input corresponding to the question text is generated based on the target question text and the target information, inference processing is conducted on the second model input through the target language model to obtain a corresponding answer text, optimization processing is conducted on the answer text to obtain a corresponding target answer text, and finally the target answer text is returned to the user. The application constructs the local knowledge question-answering system aiming at the medical field and based on the preset target language model, and can accurately answer the question text input by the user by using the local knowledge question-answering system, thereby improving the processing efficiency of the medical question-answering and the accuracy of the generated target answer text.
The present application also provides another embodiment, namely, a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the artificial intelligence based problem processing method as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
According to the method, a question text input by a user is received, the question text is preprocessed to obtain a corresponding target question text, a target document which accords with a preset correlation with the target question text is queried from a preset medical knowledge base, a first model input corresponding to the target question text is generated based on the target question text and the target document, information extraction is conducted on the first model input through a preset target language model to extract target information related to the question text from the target document, a second model input corresponding to the question text is generated based on the target question text and the target information, inference processing is conducted on the second model input through the target language model to obtain a corresponding answer text, optimization processing is conducted on the answer text to obtain a corresponding target answer text, and finally the target answer text is returned to the user. The application constructs the local knowledge question-answering system aiming at the medical field and based on the preset target language model, and can accurately answer the question text input by the user by using the local knowledge question-answering system, thereby improving the processing efficiency of the medical question-answering and the accuracy of the generated target answer text.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present application, but not all embodiments, and the preferred embodiments of the present application are shown in the drawings, which do not limit the scope of the patent claims. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing description, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the scope of the application.

Claims (10)

1. The problem processing method based on artificial intelligence is characterized by comprising the following steps:
receiving a question text input by a user;
Preprocessing the question text to obtain a corresponding target question text;
Inquiring a target document which accords with a preset correlation with the target problem text from a preset medical knowledge base;
generating a corresponding first model input based on the target problem text and the target document, and extracting information from the first model input through a preset target language model to extract target information related to the problem text from the target document;
generating a corresponding second model input based on the target question text and the target information, and carrying out reasoning processing on the second model input through the target language model to obtain a corresponding answer text;
Optimizing the answer text to obtain a corresponding target answer text;
And returning the target answer text to the user.
2. The method for processing an artificial intelligence-based question according to claim 1, wherein the step of querying a target document from a preset medical knowledge base, the target document conforming to a preset correlation with the target question text, specifically comprises:
Invoking a pre-trained document vector characterization model;
converting the problem text into a corresponding problem vector based on the vector characterization model;
Respectively calculating the similarity between the problem vector and the vector of each document in the medical knowledge base;
Sorting all the documents based on the order of the similarity from large to small to obtain a corresponding document sorting list;
sequentially screening out first documents with target quantity from the document sorting list;
extracting key contents from the first document to obtain a corresponding second document;
And taking the second document as the target document.
3. The method for processing an artificial intelligence-based question according to claim 1, wherein the step of optimizing the answer text to obtain a corresponding target answer text specifically comprises:
Removing redundancy processing is carried out on the answer text, and a corresponding first answer text is obtained;
carrying out grammar correction processing on the first answer text to obtain a corresponding second answer text;
and taking the second answer text as the target answer text.
4. The artificial intelligence based question processing method of claim 1, wherein the step of returning the target answer text to the user comprises:
obtaining a target display format;
converting the target answer text based on the target display format to obtain a converted target answer text;
calling a preset user interface;
the target answer text is presented to the user based on the user interface.
5. The method for processing an artificial intelligence-based question according to claim 1, wherein the step of preprocessing the question text to obtain a corresponding target question text specifically comprises:
performing irrelevant information removal processing on the question text to obtain a corresponding first question text;
Acquiring a preset standard format;
Performing format conversion processing on the first question text based on the standard format to obtain a corresponding second question text;
and taking the second question text as the target question text.
6. The artificial intelligence based question processing method according to claim 1, further comprising, before the step of generating a first model input corresponding to the target document based on the target question text and extracting information from the first model input by a preset target language model to extract target information related to the question text from the target document:
Constructing a medical question-answer pair based on a preset large language model;
labeling the medical question-answering pair to obtain corresponding medical sample data;
dividing the medical sample data into a training set and a testing set;
calling a preset language model;
Acquiring a preset improved cross entropy loss function;
Fine tuning the language model by using the improved cross entropy loss function and the training set to obtain a corresponding appointed language model;
performing performance testing on the specified language model based on the test set;
and if the appointed language model passes the performance test, taking the appointed language model as the target language model.
7. The artificial intelligence based problem processing method of claim 6, wherein the step of obtaining a predetermined modified cross entropy loss function specifically comprises:
Acquiring a cross entropy loss function;
Acquiring a preset weight adjustment strategy;
adjusting the cross entropy loss function based on the weight adjustment strategy to obtain an adjusted cross entropy loss function;
And taking the adjusted cross entropy loss function as the improved cross entropy loss function.
8. An artificial intelligence based problem-handling device, comprising:
the receiving module is used for receiving the question text input by the user;
the preprocessing module is used for preprocessing the question text to obtain a corresponding target question text;
The query module is used for querying a target document which accords with a preset correlation with the target problem text from a preset medical knowledge base;
The extraction module is used for generating corresponding first model input based on the target problem text and the target document, and extracting information from the first model input through a preset target language model so as to extract target information related to the problem text from the target document;
the reasoning module is used for generating a corresponding second model input based on the target question text and the target information, and carrying out reasoning processing on the second model input through the target language model to obtain a corresponding answer text;
the optimizing module is used for optimizing the answer text to obtain a corresponding target answer text;
and the return module is used for returning the target answer text to the user.
9. A computer device comprising a memory having stored therein computer readable instructions which when executed implement the steps of the artificial intelligence based problem handling method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the artificial intelligence based problem handling method according to any of claims 1 to 7.
CN202411155830.1A 2024-08-21 2024-08-21 Problem-solving method, device, computer equipment and medium based on artificial intelligence Pending CN119202155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411155830.1A CN119202155A (en) 2024-08-21 2024-08-21 Problem-solving method, device, computer equipment and medium based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411155830.1A CN119202155A (en) 2024-08-21 2024-08-21 Problem-solving method, device, computer equipment and medium based on artificial intelligence

Publications (1)

Publication Number Publication Date
CN119202155A true CN119202155A (en) 2024-12-27

Family

ID=94043310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411155830.1A Pending CN119202155A (en) 2024-08-21 2024-08-21 Problem-solving method, device, computer equipment and medium based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN119202155A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120234398A (en) * 2025-05-29 2025-07-01 湖南工程学院 Intelligent question-answering method and system for low-altitude economic education on interactive learning platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120234398A (en) * 2025-05-29 2025-07-01 湖南工程学院 Intelligent question-answering method and system for low-altitude economic education on interactive learning platform
CN120234398B (en) * 2025-05-29 2025-08-15 湖南工程学院 Intelligent questioning and answering method and system for low-altitude economic education of interactive learning platform

Similar Documents

Publication Publication Date Title
CN112231569B (en) News recommendation method, device, computer equipment and storage medium
CN110825956A (en) Information flow recommendation method and device, computer equipment and storage medium
CN113722438B (en) Sentence vector generation method and device based on sentence vector model and computer equipment
CN113627797B (en) Method, device, computer equipment and storage medium for generating staff member portrait
CN112199954B (en) Disease entity matching method and device based on voice semantics and computer equipment
CN112287089A (en) Classification model training and automatic question-answering method and device for automatic question-answering system
CN112287069A (en) Information retrieval method and device based on voice semantics and computer equipment
CN119046432A (en) Data generation method and device based on artificial intelligence, computer equipment and medium
CN118070072A (en) Problem processing method, device, equipment and storage medium based on artificial intelligence
CN116796730A (en) Text error correction method, device, equipment and storage medium based on artificial intelligence
CN119202155A (en) Problem-solving method, device, computer equipment and medium based on artificial intelligence
CN116701593A (en) Chinese question answering model training method and related equipment based on GraphQL
CN113901821B (en) Entity naming recognition method, device, equipment and storage medium
CN118760759B (en) Document-oriented question-answering method, device, electronic device, storage medium and product
CN119202156A (en) Question processing method, device, computer equipment and medium based on artificial intelligence
CN119621897A (en) Artificial intelligence-based reply generation method, device, computer equipment and medium
CN119166763A (en) Query processing method, device, computer equipment and medium based on artificial intelligence
CN113609833A (en) Dynamic generation method and device of file, computer equipment and storage medium
CN119271773A (en) Query processing method, device, computer equipment and medium based on artificial intelligence
CN119293159A (en) Query processing method, device, computer equipment and medium based on artificial intelligence
CN119250062A (en) A method, device, equipment and medium for determining sentence vector
CN119719292A (en) Insurance question-and-answer method, device, equipment and storage medium
CN119127693A (en) Product recommendation test set generation method, device, computer equipment and medium
CN117076775A (en) Information data processing method, information data processing device, computer equipment and storage medium
CN119398014A (en) A dynamic form generation method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination