Query question classification method and device, equipment, medium and product

By using a target intent recognition and classification model and pooling layer parameters trained on avionics fault diagnosis samples, the problem of insufficient accuracy in query intent recognition and classification is solved, thereby improving the question-answering accuracy and response speed of the large language model.

CN121833947APending Publication Date: 2026-04-10CHINA ELECTRONICS RELIABILITY AND ENVIRONMENTAL TESTING INSTITUTE ((THE FIFTH INSTITUTE OF ELECTRONICS MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY) (CHINA SAIBAO LABORATORY)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA ELECTRONICS RELIABILITY AND ENVIRONMENTAL TESTING INSTITUTE ((THE FIFTH INSTITUTE OF ELECTRONICS MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY) (CHINA SAIBAO LABORATORY)
Filing Date
2025-11-10
Publication Date
2026-04-10

Smart Images

  • Figure CN121833947A_ABST
    Figure CN121833947A_ABST
Patent Text Reader

Abstract

The invention relates to a query question classification method and device, equipment, a medium and a product. The method comprises the steps of obtaining a to-be-queried problem for avionics fault diagnosis; inputting the to-be-queried question into the target intention recognition and classification model to obtain a question classification result output by the target intention recognition and classification model; wherein target pooling norm parameters in a pooling layer included in the target intention recognition and classification model are obtained based on problem samples and problem label training for avionics fault diagnosis. By adopting the method, the accuracy of intention recognition and classification processing on the query problem can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of natural language data processing, and in particular to a query question classification method, device, equipment, medium and product. BACKGROUND

[0002] In the online operation and maintenance work of industrial equipment, a large language model can be used to provide knowledge services for field engineers in the form of question and answer. Field engineers can ask the large language model about alarm codes, component names and fault phenomena, such as “How to locate XXX fault?” or “What is the reason for XXX alarm? Which part needs to be replaced?”.

[0003] In order to improve the accuracy and timeliness of the question and answer of the large language model, the input query question needs to be subjected to intent recognition and classification processing, and the classification result is input into the large language model to assist the large language model in answering. However, the accuracy of the intent recognition and classification processing of the query question in the related art is poor. SUMMARY

[0004] Therefore, it is necessary to provide a query question classification method, device, equipment, medium and product capable of improving the accuracy of intent recognition and classification processing.

[0005] In a first aspect, the present application provides a query question classification method, which comprises:

[0006] Obtaining a to-be-queried question for avionics fault diagnosis;

[0007] Inputting the to-be-queried question into a target intent recognition and classification model to obtain a question classification result output by the target intent recognition and classification model; wherein a target pooling norm parameter in a pooling layer included in the target intent recognition and classification model is obtained based on a question sample and a question label for avionics fault diagnosis.

[0008] In one of the embodiments, the target intent recognition and classification model comprises an encoding layer, a pooling layer and a classification layer, and inputting the to-be-queried question into the target intent recognition and classification model to obtain the question classification result output by the target intent recognition and classification model comprises:

[0009] Inputting the to-be-queried question into the encoding layer to obtain encoding feature data output by the encoding layer;

[0010] Inputting the encoding feature data into the pooling layer to obtain global feature data output by the pooling layer;

[0011] Inputting the global feature data into the classification layer to obtain the question classification result output by the classification layer.

[0012] In one embodiment, the method further includes:

[0013] Obtain the initial intent recognition classification model and the avionics fault diagnosis sample dataset, wherein the avionics fault diagnosis sample dataset includes problem samples and corresponding problem labels;

[0014] The initial intent recognition classification model was iteratively trained using an avionics fault diagnosis sample dataset to obtain a target intent recognition classification model.

[0015] In one embodiment, the initial intent recognition classification model is iteratively trained based on an avionics fault diagnosis sample dataset to obtain a target intent recognition classification model, including:

[0016] For each iteration of the training process, each problem sample is input into the intermediate intent recognition classification model to obtain the sample classification result corresponding to each problem sample;

[0017] Based on the problem label and sample classification results corresponding to each problem sample, determine the first loss value corresponding to each problem sample;

[0018] Based on the first loss value corresponding to each problem sample, generate adversarial samples corresponding to each problem sample;

[0019] Each adversarial sample is input into the intermediate intent recognition and classification model to obtain the sample classification result corresponding to each adversarial sample;

[0020] Based on the sample classification results corresponding to the adversarial examples and the question labels corresponding to the question samples, the second loss value corresponding to the adversarial examples is determined.

[0021] Based on the first and second loss values, adjust the model parameters of the intermediate intent recognition and classification model.

[0022] In one embodiment, adversarial samples corresponding to each problem sample are generated based on the first loss value corresponding to each problem sample, including:

[0023] The gradient corresponding to each problem sample is determined based on the first loss value of each problem sample.

[0024] Based on the gradient and interference intensity of each problem sample, adversarial samples are generated for each problem sample.

[0025] In one embodiment, the method further includes:

[0026] The interference intensity corresponding to each problem sample is determined based on the first loss value corresponding to each problem sample; wherein, the interference intensity is negatively correlated with the first loss value.

[0027] Secondly, this application also provides a query question classification device, comprising:

[0028] The acquisition module is used to acquire query questions for avionics fault diagnosis;

[0029] The classification module is used to input the query question into the target intent recognition classification model and obtain the question classification result output by the target intent recognition classification model. The target pooling norm parameter in the pooling layer of the target intent recognition classification model is obtained by training based on question samples and question labels for avionics fault diagnosis.

[0030] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0031] Retrieve query questions related to avionics fault diagnosis;

[0032] The query question is input into the target intent recognition and classification model to obtain the question classification result output by the target intent recognition and classification model; the target pooling norm parameter in the pooling layer of the target intent recognition and classification model is obtained based on the question samples and question labels for avionics fault diagnosis.

[0033] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0034] Retrieve query questions related to avionics fault diagnosis;

