Interrogation intention recognition method and device and electronic equipment

By fusing category prototype semantics, combining the interaction between contextual embedding representation and category prototype semantic vectors, and using convolutional neural networks to extract features, the problem of high modeling cost in deep learning methods is solved, and efficient intent recognition of intelligent consultation systems is achieved.

CN121413628APending Publication Date: 2026-01-27CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511556732.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-28
Publication Date
2026-01-27

AI Technical Summary

Technical Problem

Existing deep learning-based methods for identifying intent in medical consultations rely on multi-task joint modeling, which results in high modeling costs and complexity, and intelligent medical consultation systems are deficient in terms of the accuracy and efficiency of intent recognition.

Method used

By employing a method that integrates category prototype semantics, the contextual embedding representation of the consultation text is obtained and interacts with the category prototype semantic vector corresponding to the preset intent category to form intra-class aggregated vectors and inter-class interactions. Combined with a convolutional neural network, fine-grained features are extracted to predict the intent category of the consultation text.

Benefits of technology

It improves the accuracy and efficiency of intent recognition in intelligent consultation systems, reduces modeling costs, and decreases reliance on complex data annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121413628A_ABST
    Figure CN121413628A_ABST
Patent Text Reader

Abstract

The invention discloses an inquiry intention recognition method and device and electronic equipment. The method comprises the following steps: acquiring a context embedding representation corresponding to an inquiry text; determining an intra-class aggregation vector according to the context embedding representation and a class prototype semantic vector corresponding to each preset intention class; intention recognition features corresponding to the intra-class aggregation vectors and the context embedding representations are determined, and the intention recognition features comprise feature representations which are formed by combining intra-class aggregation and inter-class interaction and used for reflecting the degree of correlation between the inquiry text and the multiple intention classes on different semantic granularities; and determining an intention recognition result corresponding to the inquiry text according to the intention recognition features. According to the invention, the technical problem of high modeling cost and complexity caused by the fact that a deep learning-based intention recognition method adopted in the related technology depends on complex data annotation of multi-task joint modeling in order to improve the model prediction effect is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical information processing technology, and more specifically, to a method, apparatus, and electronic device for identifying consultation intent. Background Technology

[0002] With the rapid development of artificial intelligence technology and the increasing public demand for high-quality medical care, intelligent consultation systems are widely used in medical institutions and search engine platforms. Consultation intent recognition, medical knowledge retrieval, and medical response generation are the three core technical challenges faced by intelligent consultation systems. Consultation intent recognition enables the machine to accurately determine the core purpose expressed by the user in the dialogue system. Specifically in the field of intelligent consultation, the accuracy of consultation intent recognition directly determines the accuracy of subsequent medical knowledge retrieval and medical response generation. Therefore, an excellent intelligent consultation system must first possess efficient intent recognition capabilities.

[0003] However, the deep learning-based medical intent recognition technology used in this field employs slot filling or sequence labeling tasks for joint learning in order to better capture the subtle semantic differences between professional terms in short medical texts. However, this requires a large amount of manual annotation of slot filling and sequence labeling labels, which increases the modeling cost and reduces the responsiveness of building intelligent consultation systems.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a method, apparatus, and electronic device for identifying consultation intent, in order to at least solve the technical problem that the deep learning-based intent recognition methods used in related technologies rely on complex data annotation for multi-task joint modeling in order to improve model prediction performance, resulting in high modeling costs and complexity.

[0006] According to one aspect of the embodiments of this application, a method for identifying consultation intent is provided, comprising: obtaining a contextual embedding representation corresponding to consultation text; determining an intra-class aggregation vector based on the contextual embedding representation and a category prototype semantic vector corresponding to each preset intent category, wherein the category prototype semantic vector is used to reflect the semantic features of the intent category, and the intra-class aggregation vector is formed by aggregating multiple classification center vectors under each intent category, wherein the classification center vector is an instance of each intent category in the semantic space; determining intent recognition features corresponding to the intra-class aggregation vector and the contextual embedding representation, wherein the intent recognition features include a feature representation formed by combining intra-class aggregation and inter-class interaction to reflect the degree of correlation between consultation text and multiple intent categories at different semantic granularities; and determining an intent recognition result corresponding to consultation text based on the intent recognition features.

[0007] In some embodiments of this application, determining the intra-class aggregation vector based on the context embedding representation and the category prototype semantic vector corresponding to each preset intent category includes: using the embedding vector corresponding to the classification label bit of the context embedding representation as the sentence embedding representation, wherein the classification label bit includes a label bit reflecting the global context semantics of the consultation text; determining the intra-class matching score between the sentence embedding representation and the category prototype semantic vector, wherein the intra-class matching score is used to reflect the semantic similarity between the consultation text and all classification center vectors under each intent category; and determining the intra-class aggregation vector based on the intra-class matching score.

[0008] In some embodiments of this application, determining the intra-class aggregation vector based on the intra-class matching score includes: determining the intra-class matching score corresponding to each intent category as the weight of multiple category centers of the intent category; and using the weights to perform a weighted average of the multiple category center vectors corresponding to each intent category to obtain the intra-class aggregation vector.

[0009] In some embodiments of this application, determining the intent recognition features corresponding to the intra-class aggregation vector and the context embedding representation includes: determining a first inter-class matching score between the sentence vector corresponding to the context embedding representation and the intra-class aggregation vectors corresponding to all intent categories, wherein the first inter-class matching score is used to reflect the association strength between the sentence vector and different intent categories; determining a coarse-grained inter-class interaction semantic vector based on the first inter-class matching score, wherein the coarse-grained inter-class interaction semantic vector is used to represent the global semantic features of the consultation text and the category prototype semantic features with the highest similarity to the global semantic features; adding the sentence vector and the coarse-grained inter-class interaction semantic vector to obtain a first intent recognition feature, wherein the first intent recognition feature includes sentence-level coarse-grained fused intent recognition features.

