Intelligent classification method and system for pressure-bearing equipment inspection defects based on dynamic few-shot learning

By constructing a special equipment inspection defect example library and semantic vectorization processing using the dynamic Few-Shot learning method, the problems of low manual efficiency and poor consistency in the inspection of pressure-bearing special equipment are solved, and efficient and accurate defect identification and standardized output are achieved.

CN122432881APending Publication Date: 2026-07-21ZHEJIANG PROVINCIAL SPECIAL EQUIP INSPECTION & RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG PROVINCIAL SPECIAL EQUIP INSPECTION & RES INST
Filing Date
2026-05-13
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as low manual efficiency, poor consistency, and lack of domain knowledge in the inspection of pressure-bearing special equipment. General large language models cannot accurately identify and standardize defect classification.

Method used

A defect example library for the field of special equipment inspection is constructed using a dynamic Few-Shot learning method. Examples are dynamically selected through semantic vectorization and cosine similarity calculation, and defect identification is performed by combining a large language model. The output is standardized by a defect classification mapping dictionary.

Benefits of technology

It achieves efficient and accurate defect identification and classification, with classification results highly consistent with expert knowledge, standardized output format, and significantly improved processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432881A_ABST
    Figure CN122432881A_ABST
Patent Text Reader

Abstract

The application discloses a pressure-bearing equipment inspection defect intelligent classification method and system based on dynamic Few-Shot learning, comprising the following steps: constructing a pressure-bearing special equipment inspection report defect example library and a defect classification mapping dictionary; performing semantic vectorization processing on an input defect description to be classified, and converting the text into a high-dimensional semantic vector by using a pre-trained semantic embedding model; calculating the semantic similarity between the defect description to be classified and each example in the example library; dynamically selecting a preset number of most relevant examples according to the similarity; combining the selected examples and the defect description to be classified to form an optimized dynamic Few-Shot Prompt; calling a large language model to identify the defect; and standardizing the classification of the identification result by using the defect classification mapping dictionary. The most relevant examples are dynamically selected according to the semantic similarity, an intelligent example selection mechanism that meets the needs is realized, the field-specific example library and the classification mapping dictionary are constructed, and the large language model is endowed with professional knowledge in the special equipment inspection field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of artificial intelligence technology in the inspection of special equipment, and in particular to an intelligent classification method and system for defects in pressure equipment based on dynamic Few-Shot learning. Background Technology

[0002] Pressure-bearing special equipment (such as atmospheric pressure tank trucks and mobile pressure vessels) is a critical piece of equipment widely used in the petroleum, chemical, and gas industries. Its safe operation is directly related to the safety of people's lives and property and the stable development of the economy and society. According to relevant national laws and regulations, pressure-bearing special equipment must undergo mandatory periodic inspections. These inspections include wall appearance inspection, thickness measurement, non-destructive testing, hydrostatic testing, airtightness testing, and safety accessory calibration, among other aspects.

[0003] Traditional methods for processing inspection reports of pressure-bearing special equipment mainly rely on manual reading and classification. This manual processing method has the following significant problems: (1) Low efficiency: A complete inspection report for an atmospheric pressure tank truck often involves hundreds of inspection records and several defect records, and manual reading and classification are extremely time-consuming. Taking a provincial special equipment inspection agency as an example, it needs to process more than 7,000 tank truck inspection reports annually, with each report taking an average of 10-20 minutes, totaling more than 1,200 hours.

[0004] (ii) Consistency is difficult to guarantee: Different inspectors may have different understandings and classification standards for defects, which may lead to the same type of defect being classified into different categories in different reports, affecting the statistical analysis of inspection data and subsequent equipment safety management.

[0005] In recent years, the rapid development of Large Language Model (LLM) technology has provided new technical approaches to solving the aforementioned problems. However, directly applying general large language models to the defect classification of pressure-bearing special equipment faces the following technical obstacles:

[0006] (i) Domain knowledge gap: The general language model lacks professional knowledge in the field of special equipment inspection. For example, for a description such as "replace an emergency shut-off valve", the general model may not understand the implied information that "the emergency shut-off valve is defective".

[0007] (ii) Non-standard output format: The defect classification results generated by the general model are often not in a uniform format, and may include multiple expressions such as "none", "none;", and "no defects", which affects subsequent data processing and statistical analysis.