[0035] The query question is input into the target intent recognition and classification model to obtain the question classification result output by the target intent recognition and classification model; the target pooling norm parameter in the pooling layer of the target intent recognition and classification model is obtained based on the question samples and question labels for avionics fault diagnosis.

[0036] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0037] Retrieve query questions related to avionics fault diagnosis;

[0038] The query question is input into the target intent recognition and classification model to obtain the question classification result output by the target intent recognition and classification model; the target pooling norm parameter in the pooling layer of the target intent recognition and classification model is obtained based on the question samples and question labels for avionics fault diagnosis.

[0039] The aforementioned query question classification method, apparatus, equipment, medium, and product acquire query questions for avionics fault diagnosis. The query questions are then input into a target intent recognition and classification model to obtain the output question classification result. The target pooling norm parameter in the pooling layer of the target intent recognition and classification model is obtained based on question samples and labels related to avionics fault diagnosis. Thus, the target intent recognition and classification model employs pooling layers with learnable norms. These learnable norms automatically adapt to different sample datasets, flexibly controlling the hardness and softness of attention to fully utilize features. This effectively addresses complex situations where user-input query questions contain technical terms, colloquialisms, input errors, and mis-inputs, giving the target intent recognition and classification model better generalization capabilities and improving the accuracy of intent recognition and classification for query questions. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is an application environment diagram of a query problem classification method in one embodiment;

[0042] Figure 2 This is a flowchart illustrating a query problem classification method in one embodiment;

[0043] Figure 3 This is a schematic diagram of the structure of a target intent recognition and classification model in one embodiment;

[0044] Figure 4 This is a schematic diagram of the steps for obtaining problem classification results in one embodiment;

[0045] Figure 5 This is a flowchart illustrating the process of obtaining a target intent recognition and classification model in one embodiment;

[0046] Figure 6 This is a flowchart illustrating the iterative training process of a model in one embodiment;

[0047] Figure 7 This is a structural block diagram of a query problem classification device in one embodiment;

[0048] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0050] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0051] The query question classification method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.

[0052] Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0053] In one exemplary embodiment, such as Figure 2 As shown, a query question classification method is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps 202 to 206. Wherein:

[0054] Step 202: Obtain the query question for avionics fault diagnosis.

[0055] The query question is input by the user into the large language model in natural language form. For example, a query question for avionics fault diagnosis might have strong colloquial characteristics, including numerous abbreviations of technical terms in the avionics field, and possibly also containing log fragments or equipment model information. If such a query question is directly input into the large language model, the model may struggle to accurately understand the user's intent and map it precisely to the corresponding diagnostic process and knowledge segments. This could easily lead to retrieval deviations, increased dialogue rounds, and response delays, ultimately affecting the average repair time and equipment availability.

