Method for Matching Aviation Product Requirements and Defect Analysis Regulations Based on Asymmetric Alignment
By building a product failure knowledge base and asymmetric alignment model of local-global features, the problem of inconsistency in the matching of aviation product requirements and defect analysis regulations and the semantic correlation is not obvious, achieving more accurate and efficient matching, and improving the quality of aviation product analysis.
Patent Information
- Application Number
- CN202411628289.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In the prior art, in the matching process of aviation product requirements and defect analysis regulations, there are problems of inconsistency in descriptions and inconspicuous semantic correlations, resulting in interference in keyword retrieval and matching difficulties.
Build a product failure knowledge base, extract the characteristics of fault elements and processing measures, establish a keyword and synonym database, design a local-global feature asymmetric alignment model, and achieve matching product requirements and defect analysis regulations through classification model and loss function training.
It improves the accuracy and efficiency of matching product requirements and defect analysis regulations, enhances the practicality and applicability of the method, and can better identify and deal with key elements of the same semantics.
Smart Images

Figure CN119577122B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of aviation product analysis, and particularly relates to a method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment. Background Art
[0002] The defect analysis of aviation product functional requirements is a process of identifying, evaluating, and repairing defects or problems existing in product requirements. Through systematic requirement defect analysis, the quality of the product can be improved, and potential defect hazards of the product can be eliminated. When conducting tests on aviation airborne products, by accumulating cases such as product failures and defects, the requirements of the tested products and the instances of final failures can be recorded, and defect analysis regulations for a class of product requirements can be summarized.
[0003] When analyzing new product requirements, defect analysis regulations that match the current requirements can be matched and pushed. When matching and pushing product requirements and product defect analysis regulations, the main problems faced are as follows: First, current product failures are usually recorded in documents such as product failure records and product failure change records. During the recording process, the descriptions of key elements such as the functions, failure descriptions, and failure causes of the products are not completely consistent, resulting in excessive abbreviations, synonyms, etc., which interfere with subsequent keyword retrieval. Second, defect analysis regulations are a general analysis means, requirements, and principles for failure categories, and do not involve specific product names, instances, etc., and have obvious category characteristics. Third, during the process of matching and recommending product requirements and product defect analysis regulations, the text of product requirements is a description of a record of functions, performances, and execution processes, with strong realism and local characteristics. While product defect analysis regulations are usually summary descriptions of a class of problems, without descriptions of product names, characteristics, etc., and are more overall descriptions formulated according to the characteristics of this class of products, and are more inclined to a global characteristic. During the matching process, the requirement description shows the characteristics of long length and complex content, while the regulation description is usually concise and general, and there are certain differences in their semantic contents. It is difficult to associate common keywords and semantic matches. Therefore, in order to solve the problem that the characteristics of product requirements and product defect analysis regulations are inconsistent and the association is not obvious, it is extremely urgent and necessary to seek a method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment, and specifically design a local-global feature asymmetric alignment model to achieve the matching of defect analysis regulations for new requirements. Summary of the Invention
[0004] In view of the above-mentioned defects in the prior art, the present invention proposes a method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment. The method includes constructing a product fault knowledge base for the product evaluation problem list; constructing a product key element classification system and defect analysis regulations; constructing a product requirement text hierarchical element extraction and classification model; constructing a text local-global feature asymmetric alignment model and training; and outputting a product defect analysis regulation text based on the product requirement text to obtain the product defect analysis regulation text that best matches the product requirement text. By constructing a product fault knowledge base, extracting a classification system from the product key elements, classifying the product requirements and product defect analysis regulations, and specifically designing a local-global feature asymmetric alignment model, the present invention completes the matching of defect analysis regulations for new requirements, has important practical application significance, and is more practical and applicable.
[0005] The present invention provides a method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment, which includes the following steps:
[0006] S1. Construct a product fault knowledge base: For the product evaluation problem list, construct a product fault knowledge base SKD:
[0007] SKD = D, C, S (1)
[0008] Where D represents the description of the fault phenomenon and D = d1, d2…d i ; C represents the description of the fault cause and C = c1, c2…c j ; S represents the description of the solution measure and S = s1, s2…s k ; i, j, k respectively represent the total numbers of the fault phenomenon description data, fault cause description data, and solution measure description data; d, c, s respectively represent the natural language descriptions of the fault phenomenon, fault cause, and solution measure;
[0009] S2. Construct a product key element classification system and defect analysis regulations;
[0010] S21. Construct a product key element classification system Sch cls ;
[0011] S22. Extract product defect analysis regulations from historical product fault data: According to the product fault knowledge base SKD in step S1, perform pattern extraction on the historical product fault causes and fault phenomena, and refine the corresponding product defect analysis regulations P:
[0012] P = p1, p2,…, p y (5)
[0013] Where p represents the product defect analysis regulation text; y represents the number of all defect analysis regulations;
[0014] S23. Classify the product defect analysis regulations: According to the product key element classification system in step S21, classify each description item in the product defect analysis regulation P to obtain the classification label set TP of the product defect analysis regulation P:
[0015]
[0016] where t represents the classification label;
[0017] S3. Extract the hierarchical elements of the product requirement text and construct a classification model;
[0018] S31. Divide the product requirement item set Req:
[0019] Req = {req1, req2,..., req z (7)
[0020] where req represents the product requirement text disassembled from the requirement document, and each req ensures the independence of the requirement; z represents the number of product requirement texts;
[0021] S32. Unified processing of the key elements of the product requirement text;
[0022] S33. Construct and train the product requirement text classification model;
[0023] S4. Construct and train the text local-global feature asymmetric alignment model; Construct the text local-global feature asymmetric alignment model M match , establish a semantic-level matching relationship between the product requirement text req and the product defect analysis regulation text p, complete the input product requirement text, and recommend the corresponding product defect analysis regulation text; for each product requirement text req, there is one or more matching product defect analysis regulation texts p, which are constrained by the similarity score score sim :
[0024] score sim = M match (req ni , p nj ) (11)
[0025] where req ni represents the ni-th input product requirement text; p nj represents the nj-th product defect analysis regulation text;
[0026] S5. Output the product defect analysis regulation text based on the product requirement text;
[0027] S51. Generate and store product defect analysis regulations: For all product defect analysis regulations P, use the product defect analysis regulation text encoder Encoder with optimal parameters obtained through training pri-trained to perform feature encoding, forming a set V of product defect analysis regulation feature vectors p , and store the set V of product defect analysis regulation feature vectors p in the feature vector retrieval database;
[0028] S52. Calculate the similarity recall and ranking between the input product requirement text and product defect analysis regulations: For the input product requirement text req and all product defect analysis regulation texts p, perform similarity judgment to obtain the product defect analysis regulation text that best matches the product requirement text req.
[0029] Furthermore, step S4 specifically includes the following steps:
[0030] S41. Construct a text local-global feature asymmetric alignment model: The text local-global feature asymmetric alignment model includes a product requirement text feature encoder Encoder req , a product defect analysis regulation text encoder Encoder pri and a feature alignment encoder Encoder Ali , that is:
[0031] M match ={Encoder req , Encoder pri , Encoder Ali} (12);
[0032] S411. Construct a product requirement text feature encoder Encoder req : The product requirement text feature encoder Encoder req includes a first local feature extractor F local-req , a first global feature extractor F global-req and a feature integrator AttentionWeights req , that is:
[0033] Encoder req ={F local-req , F global-req , AttentionWeights req} (13);
[0034] The output of the feature integrator AttentionWeights req is the product requirement text feature H fused-req :
[0035] H fused-req = AW req ·H local-req +(1 - AW req )·H global-req (15);
[0036] S412. Construct the text encoder Encoder for product defect analysis regulations pri : The text encoder Encoder for product defect analysis regulations pri includes the second global feature extractor F global-pri , that is:
[0037] Encoder pri = {F global-pri}} (16);
[0038] The output of the second global feature extractor F global-pri is the product defect analysis regulation feature H global-pri ;
[0039] S413. Construct the feature alignment encoder Encoder Ali : The feature alignment encoder Encoder Ali adopts the last six layers of the pre - trained language model Bert model, which includes a similarity calculation sub - module M sim and a feature alignment sub - module M ali , that is:
[0040] Encoder Ali = {M sim , M ali}} (17);
[0041] S414. Design the loss function of the text local - global feature asymmetric alignment model;
[0042] S42. Determine the training dataset: Construct the dataset Ω match for training the text local - global feature asymmetric alignment model M match , where, for any given product requirement text req ∈ Ω match , there is one or more matching product defect analysis regulation texts p ∈ Ω match corresponding to it, and they are considered to have similarity;
[0043] S43. Extract the key elements of the product requirement text req and the product defect analysis regulation text p;
[0044] S431. Construct the key element extraction model M for the product requirement text req and the product defect analysis regulation text pkeyword :
[0045] M keyword ={m base ,m keybert}(21)
[0046] Wherein, m base represents the first keyword extraction module; m keybert represents the second keyword extraction module;
[0047] S432. The first keyword extraction module m base extracts keywords from the product requirement text req and the product defect analysis regulation text p by means of the fault symptom feature word list W, the processing measure feature word list F, the fault cause feature word list R and the synonym word list W sim , and obtains the first key elements keywords base ; The second keyword extraction module m keybert extracts keywords from the product requirement text req and the product defect analysis regulation text p by means of the model after incremental training with the product fault knowledge base SKD, and obtains the second key elements keywords keybert ;
[0048] S433. Take the intersection of the first key elements keywords base and the second key elements keywords keybert as the key elements keywords r of the product requirement text req and the key elements keywords p of the product defect analysis regulation text p;
[0049] S44. Construct a product requirement text preprocessing module;
[0050] S441. Local feature enhancement processing: Through the key element extraction in step S42, the key elements keywords r of the product requirement text req are used as enhanced keywords. In the product requirement text feature encoder Encoder req , after splicing the key elements keywords r of the product requirement text req to the product requirement text req, the locally enhanced product requirement text req enh is obtained:
[0051] req enh =CONCATENATE(r,keywords r )(22)
[0052] Among them, CONCATENATE represents the concatenation operation;
[0053] S442. Global feature enhancement processing: With the help of the first global feature extractor F global-req , extract the global features of the product requirement text req, and use the key elements keywords r of the product requirement text req to match the words in the product requirement text req, and use the wildcard "mask" to mask the keywords r in the product requirement text req;
[0054] S45. Train the text local-global feature asymmetric alignment model: Obtain the trained text local-global feature asymmetric alignment model M match-trained :
[0055] M match-trained = {Encoder req-trained , Encoder pri-trained , Encoder Ali-trained} (23)
[0056] Among them, Encoder req-trained , Encoder pri-trained , Encoder Ali-trained respectively represent the product requirement text feature encoder, product defect analysis regulation text encoder, and feature alignment encoder obtained by training with optimal parameters.
[0057] Preferably, the step S33 specifically includes the following steps:
[0058] S331. Product requirement text classification data annotation: For the product key element classification system Sch cls constructed in step S21, in the product requirement item set Req constructed in step S31, select the product requirement texts with obvious classification features, and classify and annotate them according to the object and content of the requirement description to obtain the annotation data Tag ReqCls :
[0059]
[0060] Among them, represents the classification label for the z-th product requirement text req z ;
[0061] S332. Product requirement text preprocessing encoding: Use the dictionary in the pre-trained language model Bert to construct the product requirement text charactertization model M tok , and encode the annotation data Tag ReqClsConvert the product requirement text req in it into a Token sequence, and serialize the classification labels to obtain the serialized annotation data TokTag ReqCls :
[0062]
[0063] Among them, tokreq represents the serialized representation of the product requirement text; ids represents the serialized representation of the multi-classification labels;
[0064] S333. Construction and training of a classification model based on a self-attention encoder-decoder: Construct a classification model M based on a self-attention encoder-decoder cls , the classification model M cls includes a product requirement text feature extractor m based on the pre-trained language model Bert bert , a product requirement text vector feature encoder m enc and a label item self-attention decoder m dec ; Obtain the trained classification model M cls-trained ;
[0065] The specific steps of step S52 include the following steps:
[0066] S521. Use the trained classification model M in step S333 cls-trained , classify the input product requirement text req to obtain the classification label t req ;
[0067] S522. Use the product requirement text feature encoder Encoder with the optimal parameters obtained in step S45 req-trained , generate a product requirement feature vector v for the input product requirement text req req ;
[0068] S523. Based on the product requirement feature vector v req , use the similarity calculation sub-module M of the feature alignment encoder Encoder with the optimal parameters obtained in step S45 Ali-trained , search in the feature vector retrieval database obtained in step S51 by vector similarity distance, and recall a set of s product defect analysis regulation vectors that are similar sim
[0069] S524. Concatenate the product requirement feature vector v req with the recalled set of product defect analysis regulation vectors V' p , and use the feature alignment sub-module M of the feature alignment encoder Encoder with the optimal parameters obtained Ali-trained ali For the calculation of vector joint similarity, sort the similarities from large to small and return the top five product defect analysis regulation texts P top5 :
[0070] P top5 ={p top1 ,p top2 ,…,p top5}(24)
[0071] Among them, p top1 ,p top2 ,p top5 respectively represent the product defect analysis regulation texts ranked first, second, and fifth;
[0072] P top5 is considered to be the product defect analysis regulation text that best matches the product requirement text req.
[0073] Preferably, the step S414 specifically includes the following steps:
[0074] S4141. For the product requirement text feature H fused-req and the product defect analysis regulation feature H global-pri , construct the triplet loss L tpl :
[0075] L tpl =∑ Req′ [α - cos(P, Req) + cos(P, Req′)] + ∑ P′ [α - cos(Req, P) + cos(Req′, P)](18);
[0076] Among them, α represents the boundary parameter of the distance; cos() represents the similarity distance obtained through the similarity calculation sub-module; Req′ represents the negative example sample of the product defect analysis regulation P; P′ represents the negative example sample of the product requirement item set Req;
[0077] S4142. For the first global feature extractor F global-req , construct the cross-entropy loss L ce :
[0078]
[0079] Among them, γ a represents the actual category of the a-th product requirement text; ρ a represents the predicted probability of the category of the a-th product requirement text output by the model; N represents the number of samples; a is a positive integer;
[0080] S4143. Construct the requirement-regulation matching loss L itm :
[0081]
[0082] Among them, represents the expected value of the sample pair (P, Req) in the distribution Ω; Ω represents the training sample set; γ match is the matching label of the current requirement-regulation pair, ρ match (P, Req) is the matching probability of the requirement-regulation pair; H() represents the loss function.
[0083] Preferably, the step S1 specifically includes the following steps:
[0084] S11. Construct a fault symptom feature word list: Extract the element word list related to software and hardware fault characterization from the existing fault description text, and construct a fault symptom feature word list W:
[0085] W = {w1, w2... w l (2)
[0086] Among them, w represents the feature word describing the fault symptom, extracted from the fault symptom description D; l represents the number of fault symptom feature words;
[0087] S12. Construct a treatment measure feature word list: Extract the element word list related to the treatment measures for solving product problems from the existing treatment measure text, and construct a treatment measure feature word list F:
[0088] F = {f1, f2... f m} (3)
[0089] Among them, f represents the feature word describing the treatment measure, extracted from the solution measure description S; m represents the number of treatment measure feature words;
[0090] S13. Construct a fault cause feature word list: Extract the element word list related to the root cause of product faults from the existing fault cause text, and construct a fault cause feature word list R:
[0091] R = {r1, r2... r n (4)
[0092] Among them, r represents the feature word describing the fault cause, extracted from the fault cause description C; n represents the number of fault cause feature words;
[0093] S14. Synonym mapping of feature library elements: Perform synonym analysis on each feature word w, f, r in the fault element feature word list W, the treatment measure feature word list F, and the fault cause feature word list R respectively, find the words with the same semantic expression, and construct a synonym word list W sim , for any element word w' with synonyms, in Wsim corresponding synonym sets (w′1,…,w′ are found through table lookup) x ), where x represents the number of synonyms.
[0094] Preferably, the step S21 specifically includes the following steps:
[0095] S211. Divide the first level: The first level divides the product requirement description object into external input IF in , external output IF out , product function Fuc, and working state State;
[0096] S212. Divide the second level: Based on the first level, with the rule type as the classification basis, the external input IF in is divided into input digital quantity, input analog quantity, and input data bus, and the external output IF out is divided into output digital quantity, output analog quantity, and output data bus;
[0097] S213. Divide the third level: Based on the second level, with the rule type as the classification basis, the external input IF in is divided into input value, input timing, input communication, input redundancy, input fault handling, and input fault diagnosis, the external output IF out is divided into output value, output timing, output communication, output redundancy, output fault handling, and output fault diagnosis, the product function Fuc is divided into timing constraint, external interaction, redundancy switching, and processing logic, and the working state State is divided into state transition and state influence.
[0098] Preferably, in the step S333, the product requirement text feature extractor m bert selects the Chinese pre-trained language model Bert and its variant models, the product requirement text vector feature encoder m enc adopts an n1-layer BiLSTM model, and the label item self-attention decoder m dec adopts an n2-layer multi-head attention model Multi-head Attention and a fully connected layer; the classification model M cls uses a combined loss function as the optimization objective, and the combined loss function is expressed as:
[0099]
[0100] where y g represents the true classification label; z g represents the output possibility of the current label; z h represents the model output possibilities of all categories;
[0101] The product requirement text feature encoder Encoder described in step S41 req Used to extract the global features and local features in the product requirement text, the product defect analysis regulation text encoder Encoder pri Used to extract the global features and local features in the product defect analysis regulation text, the feature alignment encoder Encoder Ali Used to align the product requirement text features and the product defect analysis regulation text features;
[0102] The first local feature extractor F described in step S411 local-req Adopts the first three layers of the pre-trained language model Bert, used to extract the local features of the product requirement text, and the output of the first local feature extractor is the first local feature vector H local-req , the first local feature vector H local-req The dimension of is 768; the first global feature extractor F global-req Adopts the pre-trained language model Bert model of 12-layer Transformer, used to extract the global features of the product requirement text, the first global feature extractor F global-req The output of is the first global feature vector H global-req , the first global feature vector H global-req The dimension of is 768; the feature integrator AttentionWeights req Used for the fusion of local features and global features, and obtains the weight AW of the text local feature vector H local-req through the attention mechanism req :
[0103] AW req = softmax(W[H local-req ,H global-req ) (14)
[0104] Among them, softmax represents the normalized exponential function; W represents the feature weight;
[0105] The second global feature extractor F described in step S412 global-pri Adopts the pre-trained language model Bert model of 12-layer Transformer, and the dimension of the product defect analysis regulation feature H global-pri is 768;
[0106] The similarity calculation sub-module M described in step S413 sim Adopts the vector similarity calculation method to construct a similarity calculation module, and calculates the product requirement description feature H fused-reqThe similarity between the product defect analysis regulations feature H global-pri and use the triplet loss to optimize the product requirement text feature encoder Encoder req , the product defect analysis regulations text encoder Encoder pri in the parameters; the feature alignment sub-module M in the step S413 ali uses the requirement-regulation matching loss to optimize the product requirement text feature H fused-req and the product defect analysis regulations feature H global-pri interaction between.
[0107] Preferably, the expression method of the classification label t in the step S23 is in accordance with "the first level - the second level - the third level"; for each product requirement text req in the product requirement item set Req in the step S32, based on the synonym table W obtained in the step S15 sim , perform synonym replacement on each product requirement text req, and the key elements appearing in each product requirement text req are replaced with the first synonym in the synonym table W sim to complete the unification process of the key elements of the product requirement text; in the step S331, for the product key element classification system Sch cls , mark at least 20 product requirement texts under each category; the format of the classification annotation is in accordance with the product requirement text + classification label.
[0108] Preferably, in the step S333, based on the serialized annotation data TokTag ReqCls train the classification model M cls , randomly divide the serialized annotation data TokTag ReqCls into a first training set, a first validation set and a first test set at a ratio of 8:1:1; in the step S45, divide the dataset Ω in the step S42 match into a second training set, a second validation set and a second test set at a ratio of 8:1:1, train the text local-global feature asymmetric alignment model constructed in the step S41 based on the second training set, and initialize the parameters of the text local-global feature asymmetric alignment model with a normal distribution. The training termination condition is set to iterate 50 times or the loss function does not change in three consecutive iterations.
[0109] Compared with the prior art, the technical effect of the present invention is:
[0110] 1. A method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment designed by the present invention constructs a product fault knowledge base, extracts fault element features, treatment measure features, and fault cause features, and establishes keyword and synonym libraries that can represent the above features for identifying and processing key elements with the same semantics.
[0111] 2. A method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment designed by the present invention extracts a classification system from product key elements for classifying product requirements and product defect analysis regulations; at the same time, defect analysis regulations are refined from historical product fault data, and the constructed classification system is used to classify and process product requirements and product defect analysis regulations, and the classified data is trained into a classification model.
[0112] 3. A method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment designed by the present invention, aiming at the characteristics of product requirement descriptions and product defect analysis regulation descriptions, specifically designs a local-global feature asymmetric alignment model, designs a loss function to constrain it, and trains it with historical data to obtain a model that can align and analyze product requirement features and product defect analysis regulation features, completing the matching of defect analysis regulations for new requirements, which has important practical application significance, stronger practicability, and wider applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0113] Other features, objects, and advantages of the present application will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings.
[0114] Figure 1 is a flowchart of the method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment of the present invention;
[0115] Figure 2 is a flowchart of constructing a product fault knowledge base of the present invention;
[0116] Figure 3 is a schematic structural diagram of the text local-global feature asymmetric alignment model of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0117] The following further elaborates the present application with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related invention and do not limit the invention. Additionally, it should be noted that only parts related to the relevant invention are shown in the drawings for the convenience of description.
[0118] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and embodiments.
[0119] Figure 1 Shows the method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment of the present invention, and the method includes the following steps:
[0120] S1. Construct a product fault knowledge base: For the existing product evaluation problem sheets, construct a product fault knowledge base SKD:
[0121] SKD = D, C, S (1)
[0122] Wherein, D represents the description of the fault phenomenon and D = d1, d2…d i ; C represents the description of the fault cause and C = c1, c2…c j ; S represents the description of the solution measure and S = s1, s2…s k ; i, j, k respectively represent the total numbers of the fault phenomenon description data, the fault cause description data, and the solution measure description data; d, c, s respectively represent the natural language descriptions of the fault phenomenon, the fault cause, and the solution measure.
[0123] The product fault knowledge base is summarized from historical product evaluation projects and reflects the overall faults, analysis, and processing knowledge of the product. The specific flowchart is as Figure 2 shown.
[0124] S11. Construct a fault phenomenon feature word list: Extract the element word list related to the software and hardware faults from the existing fault description text, and construct a fault phenomenon feature word list W:
[0125] W = w1, w2…w l (2)
[0126] Wherein, w represents the feature word describing the fault phenomenon, which is extracted from the fault phenomenon description D; l represents the number of the fault phenomenon feature words. W is an extensible set, and as the fault phenomenon description D increases, W also expands.
[0127] S12. Construct a processing measure feature word list: Extract the element word list related to the processing measures for solving product problems from the existing processing measure text, and construct a processing measure feature word list F:
[0128] F = {f1, f2…f m} (3)
[0129] Wherein, f represents the feature word describing the processing measure, such as modifying the error code, increasing the product redundancy, increasing the memory margin, etc., which is extracted from the solution measure description S; m represents the number of the processing measure feature words. F is an extensible set, and as the solution measure description S increases, F also expands.
[0130] S13. Construct a fault cause feature word list: Extract an element word list that characterizes the root cause of product faults from existing fault cause texts, and construct a fault cause feature word list R:
[0131] R = {r1, r2, …, rn} n (4)
[0132] Among them, r represents a feature word describing the fault cause, such as array out-of-bounds, memory leak, assignment error, etc., which is extracted from the fault cause description C; n represents the number of fault cause feature words. R is an extensible set, and as the fault cause description C increases, R also expands.
[0133] S14. Synonym mapping of feature library elements: Perform synonym analysis on each feature word w, f, r in the fault element feature word list W, the treatment measure feature word list F, and the fault cause feature word list R respectively, find words with the same semantic expression, and construct a synonym table W sim , for any element word w' with synonyms, find the corresponding synonym set (w'1, …, w'x) in W sim , where x represents the number of synonyms. W x can refer to the descriptions of synonyms in existing authoritative dictionaries such as the Aeronautical Engineering Dictionary and the Aeronautical Encyclopedia Dictionary for supplementation, and as the data continues to expand, new synonyms can be continuously discovered and improved. sim
[0134] S2. Construct a classification system for key product elements and defect analysis regulations.
[0135] S21. Construct a classification system for key product elements: According to the definition of the product in product engineering and the characteristics of embedded products, construct a classification system for key product elements Sch cls , the classification system for key product elements Sch cls includes the first level, the second level, and the third level.
[0136] S211. Divide the first level: The first level divides the product requirement description object into external input IF in , external output OF out , product function Fuc, and working state State.
[0137] S212. Divide the second level: On the basis of the first level, using the rule type as the classification basis, divide the external input IF in into input digital quantity, input analog quantity, and input data bus, and divide the external output OF out into output digital quantity, output analog quantity, and output data bus. The product function Fuc and the working state State are not divided at the second level.
[0138] S213. Divide the third level: Based on the second level, using the rule type as the classification basis, divide the external input IF in into input value, input timing, input communication, input redundancy, input fault handling, and input fault diagnosis, and divide the external output IF out into output value, output timing, output communication, output redundancy, output fault handling, and output fault diagnosis. Divide the product function Fuc into timing constraints, external interaction, redundancy switching, and processing logic, and divide the working state State into state transition and state impact.
[0139] S22. Extract product defect analysis regulations from historical product fault data: According to the product fault knowledge base SKD constructed in step S1, perform pattern extraction on the historical product fault causes and fault phenomena, and refine the corresponding product defect analysis regulations P:
[0140] P = p1, p2, …, p y (5)
[0141] where p represents the product defect analysis regulation text; y represents the number of all defect analysis regulations.
[0142] With the accumulation and increase of product faults, the number of product defect analysis regulation texts can be continuously refined and increased.
[0143] S23. Classify the product defect analysis regulations: According to the product key element classification system constructed in step S21, classify each description item in the product defect analysis regulations P to obtain the classification label set T of the product defect analysis regulations P P :
[0144]
[0145] where t represents the classification label; the expression method of the classification label t is in the form of "first level - second level - third level". For example, for the product defect analysis regulation "For redundant input signals, there is no redundancy voting strategy. Can the product handle it correctly?", its classification label is "external input interface - digital quantity - redundancy".
[0146] S3. Extract the hierarchical elements of the product requirement text and construct a classification model.
[0147] For the given natural language description of product requirements, a series of preprocessing measures are required.
[0148] S31. Divide the product requirement item set: For the given product requirement document, divide the product requirement item set Req according to the product requirement items described in the requirements:
[0149] Req = req1, req2, …, req z (7)
[0150] Among them, req represents the product requirement text disassembled from the requirement document, and each req ensures the independence of the requirement; z represents the number of product requirement texts.
[0151] S32. Unification processing of key elements of product requirement texts: For each product requirement text req in the product requirement item set Req, based on the synonym table W obtained in step S15 sim , perform synonym replacement on each product requirement text req, and replace the key elements appearing in each product requirement text req with the first synonym in the synonym table W sim to complete the unification processing of the key elements of the product requirement text.
[0152] S33. Construction and training of product requirement text classification model.
[0153] S331. Classification data annotation of product requirement texts: For the product key element classification system Sch constructed in step S21 cls , in the product requirement item set Req constructed in step S31, select the product requirement texts with obvious classification features, and classify and annotate them according to the objects and contents described in the requirements to obtain the annotation data Tag ReqCls :
[0154]
[0155] Among them, represents the classification label for the z-th product requirement text req z . It can be multi-label, and at most 3 reasonable classifications are given.
[0156] For the product key element classification system Sch cls , at least 20 product requirement texts are annotated under each category; the format of the classification annotation is in accordance with the product requirement text + classification label.
[0157] S332. Preprocessing encoding of product requirement texts: Using the dictionary in the pre-trained language model Bert, construct a product requirement text character model M tok , convert the product requirement text req in the annotation data Tag ReqCls into a Token sequence, and serialize the classification label to obtain the serialized annotation data TokTag ReqCls :
[0158]
[0159] Among them, tokreq represents the serialized representation of the product requirement text; ids represents the serialized representation of the multi-classification labels.
[0160] S333. Construction and training of a classification model based on a self-attention encoder-decoder: Construct a classification model M based on a self-attention encoder-decoder cls , the classification model M cls includes a product requirement text feature extractor m based on the pre-trained language model Bert bert , a product requirement text vector feature encoder m enc and a label item self-attention decoder m dec ; the product requirement text feature extractor m bert selects the Chinese pre-trained language model Bert and its variant models, and the product requirement text vector feature encoder m enc adopts an n1-layer BiLSTM model, and the label item self-attention decoder m dec adopts an n2-layer multi-head attention model Multi-head Attention and a fully connected layer; the classification model M cls uses the combined loss function softmax_cross_entropy_with_logits as the optimization objective, and the combined loss function is expressed as:
[0161]
[0162] where, y g represents the true classification label; z g represents the output probability of the current label; z h represents the model output probabilities of all classes.
[0163] Based on the serialized annotation data TokTag ReqCls train the classification model M cls , randomly divide the serialized annotation data TokTag ReqCls into a first training set, a first validation set and a first test set in a ratio of 8:1:1, and obtain the trained classification model M cls-traubed .
[0164] S4. Construct and train a text local-global feature asymmetric alignment model; as Figure 3 shown, construct a text local-global feature asymmetric alignment model M match, establish a semantic-level matching relationship between the product requirement text req and the product defect analysis regulation text p, complete the input of the product requirement text, and recommend the corresponding product defect analysis regulation text; for each product requirement text req, there is one or more matching product defect analysis regulation texts p, which are constrained by the similarity score score sim to be constrained by:
[0165] score sim = M match (req ni , p nj ) (11)
[0166] wherein, req ni represents the ni-th product requirement text of the input; p nj represents the nj-th product defect analysis regulation text.
[0167] S41. Construct a text local-global feature asymmetric alignment model: The text local-global feature asymmetric alignment model includes a product requirement text feature encoder Encoder req , a product defect analysis regulation text encoder Encoder pri and a feature alignment encoder Encoder Ali , that is:
[0168] M match = {Encoder req , Encoder pri , Encoder Ali}} (12).
[0169] The product requirement text feature encoder Encoder req is used to extract the global features and local features in the product requirement text; the product defect analysis regulation text encoder Encoder pri is used to extract the global features and local features in the product defect analysis regulation text; the feature alignment encoder Encoder Ali is used to align the product requirement text features and the product defect analysis regulation text features, learn their correspondence, and is used to represent the association between the two.
[0170] S411. Construct a product requirement text feature encoder Encoder req : The product requirement text usually contains descriptions such as functions, performance, interfaces, and security, and these descriptions are generally characterized by keywords and description methods. Among them, the keywords represent the local features of the current text description, and the overall description method represents the global feature.
[0171] The product requirement text feature encoder Encoderreq including a first local feature extractor F local-req , a first global feature extractor F global-req and a feature integrator AttentionWeights req , that is:
[0172] Encoder req ={F local-req ,F global-req ,AttentionWeights req}} (13)
[0173] The first local feature extractor F local-req adopts the first three layers of the pre-trained language model Bert to extract the local features of the product requirement text. The output of the first local feature extractor is the first local feature vector H local-req , and the dimension of the first local feature vector H local-req is 768; the first global feature extractor F global-req adopts the pre-trained language model Bert model of 12-layer Transformer to extract the global features of the product requirement text. The output of the first global feature extractor F global-req is the first global feature vector H global-req , and the dimension of the first global feature vector H global-req is 768; the feature integrator AttentionWeights req is used for the fusion of local features and global features, and obtains the weight AW local-req of the text local feature vector H req :
[0174] AW req =softmax(W[H local-req ,H global-req ) (14)
[0175] Among them, softmax represents the normalized exponential function; W represents the feature weight.
[0176] The output of the feature integrator AttentionWeights req is the product requirement text feature H fused-req :
[0177] H fused-req =AW req ·H local-req +(1-AW req )·H global-req (15).
[0178] The pre-trained language model Bert usually consists of multiple Transformer layers (usually 12 or 24 layers), each of which includes a multi-head self-attention mechanism and a feedforward neural network.
[0179] The Product Defect Analysis Regulations are a summary text language that contains analysis and testing requirements for a certain type of required functions and performance. These descriptions usually do not contain specific component name information, and local features are not obvious, so the main consideration is the global features.
[0180] S412. Construct a text encoder for product defect analysis regulations pri :Product Defect Analysis Regulations Text Encoder pri Including the second global feature extractor F global-pri ,Right now:
[0181] Encoder pri ={F global-pri} (16).
[0182] The second global feature extractor F global-pri The 12-layer Transformer pre-trained language model Bert model is used, and the second global feature extractor F global-pri The output of the product defect analysis rule feature H global-pri , Product Defect Analysis Regulations Characteristics H global-pri The dimension of F is 768. global-pri The parameters of are learnable.
[0183] S413. Construct feature alignment encoder Encoder Ali : A feature alignment module is cascaded at the end of the feature extraction module to align the product requirement features and the defect analysis regulations features, and optimize the encoder by fusion feature learning. req and Encoder pri The encoding ability of allows the encoder to bring the respective feature vectors closer to each other and express them in a mutually matching form. Ali The last six layers of the pre-trained language model Bert are used only for the calibration and alignment of product requirement features and defect analysis regulations features, and do not directly participate in the final reasoning of the retrieval system. It includes the similarity calculation submodule M sim and feature alignment submodule M ali ,Right now:
[0184] Encoder Ali ={M sim ,M ali} (17).
[0185] Similarity calculation sub-module M sim Consistent with the conventional double-branch retrieval model, a vector similarity calculation method (such as Euclidean distance, cosine distance, etc.) is adopted to construct a similarity calculation module to calculate the product requirement description feature H fused-req and the product defect analysis regulation feature H global-pri The similarity between them is calculated, and the triple loss is used to optimize the product requirement text feature encoder Encoder req and the product defect analysis regulation text encoder Encoder pri The parameters in; the feature alignment sub-module M ail Adopts a requirement-regulation matching loss to optimize the product requirement text feature H fused-req and the product defect analysis regulation feature H global-pri The interaction between them. The requirement-regulation matching loss can predict whether a given pair of product requirement descriptions and product defect analysis regulation descriptions match.
[0186] S414. Loss function of the local-global feature asymmetric alignment model for design text.
[0187] S4141. By increasing the feature distance of the matching requirement-regulation pair and decreasing the feature distance of the non-matching requirement-regulation pair to enhance the feature representation, the triple loss is used to learn the representation space of the requirement feature and the regulation feature, and the loss is calculated by comparing the distances between the features of three comparison samples. To optimize the overall feature representation, for the product requirement text feature H fused-req and the product defect analysis regulation feature H global-pri , a triple loss L tpl is constructed:
[0188] L tpl =∑ Req′ [α - cos(P, Req) + cos(P, Req′)] + ∑ P′ [α - cos(Req, P) + cos(Req′, P)] (18)
[0189] Among them, α represents the boundary parameter of the distance; cos() represents the similarity distance obtained through the similarity calculation sub-module; Req′ represents the negative example sample of the product defect analysis regulation P; P′ represents the negative example sample of the product requirement item set Req.
[0190] S4142. For the first global feature extractor F global-req , a cross-entropy loss L ce is constructed:
[0191]
[0192] Among them, γ aIndicates the actual category of the ath product requirement text; ρ a Indicates the predicted category probability of the ath product requirement text output by the model; N represents the number of samples; a is a positive integer.
[0193] To guide the generation of significant category features of the first global feature encoder F global-req Through this loss function, the global encoding effect of the requirement text can be improved.
[0194] S4143. Considering that the requirement-regulation matching task can be regarded as a binary classification prediction problem, construct the requirement-regulation matching loss L itm :
[0195]
[0196] Among them, Indicates the expected value of the sample pair (P, Req) in the distribution Ω; Ω represents the training sample set; γ match Is the matching label of the current requirement-regulation pair, ρ match (P, Req) is the matching probability of the requirement-regulation pair; H() represents the loss function, which is used to calculate the difference between the actual matching label γ match And the predicted matching probability ρ match (P, Req), punish the wrong prediction, so as to guide the model to learn the correct matching between requirements and regulations.
[0197] S42. Determine the training dataset: Construct the dataset Ω match For training the text local-global feature asymmetric alignment model M match , where, given any product requirement text req ∈ Ω match , there is one or more matching product defect analysis regulation texts p ∈ Ω match Corresponding to it, it is considered to have similarity.
[0198] S43. Extract the key elements of the product requirement text req and the product defect analysis regulation text p.
[0199] In the model designed in step S41, the product requirement text feature encoder Encoder req Will extract and process the global feature and the local feature of the requirement text respectively. The product defect analysis regulation text encoder Encoder pri Although only extracts the global feature, it is necessary to enhance the local feature in the input text so that the encoder can take into account both the global and local features. In order to better express these two types of features, preprocess the input product requirements.
[0200] S431. Construct the key element extraction model M for the product requirement text req and the product defect analysis regulation text p keyword :
[0201] M keyword ={m base ,m keybert}(21)
[0202] Among them, m base represents the first keyword extraction module; m keybert represents the second keyword extraction module.
[0203] S432. The first keyword extraction module m base extracts keywords from the product requirement text req and the product defect analysis regulation text p by means of the failure phenomenon feature word list W, the processing measure feature word list F, the failure cause feature word list R, and the synonym list W sim , and obtains the first key elements keywords base ; The second keyword extraction module m keybert extracts keywords from the product requirement text req and the product defect analysis regulation text p by means of the model after incremental training with the product failure knowledge base SKD, and obtains the second key elements keywords keybert .
[0204] S433. Take the intersection of the first key elements keywords base and the second key elements keywords keybert as the key elements keywords r of the product requirement text req and the key elements keywords p of the product defect analysis regulation text p
[0205] S44. Construct a preprocessing module for the product requirement text
[0206] S441. Local feature enhancement processing: Through the key element extraction in step S42, the key elements keywords r of the product requirement text req are used as enhanced keywords. In the product requirement text feature encoder Encoder req , the key elements keywords r of the product requirement text req are spliced after the product requirement text req to obtain the locally enhanced product requirement text req enh :
[0207] req enh =CONCATENATE(r,keywords r )(22)
[0208] Among them, CONCATENATE represents a concatenation operation.
[0209] S442. Global feature enhancement processing: With the help of the first global feature extractor F global-req , extract the global features of the product requirement text req, and use the key elements keywords r of the product requirement text req to match the words in the product requirement text req, and use the wildcard "mask" to mask the keywords r in the product requirement text req.
[0210] In a specific embodiment, a product requirement text req is "The software control system of the landing gear needs to have redundant safety capabilities. When receiving a control instruction, at least two active programs should judge simultaneously, adopt a master-slave structure. When the main control program is not faulty, use the output result of the main program. When the main program fails, use the control result of the slave program". Through step S433, words related to specific products such as "landing gear, control system" are obtained as the key elements keywords r of the product requirement text req. When performing global feature enhancement, it is to make the subsequent feature extractor not consider which system it is, but only need to know that it is a redundant system. Therefore, through the step of global feature enhancement, these keywords r such as "landing gear, control system" are masked, and the text sent to the subsequent encoder should be "[mask] software [mask] needs to have redundant safety capabilities. When receiving a control instruction, at least two active programs should judge simultaneously, adopt a master-slave structure. When the main control program is not faulty, use the output result of the main program. When the main program fails, use the control result of the slave program".
[0211] S45. Train the text local-global feature asymmetric alignment model: Divide the dataset Ω match in step S42 into a second training set, a second validation set, and a second test set according to the ratio of 8:1:1. Based on the second training set, train the text local-global feature asymmetric alignment model constructed in step S41. The parameters of the text local-global feature asymmetric alignment model are initialized with a normal distribution. The training termination condition is set to iterate 50 times or the loss function does not change in three consecutive iterations, and obtain the trained text local-global feature asymmetric alignment model M match-trained :
[0212] M match-trained = {Encoder req-trained , Encoder pri-trained , EncoderAli-trained} (23)
[0213] Among them, Encoder req-trained , Encoder pri-trained , Encoder Ali-trained respectively represent the product requirement text feature encoder, product defect analysis regulation text encoder, and feature alignment encoder that obtain the optimal parameters through training.
[0214] The training process mainly optimizes the feature vector generation model and the semantic knowledge interaction and alignment model.
[0215] S5. Output of product defect analysis regulations text based on product requirement text.
[0216] S51. Generate and store product defect analysis regulations: For all product defect analysis regulations P, use the product defect analysis regulation text encoder Encoder pri-trained that obtains the optimal parameters through training to perform feature encoding, forming a set of product defect analysis regulation feature vectors V p , and store the set of product defect analysis regulation feature vectors V p in the feature vector retrieval database.
[0217] S52. Calculate the similarity recall and ranking between the input product requirement text and product defect analysis regulations: For the input product requirement text req and all product defect analysis regulation texts p, perform similarity judgment.
[0218] S521. Use the trained classification model M cls-trained in step S333 to classify the input product requirement text req, obtaining the classification label t req .
[0219] S522. Use the product requirement text feature encoder Encoder req-trained that obtains the optimal parameters in step S45 to generate a product requirement feature vector v req for the input product requirement text req.
[0220] S523. Based on the product requirement feature vector v req , use the similarity calculation sub-module M Ali-trained of the feature alignment encoder Encoder that obtains the optimal parameters in step S45, and search in the feature vector retrieval database obtained in step S51 according to the vector similarity distance, recalling a set of s product defect analysis regulation vectors sim
[0221] S524. Concatenate the product requirement feature vector v req with the recalled product defect analysis regulation vector set V′ p and perform vector joint similarity calculation using the feature alignment sub-module M of the feature alignment encoder Encoder with the obtained optimal parameters. Sort the similarities from large to small and return the top five product defect analysis regulation texts P Ali-trained : ali : top5 :
[0222] P top5 ={p top1 , p top2 , …, p top5} (24)
[0223] where p top1 , p top2 , p top5 represent the product defect analysis regulation texts ranked first, second, and fifth respectively.
[0224] P top5 is considered the product defect analysis regulation text that best matches the product requirement text req.
[0225] A matching method for aviation product requirements and defect analysis regulations based on asymmetric alignment designed in the present invention constructs a product fault knowledge base, extracts fault element features, treatment measure features, and fault cause features, and establishes a keyword and synonym library that can represent the above features for identifying and processing key elements with the same semantics; extracts a classification system from the product key elements for classifying product requirements and product defect analysis regulations; at the same time, extracts defect analysis regulations from historical product fault data, classifies the product requirements and product defect analysis regulations using the constructed classification system, and trains the classification data into a classification model; designs a local-global feature asymmetric alignment model according to the characteristics of product requirement descriptions and product defect analysis regulation descriptions, designs a loss function to constrain it, and trains it with historical data to obtain a model that can align and analyze product requirement features and product defect analysis regulation features, completing the matching of defect analysis regulations for new requirements, which has important practical application significance, stronger practicability, and wider applicability.
[0226] Finally, it should be noted that the above embodiments are only used to illustrate rather than limit the technical solutions of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: the present invention can still be modified or equivalently replaced, and any modification or partial replacement without departing from the spirit and scope of the present invention should be covered by the scope of the claims of the present invention.
Claims
1. A method for matching aviation product requirement and defect analysis regulations based on asymmetric alignment, characterized in that It includes the following steps: S1. Construct a product fault knowledge base: For the product evaluation problem list, construct a product fault knowledge base SKD: SKD = D, C, S (1) Among them, D represents the description of the fault phenomenon and D = d1, d2…d i ; C represents the description of the fault cause and C = c1, c2…c j ; S represents the description of the solution measure and S = s1, s2…s k ; i, j, k respectively represent the total numbers of the fault phenomenon description data, the fault cause description data, and the solution measure description data; d, c, s respectively represent the natural language descriptions of the fault phenomenon, the fault cause, and the solution measure; S2. Construct a classification system for key elements of the product and defect analysis regulations; S21. Construct the classification system Sch for the key elements of the product cls ; S22. Extract product defect analysis regulations from historical product fault data: According to the product fault knowledge base SKD in step S1, perform pattern extraction on the causes and phenomena of historical product faults, and refine the corresponding product defect analysis regulations P: P = p1, p2, …, p y (5) Among them, p represents the text of the product defect analysis regulation; y represents the number of all defect analysis regulations; S23. Classify the product defect analysis regulations: According to the product key element classification system in step S21, classify each description item in the product defect analysis regulation P to obtain the classification label set T of the product defect analysis regulation P P : Among them, t represents the classification label; S3. Extract the hierarchical elements of the product requirement text and construct a classification model; S31. Divide the product requirement item set Req: Req = req1, req2, …, req z (7) Among them, req represents the product requirement text disassembled from the requirement document, and each req ensures the independence of the requirement; z represents the number of product requirement texts; S32. Unified processing of key elements of the product requirement text; S33. Construct and train a product requirement text classification model; S4. Construct the text local-global feature asymmetric alignment model and training; construct the text local-global feature asymmetric alignment model M match , establish a semantic-level matching relationship between the product requirement text req and the product defect analysis regulation text p, complete the input of the product requirement text, and recommend the corresponding product defect analysis regulation text; for each product requirement text req, there is one or more matching product defect analysis regulation texts p, through the similarity score score sim to perform the constraint: score sim = M match (req ni , p nj ) (11) Among them, req ni represents the ni-th product requirement text of the input; p nj represents the nj-th product defect analysis regulation text; The local-global feature asymmetric alignment model for the text includes a product requirement text feature encoder Encoder req , a product defect analysis regulation text encoder Encoder pri and a feature alignment encoder Encoder Ali , that is: M match = {Encoder req , Encoder pri , Encoder Ali} (12); S411. Construct the product requirement text feature encoder Encoder req : The product requirement text feature encoder Encoder req includes the first local feature extractor F local-req , the first global feature extractor F global-req and the feature integrator AttentionWeights req , that is: Encoder req ={F local-req ,F global-req ,AttentionWeights req}(13); The feature integrator AttentionWeights req outputs the product requirement text feature H fused-req : H fused-req = AW req ·H local-req +(1 - AW req )·H global-req (15); Among them, H local-req is the first local feature vector, and H global-req is the first global feature vector; S412. Construct a text encoder Encoder for product defect analysis regulations pri : The text encoder Encoder for product defect analysis regulations pri includes a second global feature extractor F global-pri That is: Encoder pri ={F global-pri}(16); The output of the second global feature extractor F global-pri is the product defect analysis regulation feature H global-pri ; S413. Construct a feature alignment encoder Encoder Ali : The feature alignment encoder Encoder Ali adopts the last six layers of the pre-trained language model Bert model, which includes a similarity calculation sub-module M sim and a feature alignment sub-module M ali , that is: Encoder Ali ={M sim ,M ali}(17); S414. Design the loss function of the text local-global feature asymmetric alignment model; S5. Output the product defect analysis regulation text based on the product requirement text; S51. Generate and store product defect analysis regulations: For all product defect analysis regulations P, use the product defect analysis regulation text encoder Encoder with optimal parameters obtained through training pri-trained to perform feature encoding to form a set V of product defect analysis regulation feature vectors p , and store the set V of product defect analysis regulation feature vectors p in the feature vector retrieval database; S52. Calculate the similarity recall and ranking of the input product requirement text and the product defect analysis regulations: For the input product requirement text req and all the product defect analysis regulation texts p, perform similarity judgment to obtain the product defect analysis regulation text that best matches the product requirement text req.
2. The method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment according to claim 1, wherein The specific steps of step S4 include the following steps: S41. Construct a text local-global feature asymmetric alignment model; S42. Determine the training dataset: Construct a dataset Ω for training the text local-global feature asymmetric alignment model M match wherein, given any product requirement text req ∈ Ω match , there is one or more matching product defect analysis regulation texts p ∈ Ω match corresponding to it, and they are considered to have similarity; match S43. Extract the key elements of the product requirement text req and the product defect analysis regulation text p; S431. Construct the key element extraction model M of the product requirement text req and the product defect analysis regulation text p keyword : M keyword = {m base , m keybert} (21) Among them, m base represents the first keyword extraction module; m keybert represents the second keyword extraction module; S432. The first keyword extraction module m base With the help of the failure symptom feature word list W, the treatment measure feature word list F, the failure cause feature word list R, and the synonym list W sim , extract the keywords in the product requirement text req and the product defect analysis regulation text p to obtain the first key elements keywords base ; The second keyword extraction module m keybert With the help of the model after incremental training using the product failure knowledge base SKD, extract the keywords in the product requirement text req and the product defect analysis regulation text p to obtain the second key elements keywords keybert ; S433. Obtain the first key element keywords base and the second key element keywords keybert The intersection of which is used as the key element keywords of the product requirement text req r and the key element keywords of the product defect analysis regulation text p p ; S44. Construct a product requirement text preprocessing module; S441. Local feature enhancement processing: Through the key element extraction in step S42, the key elements keywords of the product requirement text req r are used as enhanced keywords in the product requirement text feature encoder Encoder req where the key elements keywords of the product requirement text req r are spliced after the product requirement text req to obtain the locally enhanced product requirement text req enh : req enh = CONCATENATE(r, keywords r ) (22) Among them, CONCATENATE represents the concatenation operation; S442. Global feature enhancement processing: With the help of the first global feature extractor F global-req , extract the global features of the product requirement text req, and use the key elements keywords of the product requirement text req r to match the words in the product requirement text req, and use the wildcard "mask" to mask the keywords in the product requirement text req r ; S45. Train the local-global feature asymmetric alignment model for text: Obtain the trained local-global feature asymmetric alignment model M for text match-trained : M match-trained = {Encoder req-trained , Encoder pri-trained , Encoder Ali-trained} (23) Among them, Encoder req-trained , Encoder pri-trained , Encoder Ali-trained respectively represent the product requirement text feature encoder, the product defect analysis regulation text encoder, and the feature alignment encoder that obtain the optimal parameters through training.
3. The method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment according to claim 2, characterized in that The specific steps of step S33 include the following steps: S331. Product Requirement Text Classification Data Annotation: For the product key element classification system Sch constructed in step S21 cls , in the product requirement item set Req constructed in step S31, select product requirement texts with obvious classification characteristics, and classify and annotate them according to the object and content of the requirement description to obtain annotation data Tag ReqCls : Among them, represents the classification label for the z-th product requirement text req z ; S332. Product Requirement Text Preprocessing Encoding: Using the dictionary in the pre-trained language model Bert, construct the product requirement text charactertization model M tok , convert the product requirement text req in the labeled data Tag ReqCls into a Token sequence, and serialize the classification label to obtain the serialized labeled data TokTag ReqCls : Among them, tokreq represents the serialized representation of the product requirement text; ids represents the serialized representation of the multi-classification label; S333. Construction and Training of a Classification Model Based on Self-Attention Encoder-Decoder: Construct a classification model M based on self-attention encoder-decoder cls , the classification model M cls includes a product requirement text feature extractor m based on the pre-trained language model Bert bert , a product requirement text vector feature encoder m enc and a label item self-attention decoder m dec ; Obtain the trained classification model M cls-trained ; The specific steps of step S52 include the following steps: S521. Use the trained classification model M in step S333 cls-trained to classify the input product requirement text req and obtain the classification label t req ; S522. Use the product requirement text feature encoder Encoder with the optimal parameters obtained in step S45 req-trained to generate a product requirement feature vector v for the input product requirement text req req ; S523. Based on the product requirement feature vector v req , use the feature alignment encoder Encoder with the optimal parameters obtained in step S45 Ali-trained 's similarity calculation sub-module M sim , and search in the feature vector retrieval database obtained in step S51 by vector similarity distance to recall a set of s product defect analysis rule vectors that are similar S524. Concatenate the product requirement feature vector v req with the recalled product defect analysis regulation vector set V′ p and perform vector joint similarity calculation using the feature alignment sub-module M Ali-trained of the feature alignment encoder Encoder that obtains the optimal parameters. Sort the similarities from large to small and return the top five product defect analysis regulation texts P ali : top5 : P top5 = {p top1 , p top2 , …, p top5} (24) Among them, p top1 , p top2 , p top5 respectively represent the text of the product defect analysis regulations ranked first, second, and fifth; P top5 It is considered as the product defect analysis regulation text that best matches the product requirement text req.
4. The method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment according to claim 1, characterized in that The specific steps of step S414 include the following steps: S4141. For the product requirement text feature H fused-req and the product defect analysis regulation feature H global-pri , construct the triple loss L tpl : L tpl = ∑ Req′ [α - cos(P, Req) + cos(P, Req′)] + ∑ P′ [α - cos(Req, P) + cos(Req′, P)] (18) Among them, α represents the boundary parameter of the distance; cos() represents the similarity distance obtained through the similarity calculation sub-module; Req′ represents the negative example sample of the product defect analysis regulation P; P′ represents the negative example sample of the product requirement item set Req; S4142. For the first global feature extractor F global-req , construct the cross-entropy loss L ce : Among them, γ a represents the actual category of the a-th product requirement text; ρ a represents the category prediction probability of the a-th product requirement text output by the model; N represents the number of samples; a is a positive integer; S4143. Construct the requirement-regulation matching loss L itm : Among them, represents the expected value of the sample pair (P, Req) in the distribution Ω; Ω represents the training sample set; γ match is the matching label of the current requirement-regulation pair, ρ match (P, Req) is the matching probability of the requirement-regulation pair; H() represents the loss function.
5. The method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment according to claim 1, wherein The specific steps of step S1 include the following steps: S11. Construct a fault phenomenon feature word list: Extract the element word list related to software and hardware faults from the existing fault description text, and construct a fault phenomenon feature word list W: W = w1, w2…w l (2) Among them, w represents the feature word describing the fault phenomenon, extracted from the fault phenomenon description D; l represents the number of fault phenomenon feature words; S12. Construct a processing measure feature word list: Extract the element word list related to the processing measures to solve product problems from the existing processing measure text, and construct a processing measure feature word list F: F = {f1, f2…f m} (3) Among them, f represents the feature word describing the processing measure, extracted from the solution measure description S; m represents the number of processing measure feature words; S13. Construct a feature word list for failure causes: Extract an element word list that characterizes the root cause of product failures from existing failure cause texts, and construct a feature word list R for failure causes: R=r1,r2…r n (4) Among them, r represents a feature word describing the failure cause, which is extracted from the failure cause description C; n represents the number of feature words for failure causes; S14. Synonymous mapping of feature library elements: For each feature word w, f, r in the fault element feature word list W, the treatment measure feature word list F, and the fault cause feature word list R respectively, perform synonymous analysis to find words with the same semantic expression, and construct a synonym list W sim , for any element word w' with synonyms, in W sim , find the corresponding synonym set (w'1,..., w' x ) by looking up the table, where x represents the number of synonyms.
6. The method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment according to claim 1, characterized in that The specific steps of step S21 include the following steps: S211. Divide the first level: The first level divides the product requirement description object into external input IF in , external output IF out , product function Fuc, and working state State; S212. Divide the second level: Based on the first level, using the rule type as the classification criterion, divide the external input IF in into input digital quantity, input analog quantity, and input data bus, and divide the external output IF out into output digital quantity, output analog quantity, and output data bus; S213. Divide the third level: Based on the second level, using the rule type as the classification basis, divide the external input IF in into input value, input timing, input communication, input redundancy, input fault handling, and input fault diagnosis, and divide the external output IF out into output value, output timing, output communication, output redundancy, output fault handling, and output fault diagnosis. Divide the product function Fuc into timing constraint, external interaction, redundancy switching, and processing logic, and divide the working state State into state transition and state impact.
7. The method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment according to claim 3, characterized in that The product requirement text feature extractor m in the step S333 bert Select the Chinese pre-trained language model Bert and its variant models. The product requirement text vector feature encoder m enc Adopt an n1-layer BiLSTM model. The label item self-attention decoder m dec Adopt an n2-layer multi-head attention model Multi-head Attention and a fully connected layer. The classification model M cls Adopt a combined loss function as the optimization objective. The combined loss function is expressed as: where y g represents the true classification label; z g represents the output probability of the current label; z h represents the model output probabilities of all classes; The product requirement text feature encoder Encoder described in step S41 req is used to extract the global features and local features in the product requirement text. The product defect analysis regulation text encoder Encoder pri is used to extract the global features and local features in the product defect analysis regulation text. The feature alignment encoder Encoder Ali is used to align the product requirement text features and the product defect analysis regulation text features; The first local feature extractor F in the step S411 local-req employs the first three layers of the pre-trained language model Bert to extract local features of the product requirement text, and the output of the first local feature extractor is the first local feature vector H local-req , and the dimension of the first local feature vector H local-req is 768; the first global feature extractor F global-req employs the pre-trained language model Bert model with 12 layers of Transformer to extract global features of the product requirement text, and the output of the first global feature extractor F global-req is the first global feature vector H global-req , and the dimension of the first global feature vector H global-req is 768; the feature integrator AttentionWeights req is used for the fusion of local features and global features, and obtains the weight AW local-req of the text local feature vector H req : AW req = softmax(W[H local-req ,H global-req ) (14) Among them, softmax represents the normalized exponential function; W represents the feature weight; The second global feature extractor F in the step S412 global-pri employs a pre-trained language model, the Bert model, with 12 layers of Transformer. The product defect analysis regulation feature H global-pri has a dimension of 768; The similarity calculation sub-module M in step S413 sim Construct a similarity calculation module using the vector similarity calculation method to calculate the product requirement text feature H fused-req and the product defect analysis regulation feature H global-pri Calculate the similarity between them, and use the triplet loss to optimize the parameters in the product requirement text feature encoder Encoder req and the product defect analysis regulation text encoder Encoder pri The feature alignment sub-module M in step S413 ali Uses the requirement-regulation matching loss to optimize the interaction between the product requirement text feature H fused-req and the product defect analysis regulation feature H global-pri 8. The method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment according to claim 3, wherein In the description method of the classification label t in the step S23, it is in the form of "First level - Second level - Third level"; for each product requirement text req in the product requirement item set Req in the step S32, based on the synonym table W obtained in the step S15 sim , perform synonym replacement on each product requirement text req, and use the first synonym in the synonym table W sim to replace the key elements that appear in each product requirement text req, and complete the unification process of the key elements of the product requirement text; in the step S331, for the product key element classification system Sch cls , mark at least 20 product requirement texts under each category; the format of the classification marking is in the form of product requirement text + classification label.
9. The method for matching aviation product requirements and defect analysis regulations based on asymmetric alignment according to claim 3, wherein In the step S333, based on the serialized annotation data TokTag ReqCls train the classification model M cls randomly divide the serialized annotation data TokTag ReqCls into a first training set, a first validation set, and a first test set at a ratio of 8:1:1; in the step S45, divide the dataset Ω in the step S42 match into a second training set, a second validation set, and a second test set at a ratio of 8:1:1, train the text local-global feature asymmetric alignment model constructed in the step S41 based on the second training set, initialize the parameters of the text local-global feature asymmetric alignment model with a normal distribution, and set the training termination condition to iterate 50 times or the loss function has no change in three consecutive iterations.
Citation Information
Patent Citations
Knowledge graph and rule constraint-based equipment fault reason diagnosis method
CN113312411A
Decision-making method and system based on power transmission and transformation equipment fault maintenance knowledge base
CN118365171A