[0008] (iii) Inaccurate classification granularity: The classification granularity of the general model for defects is often too coarse or too fine, and cannot be aligned with the standard classification system for special equipment inspection.

[0009] Existing Few-Shot methods also have shortcomings. Traditional Few-Shot methods typically use random or fixed selection strategies to choose examples, which cannot guarantee that the selected examples are highly relevant to the content to be processed, resulting in limited guidance from the examples.

[0010] Based on the current state of the technology, there is an urgent need for an intelligent classification method and system for defects in the inspection of pressure-bearing special equipment that can intelligently select relevant examples, effectively embed domain knowledge, and output in a standardized format. Summary of the Invention

[0011] The purpose of this invention is to solve the problems in the prior art by proposing an intelligent classification method and system for inspection defects of pressure equipment based on dynamic Few-Shot learning, so as to solve the technical problems of low manual efficiency, poor consistency and lack of domain knowledge in the classification of inspection defects of pressure special equipment.

[0012] To achieve the above objectives, this invention proposes an intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning, comprising the following steps: Step S1, constructing an example library of inspection report defects, collecting and organizing typical defect records in the field of mobile pressure vessel inspection, and establishing an example library containing input-output pairs; Step S2, constructing a defect classification mapping dictionary, establishing a defect classification mapping system for mobile pressure vessel inspection, and mapping defect problem descriptions to standard classification categories; Step S3, semantically vectorizing the input defect description to be classified, using a pre-trained semantic embedding model to convert the defect description text to be classified into a high-dimensional semantic vector representation; Step S4, calculating semantic similarity, calculating the similarity between the semantic vector of the defect description to be classified and the semantic vector of each example input in the example library; Step S5, dynamically selecting examples, selecting a preset number of examples with the highest similarity as examples for Few-Shot inference based on the similarity calculation results; Step S6, constructing a dynamic Few-Shot Prompt, combining the selected examples with the defect description to be classified to form a dynamic Few-Shot prompt containing domain knowledge guidance. Prompt; Step S7, call the large language model to identify defects, use the large language model to infer the optimized Prompt, and output the defect identification result; Step S8, standardize the classification output, standardize the identification result through the defect classification mapping dictionary, and output the final classification result.

[0013] Preferably, the semantic vectorization process in step S3 employs a pre-trained semantic embedding model based on the Transformer architecture.

[0014] Preferably, the semantic similarity calculation in step S4 uses the cosine similarity algorithm.

[0015] Preferably, the cosine similarity algorithm includes: $$sim(\vec{v}_q,\vec{v}_e)=\frac{\vec{v}_q\cdot\vec{v}_e}{\|\vec{v}_q\| \times \|\vec{v}_e\|}$$; where $\vec{v}_q$ is the semantic vector describing the defect to be classified, and $\vec{v}_e$ is the semantic vector of an example in the example library.

[0016] Preferably, the dynamic example selection algorithm in step S2 includes the following steps: Step S201, input the description text of the defect to be classified; Step S202, perform semantic vectorization on the description text to obtain the query vector; Step S203, obtain the pre-stored semantic vectors of all examples in the example library; Step S204, calculate the cosine similarity between the query vector and each example vector; Step S205, sort the similarity calculation results in descending order; Step S206, select the top K examples as the final selected Few-Shot examples; Step S207, output the Top-K most relevant examples.

[0017] Preferably, the preset quantity in step S5 is between 3 and 5.

[0018] Preferably, the defect classification mapping dictionary in step S2 covers nine major defect types: including technical data defects, corrosion defects, crack defects, leakage defects, wear defects, material deterioration defects, safety accessory and instrument defects, manufacturing legacy defects, and other defects.

[0019] As a preferred approach, a hash-based caching mechanism is employed. A hash algorithm is used to generate cache keys, and cached results are directly returned for the same query. This avoids redundant calculations of the same or similar queries. The caching mechanism allows for direct return of cached results for repeated queries of the same question, avoiding repeated calls to the large language model and improving processing efficiency.

[0020] Preferably, the dynamic Few-Shot Prompt in step S6 also includes a classification rule description, which includes defect identification logic and classification output format specifications. The defect identification logic includes identifying explicit defect descriptions and inferring defects from implicit information. The classification output format uses a unified format for output.

