CN112560467A - Method, device, equipment and medium for determining element relationship in text - Google Patents

Method, device, equipment and medium for determining element relationship in text Download PDF

Info

Publication number
CN112560467A
CN112560467A CN202011487900.5A CN202011487900A CN112560467A CN 112560467 A CN112560467 A CN 112560467A CN 202011487900 A CN202011487900 A CN 202011487900A CN 112560467 A CN112560467 A CN 112560467A
Authority
CN
China
Prior art keywords
sample
text
model
neural network
relationship
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
CN202011487900.5A
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011487900.5A priority Critical patent/CN112560467A/en
Publication of CN112560467A publication Critical patent/CN112560467A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Machine Translation (AREA)

Abstract

The disclosure provides a method, a device, equipment and a medium for determining element relations in texts, and relates to the technical field of artificial intelligence, in particular to the technical fields of deep learning, knowledge maps and natural language processing. The implementation scheme is as follows: acquiring a first element and a second element in a text to be processed; constructing a model input based on at least the text to be processed, the first element and the second element; and obtaining a prediction result output by the neural network model based on the model input, wherein the prediction result can represent an element relation between the first element and the second element.

Description

Method, device, equipment and medium for determining element relationship in text
Technical Field
The present disclosure relates to the field of artificial intelligence technologies, and in particular, to the field of deep learning, knowledge graph, and natural language processing technologies, and in particular, to a method, an apparatus, a device, and a medium for determining a relationship between elements in a text.
Background
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. The artificial intelligence hardware technology generally comprises technologies such as a sensor, a special artificial intelligence chip, cloud computing, distributed storage, big data processing and the like, and the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, machine learning/deep learning, a big data processing technology, a knowledge graph technology and the like.
Determining the element relationship between two elements in text is a common problem in the field of natural language processing when performing semantic understanding tasks. However, the existing method relying on knowledge base and rule template mining has low recall rate, insufficient generalization capability and high cost for establishing the knowledge base and the rule template.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, unless otherwise indicated, the problems mentioned in this section should not be considered as having been acknowledged in any prior art.
Disclosure of Invention
The disclosure provides a method, a device, equipment and a medium for determining element relations in texts.
According to an aspect of the present disclosure, there is provided a computer-implemented method for determining element relationships in text using a neural network model, comprising: acquiring a first element and a second element in a text to be processed; constructing a model input based on at least the text to be processed, the first element and the second element; and obtaining a prediction result output by the neural network model based on the model input, wherein the prediction result can represent an element relation between the first element and the second element.
According to another aspect of the present disclosure, there is provided a training method of a neural network model for determining element relationships in text, the training method including: acquiring a first sample element and a second sample element included in a sample text, and labeling a real element relation between the first sample element and the second sample element; constructing a model sample input based at least on the sample text and the first and second sample elements; and training the neural network model using the model sample inputs.
According to another aspect of the present disclosure, there is provided a text element relation determination apparatus including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first element and a second element in a text to be processed; a construction unit configured to construct a model input based on at least the text to be processed, the first element, and the second element; and a neural network configured to output a prediction result based on the model input, the prediction result being capable of characterizing an element relationship between the first element and the second element.
According to another aspect of the present disclosure, there is provided a neural network model training apparatus including: the labeling unit is configured to obtain a first sample element and a second sample element included in a sample text, and label a real element relation between the first sample element and the second sample element; a construction unit configured to construct a model sample input based on at least the sample text and the first and second sample elements; and a training unit configured to train the neural network model using the model sample inputs.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described method of determining element relationships in text or training a neural network model.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to execute the above method of determining element relationships in text or the training method of a neural network model.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the above method of determining element relationships in text or the training method of a neural network model.
According to one or more embodiments of the disclosure, a model input is constructed based on at least a text to be processed and two elements included in the text to be processed, and the model input is input into a trained neural network model to output a prediction result capable of representing an element relation between the two elements in the text to be processed, so that the neural network model can determine the element relation between the two elements in the text to be processed by combining the elements under the condition of understanding context semantic information of the text where the elements are located. In addition, because the neural network model is used, the recall rate and the generalization capability of the model are improved, and the construction cost of the model is reduced.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the embodiments and, together with the description, serve to explain the exemplary implementations of the embodiments. The illustrated embodiments are for purposes of illustration only and do not limit the scope of the claims. Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
FIG. 1 shows a flow diagram of a method of determining element relationships in text, according to an embodiment of the disclosure;
FIG. 2 shows a flow diagram of a method of training a neural network model in accordance with an embodiment of the present disclosure;
fig. 3 shows a block diagram of a structure of a text element relation determination apparatus according to an embodiment of the present disclosure;
FIG. 4 shows a block diagram of a neural network model training apparatus, according to an embodiment of the present disclosure; and
FIG. 5 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, the timing relationship, or the importance relationship of the elements, and such terms are used only to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, based on the context, they may also refer to different instances.
The terminology used in the description of the various described examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the elements may be one or more. Furthermore, the term "and/or" as used in this disclosure is intended to encompass any and all possible combinations of the listed items.
In the related technology, the method for determining the element relationship between two elements in the text based on the knowledge graph or the rule template constructed by experts has low recall rate and weak generalization capability, and the construction cost of the knowledge graph and the rule template is high because the prediction result is very dependent on the integrity, richness and accuracy of the knowledge graph and the rule template.
In order to solve the above problem, the present disclosure enables a neural network model to determine an element relationship between two elements in a text to be processed while understanding semantics by constructing an input based on at least the text to be processed and the two elements included therein and obtaining a prediction result output by the neural network model based on the input. In addition, because the neural network model is used, the recall rate and the generalization capability of the model are improved, and the construction cost of the model is reduced.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method of determining a relationship of elements in text according to an exemplary embodiment of the present disclosure. As shown in fig. 1, the method for determining the element relationship in the text may include: s101, acquiring a first element and a second element in a text to be processed; step S102, constructing model input at least based on the text to be processed, the first element and the second element; and step S103, acquiring a prediction result output by the neural network model based on the model input, wherein the prediction result can represent the element relation between the first element and the second element. Therefore, the neural network model can determine the element relationship between the two elements in the text to be processed by combining the elements under the condition of understanding the context semantic information of the text in which the elements are positioned by constructing a model input at least based on the text to be processed and the two elements included in the text to be processed and inputting the model input into the trained neural network model to output a prediction result capable of representing the element relationship between the two elements in the text to be processed. In addition, because the neural network model is used, the recall rate and the generalization capability of the model are improved, and the construction cost of the model is reduced.
According to some embodiments, the pending text may be medical history text. The elements may be, for example, diseases, symptoms, examination items, examination results, operations, and drugs. The element relationship may be, for example, a disease and symptom relationship, a disease and examination relationship, a disease and surgery relationship, a disease and drug relationship, and a symptom-associated relationship. Illustratively, in the medical history text "patient had no incentive for facial redness 3 days ago, and was a bilateral buccal symmetrical erythema, flat on the skin, desquamation, itching, increased weight after sun exposure, repeated oral ulceration, etc., and was admitted to the hospital via an outpatient visit for further treatment. "in the above description, the first element" bilateral buccal symmetric erythema "is the chief symptom, the second element" desquamation "is the concomitant symptom, and the element relationship between the first element and the second element is the concomitant relationship.
According to some embodiments, constructing a model input based at least on the text to be processed, the first element, and the second element may comprise: and splicing the text to be processed, the first element and the second element to obtain a spliced text. Thus, by using the above-described stitched text as input, the result for the classification task output by the neural network model can be obtained. When splicing, a separator can be inserted between the text to be processed and the first element and between the first element and the second element. Illustratively, in the medical history text "the patient had no incentive for facial redness 3 days ago, the redness was bilateral buccal symmetrical erythema, the redness was flat on the skin, desquamation, itching, increased weight after sun exposure, repeated oral ulceration, and the like, and the patient was admitted to the hospital through an outpatient clinic for further diagnosis and treatment. "the input may be" the patient had no inducement to face redness 3 days ago, bilateral cheek symmetry erythema, even on the skin, desquamation, pruritus, aggravation after solarization, repeated oral ulcer, etc., and for further diagnosis and treatment, the patient was admitted to the hospital through the clinic. If the symmetric erythema on the cheek part on both sides is desquamated, the neural network model can output a result 'accompanying relation'. It will be appreciated that the inputs to the neural network model may be constructed in other ways to enable the neural network model to solve the classification problem.
According to some embodiments, constructing a model input based at least on the text to be processed, the first element, and the second element may comprise: and constructing an inquiry text for judging whether the first element and the second element are in the preset element relation or not according to a preset rule based on the preset element relation. The model input comprises a text to be processed and an inquiry text, and the prediction result comprises a confirmation result of whether the first element and the second element are in a preset element relationship. Thus, by using the above-described input including the text to be processed and the query text, the result for the query text output by the neural network model can be obtained. For example, the text to be processed and the query text may be concatenated, and a separator may be inserted between the text to be processed and the query text. Illustratively, for the medical case text "patients had no incentive to develop facial redness 3 days ago, bilateral buccal symmetrical erythema, flat skin, desquamation, itching, increased weight after sun exposure, repeated oral ulceration, etc., and were admitted to the hospital via outpatient service for further treatment. "the input may be" the patient had no inducement to face redness 3 days ago, bilateral cheek symmetry erythema, even on the skin, desquamation, pruritus, aggravation after solarization, repeated oral ulcer, etc., and for further diagnosis and treatment, the patient was admitted to the hospital through the clinic. Is | a concomitant relationship between bilateral buccal symmetric erythema and desquamation? ", the neural network model may output a result of" yes ". It will be appreciated that the inputs to the neural network model may be constructed in other ways to enable the neural network model to solve the reading understanding problem.
According to some embodiments, the predicted result may include a predicted element relationship between the first element and the second element. For example, when the input of the neural network model is the above-mentioned spliced text, the prediction result may be a plurality of two-class or one-multiple-class results to represent an element relationship between two elements included in the spliced text; when the input of the neural network model is the above-described question text, the prediction result may be a question for the question text. It is understood that the predicted result of the relationship of the predicted elements in the current text, which characterize the first element and the second element in different ways, can be obtained for the input of the neural network model configured in different ways, and is not limited herein.
According to some embodiments, the method of determining element relationships in text may further comprise: querying a knowledge graph for element relationships between the first and second elements prior to inputting the model into a neural network model. Inputting the model into a neural network model is performed based on determining that an element relationship between the first element and the second element is not queried in a knowledge-graph. Therefore, by using the mode of firstly inquiring the knowledge graph and then predicting by using the neural network model, the advantages of high accuracy and fast inquiring speed of the knowledge graph and the advantages of high recall rate and strong generalization capability of the neural network model can be simultaneously exerted, and the performances of the method for determining the element relationship in the text, such as efficiency, can be further improved. It will be appreciated that before the model is input into the neural network model, edge relationship mining may also be performed based on expert-constructed rule templates to derive relationships of elements in the text.
By using the technical scheme disclosed by the invention, the Precision ratio Precision of the determined accompanying relation in the medical record text can reach 0.95, the Recall ratio Recall can reach 0.92, and the value F1 can reach 0.93. Wherein, the accuracy rate represents the proportion of correctly predicted positive samples to actually predicted positive samples, the recall rate represents the proportion of correctly predicted positive samples to positive samples, the F1 value is used for summing up the evaluation accuracy rate and the recall rate, specifically, the reciprocal of the sum of the reciprocal of the recall rate and the reciprocal of the accuracy rate is multiplied by two, namely:
Figure BDA0002839871940000061
according to another aspect of the present disclosure, a computer-implemented training method of a neural network model for determining element relationships in text is provided. As shown in fig. 2, the training method may include: step S201, obtaining a first sample element and a second sample element included in a sample text, and labeling a real element relation between the first sample element and the second sample element; step S202, constructing model sample input at least based on the sample text and the first sample element and the second sample element; and step S203, training the neural network model by using the model sample input. Therefore, through the training mode, the trained neural network model can receive model sample input constructed at least based on the text to be processed and the two elements included in the text to be processed so as to output a prediction result capable of representing the element relationship between the two elements in the text to be processed, and can determine the element relationship between the two elements in the text to be processed by combining the elements under the condition of understanding the context semantic information of the text where the elements are located.
According to some embodiments, the sample text may be medical record text. The elements may be, for example, diseases, symptoms, examination items, examination results, operations, and drugs. The element relationship may be, for example, a disease and symptom relationship, a disease and examination relationship, a disease and surgery relationship, a disease and drug relationship, and a symptom-associated relationship.
According to some embodiments, annotating the true element relationship between the first and second sample elements may comprise: determining a true element relationship between the first sample element and the second sample element based on a knowledge-graph. Therefore, the real element relation between two sample elements is determined based on the knowledge graph, a large number of pre-labeled regular training samples can be automatically generated, and the pre-labeling process is achieved. It will be appreciated that edge relation mining may also be performed based on expert-constructed rule templates to automatically generate a large number of pre-labeled positive training samples.
The elements may be identified prior to determining the true element relationship between the first sample element and the second sample element based on the knowledge-graph. Illustratively, the sample text is a medical case text, and element recognition may be performed on the sample text according to an existing Natural Language Understanding (NLU) tool to obtain a plurality of elements in the sample text.
According to some embodiments, the training method may further comprise: and generating related negative sample texts based on the real element relation between the first sample element and the second sample element. In generating positive training samples using a knowledge-graph based method and an expert-constructed rule template based method, text including two or more elements but with an element relationship between the elements being "unassociated" may be used as a pre-labeled negative training sample. Therefore, by using the method to generate a large number of negative examples, the training data set can be balanced as much as possible, and the problems of low recall rate, poor generalization capability and the like caused by unbalanced data sets are avoided.
According to some embodiments, after the pre-labeling stage is completed, the pre-labeled positive training samples and the pre-labeled negative training samples can be provided to a labeling person for further labeling, so as to generate training samples. Therefore, the relation between the elements included in the sample text is labeled by using a mode of combining pre-labeling and labeling, and a large amount of accurately labeled training samples can be generated under the condition of reducing labeling cost. Illustratively, a total of 10,000 training samples are labeled, and the ratio of positive training samples to negative training samples is approximately 1: 1.
According to some embodiments, building a model sample input based at least on the sample text and the first and second sample elements may comprise: and splicing the sample text, the first sample element and the second sample element to obtain a spliced text. Therefore, the neural network model is trained by utilizing the model sample input constructed in the mode, so that the neural network model can output an accurate result aiming at the classification task, and the neural network model can solve the classification problem.
According to some embodiments, building a model sample input based at least on the sample text and the first and second sample elements may comprise: and constructing an inquiry text for judging whether the first sample element and the second sample element are in the preset element relationship according to a preset rule based on the preset element relationship. The model input comprises the sample text and the query text, and the prediction result output by the neural network model based on the model sample input comprises a confirmation result of whether the first sample element and the second sample element are in a preset element relationship. Therefore, the neural network model is trained by utilizing the model sample input constructed in the mode, so that the neural network model can output an accurate result aiming at the inquiry task, and the neural network model can solve the reading understanding problem.
According to some embodiments, the prediction result output by the neural network model based on the model sample input may comprise a predicted element relationship between the first element and the second element. For example, when the input of the neural network model is the above-mentioned spliced text, the prediction result may be a plurality of two-class or one-multiple-class results to represent an element relationship between two elements included in the spliced text; when the input of the neural network model is the above-described question text, the prediction result may be a question for the question text. It is understood that the predicted result of the relationship of the predicted elements in the current text, which characterize the first element and the second element in different ways, can be obtained for the input of the neural network model configured in different ways, and is not limited herein.
According to some embodiments, the training of the neural network model with the model sample input of step S203 may include: and fine-tuning a natural language processing pre-training model by using the model sample input to obtain the neural network model for determining element relations in the text. Therefore, the natural language processing pre-training model can greatly improve the capability of the neural network model in processing texts, understanding semantics and judging element relations, and the neural network model can more specifically process the natural language texts in the current application scene by using the fine tuning method. Furthermore, in contrast to the feature-integrated approach, the fine-tuning can be trained directly on the neural network to purposefully modify the network parameters obtained with the training phase.
According to some embodiments, the natural language processing pre-training model may select any one of the following models: wen xin (ERNIE), wen xin-Health (ERNIE-Health), BERT, GPT, and Transformer. The natural language processing model may also be selected from modified, evolved versions of these models, such as ERNIE 2.0, RoBERTa, GPT-2, GPT-3, etc., and other pre-trained models may also be used, without limitation.
According to another aspect of the present disclosure, there is provided a text element relation determination apparatus. As shown in fig. 3, the text element relationship determination 300 may include: an acquiring unit 301 configured to acquire a first element and a second element in a text to be processed; a construction unit 302 configured to construct a model input based on at least the text to be processed, the first element, and the second element; and a neural network 303 configured to output a prediction result based on the model input, the prediction result being capable of characterizing an element relationship between the first element and the second element.
The operations of the units 301 to 303 of the text element relation determining apparatus 300 are similar to the operations of the steps S101 to S103 described above, respectively, and are not described herein again.
According to another aspect of the present disclosure, a neural network model training apparatus is provided. As shown in fig. 4, the neural network model training apparatus 400 includes: a labeling unit 401 configured to obtain a first sample element and a second sample element included in a sample text, and label a real element relationship between the first sample element and the second sample element; a construction unit 402 configured to construct a model sample input based on at least the sample text and the first and second sample elements; and a training unit 403 configured to train the neural network model with the model sample inputs.
The operations of the units 401 to 403 of the neural network model training device 400 are similar to the operations of the steps S201 to S203 described above, and are not repeated herein.
According to an embodiment of the present disclosure, there is also provided an electronic device, a readable storage medium, and a computer program product.
Referring to fig. 5, a block diagram of a structure of an electronic device 500, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 comprises a computing unit 501 which may perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the device 500 are connected to the I/O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the device 500, and the input unit 506 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and/or a remote controller. Output unit 507 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 508 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 509 allows the device 500 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, 1302.11 devices, WiFi devices, WiMax devices, cellular communication devices, and/or the like.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 501 performs the respective methods and processes described above, such as a method of determining element relationships in text or a training method of a neural network model. For example, in some embodiments, the method of determining element relationships in text or the training method of the neural network model may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When loaded into RAM 503 and executed by the computing unit 501, a computer program may perform one or more steps of the method of determining element relationships in text or the method of training a neural network model described above. Alternatively, in other embodiments, the computing unit 501 may be configured in any other suitable way (e.g., by means of firmware) to perform a method of determining element relationships in text or a training method of a neural network model.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be performed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the above-described methods, systems and apparatus are merely exemplary embodiments or examples and that the scope of the present invention is not limited by these embodiments or examples, but only by the claims as issued and their equivalents. Various elements in the embodiments or examples may be omitted or may be replaced with equivalents thereof. Further, the steps may be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced with equivalent elements that appear after the present disclosure.