[0010] In some embodiments of this application, determining the coarse-grained inter-class interaction semantic vector based on the first inter-class matching score includes: determining the position corresponding to the maximum inter-class matching score in the first inter-class matching score; determining the target intra-class aggregation vector corresponding to the position from the intra-class aggregation vectors corresponding to all intent categories respectively; and multiplying the target intra-class aggregation vector with the maximum inter-class matching score to obtain the coarse-grained inter-class interaction semantic vector.

[0011] In some embodiments of this application, determining the intent recognition features corresponding to the intra-class aggregation vector and the context embedding representation includes: determining a second inter-class matching score between the word vector corresponding to the context embedding representation and the intra-class aggregation vector corresponding to each intent category, wherein the second inter-class matching score is used to reflect the association strength between the word vector and different intent categories; determining a fine-grained inter-class interaction semantic vector based on the second inter-class matching score, wherein the fine-grained inter-class interaction semantic vector is used to reflect the association features between words and intent categories in the consultation text; and determining a second intent recognition feature based on the fine-grained inter-class interaction semantic vector, wherein the second intent recognition feature includes word-level fine-grained fused intent recognition features.

[0012] In some embodiments of this application, determining the second intent recognition feature based on the fine-grained inter-class interaction semantic vector includes: adding the word vector to the fine-grained inter-class interaction semantic vector to obtain the word-level fusion vector; and using a convolutional neural network to extract the local semantic features of the word-level fusion vector to obtain the second intent recognition feature.

[0013] In some embodiments of this application, the intent recognition features include sentence-level coarse-grained fused intent recognition features and word-level fine-grained fused intent recognition features; determining the intent recognition result corresponding to the consultation text based on the intent recognition features includes: determining an intent score based on the sentence-level coarse-grained fused intent recognition features and the word-level fine-grained fused intent recognition features, wherein the intent score is used to quantify the similarity between the consultation text and each intent category; and determining the intent category corresponding to the highest intent score among the intent scores as the intent recognition result.

[0014] According to another aspect of the embodiments of this application, a device for identifying consultation intent is also provided, comprising: an acquisition module for acquiring a contextual embedding representation corresponding to consultation text; a first determination module for determining an intra-class aggregation vector based on the contextual embedding representation and a category prototype semantic vector corresponding to each preset intent category, wherein the category prototype semantic vector is used to reflect the semantic features of the intent category, and the intra-class aggregation vector is formed by aggregating multiple classification center vectors under each intent category, wherein the classification center vector is an instance of each intent category in the semantic space; a second determination module for determining intent recognition features corresponding to the intra-class aggregation vector and the contextual embedding representation, wherein the intent recognition features include a feature representation formed by combining intra-class aggregation and inter-class interaction to reflect the degree of correlation between consultation text and multiple intent categories at different semantic granularities; and a third determination module for determining the intent recognition result corresponding to the consultation text based on the intent recognition features.

[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the identification method for realizing the above-mentioned consultation intent.

[0016] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device on which the non-volatile storage medium is located executes the above-mentioned method for identifying the intent to conduct a medical consultation by running the computer program.

[0017] According to another aspect of the embodiments of this application, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the above-mentioned method for identifying the intent of a medical consultation.

[0018] In this embodiment, a fusion of category prototype semantics is adopted. By obtaining the contextual embedding representation of the consultation text, it interacts with the category prototype semantic vector corresponding to the preset intent category to form an intra-class aggregation vector that reflects the correlation between the consultation text and a specific intent category. Then, the intent recognition features corresponding to the intra-class aggregation vector and the contextual embedding representation are determined. Based on the extracted intent recognition features, the most likely intent category corresponding to the consultation text is predicted, thereby achieving the goal of accurate intent recognition. This improves the accuracy and efficiency of intent recognition in intelligent consultation systems and solves the technical problem that the deep learning-based intent recognition methods used in related technologies rely on complex data annotation for multi-task joint modeling to improve model prediction performance, resulting in high modeling costs and complexity. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1 This is a hardware structure block diagram of a computer terminal for a method of recognizing a patient's intent according to an embodiment of this application;

[0021] Figure 2 This is a flowchart of a method for identifying a patient's intent according to an embodiment of this application;

[0022] Figure 3 This is a schematic diagram of a model structure for a method of recognizing consultation intent according to an embodiment of this application;

[0023] Figure 4 This is a flowchart of the model training process for a method for recognizing a patient's intent according to an embodiment of this application.

[0024] Figure 5 This is a schematic diagram of a diagnostic intent recognition device according to an embodiment of this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:

[0028] Integrating Prototype Semantics for Medical Consultation Intent Recognition (IPS-MedIR): In this embodiment, it refers to an algorithm designed to improve the accuracy and efficiency of intent recognition in intelligent consultation systems. By integrating the contextual embedding representation of consultation text with preset prototype semantic vectors, it evaluates the relevance of text to different intent categories in multiple dimensions, thereby improving the accuracy of intent recognition.

[0029] BERT (Bidirectional Encoder Representations from Transformers): A bidirectional pre-trained model based on the Transformer architecture, capable of understanding contextual relationships in text and providing high-quality text embedding representations. In this embodiment, the BERT model is used to extract contextual embedding information from consultation text.

[0030] Category prototype semantics: a method for representing the central semantic concept of a specific intent category. By constructing and learning the central vector of each intent category, the model can more effectively capture the association between text and category. In the embodiments of this application, category prototype semantics is the core of the IPS-MedIR model. Through intra-class and inter-class prototype semantic interactions, the model can understand the intent of the text and perform fine-grained feature fusion and intent prediction based on this.

[0031] Coarse-grained features: In this embodiment, these refer to features generated by the interaction between sentence-level representations and category prototypes. They are used to evaluate the overall relevance of the consultation text to different intent categories. For example, they can be generated through intra-class and inter-class interaction processes, providing the model with a high-level perspective on intent understanding.

[0032] Fine-grained features: In this embodiment, fine-grained features refer to local features extracted by convolutional neural networks based on the interaction between word-level representations and intra-class aggregated vectors. These features are used to capture subtle associations between specific words and phrases in the text and the intent category. For example, word-level prototypical semantic interaction and local feature extraction can enhance the model's sensitivity to text details, thereby improving the accuracy of intent recognition.

[0033] The dialogue intent recognition methods employed in related technologies have mainly evolved from rule-based methods to machine learning-based methods and deep learning-based methods. Among them, rule-based matching methods have low flexibility and poor compatibility; traditional machine learning methods, for short text intent recognition, have limited feature construction methods, and semantic differences are difficult to distinguish, making them unsuitable for the medical field.

[0034] In recent years, deep learning has been widely applied in the field of intent recognition. Leveraging the powerful fitting capabilities of deep neural networks, even without specifically designed feature elements, neural networks can automatically extract deep semantic features from text, achieving good intent recognition results. Examples include using gated memory recurrent neural networks (LSTM, GRU) for intent recognition, or employing dual-channel short text intent recognition models utilizing both local and global features. Joint learning methods primarily employ multi-task learning of intent recognition and slot filling. The slot filling task can assist the intent recognition task during training, thereby improving intent recognition performance, but this requires the dataset to have labels adapted to the slot filling task. However, current work employs joint learning using slot filling or sequence labeling tasks, but this requires significant manual annotation of both slot filling and sequence labeling.

[0035] Furthermore, intelligent consultation systems built on semantic large models, RAG technology, and agent platforms are gradually replacing traditional systems that rely on template matching or search engine retrieval, improving the flexibility of medical consultation dialogue and the accuracy of medical responses. However, intelligent consultation systems built on agent platforms often use the general knowledge capabilities of non-fine-tuned large models to identify user intent, which can easily lead to identification errors in the first step. This can cause subsequent issues such as the agent workflow going down the wrong branch, RAG retrieving incorrect knowledge bases, and generating large model responses that do not match the intent. Moreover, the agent workflow often involves multiple semantic large models sequentially, which delays the system's response time and degrades the user experience.

[0036] To address the aforementioned technical problems, this application provides corresponding solutions, which are detailed below.

[0037] The method for identifying the intent to conduct a medical consultation provided in this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing a method to recognize the intent of a patient seeking medical advice is shown. Figure 1 As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions connected via wired and / or wireless networks. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0038] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for recognizing the intent to consult a doctor in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned method for recognizing the intent to consult a doctor. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0040] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a radio frequency (RF) module, used for wireless communication with the Internet.