[0056] Step 204: Input the question to be queried into the target intent recognition and classification model to obtain the question classification result output by the target intent recognition and classification model.

[0057] Among them, the target intent recognition and classification model can perform intent recognition processing on the input query question and classify it into a specific question category to obtain the question classification result corresponding to the query question.

[0058] In one possible implementation, the question classification result is used to obtain target prompt words based on the question classification result and the question to be queried, so that the large language model can output an answer to the question to be queried based on the target prompt words.

[0059] In this embodiment, the target pooling norm parameter in the pooling layer of the target intent recognition classification model is obtained based on problem samples and problem labels for avionics fault diagnosis.

[0060] For example, the pooling layer in this application embodiment can be represented as Formula 1:

[0061] , Formula 1

[0062] Where r represents the feature data output by the pooling layer. Represents the i-th input feature The attention weights are p, which is a learnable pooling norm parameter; where, q is the attention query vector. It is used for input features A nonlinear mapping is performed, where N represents the total length of the input feature sequence of the pooling layer, and exp represents the exponential function.

[0063] The query question classification method provided in the above embodiments obtains the query question for avionics fault diagnosis, inputs the query question into a target intent recognition classification model, and obtains the question classification result output by the target intent recognition classification model. The target pooling norm parameter in the pooling layer of the target intent recognition classification model is obtained based on question samples and question labels for avionics fault diagnosis. Thus, the target intent recognition classification model uses a pooling layer with a learnable norm, which automatically adapts to different sample datasets and flexibly controls the hardness or softness of attention to fully utilize features. This effectively addresses complex situations such as user-inputted query questions containing professional vocabulary, colloquialisms, input errors, and mis-inputs, giving the target intent recognition classification model better generalization ability and improving the accuracy of intent recognition and classification processing for query questions.

[0064] In one exemplary embodiment, based on Figure 2 Please refer to the embodiments shown. Figure 3 The target intent recognition and classification model includes an encoding layer, a pooling layer, and a classification layer. Please refer to [reference needed]. Figure 4 In this embodiment, the process of inputting the query question into the target intent recognition and classification model and obtaining the question classification result input into the target intent recognition and classification model includes steps 402 to 406, wherein:

[0065] Step 402: Input the query question into the coding layer to obtain the coded feature data output by the coding layer.

[0066] Optionally, the encoding layer is implemented using a pre-trained Chinese BERT (Bidirectional Encoder Representations from Transformers) model. For example, the encoding layer includes an embedding sublayer, an encoding sublayer, and an output sublayer. Through the encoding layer, the contextual semantic vector representation of each word in the query can be obtained. The vector representation corresponding to each word has 768-dimensional embedding features, which can fully utilize the semantic and contextual dependency information of the expressed text.

[0067] Step 404: Input the encoded feature data into the pooling layer to obtain the global feature data output by the pooling layer.

[0068] The pooling layer in this embodiment is an attention pooling layer with a learnable norm. Specifically, the pooling layer converts the encoded feature data in the form of a feature sequence into a fixed-length vector, i.e., global feature data.

[0069] Step 406: Input the global feature data into the classification layer to obtain the problem classification result output by the classification layer.

[0070] The classification layer receives fully learned and feature-extracted global feature data and maps it to predefined question categories. For example, the classification layer uses a Softmax function to calculate the probability distribution of an input sample belonging to each intent category.

[0071] In one exemplary embodiment, the provided query question classification method further includes a training process for a target intent recognition classification model. Please refer to... Figure 5 The process includes steps 502 and 540, wherein:

[0072] Step 502: Obtain the initial intent recognition classification model and the avionics fault diagnosis sample dataset, wherein the avionics fault diagnosis sample dataset includes problem samples and corresponding problem labels.

[0073] The issue label refers to the issue category corresponding to the issue sample.

[0074] In the initial intent recognition classification model, the pooling norm parameter of the pooling layer is a learnable norm parameter. For example, the initial value of the pooling norm parameter can be a random value or a preset empirical value.