[0021] Another objective of this invention is to propose an intelligent classification system for defects in pressure equipment inspection based on dynamic Few-Shot learning. This system uses the intelligent classification method for defects in pressure equipment inspection based on dynamic Few-Shot learning described above. The system includes: a defect example library module for storing typical defect case data in the field of special equipment inspection; a semantic vectorization module for semantically vectorizing the input defect description to be classified; a dynamic example selection module for dynamically selecting a preset number of most relevant examples from the example library based on semantic similarity; a Prompt construction module for combining the selected examples with the description to be classified to form a dynamic Few-Shot Prompt; a large language model interface module for calling a large language model for defect recognition; and a standardized classification module for standardizing the recognition results through a classification mapping dictionary.

[0022] Preferably, a user interface module is also included, which receives user input describing the defects to be classified and displays the classification results.

[0023] Preferably, a batch processing module is also included to support batch processing of multiple records.

[0024] The beneficial effects of this invention on the intelligent classification method and system for inspection defects of pressure equipment based on dynamic Few-Shot learning are as follows:

[0025] (1) Strong defect identification capability: By constructing a domain-specific example library and dynamic Few-Shot Prompt, it can accurately identify implicit defect information such as "replacing valves" and "providing certificates", which is significantly improved compared with the Direct method. According to experimental data, the method of this invention achieved a classification accuracy of 97.82% on 1103 records with expert judgment results, and the consistency with the rule engine method reached 5.4%, which is much higher than the 0.5% of the Direct method.

[0026] (2) Classification logic is close to expert knowledge: Experiments show that the method of the present invention can learn the expert classification logic in the field of special equipment inspection, and the classification results are most consistent with the rule engine method based on expert knowledge.

[0027] (3) Fine-grained classification: It can identify multiple defect types simultaneously and achieve fine-grained defect classification. Through the defect classification mapping dictionary, it ensures that the classification results are aligned with the standard classification system for special equipment inspection.

[0028] (4) Standardized Terminology: Through the dual constraints of classification rules and mapping dictionary, the output format is standardized and uniform, and the expression format of "XX problem" is used uniformly.

[0029] (5) Deep understanding of context: By selecting examples that are highly relevant to the semantics of the description to be classified, the large language model can be helped to understand the professional logic in the field of special equipment inspection.

[0030] (6) High processing efficiency: By avoiding redundant calculations through caching mechanism and combining with batch processing strategy, the processing efficiency of batch inspection reports can be significantly improved.

[0031] The features and advantages of the present invention will be described in detail through embodiments and in conjunction with the accompanying drawings. Attached Figure Description

[0032] Figure 1 This is an overall flowchart of the intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning, which is the subject of this invention.

[0033] Figure 2 This is a flowchart of the dynamic example selection algorithm.

[0034] Figure 3 This is a schematic diagram of the system architecture of the present invention.

[0035] Figure 4 This is a schematic diagram illustrating the principles of semantic vectorization and similarity calculation in this invention.

[0036] Figure 5 This is a schematic diagram illustrating the construction of the dynamic Few-Shot Prompt in this invention.

[0037] Figure 6 This is a performance comparison diagram of the four methods. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. However, it should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0039] In the description of this invention, it should be noted that when an element is referred to as being "fixed to" or "set on" another element, it can be directly on or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to or indirectly connected to the other element.

[0040] In the description of this invention, it should be noted that the terms "center," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified. "Several" means one or more, unless otherwise explicitly specified.

[0041] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0042] Example 1:

[0043] Dynamic example selection based on semantic similarity, see [link / reference] Figure 1 , Figure 2 This invention relates to an intelligent classification method for inspection defects in pressure equipment based on dynamic Few-Shot learning, comprising the following steps: Step S1: Construct a defect example library for inspection reports. Collect typical defect records in the field of special equipment inspection and establish a domain knowledge example library containing input-output pairs. Each example in the example library contains: (1) defect description text, such as "replace an emergency shut-off valve", "the user unit provides a pressure gauge calibration certificate", etc.; (2) the corresponding standard classification result, such as "emergency shut-off valve problem", "incomplete technical data problem", etc.

[0044] Step S2: Construct a defect classification mapping dictionary. Establish a defect classification mapping system for special equipment inspection, mapping various defect descriptions to standard classification categories. The classification mapping dictionary covers nine major defect types: technical data defects, corrosion defects, crack defects, leakage defects, wear defects, material deterioration defects, safety accessory and instrument defects, manufacturing legacy defects, and other defects.