[0041] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0042] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.

[0043] In the above operating environment, this application provides an embodiment of a method for identifying consultation intent. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0044] Figure 2This is a flowchart of a method for identifying a patient's intent according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0045] Step S202: Obtain the contextual embedding representation corresponding to the consultation text.

[0046] In step S202 above, the context embedding representation can change its representation according to the specific context in which the word appears, thereby more accurately reflecting the true semantics of the word. In some embodiments of this application, the context embedding representation can be generated by the BERT model to capture the polysemy and semantic richness of the consultation text.

[0047] Specifically, the contextual embedding representation of the consultation text can be determined through the following steps:

[0048] For a text sequence input into the intelligent consultation system ,in The sentence length is represented by a BERT model derived from the Transformer encoder architecture for text processing. If an embedded representation is performed, then This represents the segmentation of the BERT model's word segmenter. Each word is used to generate the BERT input vector using formula (1). :

[0049] (1)

[0050] in, It maps each token to dimensional vector, , For position encoding, Encoding the segment. Let the first segment in the multi-head self-attention mechanism be... The head query vector, key vector, and value vector are respectively ,in Then the first The calculation of head self-attention is shown in formula (2):

[0051] (2)

[0052] in, , , , , The function is used to calculate the scaled dot product. Since the BERT model uses 12 self-attention heads in each layer to combine and calculate in order to capture the semantic features of the text in different hidden layer spaces, the final calculation process of the multi-head self-attention mechanism is as shown in formula (3):

[0053] (3)

[0054] After being encoded through a multi-head self-attention mechanism with 12 layers of identical computational processes, the final embedded representation of the text is obtained. .

[0055] Step S204: Determine the intra-class aggregation vector based on the context embedding representation and the category prototype semantic vector corresponding to each preset intent category. The category prototype semantic vector is used to reflect the semantic features of the intent category. The intra-class aggregation vector is formed by aggregating multiple classification center vectors under each intent category. The classification center vector is an instance of each intent category in the semantic space.

[0056] In step S204 above, the category prototype semantic vector is a vector used to represent the core semantic features of a specific intent category. In some embodiments of this application, each preset intent category has a category prototype semantic vector associated with it. These vectors are constructed in a specific way (such as Xavier initialization) to capture and represent the semantic center of each intent category. Through the category prototype semantic vector, the model (IPS-MedIR) can identify the semantic features that best represent the intent category.

[0057] It should be noted that Xavier initialization refers to the network weight initialization strategy, which initializes the weights through uniform or normal distribution to ensure that the variance of the output of each layer of the network remains stable and to prevent gradient vanishing or gradient exploding.

[0058] Specifically, the category prototype semantic vector can be defined in the following way:

[0059] The class prototype semantic vector is defined using a uniformly distributed Xavier parameter initialization method. In the process of neural network training, it can alleviate the problem of gradient vanishing or exploding, so that the variance of the forward propagation output remains stable. The initialization calculation process of the uniformly distributed Xavier parameters is shown in formula (4):

[0060] (4)

[0061] in, Scaling factor It is the input dimension. It is the output dimension, the category prototype semantic vector. The parameters will be from Mid-sampling, Indicates shared ownership There are several categories of consultation intent, each category represented by a two-dimensional symbol. Semantic vector representation, that is, setting each intent to have Each category center.