[0075] Step 504: Use the avionics fault diagnosis sample dataset to iteratively train the initial intent recognition classification model to obtain the target intent recognition classification model.

[0076] In each iteration, the question sample is input into the intermediate intent recognition classification model to obtain the classification result output by the intermediate intent recognition classification model. Based on the classification result and the question label, the model parameters of the intermediate intent recognition model are adjusted. The intermediate intent recognition classification model that reaches the iteration termination condition is taken as the target intent recognition classification model.

[0077] In one exemplary embodiment, based on Figure 5 The illustrated embodiment involves the process of iteratively training an initial intent recognition classification model based on an avionics fault diagnosis sample dataset to obtain a target intent recognition classification model. For example... Figure 6 As shown, each iteration of the training process includes steps 602 to 612, wherein:

[0078] Step 602: Input each of the problem samples into the intermediate intent recognition classification model to obtain the sample classification result corresponding to each of the problem samples.

[0079] Step 604: Based on the problem label and sample classification results corresponding to each problem sample, determine the first loss value corresponding to each problem sample.

[0080] Step 606: Based on the first loss value corresponding to each of the problem samples, generate adversarial samples corresponding to each of the problem samples.

[0081] In one possible implementation, the process of generating adversarial examples corresponding to each problem sample based on the first loss value corresponding to each problem sample includes:

[0082] Step A1: Determine the gradient corresponding to each problem sample based on the first loss value of each problem sample.

[0083] For example, the process of determining the gradient corresponding to each problem sample is shown in Equation 2:

[0084] , Formula 2

[0085] in, Let x represent the gradient corresponding to the problem sample, and y represent the problem sample and its corresponding problem label. L represents the model parameters, and L represents the loss function. This indicates taking the partial derivative with respect to x.

[0086] Step A2: Based on the gradient and interference intensity corresponding to each problem sample, generate adversarial samples corresponding to each problem sample.

[0087] First, a perturbation vector is generated based on the gradient and interference intensity of the problem sample. Then, adversarial samples are generated based on the perturbation vector and the problem sample.

[0088] For example, perturbation vector ,in, It is the interference intensity. The L2 norm of the gradient; adversarial examples .

[0089] In this implementation, the gradient along the true gradient direction of the loss function is used. The L2 norm controls the direction of perturbations during adversarial training, maintaining semantic structure and training stability.

[0090] In one possible implementation, the interference intensity corresponding to each problem sample is determined as follows: the interference intensity corresponding to each problem sample is determined based on the first loss value corresponding to each problem sample, wherein the interference intensity is negatively correlated with the first loss value.

[0091] In this embodiment, different levels of interference intensity are set for each problem sample with different first loss values. Compared to setting the interference intensity to a fixed value, which makes the interference level the same for each sample, the interference intensity determination method in this embodiment has self-adjusting capability, allowing the interference level to adjust itself according to the size of the loss value. Specifically, a larger first loss value indicates that the corresponding problem sample is more difficult to classify accurately, and a stronger attack on it will make the sample even more difficult to distinguish, potentially resulting in invalid samples. Conversely, a smaller first loss value indicates that the corresponding problem sample is easier to classify accurately, and a weaker attack on it may not achieve the desired adversarial training effect. Therefore, in this embodiment, a smaller interference intensity is set for problem samples with larger first loss values, and a larger interference intensity is set for problem samples with smaller first loss values.

[0092] For example, the interference strength of problem sample i ,in, This represents the lower limit of the impact level. This represents the upper limit of the impact level. Indicates the difficulty level of the problem sample, where, , , The first loss value corresponding to the problem sample i is sorted from low to high, and B is the number of problem samples in the avionics fault diagnosis sample dataset.

[0093] Step 608: Input each of the adversarial samples into the intermediate intent recognition classification model to obtain the sample classification result corresponding to each adversarial sample.

[0094] Step 610: Based on the sample classification result corresponding to the adversarial sample and the question label corresponding to the question sample, determine the second loss value corresponding to the adversarial sample.

[0095] Step 612: Adjust the model parameters of the intermediate intent recognition classification model based on the first loss value and the second loss value.

[0096] The above embodiments use adversarial training to improve the robustness of the obtained target intent recognition and classification model. Furthermore, by assigning an appropriate level of adversarial training to each question sample, the robustness and generalization ability of the target intent recognition and classification model obtained through adversarial training are further improved, thereby increasing the accuracy of the query question classification results.