[0045] Step S3: Semantic vectorization. A pre-trained semantic embedding model (such as paraphrase-multilingual-MiniLM-L12-v2) is used to convert the defect description text to be classified into a high-dimensional semantic vector representation (such as 384-dimensional).

[0046] Step S4: Calculate semantic similarity. The cosine similarity algorithm is used to calculate the similarity between the semantic vector describing the defect to be classified and the semantic vectors of each example input in the example library.

[0047] Step S5: Dynamically select examples. Based on the similarity calculation results, select a preset number of examples with the highest similarity as examples for Few-Shot inference. The preset number is preferably between 3 and 5.

[0048] Step S6: Construct a dynamic Few-Shot Prompt. Combine the selected examples with the descriptions of the defects to be classified, and add classification rule descriptions to form a dynamic Few-Shot Prompt that includes domain knowledge guidance.

[0049] Step S7: Use the large language model for defect identification. Utilize the large language model to infer the optimized Prompt and output the defect identification results.

[0050] Step S8: Standardize the classification output. The identification results are standardized and classified through the defect classification mapping dictionary, and the final classification result is output.

[0051] The dynamic example selection algorithm of the present invention includes the following steps:

[0052] Step S201: Input the text describing the defects to be classified.

[0053] Step S202: Semantically vectorize the description text to obtain the query vector.

[0054] Step S203: Obtain the pre-stored semantic vectors of all examples in the example library.

[0055] Step S204: Calculate the cosine similarity between the query vector and each example vector.

[0056] Step S205: Sort the similarity calculation results in descending order.

[0057] Step S206: Select the top K examples as the final selected Few-Shot examples.

[0058] Step S207: Output the Top-K most relevant examples.

[0059] See Figure 4 The formula for calculating cosine similarity is:

[0060] $$sim(\vec{v}_q, \vec{v}_e) = \frac{\vec{v}_q \cdot \vec{v}_e}{\|\vec{v}_q\| \times \|\vec{v}_e\|}$$

[0061] Where $\vec{v}_q$ is the semantic vector describing the defect to be classified, and $\vec{v}_e$ is the semantic vector of a certain example in the example library.

[0062] See Figure 5 The dynamic Few-Shot Prompt construction method of the present invention includes the following parts:

[0063] (1) System instructions: These specify the task requirements and output format specifications.

[0064] (2) Classification Rules Description: Includes defect identification logic and classification output format specifications. Defect identification logic includes: identifying explicit defect descriptions (such as words that directly describe defects, such as "corrosion" and "leakage") and inferring defects from implicit information (such as "replacement" indicating a problem with the original component, and "provide certificate" indicating incomplete documentation). The classification output format specifications require the use of a unified "XX problem" format for output.

[0065] (3) Dynamically selected examples: contains the most relevant examples dynamically selected from the example library. Each example contains input (defect description) and output (standard classification result).

[0066] (4) Problems to be classified: Defect description text to be classified.

[0067] For example, when the question to be classified is "replace one emergency shut-off valve", the system selects relevant examples based on semantic similarity:

[0068] Example 1: Input "Replace a safety valve", output "Safety valve problem"

[0069] Example 2: Input "Pressure gauge calibration certificate provided by the user unit", Output "Incomplete technical data issue"

[0070] Example 3: Input "Vacuum level exceeded standard on March 7th", Output "Interlayer vacuum issue"

[0071] Based on the above example, the large language model can understand that the "replace" action represents a defect, and thus correctly output "emergency shut-off valve problem".

[0072] Comparison of four methods

[0073] See Figure 6 To fully verify the technical effects of this invention, a comparative experiment involving four methods was conducted. The experimental data came from the 2025 atmospheric pressure tank truck inspection report, totaling 3401 records, of which 1103 records were classified correctly by experts (the total number of defective records).

[0074] Experimental method description:

[0075] (1) Few-Shot method (this invention): includes 3 dynamically selected similar examples, classification rules and descriptions to be classified;

[0076] (2) Direct method: contains only simple instructions and descriptions to be categorized, without examples;

[0077] (3) Keyword matching method: a defect classification method based on predefined keywords (such as "corrosion", "leakage" etc.);