[0062] In some embodiments of this application, under each intent category, there are multiple classification center vectors, which are instance representations of that category in the semantic space. For example, each category has 5 classification centers. These classification center vectors are designed to cover the semantic diversity of the intent category, so that the intra-class aggregated vectors can comprehensively express the various expressions and semantic variations of this intent category.

[0063] By interacting with the context embedding representation and the category prototype semantic vector, the relevance of each consultation text to the classification center vector under each intent category is calculated. Then, based on these relevance scores, the classification center vectors are weighted and aggregated to form a vector that reflects the relevance of the consultation text to a specific intent category (i.e., the intra-class aggregated vector).

[0064] In intelligent consultation, different consultation texts may express the same intent in different ways. For example, consultation texts in the category of "treatment plan" may ask "how to treat", "what is the treatment method", or "what are the treatment methods". By calculating the correlation score between the sentence vector and the classification center vector, the model can understand the semantic similarity of these expressions, thereby more accurately classifying the consultation text into the correct intent category.

[0065] In some embodiments of this application, the intra-class aggregation vector can be determined as follows: the embedding vector corresponding to the classification tag bit of the context embedding representation is used as the sentence embedding representation, wherein the classification tag bit includes a tag bit that reflects the global contextual semantics of the consultation text; the intra-class matching score between the sentence embedding representation and the category prototype semantic vector is determined, wherein the intra-class matching score is used to reflect the semantic similarity between the consultation text and all classification center vectors under each intent category; and the intra-class aggregation vector is determined based on the intra-class matching score.

[0066] Specifically, the intra-class aggregation vector is determined based on the intra-class matching score: the intra-class matching score corresponding to each intent category is determined as the weight of multiple category centers of the intent category; the weights are used to perform a weighted average of the multiple category center vectors corresponding to each intent category to obtain the intra-class aggregation vector.

[0067] Specifically, the steps for calculating the intra-class aggregate vector include:

[0068] Take the CLS token bits from BERT as the sentence embedding representation. ,calculate Intent matching score between the prototype and the category The calculations are shown in formulas (5)-(6):

[0069] (5)

[0070] (6)

[0071] in, This is a transpose. For use right Normalize the dimensions to obtain the intra-class intent matching score. Finally, the intra-class aggregation vector of the category prototype is calculated based on the matching score. That is, aggregation The weighted classification center semantics aims to improve the effect of perceiving the intent category of the consultation sentence.

[0072] The calculation is shown in formula (7):

[0073] (7)

[0074] in, Function representation in Reduce dimensions at corresponding positions. Dimension updated to . This is the final result after the semantic interaction of the class prototype (intra-class aggregated vector).

[0075] Step S206: Determine the intent recognition features corresponding to the intra-class aggregation vector and the context embedding representation. The intent recognition features include feature representations formed by combining intra-class aggregation and inter-class interaction to reflect the degree of relevance of the consultation text to multiple intent categories at different semantic granularities.

[0076] In step S206 above, the intent recognition features are generated by fusing intra-class aggregated vectors and contextual embedding representations, aiming to characterize the correlation between the consultation text and each intent category, as well as the semantic orientation of the text at different semantic granularities (such as sentence level and word level).

[0077] It's important to note that in the IPS-MedIR model, intra-class aggregation refers to interacting the consultation text with multiple category prototype semantic vectors of a specific intent category. Similarity or relevance scores are calculated, and these scores are used to weight and aggregate the corresponding category prototype vectors, thus forming a vector reflecting the sentence-level association between the consultation text and that intent category. Intra-class aggregation helps the model understand the relationship between the consultation text and a specific intent category from a holistic sentence perspective, capturing the overall semantic features of the consultation sentence, thereby enhancing the model's ability to discriminate the intent category of the consultation text.

[0078] Inter-class interaction refers to the further interaction between the intra-class aggregated vectors and the intra-class aggregated vectors of all or some other intent categories through sentence-level representations after the intra-class aggregated vectors are formed. This obtains a more comprehensive understanding of inter-class relationships and discriminative power, used to compare and evaluate the relationships between different intent categories, in order to more accurately locate which specific intent category the consultation text belongs to. By calculating the similarity or correlation between prototype vectors of different categories, inter-class interaction can enhance the model's comparative and decision-making abilities when identifying specific intent categories. It helps the model make more accurate judgments when distinguishing similar or close intent categories, because the semantics of some intent categories may overlap in some aspects. Through inter-class interaction, the model can learn the differences between different categories, thereby improving the accuracy of intent recognition.

[0079] Different semantic granularities refer to the different depths at which text information can be understood in text analysis. In some embodiments of this application, sentence-level and word-level features can be included. Sentence-level features reflect the overall semantic orientation of the consultation text, while word-level features consider the semantic contribution of each word in the text and its association with the intent category in greater depth. This multi-granularity feature fusion helps the model to fully understand the text intent from both global and local perspectives.

[0080] In some embodiments of this application, the intent recognition features include sentence-level coarse-grained fused intent recognition features. The intent recognition features corresponding to the intra-class aggregation vector and the context embedding representation can be determined in the following way: determining a first inter-class matching score between the sentence vector corresponding to the context embedding representation and the intra-class aggregation vectors corresponding to all intent categories, wherein the first inter-class matching score is used to reflect the association strength between the sentence vector and different intent categories; determining a coarse-grained inter-class interaction semantic vector based on the first inter-class matching score, wherein the coarse-grained inter-class interaction semantic vector is used to represent the global semantic features of the consultation text and the prototype semantic features of the category with the highest similarity to the global semantic features; adding the sentence vector and the coarse-grained inter-class interaction semantic vector to obtain the first intent recognition feature, wherein the first intent recognition feature includes sentence-level coarse-grained fused intent recognition features.

[0081] Specifically, the coarse-grained inter-class interaction semantic vector is determined based on the first-class inter-match score: the position corresponding to the maximum inter-class matching score in the first-class inter-match score is determined; the target intra-class aggregation vector corresponding to the position is determined from the intra-class aggregation vectors corresponding to all intent categories; the target intra-class aggregation vector is multiplied by the maximum inter-class matching score to obtain the coarse-grained inter-class interaction semantic vector.