[0097] In one exemplary embodiment, such as Figure 7 As shown, a query question classification method is provided, which can be applied to... Figure 1Taking terminal 102 as an example, the explanation includes the following steps S2 to S3, wherein:

[0098] Step S2: Obtain the initial intent recognition classification model and the avionics fault diagnosis sample dataset, wherein the avionics fault diagnosis sample dataset includes problem samples and corresponding problem labels;

[0099] Step S4: Use the avionics fault diagnosis sample dataset to iteratively train the initial intent recognition classification model to obtain the target intent recognition classification model.

[0100] In each iteration of the training process, each problem sample is input into the intermediate intent recognition classification model to obtain a sample classification result corresponding to each problem sample; based on the problem label and sample classification result corresponding to each problem sample, a first loss value corresponding to each problem sample is determined; based on the first loss value corresponding to each problem sample, adversarial samples corresponding to each problem sample are generated; each adversarial sample is input into the intermediate intent recognition classification model to obtain a sample classification result corresponding to each adversarial sample; based on the sample classification result corresponding to the adversarial sample and the problem label corresponding to the problem sample, a second loss value corresponding to the adversarial sample is determined; based on the first loss value and the second loss value, the model parameters of the intermediate intent recognition classification model are adjusted.

[0101] Optionally, the process of generating adversarial examples corresponding to each of the problem samples based on the first loss value of each problem sample includes: determining the gradient of each problem sample based on the first loss value of each problem sample; determining the interference intensity of each problem sample based on the first loss value of each problem sample; and generating adversarial examples corresponding to each problem sample based on the gradient and the interference intensity of each problem sample. The interference intensity is negatively correlated with the first loss value.

[0102] Step S6: Obtain the query question for avionics fault diagnosis.

[0103] Step S8: Input the question to be queried into the target intent recognition and classification model to obtain the question classification result output by the target intent recognition and classification model; wherein, the target pooling norm parameter in the pooling layer of the target intent recognition and classification model is obtained based on the question samples and question labels for avionics fault diagnosis.

[0104] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0105] It is understood that the term "based on" as used in this application is used to describe one or more factors that influence the determination, but does not exclude other factors that may influence the determination. For example, the phrase "determine A based on B" means that the determination of A can be based entirely or at least partially on factor B. That is, B is a factor that influences the determination of A, but does not exclude the fact that the determination of A is also based on C.

[0106] Based on the same inventive concept, this application also provides a query question classification device for implementing the query question classification method described above. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more query question classification device embodiments provided below can be found in the limitations of the query question classification method described above, and will not be repeated here.

[0107] In one exemplary embodiment, such as Figure 7 As shown, a query question classification device is provided, including: an acquisition module 702 and a classification module 704, wherein:

[0108] The acquisition module 702 is used to acquire query questions for avionics fault diagnosis;

[0109] The classification module 704 is used to input the query question into the target intent recognition classification model to obtain the question classification result output by the target intent recognition classification model; wherein, the target pooling norm parameter in the pooling layer of the target intent recognition classification model is obtained based on the question samples and question labels for avionics fault diagnosis.

[0110] In an exemplary embodiment, the target intent recognition classification model includes an encoding layer, a pooling layer, and a classification layer. The classification module 704 is used to input the query question into the encoding layer to obtain encoded feature data output by the encoding layer; input the encoded feature data into the pooling layer to obtain global feature data output by the pooling layer; and input the global feature data into the classification layer to obtain the question classification result output by the classification layer.

[0111] In an exemplary embodiment, the provided query question classification device further includes a training module for acquiring an initial intent recognition classification model and an avionics fault diagnosis sample dataset, wherein the avionics fault diagnosis sample dataset includes question samples and corresponding question labels; and iteratively training the initial intent recognition classification model using the avionics fault diagnosis sample dataset to obtain the target intent recognition classification model.