[0078] (4) Rule engine method: a defect classification method based on expert rule system.

[0079] Experimental Result 1: Comparison of Performance Indicators Total time (seconds) 378.75 211.51 0.09 0.10 Average processing time (seconds / item) 0.117 0.066 0.000 0.000 Token consumption 315,195 49,532 27,670 25,441 LLM call count 594 594 594 594

[0080] Experimental Result 2: Classification Consistency Analysis Total number of records processed 3401 The number of expert judgments 1103 Number of correct classifications 1079 Number of classification errors 24 Classification accuracy 97.82%

[0081] Key findings: The method of this invention (Few-Shot) achieved a classification accuracy of 97.82% (1079 correct and 24 incorrect) on 1103 records with expert judgment results. At the same time, the consistency with the rule engine method reached 5.4%, which is much higher than the consistency with other methods. This shows that the method of this invention not only has high classification accuracy, but also can learn the classification logic of domain experts.

[0082] Experimental Result 3: Comparison of Typical Case Classifications Replace one emergency shut-off valve Emergency shut-off valve problem none none Emergency shut-off valve problem The user unit provides a pressure gauge calibration certificate. Incomplete technical information none none Incomplete technical data Replace a safety valve Safety valve problem none none Safety valve problem Vacuum exceeded the standard on March 7. Interlayer vacuum problem interlayer vacuum problem Interlayer vacuum problem interlayer vacuum problem

[0083] As can be seen from the table above:

[0084] (i) The Direct method suffers from a serious lack of domain knowledge: For implicit defect information such as "replacing the valve", the Direct method returns "none" and cannot be correctly identified.

[0085] (ii) The keyword matching method has limited capabilities: it can only identify descriptions containing keywords and is powerless to identify hidden defect information.

[0086] (iii) The results of the method of the present invention are consistent with those of the rule engine method: This shows that the method of the present invention can achieve the classification level of the expert knowledge system.

[0087] Example 2:

[0088] See Figure 3 The present invention discloses an intelligent classification system for defects in pressure-bearing special equipment based on dynamic Few-Shot learning. The system adopts a hierarchical architecture and includes a defect example library module, which stores typical defect case data in the field of special equipment inspection.

[0089] Semantic Vectorization Module: Converts text into semantic vectors. Employs a pre-trained semantic embedding model based on the Transformer architecture.

[0090] Dynamic example selection module: Dynamically selects a preset number of the most relevant examples from the example library based on semantic similarity. Similarity is calculated using a cosine similarity algorithm, and examples are selected in descending order of similarity.

[0091] The Prompt building block combines selected examples with descriptions to be categorized to form a dynamic Few-Shot Prompt.

[0092] Large Language Model Interface Module: Calls the large language model for defect identification.

[0093] Standardized classification module: Standardizes the recognition results using a classification mapping dictionary.

[0094] Cache module: Uses a hash algorithm to generate cache keys and directly returns the cached result for the same question.

[0095] User interface module: Receives user input describing the defects to be classified and displays the classification results.

[0096] Batch processing module: Supports batch processing of multiple records.

[0097] Typical application scenarios

[0098] This invention can be widely applied to the inspection of the following pressure-bearing special equipment:

[0099] (1) Processing of inspection reports for atmospheric pressure tank trucks: Automatically identify and classify various defects found during tank truck inspections, such as vacuum issues, valve issues, and safety accessory issues.

[0100] (2) Inspection of mobile pressure vessels: Process periodic inspection reports of mobile pressure vessels and accurately identify various defects.

[0101] (3) Inspection of long-tube trailers: Classify the defects of gas cylinders, pipelines, valves and other components of long-tube trailers.

[0102] (4) Inspection of gas storage wells: Defect identification and classification of components such as wellbore, packers, and safety valves of gas storage wells.

[0103] (5) Inspection report quality review: assists the reviewers in reviewing the defect classification in the inspection report to improve the review efficiency.

[0104] (6) Defect statistical analysis: Batch processing of a large number of inspection reports to statistically analyze the frequency and distribution patterns of various defects.

[0105] It should be noted that although the above embodiments have been described herein, this does not limit the scope of patent protection for this invention. Therefore, any changes and modifications made to the embodiments described herein based on the innovative concept of this invention, or equivalent structural or procedural transformations made using the content of this specification and drawings, directly or indirectly applying the above technical solutions to other related technical fields, are all included within the scope of protection of this invention.