[0082] Specifically, the first intent recognition feature can be determined through the following steps:

[0083] The intra-class interaction aggregation vector is obtained through the intra-class interaction process. Subsequently, sentence vectors can be used again to enable inter-class interactions based on category prototypes. and Calculate the aggregate matching score between category prototype classes. (Inter-class matching score) The calculation process is shown in formula (8):

[0084] (8)

[0085] Select the aggregate vector (within the target class) corresponding to the position with the highest score after inter-class interaction, and multiply it by the score. (Maximum inter-class matching score) is used as a vector obtained from inter-class interactions. (Coarse-grained inter-class interaction semantic vectors) The calculations are shown in formulas (9)-(10):

[0086] (9)

[0087] (10)

[0088] in, The function represents finding the maximum value and outputting the position corresponding to the maximum value. .

[0089] Finally, the sentence vector and the vector obtained from inter-class interactions are combined using formula (11). Adding them together yields sentence-level coarse-grained fused intent recognition features (first intent recognition features).

[0090] (11)

[0091] In some embodiments of this application, the intent recognition features further include word-level fine-grained fused intent recognition features, which can be determined by the following methods: determining a second inter-class matching score between the word vector corresponding to the context embedding representation and the intra-class aggregate vectors corresponding to all intent categories, wherein the second inter-class matching score is used to reflect the association strength between the word vector and different intent categories; determining a fine-grained inter-class interaction semantic vector based on the second inter-class matching score, wherein the fine-grained inter-class interaction semantic vector is used to reflect the association features between words and intent categories in the consultation text; and determining a second intent recognition feature based on the fine-grained inter-class interaction semantic vector, wherein the second intent recognition feature includes word-level fine-grained fused intent recognition features.

[0092] Specifically, the second intent recognition features are determined based on the fine-grained inter-class interaction semantic vector: the word vector is added to the fine-grained inter-class interaction semantic vector to obtain the word-level fusion vector; the local semantic features of the word-level fusion vector are extracted using a convolutional neural network to obtain the second intent recognition features.

[0093] Specifically, the second intent recognition features can be determined through the following steps:

[0094] Intraclass aggregate vector Record the corresponding sentences A weighted aggregated intent category vector can be reused to guide fine-grained word-level prototypical semantic interactions between categories; that is, through word vectors... and weighted aggregation intent vector Perform a dot product operation to make In Each aggregated intent vector has weights for different words. The aggregated vector at the position with the highest score after fine-grained interaction is then multiplied by the score. (Second-class matching score) yields the intent category vector (fine-grained inter-class interaction semantic vector) after fine-grained word-level inter-class prototype semantic interaction. The calculation process is shown in formulas (12)-(14):

[0095] (12)

[0096] (13)

[0097] (14)

[0098] In formula (12) It belongs to a trainable parameter matrix. Then the word count... and Adding them together yields a fine-grained fusion vector (word-level fusion vector). The calculation is shown in formula (15):

[0099] (15)

[0100] After obtaining the word-level fusion vector Then, convolutional neural networks can be used to further extract fine-grained local semantic features. As a filter for convolutional neural network operations, this invention sets the convolution scale to be [value missing]. Then the convolution calculation is as shown in formulas (16)-(18):

[0101] (16)

[0102] (17)

[0103] (18)

[0104] in, The activation function is calculated as shown in formula (19). This indicates a max pooling operation.

[0105] (19)

[0106] This invention uses When multiple convolutional filters of the same scale participate in the computation, the local semantic features ultimately extracted by the convolutional neural network are... As a word-level fine-grained fusion intent recognition feature (second intent recognition feature), it is shown in formula (20):

[0107] (20)

[0108] Step S208: Determine the intent recognition result corresponding to the consultation text based on the intent recognition features.

[0109] In step S208 above, the intent recognition result refers to the intent category corresponding to the consultation text predicted by the final classifier based on the intent recognition features that fuse intra-class aggregated vectors and contextual embedding representations.

[0110] It should be noted that intent recognition features can include sentence-level coarse-grained fusion intent recognition features and word-level fine-grained fusion intent recognition features. Under this premise, the intent recognition result corresponding to the consultation text can be determined based on the intent recognition features through the following steps: determine the intent score based on the sentence-level coarse-grained fusion intent recognition features and the word-level fine-grained fusion intent recognition features, wherein the intent score is used to quantify the similarity between the consultation text and each intent category; and determine the intent category corresponding to the intent score with the highest intent score as the intent recognition result.

[0111] Specifically, after obtaining coarse-grained sentence-level intent features (first intent recognition features) and fine-grained word-level intent features (second intent recognition features), the final intent recognition result can be calculated using formula (21):

[0112] (twenty one)

[0113] in, , All of these are trainable weight parameters, taken as... The intent category corresponding to the position of the maximum value is used as the intent recognition result of the IPS-MedIR model.

[0114] In some embodiments of this application, the cross-entropy loss function can be used to calculate the sample loss during model training, as shown in formula (22):

[0115] (twenty two)

[0116] in, It refers to the batch size. Indicates the category of intent. Let logit be the logit of the k-th sample. It is the exponential summation of the logits of all categories for the k-th sample.

[0117] Through steps S202 to S208, a fusion of category prototype semantics is adopted. By obtaining the contextual embedding representation of the consultation text, it interacts with the category prototype semantic vector corresponding to the preset intent category to form an intra-class aggregation vector reflecting the correlation between the consultation text and a specific intent category. Then, the intent recognition features corresponding to the intra-class aggregation vector and the contextual embedding representation are determined. Based on the extracted intent recognition features, the most likely intent category corresponding to the consultation text is predicted, achieving the goal of accurate intent recognition. This improves the accuracy and efficiency of intent recognition in intelligent consultation systems and solves the technical problem that the deep learning-based intent recognition methods used in related technologies rely on complex data annotation for multi-task joint modeling to improve model prediction performance, resulting in high modeling costs and complexity.

