Disease fragment extraction method, device and equipment of pruning paradigm and storage medium
By employing a pruning paradigm for symptom fragment extraction, and utilizing a fusion feature model and a joint analysis model to construct start and end probability distribution sequences, combined with a combined pruning algorithm, the problem of low accuracy in symptom fragment extraction during TCM consultation is solved, achieving accurate extraction of multiple symptom features from dialogue text.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2023-04-12
- Publication Date
- 2026-04-21
AI Technical Summary
Existing symptom fragment extraction technologies have low accuracy in TCM consultations, especially in their inability to effectively extract dialogue information with multiple symptom characteristics.
A pruning paradigm-based symptom fragment extraction method is adopted. Text features are extracted through a pre-defined fusion feature model. Start and end probability distribution sequences are constructed using jointly trained start and end analysis models. Finally, a combined pruning algorithm is used to extract accurate symptom fragments.
It improves the accuracy of symptom fragment extraction, enabling more precise extraction of various symptom features from dialogue text, thus enhancing the accuracy of symptom diagnosis in traditional Chinese medicine consultation.
Smart Images

Figure CN116431810B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a pruning paradigm for extracting disease fragments, a device, an electronic device, and a computer-readable storage medium. Background Technology
[0002] With the development of artificial intelligence, machine learning technology is being successfully applied in more and more medical fields. In the process of traditional Chinese medicine consultation, it is necessary to obtain the patient's dialogue information and analyze the symptoms based on the dialogue information. However, the knowledge base of outpatient experts mainly contains professional terms for the symptoms. Therefore, it is necessary to use artificial intelligence technology to extract the colloquial symptoms from the patient's dialogue information and convert them into professional terms for doctors to refer to.
[0003] Existing disease fragment extraction technologies mostly extract disease fragments with single features. For example, in question-answering tasks based on reading comprehension, in practical applications, a single dialogue may contain multiple disease features. Considering only the extraction of single disease information may lead to insufficient accuracy in the extraction results, affecting doctors' disease diagnosis and resulting in low accuracy when extracting disease fragments. Summary of the Invention
[0004] This invention provides a pruning paradigm for extracting disease fragments, an apparatus, and a computer-readable storage medium, the main purpose of which is to solve the problem of low accuracy in extracting disease fragments.
[0005] To achieve the above objectives, the present invention provides a method for extracting disease fragments using a pruning paradigm, comprising:
[0006] The patient's dialogue text is obtained, and features are extracted from the dialogue text using a preset fusion feature model to obtain a text feature sequence.
[0007] The initial features corresponding to the text feature sequence are extracted using the jointly trained initial analysis model, the initial features are normalized, and the initial probability distribution sequence of the text feature sequence is constructed using the normalized initial features.
[0008] The termination features corresponding to the text feature sequence are extracted using the termination analysis model after joint training. The termination features are normalized, and the termination probability distribution sequence of the text feature sequence is constructed using the normalized termination features.
[0009] The start and end distribution combinations of the text feature sequence are established based on the start probability distribution sequence and the end probability distribution sequence.
[0010] The start-end distribution combination is pruned using a preset combination pruning algorithm to obtain the target fragment combination, and the text corresponding to the target fragment combination is taken as the symptom fragment.
[0011] Optionally, the step of extracting features from the dialogue text using a preset fusion feature model to obtain a text feature sequence includes:
[0012] The dialogue text is segmented to obtain a sequence of dialogue words;
[0013] The dialogue words in the dialogue word sequence are converted into word vectors in the order from front to back to obtain the dialogue word vector sequence;
[0014] Each dialogue word vector in the dialogue word vector sequence is selected as a target word vector, and a position vector is added to the target word vector to obtain a standard word vector sequence.
[0015] The standard word vector sequence is transformed using the multi-head attention mechanism of the fusion feature model to obtain the latent vector sequence;
[0016] The latent vector sequence is fused using the fusion layer of the fusion feature model to obtain a text feature sequence.
[0017] Optionally, the transformation of the standard word vector sequence using the multi-head attention mechanism of the fusion feature model to obtain the latent vector sequence includes:
[0018] Each standard word vector in the standard word vector sequence is selected as the target standard word vector, and the target question vector, target keyword vector, and target information word vector are generated using the target standard word vector;
[0019] Perform a cross product operation between the target question word vector and the target keyword vector to obtain the target cross product matrix. Then, perform dimensionality reduction on the target cross product matrix to obtain the target cross product vector.
[0020] The target cross product vector is multiplied by the target information word vector to obtain the standard word vector weight. The standard word vector weight is then normalized to obtain the target word vector weight.
[0021] The multi-head attention mechanism is used to generate target latent vectors based on the target word vector weights and the target standard word vectors, and all the target latent vectors are aggregated into the latent vector sequence.
[0022] Optionally, the step of using the fusion layer of the fusion feature model to perform feature fusion on the latent vector sequence to obtain a text feature sequence includes:
[0023] The latent vector sequence is added to the standard word vector sequence to form a fused vector sequence. The fused vector sequence is then normalized using the normalization function of the fusion layer to obtain the primary fused sequence.
[0024] The primary fusion sequence is propagated forward using the feedforward network of the fusion layer to obtain the secondary fusion sequence;
[0025] The primary fusion sequence and the secondary fusion sequence are added to form a standard fusion sequence. The standard fusion sequence is then normalized using the normalization function of the fusion layer to obtain the text feature sequence.
[0026] Optionally, the step of extracting the initial features corresponding to the text feature sequence using the jointly trained initial analysis model includes:
[0027] Each text feature vector in the text feature sequence is selected as the target feature vector, and the initial connection network of the initial analysis model is used to perform initial prediction on the target feature vector to obtain the initial feature vector;
[0028] All the initial feature vectors are concatenated according to the sequence order of the text feature sequence to obtain the initial features corresponding to the text feature sequence.
[0029] Optionally, constructing the initial probability distribution sequence of the text feature sequence using the normalized initial features includes:
[0030] Each text feature vector in the text feature sequence is selected as the starting feature and the normalized value of the target starting feature is used as the starting probability of the text feature vector.
[0031] The initial probabilities of all the text feature vectors are aggregated into the initial probability distribution sequence according to the order of the text feature sequence.
[0032] Optionally, establishing the start and end distribution combination of the text feature sequence based on the start probability distribution sequence and the end probability distribution sequence includes:
[0033] Each dialogue word in the dialogue word sequence is selected as the target starting word. The text feature vector corresponding to the target starting word is selected from the target text feature sequence as the target starting vector. The starting probability corresponding to the target starting vector is extracted from the starting probability distribution sequence as the target starting probability.
[0034] Each dialogue word in the dialogue word sequence that follows the target starting word is selected as the target ending word. The text feature vector corresponding to the target ending word is selected from the target text feature sequence as the target ending vector. The ending probability corresponding to the target ending sequence is extracted from the ending probability distribution sequence as the target ending probability.
[0035] The text segment in the dialogue text that starts from the target start word and ends at the target end word is taken as the target start-end segment. The probability value obtained by multiplying the target start probability by the target end probability is taken as the distribution probability of the target start-end segment. All the target start-end segments and the distribution probabilities corresponding to the target start-end segments are aggregated into the start-end distribution combination.
[0036] To address the aforementioned problems, the present invention also provides a pruning paradigm-based disease fragment extraction device, the device comprising:
[0037] The feature extraction module is used to acquire the patient's dialogue text, and to extract features from the dialogue text using a preset fusion feature model to obtain a text feature sequence.
[0038] The initial prediction module is used to extract the initial features corresponding to the text feature sequence using the jointly trained initial analysis model, normalize the initial features, and construct the initial probability distribution sequence of the text feature sequence using the normalized initial features.
[0039] The termination prediction module is used to extract the termination features corresponding to the text feature sequence using the jointly trained termination analysis model, normalize the termination features, and construct the termination probability distribution sequence of the text feature sequence using the normalized termination features.
[0040] The start-end combination module is used to establish the start-end distribution combination of the text feature sequence based on the start probability distribution sequence and the end probability distribution sequence.
[0041] The fragment extraction module is used to perform pruning operations on the start-end distribution combination using a preset combination pruning algorithm to obtain the target fragment combination, and to take the text corresponding to the target fragment combination as the disease fragment.
[0042] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:
[0043] At least one processor; and,
[0044] A memory communicatively connected to the at least one processor; wherein,
[0045] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the pruning paradigm-based symptom fragment extraction method described above.
[0046] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the pruning paradigm-based symptom fragment extraction method described above.
[0047] This invention utilizes a pre-set fusion feature model to extract features from the dialogue text, obtaining a text feature sequence. This extracts text features, laying the foundation for subsequent start and end position prediction. By using a jointly trained start analysis model to extract the start features corresponding to the text feature sequence, the start features of each word in the dialogue text can be determined, thereby determining the start probability of each word in the dialogue text, improving the accuracy of subsequent symptom segment extraction. Similarly, by using a jointly trained end analysis model to extract the end features corresponding to the text feature sequence, the end features of each word in the dialogue text can be determined, thereby determining the end probability of each word in the dialogue text, further improving the accuracy of subsequent symptom segment extraction. The accuracy of subsequent symptom fragment extraction is improved by establishing a start-end distribution combination of the text feature sequence based on the start and end probability distribution sequences. This allows the dialogue text to be divided into multiple dialogue fragments, and the distribution probability of each dialogue fragment can be obtained. This facilitates the subsequent extraction of dialogue fragments with high probability as symptom fragments based on the distribution probability. By using a preset combination pruning algorithm to prune the start-end distribution combination, a target fragment combination is obtained. Start and end fragments that do not meet the symptom fragment characteristics in the start-end distribution combination can be further removed from three aspects: whether they contain punctuation marks, whether the information is obvious, and the probability of symptom involvement. This improves the accuracy of symptom fragment extraction. Therefore, the symptom fragment extraction method, apparatus, electronic device, and computer-readable storage medium of the pruning paradigm proposed in this invention can solve the problem of low accuracy in symptom fragment extraction. Attached Figure Description
[0048] Figure 1 This is a flowchart illustrating a pruning paradigm-based lesion fragment extraction method provided in an embodiment of the present invention.
[0049] Figure 2 This is a schematic diagram of a process for extracting text features from dialogue text according to an embodiment of the present invention.
[0050] Figure 3 This is a schematic diagram of a process for generating text feature sequences according to an embodiment of the present invention;
[0051] Figure 4 This is a functional block diagram of a pruning paradigm disease fragment extraction device provided in an embodiment of the present invention;
[0052] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the pruning paradigm for extracting disease fragments according to an embodiment of the present invention.
[0053] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0054] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0055] This application provides a pruning-paradigm-based method for extracting disease fragments. The executing entity of this pruning-paradigm-based method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the pruning-paradigm-based method for extracting disease fragments can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0056] Reference Figure 1 The diagram shown is a flowchart illustrating a pruning paradigm-based symptom fragment extraction method according to an embodiment of the present invention. In this embodiment, the pruning paradigm-based symptom fragment extraction method includes:
[0057] S1. Obtain the patient's dialogue text, and use a preset fusion feature model to extract features from the dialogue text to obtain a text feature sequence.
[0058] In this embodiment of the invention, the dialogue text refers to the patient-doctor consultation dialogue text record stored in data storage media such as databases, cloud servers, or blockchains.
[0059] In this embodiment of the invention, reference is made to Figure 2 As shown, the step of extracting features from the dialogue text using a preset fusion feature model to obtain a text feature sequence includes:
[0060] S21. Perform text segmentation on the dialogue text to obtain a sequence of dialogue words;
[0061] S22. Convert the dialogue words in the dialogue word sequence into word vectors in the order from front to back to obtain the dialogue word vector sequence;
[0062] S23. Select each dialogue word vector in the dialogue word vector sequence as the target word vector, add a position vector to the target word vector, and obtain a standard word vector sequence.
[0063] S24. The standard word vector sequence is transformed using the multi-head attention mechanism of the fusion feature model to obtain the latent vector sequence;
[0064] S25. The latent vector sequence is fused using the fusion layer of the fusion feature model to obtain a text feature sequence.
[0065] Specifically, the dialogue text can be segmented using a bidirectional maximum matching algorithm or the jieba tool to obtain a sequence of dialogue words.
[0066] In detail, the dialogue words in the dialogue word sequence can be converted into word vectors in a sequential order using the word2vec model or the distributed coding model (GloVe, Global Vectors for Word Representation) to obtain the dialogue word vector sequence.
[0067] In detail, the position vector is a vector that marks the positional relationship of the target word vector.
[0068] In detail, the multi-head attention mechanism refers to the Multi-Head Attention of the transformer model.
[0069] In detail, the transformation of the standard word vector sequence into a latent vector sequence using the multi-head attention mechanism of the fusion feature model includes: selecting standard word vectors from the standard word vector sequence one by one as target standard word vectors; generating target question vectors, target keyword vectors, and target information word vectors using the target standard word vectors; performing a cross product operation between the target question word vector and the target keyword vector to obtain a target cross product matrix; performing dimensionality reduction on the target cross product matrix to obtain a target cross product vector; performing a dot product operation between the target cross product vector and the target information word vector to obtain standard word vector weights; normalizing the standard word vector weights to obtain target word vector weights; generating target latent vectors using the multi-head attention mechanism based on the target word vector weights and the target standard word vectors; and aggregating all the target latent vectors into the latent vector sequence.
[0070] In detail, generating the target question vector, target keyword vector, and target information word vector using the target standard word vector means multiplying the target standard word vector by the question weight to obtain the target question word vector, multiplying the target standard word vector by the keyword weight to obtain the target keyword vector, and multiplying the target standard word vector by the information weight to obtain the target information word vector.
[0071] Specifically, the dimensionality reduction processing of the target cross product matrix refers to dividing the target cross product matrix by the length of the target keyword vector.
[0072] In detail, the standard word vector weights can be normalized using the softmax function.
[0073] Specifically, the fusion layer can be a LayerNorm layer or a BatchNorm layer.
[0074] Specifically, refer to Figure 3 As shown, the step of using the fusion layer of the fusion feature model to perform feature fusion on the latent vector sequence to obtain a text feature sequence includes:
[0075] S31. Add the latent vector sequence to the standard word vector sequence to form a fused vector sequence, and normalize the fused vector sequence using the normalization function of the fusion layer to obtain the primary fused sequence;
[0076] S32. The primary fusion sequence is propagated forward using the feedforward network of the fusion layer to obtain the secondary fusion sequence;
[0077] S33. Add the primary fusion sequence and the secondary fusion sequence to form a standard fusion sequence, and normalize the standard fusion sequence using the normalization function of the fusion layer to obtain the text feature sequence.
[0078] Specifically, the normalization function can be either the softmax function or the normalized function.
[0079] Specifically, the feedforward network refers to the Feedforward Neural Network (FNN), which is the simplest type of neural network. The neurons are arranged in layers, and each neuron is only connected to the neurons in the previous layer. It receives the output of the previous layer and outputs to the next layer. There is no feedback between layers. It is one of the most widely used and fastest-developing artificial neural networks.
[0080] In this embodiment of the invention, by using a preset fusion feature model to extract features from the dialogue text, a text feature sequence is obtained, which can extract text features and lay the foundation for subsequent start and end position prediction.
[0081] S2. Extract the initial features corresponding to the text feature sequence using the jointly trained initial analysis model, normalize the initial features, and construct the initial probability distribution sequence of the text feature sequence using the normalized initial features.
[0082] In this embodiment of the invention, the initial analysis model after joint training refers to the initial analysis model after joint training with the final analysis model.
[0083] In this embodiment of the invention, the step of extracting the initial features corresponding to the text feature sequence using the jointly trained initial analysis model includes: selecting text feature vectors in the text feature sequence one by one as target feature vectors, performing initial prediction on the target feature vectors using the initial connection network of the initial analysis model to obtain initial feature vectors; and concatenating all the initial feature vectors according to the sequence order of the text feature sequence to obtain the initial features corresponding to the text feature sequence.
[0084] Specifically, the initial connection network is a neural network consisting of two trained fully connected networks.
[0085] In detail, the method for normalizing the initial features is the same as the method for normalizing the standard word vector weights in step S1 above, and will not be repeated here.
[0086] Specifically, the step of constructing the initial probability distribution sequence of the text feature sequence using the normalized initial features includes: selecting the initial features corresponding to the text feature vectors in the text feature sequence one by one as target initial features, and using the normalized values of the target initial features as the initial probabilities of the text feature vectors; and aggregating the initial probabilities of all the text feature vectors into the initial probability distribution sequence according to the order of the text feature sequence.
[0087] In this embodiment of the invention, by using the jointly trained initiation analysis model to extract the initiation features corresponding to the text feature sequence, the initiation features of each word in the dialogue text can be determined, thereby determining the initiation probability of each word in the dialogue text, which improves the accuracy of subsequent disease segment extraction.
[0088] S3. Extract the end features corresponding to the text feature sequence using the jointly trained end analysis model, normalize the end features, and construct the end probability distribution sequence of the text feature sequence using the normalized end features.
[0089] In this embodiment of the invention, the method of extracting the end features corresponding to the text feature sequence using the jointly trained end analysis model is the same as the method of extracting the start features corresponding to the text feature sequence using the jointly trained start analysis model in step S2 above, and will not be described again here.
[0090] In detail, the method of normalizing the ending feature and using the normalized ending feature to construct the ending probability distribution sequence of the text feature sequence is the same as the method of normalizing the starting feature and using the normalized starting feature to construct the starting probability distribution sequence of the text feature sequence in step S2 above, and will not be repeated here.
[0091] In this embodiment of the invention, the termination analysis model after joint training is used to extract the termination features corresponding to the text feature sequence, which can determine the termination features of each word in the dialogue text, and thus determine the termination probability of each word in the dialogue text, thereby improving the accuracy of subsequent symptom fragment extraction.
[0092] S4. Establish the start and end distribution combination of the text feature sequence based on the start probability distribution sequence and the end probability distribution sequence;
[0093] In this embodiment of the invention, establishing the start-end distribution combination of the text feature sequence based on the start probability distribution sequence and the end probability distribution sequence includes: selecting dialogue words in the dialogue word sequence one by one as target start words, selecting the text feature vector corresponding to the target start word from the target text feature sequence as a target start vector, and extracting the start probability corresponding to the target start vector from the start probability distribution sequence as a target start probability; selecting dialogue words in the dialogue word sequence following the target start word one by one as target end words, selecting the text feature vector corresponding to the target end word from the target text feature sequence as a target end vector, and extracting the end probability corresponding to the target end sequence from the end probability distribution sequence as a target end probability; taking the text segment from the target start word to the target end word in the dialogue text as a target start-end segment, multiplying the target start probability by the target end probability to obtain the probability value as the distribution probability of the target start-end segment, and aggregating all the target start-end segments and the distribution probabilities corresponding to the target start-end segments into the start-end distribution combination.
[0094] Specifically, the text segment from the target starting word to the target ending word in the dialogue text is taken as the target start and end segment. For example, if the dialogue text is "Doctor, this morning I suddenly found that my urine was yellow and the white part of my eyeballs was also a bit yellow than usual.", the target starting word is "doctor" and the target ending word is "today", then the target start and end segment is "Doctor, today".
[0095] In this embodiment of the invention, by establishing the start and end distribution combination of the text feature sequence based on the start probability distribution sequence and the end probability distribution sequence, the dialogue text can be divided into multiple dialogue segments, and the distribution probability corresponding to the dialogue segments can be obtained. This facilitates the subsequent extraction of dialogue segments with high probability as disease segments based on the distribution probability.
[0096] S5. Use a preset combination pruning algorithm to prune the start and end distribution combination to obtain the target fragment combination, and use the text corresponding to the target fragment combination as the symptom fragment.
[0097] In this embodiment of the invention, the step of pruning the start-end distribution combination using a preset combined pruning algorithm to obtain a target segment combination includes: selecting the start and end segments in the start-end distribution combination one by one as target distribution segments, and determining whether the target distribution segment contains a first preset character; when the target distribution segment contains the first preset character, deleting the target distribution segment from the start-end distribution combination, and returning to the step of selecting the start and end segments in the start-end distribution combination one by one as target distribution segments; when the target distribution segment does not contain the first preset character, removing a second preset character from the target distribution segment to obtain a standard distribution segment, and determining whether the number of characters in the standard distribution segment is greater than a preset number threshold; when the number of characters in the standard distribution segment is less than or equal to... When the number threshold is reached, the start and end segments corresponding to the standard distribution segment are deleted from the start and end distribution combination, and the process returns to the step of selecting the start and end segments in the start and end distribution combination one by one as the target distribution segment; when the number of characters in the standard distribution segment is greater than the number threshold, it is determined whether the distribution probability corresponding to the standard distribution segment is greater than a preset probability threshold; when the distribution probability corresponding to the standard distribution segment is less than or equal to the probability threshold, the start and end segments corresponding to the standard distribution segment are deleted from the start and end distribution combination, and the process returns to the step of selecting the start and end segments in the start and end distribution combination one by one as the target distribution segment; when the distribution probability corresponding to the standard distribution segment is greater than the probability threshold, the start and end segments corresponding to the standard distribution segment are added to the target segment combination.
[0098] Specifically, the first preset character can be a comma, a period, or a period character.
[0099] Specifically, the second preset character can be a word character such as an adverb or a function word.
[0100] Specifically, the quantity threshold can be 1 or 1.5.
[0101] Specifically, the probability distribution can be 0.5 or 0.6.
[0102] In this embodiment of the invention, by using a preset combination pruning algorithm to prune the start-end distribution combination to obtain the target segment combination, the start-end segments in the start-end distribution combination that do not meet the characteristics of the disease segment can be further removed from three aspects: whether they contain punctuation marks, whether the information is obvious, and the probability of the disease. This improves the accuracy of the disease segment extraction.
[0103] This invention utilizes a pre-set fusion feature model to extract features from the dialogue text, obtaining a text feature sequence. This extracts text features, laying the foundation for subsequent start and end position prediction. By using a jointly trained start analysis model to extract the start features corresponding to the text feature sequence, the start features of each word in the dialogue text can be determined, thereby determining the start probability of each word in the dialogue text, improving the accuracy of subsequent symptom segment extraction. Similarly, by using a jointly trained end analysis model to extract the end features corresponding to the text feature sequence, the end features of each word in the dialogue text can be determined, thereby determining the end probability of each word in the dialogue text, further improving the accuracy of subsequent symptom segment extraction. The accuracy of subsequent symptom fragment extraction is improved by establishing a start-end distribution combination of the text feature sequence based on the start and end probability distribution sequences. This allows the dialogue text to be divided into multiple dialogue fragments, and the distribution probability of each dialogue fragment can be obtained. This facilitates the subsequent extraction of dialogue fragments with high probability as symptom fragments based on the distribution probability. By using a preset combination pruning algorithm to prune the start-end distribution combination, a target fragment combination is obtained. Further removal of start-end fragments that do not meet the symptom fragment characteristics from the start-end distribution combination can be achieved based on three aspects: whether they contain punctuation marks, whether the information is obvious, and the probability of symptom involvement. This improves the accuracy of symptom fragment extraction. Therefore, the pruning paradigm symptom fragment extraction method proposed in this invention can solve the problem of low accuracy in symptom fragment extraction.
[0104] like Figure 4 The diagram shown is a functional block diagram of a pruning paradigm disease fragment extraction device provided in an embodiment of the present invention.
[0105] The pruning paradigm disease fragment extraction device 100 of the present invention can be installed in an electronic device. Depending on the functions implemented, the pruning paradigm disease fragment extraction device 100 may include a feature extraction module 101, a start prediction module 102, an end prediction module 103, a start-end combination module 104, and a fragment extraction module 105. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.
[0106] In this embodiment, the functions of each module / unit are as follows:
[0107] The feature extraction module 101 is used to acquire the patient's dialogue text, and to extract features from the dialogue text using a preset fusion feature model to obtain a text feature sequence.
[0108] The initial prediction module 102 is used to extract the initial features corresponding to the text feature sequence using the jointly trained initial analysis model, normalize the initial features, and construct the initial probability distribution sequence of the text feature sequence using the normalized initial features.
[0109] The termination prediction module 103 is used to extract the termination features corresponding to the text feature sequence using the jointly trained termination analysis model, normalize the termination features, and construct the termination probability distribution sequence of the text feature sequence using the normalized termination features.
[0110] The start-end combination module 104 is used to establish the start-end distribution combination of the text feature sequence based on the start probability distribution sequence and the end probability distribution sequence.
[0111] The segment extraction module 105 is used to perform pruning operations on the start-end distribution combination using a preset combination pruning algorithm to obtain a target segment combination, and to use the text corresponding to the target segment combination as a symptom segment.
[0112] In detail, the modules in the pruning paradigm disease fragment extraction device 100 described in this embodiment of the invention employ the same methods as described above during use. Figures 1 to 3 The method used is the same as the pruning paradigm for extracting disease fragments described in the text, and it can produce the same technical effect, so it will not be repeated here.
[0113] like Figure 5 The diagram shown is a schematic representation of an electronic device for implementing a pruning paradigm-based lesion fragment extraction method according to an embodiment of the present invention.
[0114] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13. It may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as a pruning paradigm disease fragment extraction program.
[0115] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing a pruning paradigm for extracting disease fragments) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.
[0116] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code of a pruning paradigm disease fragment extraction program, but also to temporarily store data that has been output or will be output.
[0117] The communication bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.
[0118] The communication interface 13 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.
[0119] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0120] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0121] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0122] The pruning paradigm disease fragment extraction program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions, which, when run in the processor 10, can achieve the following:
[0123] The patient's dialogue text is obtained, and features are extracted from the dialogue text using a preset fusion feature model to obtain a text feature sequence.
[0124] The initial features corresponding to the text feature sequence are extracted using the jointly trained initial analysis model, the initial features are normalized, and the initial probability distribution sequence of the text feature sequence is constructed using the normalized initial features.
[0125] The termination features corresponding to the text feature sequence are extracted using the termination analysis model after joint training. The termination features are normalized, and the termination probability distribution sequence of the text feature sequence is constructed using the normalized termination features.
[0126] The start and end distribution combinations of the text feature sequence are established based on the start probability distribution sequence and the end probability distribution sequence.
[0127] The start-end distribution combination is pruned using a preset combination pruning algorithm to obtain the target fragment combination, and the text corresponding to the target fragment combination is taken as the symptom fragment.
[0128] Specifically, the specific implementation method of the processor 10 for the above instructions can be referred to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, and will not be repeated here.
[0129] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0130] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:
[0131] The patient's dialogue text is obtained, and features are extracted from the dialogue text using a preset fusion feature model to obtain a text feature sequence.
[0132] The initial features corresponding to the text feature sequence are extracted using the jointly trained initial analysis model, the initial features are normalized, and the initial probability distribution sequence of the text feature sequence is constructed using the normalized initial features.
[0133] The termination features corresponding to the text feature sequence are extracted using the termination analysis model after joint training. The termination features are normalized, and the termination probability distribution sequence of the text feature sequence is constructed using the normalized termination features.
[0134] The start and end distribution combinations of the text feature sequence are established based on the start probability distribution sequence and the end probability distribution sequence.
[0135] The start-end distribution combination is pruned using a preset combination pruning algorithm to obtain the target fragment combination, and the text corresponding to the target fragment combination is taken as the symptom fragment.
[0136] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0137] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0138] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0139] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0140] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0141] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0142] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0143] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for disease fragment extraction of a pruning paradigm, characterized in that, The method includes: The process involves acquiring the patient's dialogue text, performing text segmentation on the dialogue text to obtain a dialogue word sequence, converting the dialogue words in the dialogue word sequence into word vectors in order from beginning to end to obtain a dialogue word vector sequence, selecting each dialogue word vector in the dialogue word vector sequence as a target word vector, adding position vectors to the target word vectors to obtain a standard word vector sequence, using the multi-head attention mechanism of a preset fusion feature model to transform the standard word vector sequence to obtain a latent vector sequence, and using the fusion layer of the fusion feature model to perform feature fusion on the latent vector sequence to obtain a text feature sequence. The initial features corresponding to the text feature sequence are extracted using the jointly trained initial analysis model, the initial features are normalized, and the initial probability distribution sequence of the text feature sequence is constructed using the normalized initial features. The termination features corresponding to the text feature sequence are extracted using the termination analysis model after joint training. The termination features are normalized, and the termination probability distribution sequence of the text feature sequence is constructed using the normalized termination features. The start and end distribution combinations of the text feature sequence are established based on the start probability distribution sequence and the end probability distribution sequence. The start-end distribution combination is pruned using a preset combination pruning algorithm to obtain the target fragment combination, and the text corresponding to the target fragment combination is taken as the symptom fragment. The step of transforming the standard word vector sequence into a latent vector sequence using the multi-head attention mechanism of the fusion feature model includes: Each standard word vector in the standard word vector sequence is selected as the target standard word vector, and the target question vector, target keyword vector, and target information word vector are generated using the target standard word vector; The target question vector and the target keyword vector are cross-multiplied to obtain the target cross-multiplied matrix, and the target cross-multiplied matrix is then dimensionality-reduced to obtain the target cross-multiplied vector. The target cross product vector and the target information word vector are multiplied by a dot product to obtain the standard word vector weights. The standard word vector weights are then normalized to obtain the target word vector weights. The multi-head attention mechanism is used to generate target latent vectors based on the target word vector weights and the target standard word vectors, and all the target latent vectors are aggregated into the latent vector sequence. 2.The pruning paradigm-based disorder segment extraction method of claim 1, wherein, The step of using the fusion layer of the fusion feature model to perform feature fusion on the latent vector sequence to obtain the text feature sequence includes: The latent vector sequence is added to the standard word vector sequence to form a fused vector sequence. The fused vector sequence is then normalized using the normalization function of the fusion layer to obtain the primary fused sequence. The primary fusion sequence is propagated forward using the feedforward network of the fusion layer to obtain the secondary fusion sequence; The primary fusion sequence and the secondary fusion sequence are added to form a standard fusion sequence. The standard fusion sequence is then normalized using the normalization function of the fusion layer to obtain the text feature sequence. 3.The pruning paradigm-based disorder segment extraction method of claim 1, wherein, The extraction of initial features corresponding to the text feature sequence using the jointly trained initial analysis model includes: Each text feature vector in the text feature sequence is selected as the target feature vector, and the initial connection network of the initial analysis model is used to perform initial prediction on the target feature vector to obtain the initial feature vector; All the initial feature vectors are concatenated according to the sequence order of the text feature sequence to obtain the initial features corresponding to the text feature sequence. 4.The pruning paradigm-based disorder segment extraction method of claim 1, wherein, The step of constructing the initial probability distribution sequence of the text feature sequence using the normalized initial features includes: Each text feature vector in the text feature sequence is selected as the starting feature and the normalized value of the target starting feature is used as the starting probability of the text feature vector. The initial probabilities of all the text feature vectors are aggregated into the initial probability distribution sequence according to the order of the text feature sequence. 5.The pruning paradigm-based disorder segment extraction method of claim 1, wherein, The step of establishing the start and end distribution combination of the text feature sequence based on the start probability distribution sequence and the end probability distribution sequence includes: Each dialogue word in the dialogue word sequence is selected as the target starting word. The text feature vector corresponding to the target starting word is selected from the text feature sequence as the target starting vector. The starting probability corresponding to the target starting vector is extracted from the starting probability distribution sequence as the target starting probability. Each dialogue word in the dialogue word sequence that follows the target starting word is selected as the target ending word. The text feature vector corresponding to the target ending word is selected from the text feature sequence as the target ending vector. The ending probability corresponding to the target ending vector is extracted from the ending probability distribution sequence as the target ending probability. The text segment in the dialogue text that starts from the target start word and ends at the target end word is taken as the target start-end segment. The probability value obtained by multiplying the target start probability by the target end probability is taken as the distribution probability of the target start-end segment. All the target start-end segments and the distribution probabilities corresponding to the target start-end segments are aggregated into the start-end distribution combination.
6. A device for extracting a disease segment of a pruning paradigm, for implementing the method for extracting a disease segment of a pruning paradigm according to any one of claims 1 to 5, characterized in that, The device includes: The feature extraction module is used to acquire the patient's dialogue text, and to extract features from the dialogue text using a preset fusion feature model to obtain a text feature sequence. The initial prediction module is used to extract the initial features corresponding to the text feature sequence using the jointly trained initial analysis model, normalize the initial features, and construct the initial probability distribution sequence of the text feature sequence using the normalized initial features. The termination prediction module is used to extract the termination features corresponding to the text feature sequence using the jointly trained termination analysis model, normalize the termination features, and construct the termination probability distribution sequence of the text feature sequence using the normalized termination features. The start-end combination module is used to establish the start-end distribution combination of the text feature sequence based on the start probability distribution sequence and the end probability distribution sequence. The fragment extraction module is used to perform pruning operations on the start-end distribution combination using a preset combination pruning algorithm to obtain the target fragment combination, and to take the text corresponding to the target fragment combination as the disease fragment.
7. An electronic device, comprising: The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, which enables the at least one processor to perform the pruning paradigm-based symptom fragment extraction method as described in any one of claims 1 to 5.
8. A computer readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the pruning paradigm-based symptom fragment extraction method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Content acquisition method and device combining RPA and AI, computer equipment and medium
CN112182058A
Machine reading understanding system based on multi-type question and multi-segment answer extraction
CN113742451A