Claims (18)

1. A method for determining element relationships in text using a neural network model, comprising:
acquiring a first element and a second element in a text to be processed;
constructing a model input based on at least the text to be processed, the first element, and the second element; and
obtaining a prediction result output by the neural network model based on the model input, the prediction result being capable of characterizing an element relationship between the first element and the second element.
2. The method of claim 1, wherein the predicted outcome comprises a predicted element relationship between the first element and the second element.
3. The method of claim 1, wherein constructing a model input based on at least the text to be processed, the first element, and the second element comprises:
constructing an inquiry text for whether the first element and the second element are in the preset element relationship according to a preset rule based on the preset element relationship,
wherein the model input comprises the text to be processed and the query text,
the prediction result comprises a confirmation result of whether the first element and the second element are in the preset element relationship.
4. The method of any of claims 1-3, further comprising:
querying a knowledge graph for element relationships between the first element and the second element prior to inputting the model input into the neural network model,
wherein inputting the model input into the neural network model is performed based on determining that an element relationship between the first element and the second element is not queried in a knowledge-graph.
5. The method of any one of claims 1-3, wherein the text to be processed is a medical case text,
wherein the elements in the medical case text include any one of:
diseases, symptoms, examination items, examination results, operations, and medicines,
the element relationship includes any one of:
disease and symptom relationships, disease and examination relationships, disease and surgery relationships, disease and drug relationships, and symptom-associated relationships.
6. A training method for a neural network model for determining element relationships in text, comprising:
acquiring a first sample element and a second sample element included in a sample text, and labeling a real element relation between the first sample element and the second sample element;
constructing a model sample input based at least on the sample text and the first and second sample elements; and
training the neural network model using the model sample inputs.
7. The method of claim 6, wherein training the neural network model using the model sample inputs comprises:
and fine-tuning a natural language processing pre-training model by using the model sample input to obtain the neural network model for determining element relations in the text.
8. The method of claim 6, wherein annotating the true element relationship between the first sample element and the second sample element comprises:
determining a true element relationship between the first sample element and the second sample element based on a knowledge-graph.
9. The method of claim 8, further comprising:
and generating related negative sample texts based on the real element relation between the first sample element and the second sample element.
10. The method of claim 6, wherein the prediction output by the neural network model based on the model sample input comprises a predicted element relationship between the first element and the second element.
11. The method of claim 6, wherein constructing a model sample input based at least on the sample text and the first and second sample elements comprises:
constructing an inquiry text for whether the first sample element and the second sample element are in the preset element relationship according to a preset rule based on the preset element relationship,
wherein the model input comprises the sample text and the query text,
the prediction result output by the neural network model based on the model sample input comprises a confirmation result of whether the first sample element and the second sample element are in the preset element relationship.
12. The method of any of claims 7, wherein the natural language processing pre-training model selects wen xin (ERNIE) or wen xin-Health (ERNIE-Health).
13. The method of any one of claims 6-12, wherein the sample text is a medical case text,
wherein the elements in the medical case text include any one of:
diseases, symptoms, examination items, examination results, operations, and medicines,
the element relationship includes any one of:
disease and symptom relationships, disease and examination relationships, disease and surgery relationships, disease and drug relationships, and symptom-associated relationships.
14. A text element relation determination apparatus comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first element and a second element in a text to be processed;
a construction unit configured to construct a model input based on at least the text to be processed, the first element, and the second element; and
a neural network configured to output a prediction based on the model input, the prediction being capable of characterizing an element relationship between the first element and the second element.
15. A neural network model training apparatus, comprising:
the labeling unit is configured to obtain a first sample element and a second sample element included in a sample text, and label a real element relation between the first sample element and the second sample element;
a construction unit configured to construct a model sample input based on at least the sample text and the first and second sample elements; and
a training unit configured to train the neural network model using the model sample inputs.
16. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-13.
17. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-13.
18. A computer program product comprising a computer program, wherein the computer program realizes the method of any one of claims 1-13 when executed by a processor.
CN202011487900.5A 2020-12-16 2020-12-16 Method, device, equipment and medium for determining element relationship in text Pending CN112560467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011487900.5A CN112560467A (en) 2020-12-16 2020-12-16 Method, device, equipment and medium for determining element relationship in text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011487900.5A CN112560467A (en) 2020-12-16 2020-12-16 Method, device, equipment and medium for determining element relationship in text