[0118] To facilitate understanding of the above process of recognizing the intent to conduct a consultation, a specific example is provided below, illustrating how the IPS-MedIR model predicts the text of an intelligent consultation case:

[0119] In this embodiment, the parameter settings for the IPS-MedIR model are shown in Table 1.

[0120] Table 1 IPS-MedIR model parameters

[0121]

[0122] The case text, "Where in Zhengzhou can I find a hospital to treat ankylosing spondylitis and how can it be cured?", has an intent category of "treatment plan". The case comes from the CBLUE-KUAKE-QIC dataset, a benchmark for Chinese medical information processing. The intent categories for this dataset are shown in Table 2.

[0123] Table 2. Tag and Intent Comparison Table

[0124]

[0125] Step [1]: For the case text, the BERT segmenter is first used to segment the sentence to ensure that the length of the segmented text does not exceed the set Seq_Len. For very long texts, a truncation strategy is adopted. The results of the case text processing are shown in Table 3.

[0126] Table 3. Case Text Word Segmentation Table

[0127]

[0128] Then, based on the Token, Position_ID, and Segment_ID, the weight matrix stored in the BERT pre-trained model is obtained, and the initial input vector is constructed. Then, the semantic vector encoded by BERT is obtained through formulas (1)-(3). .

[0129] Step [2]: Construct a two-dimensional category prototype semantic vector for each intent category, and set 5 classification centers for each intent category; initialize the category prototype vector parameters using the Xavier uniform distribution formula (4) to obtain the category prototype semantic vector. Extract the BERT-encoded CLS position from step [1] as the sentence vector. Coarse-grained intra-class matching was performed using formulas (5)-(6) and category prototype semantics, and scores were calculated. , The case text indicates the relevance of the five classification centers to the sentence. The calculation results are shown in Table 4; using formula (7), the matching score is calculated. Aggregate the prototype semantic vectors within the class to obtain the aggregated vector after intra-class interactions. As can be seen from Table 4, the case samples have the strongest association with the "treatment plan" category center 1.

[0130] Table 4. Label and Intent Comparison Table

[0131]

[0132] Step [3]: Based on the interaction results within the prototype semantic class in step [2], calculate the sentence vector using formula (8). With intra-class aggregate vectors Inter-class matching score The calculation results are shown in Table 5; then, the coarse-grained inter-class interaction semantic vectors are obtained through formulas (9)-(10). Finally, the inter-class interaction vectors are added to the sentence vectors to obtain coarse-grained intent recognition features that fuse category prototype semantics. .

[0133] Table 5 Inter-class matching scores

[0134]

[0135] Step [4]: ​​Take the word-level vector after BERT encoding The aggregated vector obtained from the intra-class interaction in step [2] is used again. The dot product is calculated using formula (12) to obtain the sum of the product and the aggregation vector for each word. Match score Then, the semantic vectors after fine-grained inter-class interactions are obtained using formulas (13)-(14). Finally With sentence vectors Adding them together yields a fine-grained fusion vector. .

[0136] Step [5]: Using the convolutional neural network shown in formulas (16)-(18), with 256... Convolutional filters of varying sizes are used for fine-grained vector fusion. Perform local feature extraction; use The activation function is obtained by max pooling. Fine-grained fusion of dimensional intent recognition features .

[0137] Step [6]: Combine steps [3] and [5] , The intention score is predicted by formula (21), and the prediction results are shown in Table 6. The category corresponding to the maximum score is taken as the final prediction result of the IPS-MedIR model.

[0138] Table 6. Prediction results of the IPS-MedIR model

[0139]

[0140] Figure 3 This is a schematic diagram of the model structure of a method for recognizing consultation intent according to an embodiment of this application, as shown below. Figure 3 As shown, the structure of the IPS-MedIR model used in this application is illustrated using the above specific embodiment as an example. Specifically, the IPS-MedIR model includes the following execution actions:

[0141] 1. Medical Consultation Text Embedding: This step uses the BERT model to preprocess and embed the input medical consultation text. First, the text is segmented using BERT's word segmenter to ensure that each word is correctly recognized; then, BERT's bidirectional Transformer encoder is used to transform each word into a vector containing contextual semantics, while extracting the [CLS]-tagged vector as a sentence-level global embedding representation.

[0142] 2. Coarse-grained intra-class interaction: In this stage, the model interacts with the sentence-level embedding representation of the consultation text using pre-built category prototype semantic vectors to generate intra-class aggregate vectors. Multiple classification centers are set for each intent category. By calculating the similarity between the consultation text and these classification centers, the vectors of these classification centers are weighted and fused to form coarse-grained association features that reflect the text's association with a specific category.

[0143] 3. Coarse-grained inter-class interactions: After obtaining the intra-class aggregated vectors, the model further performs inter-class interactions. By calculating the correlation between the intra-class aggregated vectors and the prototype vectors of each category, it finds the strongest association points between the text and different intent categories. This process helps the model identify multiple intent categories that the consultation text may point to, thereby generating more comprehensive coarse-grained intent recognition features.

[0144] 4. Fine-grained inter-class interactions: Based on the initial coarse-grained features, the model then performs fine-grained level interactions, focusing on the association between each word and the intent category. By guiding the interaction between word-level semantics and the previous intra-class aggregated vectors, a more refined association score between each word and the intent category is obtained through dot product operations. These scores are used to construct a fine-grained fusion vector for each word, further refining the intent recognition features.

[0145] 5. Convolutional Neural Network (CNN) Feature Extraction: After generating coarse and fine-grained intent recognition features, the model uses CNN for deep feature extraction. CNNs slide a series of convolutional filters across the fused vector, capturing local patterns and features, further refining the correlation features between the consultation text and the intent category. The application of activation functions and pooling operations enhances the feature extraction capability of CNNs, ultimately yielding deep feature representations that can be used for intent prediction.