Claims

1. A method for intelligent classification of inspection defects in pressure equipment based on dynamic Few-Shot learning, characterized in that, Includes the following steps: Step S1: Construct a sample library of inspection report defects, collect and organize typical defect records in the field of mobile pressure vessel inspection, and establish a sample library containing input-output pairs; Step S2: Construct a defect classification mapping dictionary to establish a defect classification mapping system for mobile pressure vessel inspection, mapping defect problem descriptions to standard classification categories; Step S3: Perform semantic vectorization processing on the input defect descriptions to be classified, using a pre-trained semantic embedding model to convert the defect description text to be classified into a high-dimensional semantic vector representation; Step S4: Calculate semantic similarity, calculating the similarity between the semantic vector of the defect description to be classified and the semantic vectors of each example input in the example library; Step S5: Dynamically select examples, selecting a preset number of examples with the highest similarity as examples for Few-Shot inference based on the similarity calculation results; Step S6: Construct a dynamic Few-Shot Prompt, combining the selected examples with the defect descriptions to be classified to form a dynamic Few-Shot Prompt containing domain knowledge guidance; Step S7: Call a large language model for defect recognition, using the large language model to infer the optimized Prompt and output the defect problem recognition result; Step S8: Standardize the classification output, standardizing the recognition result through the defect classification mapping dictionary and outputting the final classification result.

2. The intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning as described in claim 1, characterized in that: In step S3, the semantic vectorization process uses a pre-trained semantic embedding model based on the Transformer architecture.

3. The intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning as described in claim 1, characterized in that, In step S4, the semantic similarity calculation uses the cosine similarity algorithm.

4. The intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning as described in claim 3, characterized in that, The cosine similarity algorithm includes: $$sim(\vec{v}_q,\vec{v}_e)=\frac{\vec{v}_q\cdot\vec{v}_e}{\|\vec{v}_q\| \times \|\vec{v}_e\|}$$;where $\vec{v}_q$ is the semantic vector describing the defect to be classified, and $\vec{v}_e$ is the semantic vector of an example in the example library.

5. The intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning as described in claim 1, characterized in that, The dynamic example selection algorithm in step S2 includes the following steps: Step S201, input the description text of the defect to be classified; Step S202, perform semantic vectorization on the description text to obtain the query vector; Step S203, obtain the pre-stored semantic vectors of all examples in the example library; Step S204, calculate the cosine similarity between the query vector and each example vector; Step S205, sort the similarity calculation results in descending order; Step S206, select the top K examples as the final selected Few-Shot examples; Step S207, output the Top-K most relevant examples.

6. The intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning as described in claim 1, characterized in that: The preset quantity in step S5 is between 3 and 5.

7. The intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning as described in claim 1, characterized in that, The defect classification mapping dictionary in step S2 covers nine major defect types: technical data defects, corrosion defects, crack defects, leakage defects, wear defects, material deterioration defects, safety accessory and instrument defects, manufacturing legacy defects, and other defects.

8. The intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning as described in claim 1, characterized in that: A hash-based caching mechanism is adopted, which uses a hash algorithm to generate cache keys and directly returns the cached result for the same question.

9. The intelligent classification method for inspection defects of pressure equipment based on dynamic Few-Shot learning as described in claim 1, characterized in that: The dynamic Few-Shot Prompt in step S6 also includes a classification rule specification, which includes defect identification logic and classification output format specifications. The defect identification logic includes identifying explicit defect descriptions and inferring defects from implicit information. The classification output format uses a unified format for output.

10. An intelligent classification system for inspection defects of pressure-bearing special equipment based on dynamic Few-Shot learning, characterized in that, include: The Defect Example Library module is used to store typical defect case data in the field of special equipment inspection. The semantic vectorization module is used to perform semantic vectorization processing on the input defect description to be classified; the dynamic example selection module is used to dynamically select a preset number of the most relevant examples from the example library based on semantic similarity; the Prompt construction module is used to combine the selected examples with the description to be classified to form a dynamic Few-Shot Prompt; and the large language model interface module is used to call the large language model for defect identification. The standardization classification module is used to standardize the recognition results through a classification mapping dictionary.