Publications (1)

Publication Number Publication Date
CN112560467A true CN112560467A (en) 2021-03-26

Family

ID=75064203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011487900.5A Pending CN112560467A (en) 2020-12-16 2020-12-16 Method, device, equipment and medium for determining element relationship in text

Country Status (1)

Country Link
CN (1) CN112560467A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756250A (en) * 2023-06-06 2023-09-15 电子科技大学 Processing method and device of fault related data, computer equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776711A (en) * 2016-11-14 2017-05-31 浙江大学 A kind of Chinese medical knowledge mapping construction method based on deep learning
CN106919655A (en) * 2017-01-24 2017-07-04 网易(杭州)网络有限公司 A kind of answer provides method and apparatus
CN109062939A (en) * 2018-06-20 2018-12-21 广东外语外贸大学 A kind of intelligence towards Chinese international education leads method
CN110019839A (en) * 2018-01-03 2019-07-16 中国科学院计算技术研究所 Medical knowledge map construction method and system based on neural network and remote supervisory
CN110209832A (en) * 2018-08-08 2019-09-06 腾讯科技(北京)有限公司 Method of discrimination, system and the computer equipment of hyponymy
CN110275928A (en) * 2019-06-24 2019-09-24 复旦大学 Iterative entity relation extraction method
CN110457710A (en) * 2019-08-19 2019-11-15 电子科技大学 It is a kind of based on Dynamic routing mechanisms machine reading understand network model, method, storage medium and terminal
CN110647629A (en) * 2019-09-20 2020-01-03 北京理工大学 Multi-document machine reading understanding method for multi-granularity answer sorting
CN111966812A (en) * 2020-10-20 2020-11-20 中国人民解放军国防科技大学 Automatic question answering method based on dynamic word vector and storage medium
CN112002411A (en) * 2020-08-20 2020-11-27 杭州电子科技大学 Cardiovascular and cerebrovascular disease knowledge map question-answering method based on electronic medical record
CN112084789A (en) * 2020-09-14 2020-12-15 腾讯科技(深圳)有限公司 Text processing method, device, equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776711A (en) * 2016-11-14 2017-05-31 浙江大学 A kind of Chinese medical knowledge mapping construction method based on deep learning
CN106919655A (en) * 2017-01-24 2017-07-04 网易(杭州)网络有限公司 A kind of answer provides method and apparatus
CN110019839A (en) * 2018-01-03 2019-07-16 中国科学院计算技术研究所 Medical knowledge map construction method and system based on neural network and remote supervisory
CN109062939A (en) * 2018-06-20 2018-12-21 广东外语外贸大学 A kind of intelligence towards Chinese international education leads method
CN110209832A (en) * 2018-08-08 2019-09-06 腾讯科技(北京)有限公司 Method of discrimination, system and the computer equipment of hyponymy
CN110275928A (en) * 2019-06-24 2019-09-24 复旦大学 Iterative entity relation extraction method
CN110457710A (en) * 2019-08-19 2019-11-15 电子科技大学 It is a kind of based on Dynamic routing mechanisms machine reading understand network model, method, storage medium and terminal
CN110647629A (en) * 2019-09-20 2020-01-03 北京理工大学 Multi-document machine reading understanding method for multi-granularity answer sorting
CN112002411A (en) * 2020-08-20 2020-11-27 杭州电子科技大学 Cardiovascular and cerebrovascular disease knowledge map question-answering method based on electronic medical record
CN112084789A (en) * 2020-09-14 2020-12-15 腾讯科技(深圳)有限公司 Text processing method, device, equipment and storage medium
CN111966812A (en) * 2020-10-20 2020-11-20 中国人民解放军国防科技大学 Automatic question answering method based on dynamic word vector and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756250A (en) * 2023-06-06 2023-09-15 电子科技大学 Processing method and device of fault related data, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112016295B (en) Symptom data processing method, symptom data processing device, computer equipment and storage medium
US20230011678A1 (en) Method for predicting protein-protein interaction
CN113345577B (en) Diagnosis and treatment auxiliary information generation method, model training method, device, equipment and storage medium
US20160246932A1 (en) System and method for weighting manageable patient attributes during criteria evaluations for treatment
CN114078597A (en) Decision trees with support from text for healthcare applications
CN117149998A (en) Intelligent diagnosis recommendation method and system based on multi-objective optimization
CN117747087A (en) Training method of large inquiry model, inquiry method and device based on large inquiry model
CN116168848A (en) Drug information matching method and device based on Faiss algorithm
CN113590777B (en) Text information processing method, apparatus, electronic device and storage medium
CN116578704A (en) Text emotion classification method, device, equipment and computer readable medium
CN118230971A (en) Medical information extraction method, device, electronic equipment and storage medium
CN112560467A (en) Method, device, equipment and medium for determining element relationship in text
CN113160914A (en) Online inquiry method and device, electronic equipment and storage medium
Swain et al. Healthcare chatbot system: A survey
CN117438106A (en) Auxiliary inquiry method, device, equipment and storage medium
US20230070966A1 (en) Method for processing question, electronic device and storage medium
CN111785340A (en) Medical data processing method, device, equipment and storage medium
CN115905497A (en) Method, device, electronic equipment and storage medium for determining reply sentence
CN114496139A (en) Quality control method, device, equipment and system of electronic medical record and readable medium
CN114461085A (en) Medical input recommendation method, device, equipment and storage medium
CN114639489A (en) Mutual learning-based inquiry quick reply recommendation method and device and electronic equipment
CN113220896A (en) Multi-source knowledge graph generation method and device and terminal equipment
CN113553407B (en) Event tracing method and device, electronic equipment and storage medium
CN114334161B (en) Model training method, data processing method, device, medium and electronic equipment
CN112560434A (en) Method, device, equipment and medium for determining element attribute conflict in text

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