[0146] Intent Prediction: Following the steps described above, the model combines coarse-grained and fine-grained features, performing final intent classification through linear layers and activation functions. The model calculates scores between the consultation text and each preset intent category. The category with the highest score is considered the intent recognition result of the text. This result will be used to guide the next steps of the intelligent consultation system process, such as matching the most appropriate medical information or calling the corresponding expert knowledge base.

[0147] In some embodiments of this application, IPS-MedIR captures the association between medical dialogue text and intent categories by fusing category prototype semantic information. It employs sentence-level and word-level semantic fusion methods to enhance the category orientation of the consultation text, improving the intelligent consultation intent recognition effect while avoiding the time-consuming problem of generative large language models. Specifically, IPS-MedIR uses a BERT pre-trained language model from the Transformer encoder architecture to embed the consultation text. Secondly, inspired by label semantic embedding research, it constructs category prototype semantic vectors for each category and extends the category prototype semantics to a two-dimensional level. Then, it uses BERT's CLS markers as sentence embedding representations and adopts a two-stage mode of intra-class and inter-class interaction to generate sentence-level intent category aggregation vectors and consultation sentence vectors for special diagnosis fusion, obtaining coarse-grained intent recognition features. Finally, based on the sentence-level intent category aggregation vectors, it guides the fusion of word-level semantic vectors and intent category aggregation vectors, extracts deep local features through a convolutional neural network, and obtains fine-grained intent recognition features. The coarse and fine-grained features jointly predict the intent recognition result.

[0148] Figure 4 This is a flowchart of the model training process for a method for recognizing consultation intent according to an embodiment of this application, combined with... Figure 4 This application's embodiments test the model's performance on the CBLUE-KUAKE-QIC dataset, a benchmark for evaluating Chinese medical information processing. The dataset is divided into training, validation, and test sets in a 3:1:1 ratio. The IPS-MedIR model structure is as follows: Figure 3 As shown.

[0149] The evaluation results of the IPS-MedIR model are shown in Table 7. Table 8 shows the intent recognition results of IPS-MedIR and the comparison model under the evaluation metrics of Precision, Recall, and F1 score. As can be seen from the tables, IPS-MedIR improves precision, recall, and F1 score by 2.77%, 4.08%, and 3.73% respectively compared to the basic BERT model; while IPS-MedIR improves prompt word inference by 25.62%, 10.46%, and 27.36% respectively compared to directly using the untuned DeepSeek_R1_671B model.

[0150] Table 7 Results of Intelligent Consultation Intent Recognition by the IPS-MedIR Model (Unit: %)

[0151]

[0152] Table 8. Results of Intelligent Consultation Intent Recognition by IPS-MedIR and Comparative Model (Unit: %)

[0153]

[0154] To demonstrate the effectiveness of the two-dimensional category prototypes constructed by the IPS-MedIR model, a second comparative experiment was conducted, using a fusion of one-dimensional category prototypes for intelligent consultation intent recognition. The experimental results are shown in Table 9. For the one-dimensional category prototypes, the true semantic label of the intent, the semantic label of random initialization, and the average semantics of various training samples were used respectively. The experimental results show that the IPS-MedIR model has better recognition performance than the model that fuses the semantics of the one-dimensional category prototypes.

[0155] Table 9. Results of one-dimensional single-stage fusion category prototype intent recognition (unit: %)

[0156]

[0157] This application proposes the IPS-MedIR model for intelligent consultation intent recognition. IPS-MedIR employs a two-stage mode of intra-class and inter-class interaction to generate sentence-level coarse-grained intent recognition fusion features. Based on sentence-level category fusion vectors, it guides word-level semantic and category semantic fusion. Deep local features are extracted via a convolutional neural network to obtain word-level fine-grained intent recognition fusion features. The coarse and fine-grained features jointly predict the intent recognition result. This improves the model's prediction performance while avoiding the massive workload of multi-task joint modeling and data annotation, reducing modeling difficulty and complexity. Especially in intelligent consultation systems built on intelligent agent platforms, it can reduce identification latency, lower the error rate of workflow branching, and improve the user experience of the intelligent consultation system. The inventors hope that the entire algorithm process will be protected.

[0158] Figure 5 This is a structural diagram of a diagnostic intent recognition device according to an embodiment of this application, such as... Figure 5 As shown, the device includes:

[0159] The acquisition module 502 is used to acquire the context embedding representation corresponding to the consultation text;

[0160] The first determining module 504 is used to determine the intra-class aggregation vector based on the context embedding representation and the category prototype semantic vector corresponding to each preset intent category. The category prototype semantic vector is used to reflect the semantic features of the intent category. The intra-class aggregation vector is formed by aggregating multiple classification center vectors under each intent category. The classification center vector is an instance of each intent category in the semantic space.

[0161] The second determining module 506 is used to determine the intent recognition features corresponding to the intra-class aggregation vector and the context embedding representation, wherein the intent recognition features include feature representations formed by combining intra-class aggregation and inter-class interaction to reflect the degree of correlation between the consultation text and multiple intent categories at different semantic granularities;

[0162] The third determining module 508 is used to determine the intent recognition result corresponding to the consultation text based on the intent recognition features.

[0163] It should be noted that, Figure 5 The device shown for recognizing the intent to conduct a consultation is used to perform... Figure 2 The method for identifying the intent to conduct a consultation, therefore Figure 2 The relevant explanations in the methods for identifying patient intent also apply to... Figure 5 The device for recognizing the intent of a patient's inquiry, as shown, will not be described in detail here.

[0164] This application also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the steps of the method for recognizing the consultation intent in various embodiments of this application.

[0165] This application also provides a non-volatile storage medium including a stored computer program, wherein the device containing the non-volatile storage medium executes the steps of the consultation intent recognition method in various embodiments of this application by running the computer program.

[0166] This application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method for identifying the consultation intent in various embodiments of this application.

[0167] This application also provides a computer program that, when executed by a processor, implements the steps of the method for identifying the consultation intent in various embodiments of this application.