[0112] In an exemplary embodiment, for each iteration of the training process, the training module is used to input each of the problem samples into the intermediate intent recognition classification model to obtain the sample classification result corresponding to each of the problem samples; based on the problem label and sample classification result corresponding to each of the problem samples, determine the first loss value corresponding to each of the problem samples; based on the first loss value corresponding to each of the problem samples, generate adversarial samples corresponding to each of the problem samples; input each adversarial sample into the intermediate intent recognition classification model to obtain the sample classification result corresponding to each of the adversarial samples; based on the sample classification result corresponding to the adversarial sample and the problem label corresponding to the problem sample, determine the second loss value corresponding to the adversarial sample; and based on the first loss value and the second loss value, adjust the model parameters of the intermediate intent recognition classification model.

[0113] In an exemplary embodiment, the training module is used to determine the gradient corresponding to each of the problem samples based on the first loss value of each problem sample; and to generate adversarial samples corresponding to each of the problem samples based on the gradients corresponding to each of the problem samples and the interference intensity corresponding to each of the problem samples.

[0114] In an exemplary embodiment, the training module is used to determine the interference intensity corresponding to each of the problem samples based on the first loss value corresponding to each problem sample; wherein the interference intensity is negatively correlated with the first loss value.

[0115] Each module in the aforementioned query classification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0116] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a query question classification method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0117] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0118] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0119] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0120] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

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

[0122] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0123] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0124] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for classifying query questions, characterized in that, The method includes: Retrieve query questions related to avionics fault diagnosis; The query question is input into the target intent recognition and classification model to obtain the question classification result output by the target intent recognition and classification model; wherein, the target pooling norm parameter in the pooling layer of the target intent recognition and classification model is obtained based on the question samples and question labels for avionics fault diagnosis.

2. The method according to claim 1, characterized in that, The target intent recognition and classification model includes an encoding layer, a pooling layer, and a classification layer. The step of inputting the query question into the target intent recognition and classification model to obtain the question classification result output by the model includes: The query question is input into the coding layer to obtain the coded feature data output by the coding layer; The encoded feature data is input into the pooling layer to obtain the global feature data output by the pooling layer; The global feature data is input into the classification layer to obtain the problem classification result output by the classification layer.

3. The method according to claim 1, characterized in that, The method further includes: Obtain an initial intent recognition classification model and an avionics fault diagnosis sample dataset, wherein the avionics fault diagnosis sample dataset includes problem samples and corresponding problem labels; The initial intent recognition classification model is iteratively trained using the avionics fault diagnosis sample dataset to obtain the target intent recognition classification model.

4. The method according to claim 3, characterized in that, The step of iteratively training the initial intent recognition classification model based on the avionics fault diagnosis sample dataset to obtain the target intent recognition classification model includes: For each iteration of the training process, each of the aforementioned problem samples is input into the intermediate intent recognition classification model to obtain the sample classification result corresponding to each of the aforementioned problem samples; Based on the problem label and sample classification result corresponding to each problem sample, determine the first loss value corresponding to each problem sample; Based on the first loss value corresponding to each of the aforementioned problem samples, generate adversarial samples corresponding to each of the aforementioned problem samples; Each of the adversarial samples is input into the intermediate intent recognition and classification model to obtain the sample classification result corresponding to each adversarial sample; Based on the sample classification result corresponding to the adversarial sample and the question label corresponding to the question sample, the second loss value corresponding to the adversarial sample is determined; Based on the first loss value and the second loss value, the model parameters of the intermediate intent recognition classification model are adjusted.

5. The method according to claim 4, characterized in that, The step of generating adversarial samples corresponding to each of the problem samples based on the first loss value corresponding to each of the problem samples includes: The gradient corresponding to each problem sample is determined based on the first loss value of each problem sample; Based on the gradient corresponding to each problem sample and the interference intensity corresponding to each problem sample, adversarial samples corresponding to each problem sample are generated.

6. The method according to claim 5, characterized in that, The method further includes: The interference intensity corresponding to each problem sample is determined based on the first loss value corresponding to each problem sample; wherein the interference intensity is negatively correlated with the first loss value.

7. A query question classification device, characterized in that, The device includes: The acquisition module is used to acquire query questions for avionics fault diagnosis; The classification module is used to input the query question into the target intent recognition classification model and obtain the question classification result output by the target intent recognition classification model; wherein, the target pooling norm parameter in the pooling layer of the target intent recognition classification model is obtained based on the question samples and question labels for avionics fault diagnosis.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

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

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