[0168] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0169] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0170] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0171] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0172] Furthermore, the functional units in the various embodiments of this application 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 as a software functional unit.

[0173] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0174] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for identifying the intent to conduct a medical consultation, characterized in that, include: Obtain the context embedding representation corresponding to the consultation text; The intra-class aggregation vector is determined based on the context embedding representation and the category prototype semantic vector corresponding to each preset intent category. The category prototype semantic vector is used to reflect the semantic features of the intent category. The intra-class aggregation vector is formed by aggregating multiple classification center vectors under each intent category. The classification center vector is an instance of each intent category in the semantic space. Determine the intent recognition features corresponding to the intra-class aggregation vector and the context embedding representation, wherein the intent recognition features include feature representations formed by combining intra-class aggregation and inter-class interaction to reflect the degree of relevance of the consultation text to multiple intent categories at different semantic granularities; The intent recognition result corresponding to the consultation text is determined based on the intent recognition features.

2. The method according to claim 1, characterized in that, Based on the context embedding representation and the category prototype semantic vector corresponding to each preset intent category, an intra-class aggregation vector is determined, including: The embedding vector corresponding to the classification tag bit of the context embedding representation is used as the sentence embedding representation, wherein the classification tag bit includes a tag bit that reflects the global contextual semantics of the consultation text; Determine the intra-class matching score between the sentence embedding representation and the category prototype semantic vector, wherein the intra-class matching score is used to reflect the semantic similarity between the consultation text and all classification center vectors under each intent category; The intra-class aggregation vector is determined based on the intra-class matching score.

3. The method according to claim 2, characterized in that, Determining the intra-class aggregation vector based on the intra-class matching score includes: The intra-class matching score corresponding to each intent category is determined as the weight of multiple category centers of the intent category; The weights are used to perform a weighted average of the multiple classification center vectors corresponding to each intent category to obtain the intra-class aggregate vector.

4. The method according to claim 1, characterized in that, Determining the intent recognition features corresponding to the intra-class aggregation vector and the context embedding representation includes: Determine the first inter-class matching score between the sentence vector corresponding to the context embedding representation and the intra-class aggregate vectors corresponding to all intent categories, wherein the first inter-class matching score is used to reflect the association strength between the sentence vector and different intent categories; Based on the first inter-class matching score, a coarse-grained inter-class interaction semantic vector is determined, wherein the coarse-grained inter-class interaction semantic vector is used to represent the global semantic features of the consultation text and the category prototype semantic features with the highest similarity to the global semantic features; The sentence vector is added to the coarse-grained inter-class interaction semantic vector to obtain the first intent recognition feature, wherein the first intent recognition feature includes sentence-level coarse-grained fused intent recognition features.

5. The method according to claim 4, characterized in that, Based on the first inter-class matching score, a coarse-grained inter-class interaction semantic vector is determined, including: Determine the position corresponding to the maximum inter-class matching score in the first inter-class matching score; Determine the target intra-class aggregation vector corresponding to the position from the intra-class aggregation vectors corresponding to all intent categories; The coarse-grained inter-class interaction semantic vector is obtained by multiplying the target class intra-class aggregation vector with the maximum inter-class matching score.

6. The method according to claim 1, characterized in that, Determining the intent recognition features corresponding to the intra-class aggregation vector and the context embedding representation includes: Determine the second inter-class matching score between the word vector corresponding to the context embedding representation and the intra-class aggregate vectors corresponding to all intent categories, wherein the second inter-class matching score is used to reflect the association strength between the word vector and different intent categories; Based on the second inter-class matching score, a fine-grained inter-class interaction semantic vector is determined, wherein the fine-grained inter-class interaction semantic vector is used to reflect the association features between words and intent categories in the consultation text; A second intent recognition feature is determined based on the fine-grained inter-class interaction semantic vector, wherein the second intent recognition feature includes word-level fine-grained fused intent recognition features.

7. The method according to claim 6, characterized in that, Determining the second intent recognition features based on the fine-grained inter-class interaction semantic vector includes: The word vector is added to the fine-grained inter-class interaction semantic vector to obtain the word-level fusion vector; The local semantic features of the word-level fusion vector are extracted using a convolutional neural network to obtain the second intent recognition feature.

8. The method according to claim 1, characterized in that, The intent recognition features include sentence-level coarse-grained fused intent recognition features and word-level fine-grained fused intent recognition features; Determining the intent recognition result corresponding to the consultation text based on the intent recognition features includes: An intent score is determined based on the sentence-level coarse-grained fusion intent recognition features and the word-level fine-grained fusion intent recognition features, wherein the intent score is used to quantify the similarity between the consultation text and each intent category; The intent category corresponding to the highest intent score among the intent scores is determined as the intent recognition result.

9. A device for recognizing the intent to conduct a medical consultation, characterized in that, include: The acquisition module is used to obtain the context embedding representation corresponding to the consultation text; The first determining module is used to determine the intra-class aggregation vector based on the context embedding representation and the category prototype semantic vector corresponding to each preset intent category. The category prototype semantic vector is used to reflect the semantic features of the intent category. The intra-class aggregation vector is formed by aggregating multiple classification center vectors under each intent category. The classification center vector is an instance of each intent category in the semantic space. The second determining module is used to determine the intent recognition features corresponding to the intra-class aggregation vector and the context embedding representation, wherein the intent recognition features include feature representations formed by combining intra-class aggregation and inter-class interaction to reflect the degree of relevance of the consultation text to multiple intent categories at different semantic granularities; The third determining module is used to determine the intent recognition result corresponding to the consultation text based on the intent recognition features.

10. An electronic device, characterized in that, include: A memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the method for recognizing the intent of a medical inquiry as described in any one of claims 1 to 7.

11. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the method for identifying the consultation intent as described in any one of claims 1 to 7 by running the computer program.

12. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method for recognizing the consultation intent as described in any one of claims 1 to 7.